From e3c5327d8903cc80d12def20fe2864e532095365 Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 10 Sep 2024 09:49:25 +0330 Subject: [PATCH 01/17] fix: merge raw transaction methods to one rpc method --- www/grpc/buf/grpc-gateway.config.yaml | 13 +- www/grpc/gen/dart/blockchain.pb.dart | 1994 -- www/grpc/gen/dart/blockchain.pbenum.dart | 47 - www/grpc/gen/dart/blockchain.pbjson.dart | 415 - www/grpc/gen/dart/blockchain.pbserver.dart | 68 - www/grpc/gen/dart/network.pb.dart | 751 - www/grpc/gen/dart/network.pbenum.dart | 7 - www/grpc/gen/dart/network.pbjson.dart | 170 - www/grpc/gen/dart/network.pbserver.dart | 41 - www/grpc/gen/dart/transaction.pb.dart | 1513 - www/grpc/gen/dart/transaction.pbenum.dart | 49 - www/grpc/gen/dart/transaction.pbjson.dart | 290 - www/grpc/gen/dart/transaction.pbserver.dart | 56 - www/grpc/gen/dart/utils.pb.dart | 256 - www/grpc/gen/dart/utils.pbenum.dart | 7 - www/grpc/gen/dart/utils.pbjson.dart | 71 - www/grpc/gen/dart/utils.pbserver.dart | 41 - www/grpc/gen/dart/wallet.pb.dart | 1401 - www/grpc/gen/dart/wallet.pbenum.dart | 30 - www/grpc/gen/dart/wallet.pbjson.dart | 309 - www/grpc/gen/dart/wallet.pbserver.dart | 65 - www/grpc/gen/docs/grpc.md | 3280 -- www/grpc/gen/docs/json-rpc.md | 3186 -- www/grpc/gen/go/blockchain.cobra.pb.go | 493 - www/grpc/gen/go/blockchain.pb.go | 2658 -- www/grpc/gen/go/blockchain.pb.gw.go | 920 - www/grpc/gen/go/blockchain_grpc.pb.go | 524 - www/grpc/gen/go/blockchain_jgw.pb.go | 227 - www/grpc/gen/go/network.cobra.pb.go | 109 - www/grpc/gen/go/network.pb.go | 933 - www/grpc/gen/go/network.pb.gw.go | 242 - www/grpc/gen/go/network_grpc.pb.go | 154 - www/grpc/gen/go/network_jgw.pb.go | 74 - www/grpc/gen/go/transaction.cobra.pb.go | 347 - www/grpc/gen/go/transaction.pb.go | 1939 -- www/grpc/gen/go/transaction.pb.gw.go | 695 - www/grpc/gen/go/transaction_grpc.pb.go | 360 - www/grpc/gen/go/transaction_jgw.pb.go | 159 - www/grpc/gen/go/utils.cobra.pb.go | 114 - www/grpc/gen/go/utils.pb.go | 394 - www/grpc/gen/go/utils.pb.gw.go | 260 - www/grpc/gen/go/utils_grpc.pb.go | 156 - www/grpc/gen/go/utils_jgw.pb.go | 74 - www/grpc/gen/go/wallet.cobra.pb.go | 467 - www/grpc/gen/go/wallet.pb.go | 1919 -- www/grpc/gen/go/wallet.pb.gw.go | 869 - www/grpc/gen/go/wallet_grpc.pb.go | 478 - www/grpc/gen/go/wallet_jgw.pb.go | 210 - .../pactus/blockchain/BlockchainGrpc.java | 1183 - .../blockchain/BlockchainOuterClass.java | 25014 ---------------- .../gen/java/pactus/network/NetworkGrpc.java | 389 - .../pactus/network/NetworkOuterClass.java | 10189 ------- .../pactus/transaction/TransactionGrpc.java | 832 - .../transaction/TransactionOuterClass.java | 17403 ----------- www/grpc/gen/java/pactus/utils/UtilsGrpc.java | 394 - .../java/pactus/utils/UtilsOuterClass.java | 2927 -- .../gen/java/pactus/wallet/WalletGrpc.java | 1081 - .../java/pactus/wallet/WalletOuterClass.java | 17689 ----------- www/grpc/gen/js/blockchain_grpc_pb.js | 381 - www/grpc/gen/js/blockchain_pb.js | 6046 ---- www/grpc/gen/js/network_grpc_pb.js | 80 - www/grpc/gen/js/network_pb.js | 2193 -- www/grpc/gen/js/transaction_grpc_pb.js | 220 - www/grpc/gen/js/transaction_pb.js | 4136 --- www/grpc/gen/js/utils_grpc_pb.js | 81 - www/grpc/gen/js/utils_pb.js | 722 - www/grpc/gen/js/wallet_grpc_pb.js | 354 - www/grpc/gen/js/wallet_pb.js | 4092 --- www/grpc/gen/python/blockchain_pb2.py | 87 - www/grpc/gen/python/blockchain_pb2.pyi | 290 - www/grpc/gen/python/blockchain_pb2_grpc.py | 415 - www/grpc/gen/python/network_pb2.py | 54 - www/grpc/gen/python/network_pb2.pyi | 142 - www/grpc/gen/python/network_pb2_grpc.py | 104 - www/grpc/gen/python/transaction_pb2.py | 64 - www/grpc/gen/python/transaction_pb2.pyi | 219 - www/grpc/gen/python/transaction_pb2_grpc.py | 279 - www/grpc/gen/python/utils_pb2.py | 34 - www/grpc/gen/python/utils_pb2.pyi | 35 - www/grpc/gen/python/utils_pb2_grpc.py | 107 - www/grpc/gen/python/wallet_pb2.py | 73 - www/grpc/gen/python/wallet_pb2.pyi | 195 - www/grpc/gen/python/wallet_pb2_grpc.py | 377 - www/grpc/gen/rust/pactus.rs | 1281 - www/grpc/gen/rust/pactus.serde.rs | 10265 ------- www/grpc/gen/rust/pactus.tonic.rs | 3577 --- www/grpc/proto/transaction.proto | 79 +- www/grpc/swagger-ui/pactus.swagger.json | 264 +- www/grpc/transaction.go | 134 +- www/grpc/transaction_test.go | 62 +- 90 files changed, 255 insertions(+), 142123 deletions(-) delete mode 100644 www/grpc/gen/dart/blockchain.pb.dart delete mode 100644 www/grpc/gen/dart/blockchain.pbenum.dart delete mode 100644 www/grpc/gen/dart/blockchain.pbjson.dart delete mode 100644 www/grpc/gen/dart/blockchain.pbserver.dart delete mode 100644 www/grpc/gen/dart/network.pb.dart delete mode 100644 www/grpc/gen/dart/network.pbenum.dart delete mode 100644 www/grpc/gen/dart/network.pbjson.dart delete mode 100644 www/grpc/gen/dart/network.pbserver.dart delete mode 100644 www/grpc/gen/dart/transaction.pb.dart delete mode 100644 www/grpc/gen/dart/transaction.pbenum.dart delete mode 100644 www/grpc/gen/dart/transaction.pbjson.dart delete mode 100644 www/grpc/gen/dart/transaction.pbserver.dart delete mode 100644 www/grpc/gen/dart/utils.pb.dart delete mode 100644 www/grpc/gen/dart/utils.pbenum.dart delete mode 100644 www/grpc/gen/dart/utils.pbjson.dart delete mode 100644 www/grpc/gen/dart/utils.pbserver.dart delete mode 100644 www/grpc/gen/dart/wallet.pb.dart delete mode 100644 www/grpc/gen/dart/wallet.pbenum.dart delete mode 100644 www/grpc/gen/dart/wallet.pbjson.dart delete mode 100644 www/grpc/gen/dart/wallet.pbserver.dart delete mode 100644 www/grpc/gen/docs/grpc.md delete mode 100644 www/grpc/gen/docs/json-rpc.md delete mode 100644 www/grpc/gen/go/blockchain.cobra.pb.go delete mode 100644 www/grpc/gen/go/blockchain.pb.go delete mode 100644 www/grpc/gen/go/blockchain.pb.gw.go delete mode 100644 www/grpc/gen/go/blockchain_grpc.pb.go delete mode 100644 www/grpc/gen/go/blockchain_jgw.pb.go delete mode 100644 www/grpc/gen/go/network.cobra.pb.go delete mode 100644 www/grpc/gen/go/network.pb.go delete mode 100644 www/grpc/gen/go/network.pb.gw.go delete mode 100644 www/grpc/gen/go/network_grpc.pb.go delete mode 100644 www/grpc/gen/go/network_jgw.pb.go delete mode 100644 www/grpc/gen/go/transaction.cobra.pb.go delete mode 100644 www/grpc/gen/go/transaction.pb.go delete mode 100644 www/grpc/gen/go/transaction.pb.gw.go delete mode 100644 www/grpc/gen/go/transaction_grpc.pb.go delete mode 100644 www/grpc/gen/go/transaction_jgw.pb.go delete mode 100644 www/grpc/gen/go/utils.cobra.pb.go delete mode 100644 www/grpc/gen/go/utils.pb.go delete mode 100644 www/grpc/gen/go/utils.pb.gw.go delete mode 100644 www/grpc/gen/go/utils_grpc.pb.go delete mode 100644 www/grpc/gen/go/utils_jgw.pb.go delete mode 100644 www/grpc/gen/go/wallet.cobra.pb.go delete mode 100644 www/grpc/gen/go/wallet.pb.go delete mode 100644 www/grpc/gen/go/wallet.pb.gw.go delete mode 100644 www/grpc/gen/go/wallet_grpc.pb.go delete mode 100644 www/grpc/gen/go/wallet_jgw.pb.go delete mode 100644 www/grpc/gen/java/pactus/blockchain/BlockchainGrpc.java delete mode 100644 www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java delete mode 100644 www/grpc/gen/java/pactus/network/NetworkGrpc.java delete mode 100644 www/grpc/gen/java/pactus/network/NetworkOuterClass.java delete mode 100644 www/grpc/gen/java/pactus/transaction/TransactionGrpc.java delete mode 100644 www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java delete mode 100644 www/grpc/gen/java/pactus/utils/UtilsGrpc.java delete mode 100644 www/grpc/gen/java/pactus/utils/UtilsOuterClass.java delete mode 100644 www/grpc/gen/java/pactus/wallet/WalletGrpc.java delete mode 100644 www/grpc/gen/java/pactus/wallet/WalletOuterClass.java delete mode 100644 www/grpc/gen/js/blockchain_grpc_pb.js delete mode 100644 www/grpc/gen/js/blockchain_pb.js delete mode 100644 www/grpc/gen/js/network_grpc_pb.js delete mode 100644 www/grpc/gen/js/network_pb.js delete mode 100644 www/grpc/gen/js/transaction_grpc_pb.js delete mode 100644 www/grpc/gen/js/transaction_pb.js delete mode 100644 www/grpc/gen/js/utils_grpc_pb.js delete mode 100644 www/grpc/gen/js/utils_pb.js delete mode 100644 www/grpc/gen/js/wallet_grpc_pb.js delete mode 100644 www/grpc/gen/js/wallet_pb.js delete mode 100644 www/grpc/gen/python/blockchain_pb2.py delete mode 100644 www/grpc/gen/python/blockchain_pb2.pyi delete mode 100644 www/grpc/gen/python/blockchain_pb2_grpc.py delete mode 100644 www/grpc/gen/python/network_pb2.py delete mode 100644 www/grpc/gen/python/network_pb2.pyi delete mode 100644 www/grpc/gen/python/network_pb2_grpc.py delete mode 100644 www/grpc/gen/python/transaction_pb2.py delete mode 100644 www/grpc/gen/python/transaction_pb2.pyi delete mode 100644 www/grpc/gen/python/transaction_pb2_grpc.py delete mode 100644 www/grpc/gen/python/utils_pb2.py delete mode 100644 www/grpc/gen/python/utils_pb2.pyi delete mode 100644 www/grpc/gen/python/utils_pb2_grpc.py delete mode 100644 www/grpc/gen/python/wallet_pb2.py delete mode 100644 www/grpc/gen/python/wallet_pb2.pyi delete mode 100644 www/grpc/gen/python/wallet_pb2_grpc.py delete mode 100644 www/grpc/gen/rust/pactus.rs delete mode 100644 www/grpc/gen/rust/pactus.serde.rs delete mode 100644 www/grpc/gen/rust/pactus.tonic.rs diff --git a/www/grpc/buf/grpc-gateway.config.yaml b/www/grpc/buf/grpc-gateway.config.yaml index dae652890..cb52285f1 100644 --- a/www/grpc/buf/grpc-gateway.config.yaml +++ b/www/grpc/buf/grpc-gateway.config.yaml @@ -44,17 +44,8 @@ http: - selector: pactus.Transaction.CalculateFee get: "/pactus/transaction/calculate_fee" - - selector: pactus.Transaction.GetRawTransferTransaction - get: "/pactus/transaction/get_raw_transfer_transaction" - - - selector: pactus.Transaction.GetRawBondTransaction - get: "/pactus/transaction/get_raw_bond_transaction" - - - selector: pactus.Transaction.GetRawUnbondTransaction - get: "/pactus/transaction/get_raw_unbond_transaction" - - - selector: pactus.Transaction.GetRawWithdrawTransaction - get: "/pactus/transaction/get_raw_withdraw_transaction" + - selector: pactus.Transaction.GetRawTransaction + get: "/pactus/transaction/get_raw_transaction" # Network APIs - selector: pactus.Network.GetNetworkInfo diff --git a/www/grpc/gen/dart/blockchain.pb.dart b/www/grpc/gen/dart/blockchain.pb.dart deleted file mode 100644 index 32465c8d3..000000000 --- a/www/grpc/gen/dart/blockchain.pb.dart +++ /dev/null @@ -1,1994 +0,0 @@ -/// -// Generated code. Do not modify. -// source: blockchain.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:fixnum/fixnum.dart' as $fixnum; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'transaction.pb.dart' as $0; - -import 'blockchain.pbenum.dart'; -import 'transaction.pbenum.dart' as $0; - -export 'blockchain.pbenum.dart'; - -class GetAccountRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetAccountRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..hasRequiredFields = false - ; - - GetAccountRequest._() : super(); - factory GetAccountRequest({ - $core.String? address, - }) { - final _result = create(); - if (address != null) { - _result.address = address; - } - return _result; - } - factory GetAccountRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetAccountRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetAccountRequest clone() => GetAccountRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetAccountRequest copyWith(void Function(GetAccountRequest) updates) => super.copyWith((message) => updates(message as GetAccountRequest)) as GetAccountRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetAccountRequest create() => GetAccountRequest._(); - GetAccountRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetAccountRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetAccountRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get address => $_getSZ(0); - @$pb.TagNumber(1) - set address($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasAddress() => $_has(0); - @$pb.TagNumber(1) - void clearAddress() => clearField(1); -} - -class GetAccountResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetAccountResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'account', subBuilder: AccountInfo.create) - ..hasRequiredFields = false - ; - - GetAccountResponse._() : super(); - factory GetAccountResponse({ - AccountInfo? account, - }) { - final _result = create(); - if (account != null) { - _result.account = account; - } - return _result; - } - factory GetAccountResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetAccountResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetAccountResponse clone() => GetAccountResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetAccountResponse copyWith(void Function(GetAccountResponse) updates) => super.copyWith((message) => updates(message as GetAccountResponse)) as GetAccountResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetAccountResponse create() => GetAccountResponse._(); - GetAccountResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetAccountResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetAccountResponse? _defaultInstance; - - @$pb.TagNumber(1) - AccountInfo get account => $_getN(0); - @$pb.TagNumber(1) - set account(AccountInfo v) { setField(1, v); } - @$pb.TagNumber(1) - $core.bool hasAccount() => $_has(0); - @$pb.TagNumber(1) - void clearAccount() => clearField(1); - @$pb.TagNumber(1) - AccountInfo ensureAccount() => $_ensure(0); -} - -class GetValidatorAddressesRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorAddressesRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..hasRequiredFields = false - ; - - GetValidatorAddressesRequest._() : super(); - factory GetValidatorAddressesRequest() => create(); - factory GetValidatorAddressesRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetValidatorAddressesRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetValidatorAddressesRequest clone() => GetValidatorAddressesRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetValidatorAddressesRequest copyWith(void Function(GetValidatorAddressesRequest) updates) => super.copyWith((message) => updates(message as GetValidatorAddressesRequest)) as GetValidatorAddressesRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetValidatorAddressesRequest create() => GetValidatorAddressesRequest._(); - GetValidatorAddressesRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetValidatorAddressesRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetValidatorAddressesRequest? _defaultInstance; -} - -class GetValidatorAddressesResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorAddressesResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'addresses') - ..hasRequiredFields = false - ; - - GetValidatorAddressesResponse._() : super(); - factory GetValidatorAddressesResponse({ - $core.Iterable<$core.String>? addresses, - }) { - final _result = create(); - if (addresses != null) { - _result.addresses.addAll(addresses); - } - return _result; - } - factory GetValidatorAddressesResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetValidatorAddressesResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetValidatorAddressesResponse clone() => GetValidatorAddressesResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetValidatorAddressesResponse copyWith(void Function(GetValidatorAddressesResponse) updates) => super.copyWith((message) => updates(message as GetValidatorAddressesResponse)) as GetValidatorAddressesResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetValidatorAddressesResponse create() => GetValidatorAddressesResponse._(); - GetValidatorAddressesResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetValidatorAddressesResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetValidatorAddressesResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$core.String> get addresses => $_getList(0); -} - -class GetValidatorRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..hasRequiredFields = false - ; - - GetValidatorRequest._() : super(); - factory GetValidatorRequest({ - $core.String? address, - }) { - final _result = create(); - if (address != null) { - _result.address = address; - } - return _result; - } - factory GetValidatorRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetValidatorRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetValidatorRequest clone() => GetValidatorRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetValidatorRequest copyWith(void Function(GetValidatorRequest) updates) => super.copyWith((message) => updates(message as GetValidatorRequest)) as GetValidatorRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetValidatorRequest create() => GetValidatorRequest._(); - GetValidatorRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetValidatorRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetValidatorRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get address => $_getSZ(0); - @$pb.TagNumber(1) - set address($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasAddress() => $_has(0); - @$pb.TagNumber(1) - void clearAddress() => clearField(1); -} - -class GetValidatorByNumberRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorByNumberRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'number', $pb.PbFieldType.O3) - ..hasRequiredFields = false - ; - - GetValidatorByNumberRequest._() : super(); - factory GetValidatorByNumberRequest({ - $core.int? number, - }) { - final _result = create(); - if (number != null) { - _result.number = number; - } - return _result; - } - factory GetValidatorByNumberRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetValidatorByNumberRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetValidatorByNumberRequest clone() => GetValidatorByNumberRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetValidatorByNumberRequest copyWith(void Function(GetValidatorByNumberRequest) updates) => super.copyWith((message) => updates(message as GetValidatorByNumberRequest)) as GetValidatorByNumberRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetValidatorByNumberRequest create() => GetValidatorByNumberRequest._(); - GetValidatorByNumberRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetValidatorByNumberRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetValidatorByNumberRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get number => $_getIZ(0); - @$pb.TagNumber(1) - set number($core.int v) { $_setSignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasNumber() => $_has(0); - @$pb.TagNumber(1) - void clearNumber() => clearField(1); -} - -class GetValidatorResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validator', subBuilder: ValidatorInfo.create) - ..hasRequiredFields = false - ; - - GetValidatorResponse._() : super(); - factory GetValidatorResponse({ - ValidatorInfo? validator, - }) { - final _result = create(); - if (validator != null) { - _result.validator = validator; - } - return _result; - } - factory GetValidatorResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetValidatorResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetValidatorResponse clone() => GetValidatorResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetValidatorResponse copyWith(void Function(GetValidatorResponse) updates) => super.copyWith((message) => updates(message as GetValidatorResponse)) as GetValidatorResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetValidatorResponse create() => GetValidatorResponse._(); - GetValidatorResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetValidatorResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetValidatorResponse? _defaultInstance; - - @$pb.TagNumber(1) - ValidatorInfo get validator => $_getN(0); - @$pb.TagNumber(1) - set validator(ValidatorInfo v) { setField(1, v); } - @$pb.TagNumber(1) - $core.bool hasValidator() => $_has(0); - @$pb.TagNumber(1) - void clearValidator() => clearField(1); - @$pb.TagNumber(1) - ValidatorInfo ensureValidator() => $_ensure(0); -} - -class GetPublicKeyRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPublicKeyRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..hasRequiredFields = false - ; - - GetPublicKeyRequest._() : super(); - factory GetPublicKeyRequest({ - $core.String? address, - }) { - final _result = create(); - if (address != null) { - _result.address = address; - } - return _result; - } - factory GetPublicKeyRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetPublicKeyRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPublicKeyRequest clone() => GetPublicKeyRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPublicKeyRequest copyWith(void Function(GetPublicKeyRequest) updates) => super.copyWith((message) => updates(message as GetPublicKeyRequest)) as GetPublicKeyRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPublicKeyRequest create() => GetPublicKeyRequest._(); - GetPublicKeyRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetPublicKeyRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetPublicKeyRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get address => $_getSZ(0); - @$pb.TagNumber(1) - set address($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasAddress() => $_has(0); - @$pb.TagNumber(1) - void clearAddress() => clearField(1); -} - -class GetPublicKeyResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPublicKeyResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') - ..hasRequiredFields = false - ; - - GetPublicKeyResponse._() : super(); - factory GetPublicKeyResponse({ - $core.String? publicKey, - }) { - final _result = create(); - if (publicKey != null) { - _result.publicKey = publicKey; - } - return _result; - } - factory GetPublicKeyResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetPublicKeyResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetPublicKeyResponse clone() => GetPublicKeyResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetPublicKeyResponse copyWith(void Function(GetPublicKeyResponse) updates) => super.copyWith((message) => updates(message as GetPublicKeyResponse)) as GetPublicKeyResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetPublicKeyResponse create() => GetPublicKeyResponse._(); - GetPublicKeyResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetPublicKeyResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetPublicKeyResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get publicKey => $_getSZ(0); - @$pb.TagNumber(1) - set publicKey($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasPublicKey() => $_has(0); - @$pb.TagNumber(1) - void clearPublicKey() => clearField(1); -} - -class GetBlockRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) - ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'verbosity', $pb.PbFieldType.OE, defaultOrMaker: BlockVerbosity.BLOCK_DATA, valueOf: BlockVerbosity.valueOf, enumValues: BlockVerbosity.values) - ..hasRequiredFields = false - ; - - GetBlockRequest._() : super(); - factory GetBlockRequest({ - $core.int? height, - BlockVerbosity? verbosity, - }) { - final _result = create(); - if (height != null) { - _result.height = height; - } - if (verbosity != null) { - _result.verbosity = verbosity; - } - return _result; - } - factory GetBlockRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetBlockRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetBlockRequest clone() => GetBlockRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetBlockRequest copyWith(void Function(GetBlockRequest) updates) => super.copyWith((message) => updates(message as GetBlockRequest)) as GetBlockRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetBlockRequest create() => GetBlockRequest._(); - GetBlockRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetBlockRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetBlockRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get height => $_getIZ(0); - @$pb.TagNumber(1) - set height($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasHeight() => $_has(0); - @$pb.TagNumber(1) - void clearHeight() => clearField(1); - - @$pb.TagNumber(2) - BlockVerbosity get verbosity => $_getN(1); - @$pb.TagNumber(2) - set verbosity(BlockVerbosity v) { setField(2, v); } - @$pb.TagNumber(2) - $core.bool hasVerbosity() => $_has(1); - @$pb.TagNumber(2) - void clearVerbosity() => clearField(2); -} - -class GetBlockResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'data') - ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockTime', $pb.PbFieldType.OU3) - ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'header', subBuilder: BlockHeaderInfo.create) - ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'prevCert', subBuilder: CertificateInfo.create) - ..pc<$0.TransactionInfo>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'txs', $pb.PbFieldType.PM, subBuilder: $0.TransactionInfo.create) - ..hasRequiredFields = false - ; - - GetBlockResponse._() : super(); - factory GetBlockResponse({ - $core.int? height, - $core.String? hash, - $core.String? data, - $core.int? blockTime, - BlockHeaderInfo? header, - CertificateInfo? prevCert, - $core.Iterable<$0.TransactionInfo>? txs, - }) { - final _result = create(); - if (height != null) { - _result.height = height; - } - if (hash != null) { - _result.hash = hash; - } - if (data != null) { - _result.data = data; - } - if (blockTime != null) { - _result.blockTime = blockTime; - } - if (header != null) { - _result.header = header; - } - if (prevCert != null) { - _result.prevCert = prevCert; - } - if (txs != null) { - _result.txs.addAll(txs); - } - return _result; - } - factory GetBlockResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetBlockResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetBlockResponse clone() => GetBlockResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetBlockResponse copyWith(void Function(GetBlockResponse) updates) => super.copyWith((message) => updates(message as GetBlockResponse)) as GetBlockResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetBlockResponse create() => GetBlockResponse._(); - GetBlockResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetBlockResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetBlockResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get height => $_getIZ(0); - @$pb.TagNumber(1) - set height($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasHeight() => $_has(0); - @$pb.TagNumber(1) - void clearHeight() => clearField(1); - - @$pb.TagNumber(2) - $core.String get hash => $_getSZ(1); - @$pb.TagNumber(2) - set hash($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasHash() => $_has(1); - @$pb.TagNumber(2) - void clearHash() => clearField(2); - - @$pb.TagNumber(3) - $core.String get data => $_getSZ(2); - @$pb.TagNumber(3) - set data($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasData() => $_has(2); - @$pb.TagNumber(3) - void clearData() => clearField(3); - - @$pb.TagNumber(4) - $core.int get blockTime => $_getIZ(3); - @$pb.TagNumber(4) - set blockTime($core.int v) { $_setUnsignedInt32(3, v); } - @$pb.TagNumber(4) - $core.bool hasBlockTime() => $_has(3); - @$pb.TagNumber(4) - void clearBlockTime() => clearField(4); - - @$pb.TagNumber(5) - BlockHeaderInfo get header => $_getN(4); - @$pb.TagNumber(5) - set header(BlockHeaderInfo v) { setField(5, v); } - @$pb.TagNumber(5) - $core.bool hasHeader() => $_has(4); - @$pb.TagNumber(5) - void clearHeader() => clearField(5); - @$pb.TagNumber(5) - BlockHeaderInfo ensureHeader() => $_ensure(4); - - @$pb.TagNumber(6) - CertificateInfo get prevCert => $_getN(5); - @$pb.TagNumber(6) - set prevCert(CertificateInfo v) { setField(6, v); } - @$pb.TagNumber(6) - $core.bool hasPrevCert() => $_has(5); - @$pb.TagNumber(6) - void clearPrevCert() => clearField(6); - @$pb.TagNumber(6) - CertificateInfo ensurePrevCert() => $_ensure(5); - - @$pb.TagNumber(7) - $core.List<$0.TransactionInfo> get txs => $_getList(6); -} - -class GetBlockHashRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockHashRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) - ..hasRequiredFields = false - ; - - GetBlockHashRequest._() : super(); - factory GetBlockHashRequest({ - $core.int? height, - }) { - final _result = create(); - if (height != null) { - _result.height = height; - } - return _result; - } - factory GetBlockHashRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetBlockHashRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetBlockHashRequest clone() => GetBlockHashRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetBlockHashRequest copyWith(void Function(GetBlockHashRequest) updates) => super.copyWith((message) => updates(message as GetBlockHashRequest)) as GetBlockHashRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetBlockHashRequest create() => GetBlockHashRequest._(); - GetBlockHashRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetBlockHashRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetBlockHashRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get height => $_getIZ(0); - @$pb.TagNumber(1) - set height($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasHeight() => $_has(0); - @$pb.TagNumber(1) - void clearHeight() => clearField(1); -} - -class GetBlockHashResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockHashResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') - ..hasRequiredFields = false - ; - - GetBlockHashResponse._() : super(); - factory GetBlockHashResponse({ - $core.String? hash, - }) { - final _result = create(); - if (hash != null) { - _result.hash = hash; - } - return _result; - } - factory GetBlockHashResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetBlockHashResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetBlockHashResponse clone() => GetBlockHashResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetBlockHashResponse copyWith(void Function(GetBlockHashResponse) updates) => super.copyWith((message) => updates(message as GetBlockHashResponse)) as GetBlockHashResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetBlockHashResponse create() => GetBlockHashResponse._(); - GetBlockHashResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetBlockHashResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetBlockHashResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get hash => $_getSZ(0); - @$pb.TagNumber(1) - set hash($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasHash() => $_has(0); - @$pb.TagNumber(1) - void clearHash() => clearField(1); -} - -class GetBlockHeightRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockHeightRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') - ..hasRequiredFields = false - ; - - GetBlockHeightRequest._() : super(); - factory GetBlockHeightRequest({ - $core.String? hash, - }) { - final _result = create(); - if (hash != null) { - _result.hash = hash; - } - return _result; - } - factory GetBlockHeightRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetBlockHeightRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetBlockHeightRequest clone() => GetBlockHeightRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetBlockHeightRequest copyWith(void Function(GetBlockHeightRequest) updates) => super.copyWith((message) => updates(message as GetBlockHeightRequest)) as GetBlockHeightRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetBlockHeightRequest create() => GetBlockHeightRequest._(); - GetBlockHeightRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetBlockHeightRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetBlockHeightRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get hash => $_getSZ(0); - @$pb.TagNumber(1) - set hash($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasHash() => $_has(0); - @$pb.TagNumber(1) - void clearHash() => clearField(1); -} - -class GetBlockHeightResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockHeightResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) - ..hasRequiredFields = false - ; - - GetBlockHeightResponse._() : super(); - factory GetBlockHeightResponse({ - $core.int? height, - }) { - final _result = create(); - if (height != null) { - _result.height = height; - } - return _result; - } - factory GetBlockHeightResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetBlockHeightResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetBlockHeightResponse clone() => GetBlockHeightResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetBlockHeightResponse copyWith(void Function(GetBlockHeightResponse) updates) => super.copyWith((message) => updates(message as GetBlockHeightResponse)) as GetBlockHeightResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetBlockHeightResponse create() => GetBlockHeightResponse._(); - GetBlockHeightResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetBlockHeightResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetBlockHeightResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get height => $_getIZ(0); - @$pb.TagNumber(1) - set height($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasHeight() => $_has(0); - @$pb.TagNumber(1) - void clearHeight() => clearField(1); -} - -class GetBlockchainInfoRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockchainInfoRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..hasRequiredFields = false - ; - - GetBlockchainInfoRequest._() : super(); - factory GetBlockchainInfoRequest() => create(); - factory GetBlockchainInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetBlockchainInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetBlockchainInfoRequest clone() => GetBlockchainInfoRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetBlockchainInfoRequest copyWith(void Function(GetBlockchainInfoRequest) updates) => super.copyWith((message) => updates(message as GetBlockchainInfoRequest)) as GetBlockchainInfoRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetBlockchainInfoRequest create() => GetBlockchainInfoRequest._(); - GetBlockchainInfoRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetBlockchainInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetBlockchainInfoRequest? _defaultInstance; -} - -class GetBlockchainInfoResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockchainInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastBlockHeight', $pb.PbFieldType.OU3) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastBlockHash') - ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalAccounts', $pb.PbFieldType.O3) - ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalValidators', $pb.PbFieldType.O3) - ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalPower') - ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'committeePower') - ..pc(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'committeeValidators', $pb.PbFieldType.PM, subBuilder: ValidatorInfo.create) - ..aOB(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isPruned') - ..a<$core.int>(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pruningHeight', $pb.PbFieldType.OU3) - ..aInt64(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastBlockTime') - ..hasRequiredFields = false - ; - - GetBlockchainInfoResponse._() : super(); - factory GetBlockchainInfoResponse({ - $core.int? lastBlockHeight, - $core.String? lastBlockHash, - $core.int? totalAccounts, - $core.int? totalValidators, - $fixnum.Int64? totalPower, - $fixnum.Int64? committeePower, - $core.Iterable? committeeValidators, - $core.bool? isPruned, - $core.int? pruningHeight, - $fixnum.Int64? lastBlockTime, - }) { - final _result = create(); - if (lastBlockHeight != null) { - _result.lastBlockHeight = lastBlockHeight; - } - if (lastBlockHash != null) { - _result.lastBlockHash = lastBlockHash; - } - if (totalAccounts != null) { - _result.totalAccounts = totalAccounts; - } - if (totalValidators != null) { - _result.totalValidators = totalValidators; - } - if (totalPower != null) { - _result.totalPower = totalPower; - } - if (committeePower != null) { - _result.committeePower = committeePower; - } - if (committeeValidators != null) { - _result.committeeValidators.addAll(committeeValidators); - } - if (isPruned != null) { - _result.isPruned = isPruned; - } - if (pruningHeight != null) { - _result.pruningHeight = pruningHeight; - } - if (lastBlockTime != null) { - _result.lastBlockTime = lastBlockTime; - } - return _result; - } - factory GetBlockchainInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetBlockchainInfoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetBlockchainInfoResponse clone() => GetBlockchainInfoResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetBlockchainInfoResponse copyWith(void Function(GetBlockchainInfoResponse) updates) => super.copyWith((message) => updates(message as GetBlockchainInfoResponse)) as GetBlockchainInfoResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetBlockchainInfoResponse create() => GetBlockchainInfoResponse._(); - GetBlockchainInfoResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetBlockchainInfoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetBlockchainInfoResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get lastBlockHeight => $_getIZ(0); - @$pb.TagNumber(1) - set lastBlockHeight($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasLastBlockHeight() => $_has(0); - @$pb.TagNumber(1) - void clearLastBlockHeight() => clearField(1); - - @$pb.TagNumber(2) - $core.String get lastBlockHash => $_getSZ(1); - @$pb.TagNumber(2) - set lastBlockHash($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasLastBlockHash() => $_has(1); - @$pb.TagNumber(2) - void clearLastBlockHash() => clearField(2); - - @$pb.TagNumber(3) - $core.int get totalAccounts => $_getIZ(2); - @$pb.TagNumber(3) - set totalAccounts($core.int v) { $_setSignedInt32(2, v); } - @$pb.TagNumber(3) - $core.bool hasTotalAccounts() => $_has(2); - @$pb.TagNumber(3) - void clearTotalAccounts() => clearField(3); - - @$pb.TagNumber(4) - $core.int get totalValidators => $_getIZ(3); - @$pb.TagNumber(4) - set totalValidators($core.int v) { $_setSignedInt32(3, v); } - @$pb.TagNumber(4) - $core.bool hasTotalValidators() => $_has(3); - @$pb.TagNumber(4) - void clearTotalValidators() => clearField(4); - - @$pb.TagNumber(5) - $fixnum.Int64 get totalPower => $_getI64(4); - @$pb.TagNumber(5) - set totalPower($fixnum.Int64 v) { $_setInt64(4, v); } - @$pb.TagNumber(5) - $core.bool hasTotalPower() => $_has(4); - @$pb.TagNumber(5) - void clearTotalPower() => clearField(5); - - @$pb.TagNumber(6) - $fixnum.Int64 get committeePower => $_getI64(5); - @$pb.TagNumber(6) - set committeePower($fixnum.Int64 v) { $_setInt64(5, v); } - @$pb.TagNumber(6) - $core.bool hasCommitteePower() => $_has(5); - @$pb.TagNumber(6) - void clearCommitteePower() => clearField(6); - - @$pb.TagNumber(7) - $core.List get committeeValidators => $_getList(6); - - @$pb.TagNumber(8) - $core.bool get isPruned => $_getBF(7); - @$pb.TagNumber(8) - set isPruned($core.bool v) { $_setBool(7, v); } - @$pb.TagNumber(8) - $core.bool hasIsPruned() => $_has(7); - @$pb.TagNumber(8) - void clearIsPruned() => clearField(8); - - @$pb.TagNumber(9) - $core.int get pruningHeight => $_getIZ(8); - @$pb.TagNumber(9) - set pruningHeight($core.int v) { $_setUnsignedInt32(8, v); } - @$pb.TagNumber(9) - $core.bool hasPruningHeight() => $_has(8); - @$pb.TagNumber(9) - void clearPruningHeight() => clearField(9); - - @$pb.TagNumber(10) - $fixnum.Int64 get lastBlockTime => $_getI64(9); - @$pb.TagNumber(10) - set lastBlockTime($fixnum.Int64 v) { $_setInt64(9, v); } - @$pb.TagNumber(10) - $core.bool hasLastBlockTime() => $_has(9); - @$pb.TagNumber(10) - void clearLastBlockTime() => clearField(10); -} - -class GetConsensusInfoRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetConsensusInfoRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..hasRequiredFields = false - ; - - GetConsensusInfoRequest._() : super(); - factory GetConsensusInfoRequest() => create(); - factory GetConsensusInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetConsensusInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetConsensusInfoRequest clone() => GetConsensusInfoRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetConsensusInfoRequest copyWith(void Function(GetConsensusInfoRequest) updates) => super.copyWith((message) => updates(message as GetConsensusInfoRequest)) as GetConsensusInfoRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetConsensusInfoRequest create() => GetConsensusInfoRequest._(); - GetConsensusInfoRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetConsensusInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetConsensusInfoRequest? _defaultInstance; -} - -class GetConsensusInfoResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetConsensusInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'proposal', subBuilder: Proposal.create) - ..pc(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'instances', $pb.PbFieldType.PM, subBuilder: ConsensusInfo.create) - ..hasRequiredFields = false - ; - - GetConsensusInfoResponse._() : super(); - factory GetConsensusInfoResponse({ - Proposal? proposal, - $core.Iterable? instances, - }) { - final _result = create(); - if (proposal != null) { - _result.proposal = proposal; - } - if (instances != null) { - _result.instances.addAll(instances); - } - return _result; - } - factory GetConsensusInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetConsensusInfoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetConsensusInfoResponse clone() => GetConsensusInfoResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetConsensusInfoResponse copyWith(void Function(GetConsensusInfoResponse) updates) => super.copyWith((message) => updates(message as GetConsensusInfoResponse)) as GetConsensusInfoResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetConsensusInfoResponse create() => GetConsensusInfoResponse._(); - GetConsensusInfoResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetConsensusInfoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetConsensusInfoResponse? _defaultInstance; - - @$pb.TagNumber(1) - Proposal get proposal => $_getN(0); - @$pb.TagNumber(1) - set proposal(Proposal v) { setField(1, v); } - @$pb.TagNumber(1) - $core.bool hasProposal() => $_has(0); - @$pb.TagNumber(1) - void clearProposal() => clearField(1); - @$pb.TagNumber(1) - Proposal ensureProposal() => $_ensure(0); - - @$pb.TagNumber(2) - $core.List get instances => $_getList(1); -} - -class GetTxPoolContentRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTxPoolContentRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..e<$0.PayloadType>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payloadType', $pb.PbFieldType.OE, defaultOrMaker: $0.PayloadType.UNKNOWN, valueOf: $0.PayloadType.valueOf, enumValues: $0.PayloadType.values) - ..hasRequiredFields = false - ; - - GetTxPoolContentRequest._() : super(); - factory GetTxPoolContentRequest({ - $0.PayloadType? payloadType, - }) { - final _result = create(); - if (payloadType != null) { - _result.payloadType = payloadType; - } - return _result; - } - factory GetTxPoolContentRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetTxPoolContentRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetTxPoolContentRequest clone() => GetTxPoolContentRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetTxPoolContentRequest copyWith(void Function(GetTxPoolContentRequest) updates) => super.copyWith((message) => updates(message as GetTxPoolContentRequest)) as GetTxPoolContentRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetTxPoolContentRequest create() => GetTxPoolContentRequest._(); - GetTxPoolContentRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetTxPoolContentRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetTxPoolContentRequest? _defaultInstance; - - @$pb.TagNumber(1) - $0.PayloadType get payloadType => $_getN(0); - @$pb.TagNumber(1) - set payloadType($0.PayloadType v) { setField(1, v); } - @$pb.TagNumber(1) - $core.bool hasPayloadType() => $_has(0); - @$pb.TagNumber(1) - void clearPayloadType() => clearField(1); -} - -class GetTxPoolContentResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTxPoolContentResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..pc<$0.TransactionInfo>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'txs', $pb.PbFieldType.PM, subBuilder: $0.TransactionInfo.create) - ..hasRequiredFields = false - ; - - GetTxPoolContentResponse._() : super(); - factory GetTxPoolContentResponse({ - $core.Iterable<$0.TransactionInfo>? txs, - }) { - final _result = create(); - if (txs != null) { - _result.txs.addAll(txs); - } - return _result; - } - factory GetTxPoolContentResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetTxPoolContentResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetTxPoolContentResponse clone() => GetTxPoolContentResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetTxPoolContentResponse copyWith(void Function(GetTxPoolContentResponse) updates) => super.copyWith((message) => updates(message as GetTxPoolContentResponse)) as GetTxPoolContentResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetTxPoolContentResponse create() => GetTxPoolContentResponse._(); - GetTxPoolContentResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetTxPoolContentResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetTxPoolContentResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$0.TransactionInfo> get txs => $_getList(0); -} - -class ValidatorInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ValidatorInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'data') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') - ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'number', $pb.PbFieldType.O3) - ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') - ..a<$core.int>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastBondingHeight', $pb.PbFieldType.OU3) - ..a<$core.int>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastSortitionHeight', $pb.PbFieldType.OU3) - ..a<$core.int>(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbondingHeight', $pb.PbFieldType.OU3) - ..aOS(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..a<$core.double>(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'availabilityScore', $pb.PbFieldType.OD) - ..hasRequiredFields = false - ; - - ValidatorInfo._() : super(); - factory ValidatorInfo({ - $core.String? hash, - $core.String? data, - $core.String? publicKey, - $core.int? number, - $fixnum.Int64? stake, - $core.int? lastBondingHeight, - $core.int? lastSortitionHeight, - $core.int? unbondingHeight, - $core.String? address, - $core.double? availabilityScore, - }) { - final _result = create(); - if (hash != null) { - _result.hash = hash; - } - if (data != null) { - _result.data = data; - } - if (publicKey != null) { - _result.publicKey = publicKey; - } - if (number != null) { - _result.number = number; - } - if (stake != null) { - _result.stake = stake; - } - if (lastBondingHeight != null) { - _result.lastBondingHeight = lastBondingHeight; - } - if (lastSortitionHeight != null) { - _result.lastSortitionHeight = lastSortitionHeight; - } - if (unbondingHeight != null) { - _result.unbondingHeight = unbondingHeight; - } - if (address != null) { - _result.address = address; - } - if (availabilityScore != null) { - _result.availabilityScore = availabilityScore; - } - return _result; - } - factory ValidatorInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory ValidatorInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ValidatorInfo clone() => ValidatorInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ValidatorInfo copyWith(void Function(ValidatorInfo) updates) => super.copyWith((message) => updates(message as ValidatorInfo)) as ValidatorInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static ValidatorInfo create() => ValidatorInfo._(); - ValidatorInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static ValidatorInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static ValidatorInfo? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get hash => $_getSZ(0); - @$pb.TagNumber(1) - set hash($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasHash() => $_has(0); - @$pb.TagNumber(1) - void clearHash() => clearField(1); - - @$pb.TagNumber(2) - $core.String get data => $_getSZ(1); - @$pb.TagNumber(2) - set data($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasData() => $_has(1); - @$pb.TagNumber(2) - void clearData() => clearField(2); - - @$pb.TagNumber(3) - $core.String get publicKey => $_getSZ(2); - @$pb.TagNumber(3) - set publicKey($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasPublicKey() => $_has(2); - @$pb.TagNumber(3) - void clearPublicKey() => clearField(3); - - @$pb.TagNumber(4) - $core.int get number => $_getIZ(3); - @$pb.TagNumber(4) - set number($core.int v) { $_setSignedInt32(3, v); } - @$pb.TagNumber(4) - $core.bool hasNumber() => $_has(3); - @$pb.TagNumber(4) - void clearNumber() => clearField(4); - - @$pb.TagNumber(5) - $fixnum.Int64 get stake => $_getI64(4); - @$pb.TagNumber(5) - set stake($fixnum.Int64 v) { $_setInt64(4, v); } - @$pb.TagNumber(5) - $core.bool hasStake() => $_has(4); - @$pb.TagNumber(5) - void clearStake() => clearField(5); - - @$pb.TagNumber(6) - $core.int get lastBondingHeight => $_getIZ(5); - @$pb.TagNumber(6) - set lastBondingHeight($core.int v) { $_setUnsignedInt32(5, v); } - @$pb.TagNumber(6) - $core.bool hasLastBondingHeight() => $_has(5); - @$pb.TagNumber(6) - void clearLastBondingHeight() => clearField(6); - - @$pb.TagNumber(7) - $core.int get lastSortitionHeight => $_getIZ(6); - @$pb.TagNumber(7) - set lastSortitionHeight($core.int v) { $_setUnsignedInt32(6, v); } - @$pb.TagNumber(7) - $core.bool hasLastSortitionHeight() => $_has(6); - @$pb.TagNumber(7) - void clearLastSortitionHeight() => clearField(7); - - @$pb.TagNumber(8) - $core.int get unbondingHeight => $_getIZ(7); - @$pb.TagNumber(8) - set unbondingHeight($core.int v) { $_setUnsignedInt32(7, v); } - @$pb.TagNumber(8) - $core.bool hasUnbondingHeight() => $_has(7); - @$pb.TagNumber(8) - void clearUnbondingHeight() => clearField(8); - - @$pb.TagNumber(9) - $core.String get address => $_getSZ(8); - @$pb.TagNumber(9) - set address($core.String v) { $_setString(8, v); } - @$pb.TagNumber(9) - $core.bool hasAddress() => $_has(8); - @$pb.TagNumber(9) - void clearAddress() => clearField(9); - - @$pb.TagNumber(10) - $core.double get availabilityScore => $_getN(9); - @$pb.TagNumber(10) - set availabilityScore($core.double v) { $_setDouble(9, v); } - @$pb.TagNumber(10) - $core.bool hasAvailabilityScore() => $_has(9); - @$pb.TagNumber(10) - void clearAvailabilityScore() => clearField(10); -} - -class AccountInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'AccountInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'data') - ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'number', $pb.PbFieldType.O3) - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'balance') - ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..hasRequiredFields = false - ; - - AccountInfo._() : super(); - factory AccountInfo({ - $core.String? hash, - $core.String? data, - $core.int? number, - $fixnum.Int64? balance, - $core.String? address, - }) { - final _result = create(); - if (hash != null) { - _result.hash = hash; - } - if (data != null) { - _result.data = data; - } - if (number != null) { - _result.number = number; - } - if (balance != null) { - _result.balance = balance; - } - if (address != null) { - _result.address = address; - } - return _result; - } - factory AccountInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory AccountInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - AccountInfo clone() => AccountInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - AccountInfo copyWith(void Function(AccountInfo) updates) => super.copyWith((message) => updates(message as AccountInfo)) as AccountInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static AccountInfo create() => AccountInfo._(); - AccountInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static AccountInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static AccountInfo? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get hash => $_getSZ(0); - @$pb.TagNumber(1) - set hash($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasHash() => $_has(0); - @$pb.TagNumber(1) - void clearHash() => clearField(1); - - @$pb.TagNumber(2) - $core.String get data => $_getSZ(1); - @$pb.TagNumber(2) - set data($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasData() => $_has(1); - @$pb.TagNumber(2) - void clearData() => clearField(2); - - @$pb.TagNumber(3) - $core.int get number => $_getIZ(2); - @$pb.TagNumber(3) - set number($core.int v) { $_setSignedInt32(2, v); } - @$pb.TagNumber(3) - $core.bool hasNumber() => $_has(2); - @$pb.TagNumber(3) - void clearNumber() => clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get balance => $_getI64(3); - @$pb.TagNumber(4) - set balance($fixnum.Int64 v) { $_setInt64(3, v); } - @$pb.TagNumber(4) - $core.bool hasBalance() => $_has(3); - @$pb.TagNumber(4) - void clearBalance() => clearField(4); - - @$pb.TagNumber(5) - $core.String get address => $_getSZ(4); - @$pb.TagNumber(5) - set address($core.String v) { $_setString(4, v); } - @$pb.TagNumber(5) - $core.bool hasAddress() => $_has(4); - @$pb.TagNumber(5) - void clearAddress() => clearField(5); -} - -class BlockHeaderInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BlockHeaderInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version', $pb.PbFieldType.O3) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'prevBlockHash') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stateRoot') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sortitionSeed') - ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'proposerAddress') - ..hasRequiredFields = false - ; - - BlockHeaderInfo._() : super(); - factory BlockHeaderInfo({ - $core.int? version, - $core.String? prevBlockHash, - $core.String? stateRoot, - $core.String? sortitionSeed, - $core.String? proposerAddress, - }) { - final _result = create(); - if (version != null) { - _result.version = version; - } - if (prevBlockHash != null) { - _result.prevBlockHash = prevBlockHash; - } - if (stateRoot != null) { - _result.stateRoot = stateRoot; - } - if (sortitionSeed != null) { - _result.sortitionSeed = sortitionSeed; - } - if (proposerAddress != null) { - _result.proposerAddress = proposerAddress; - } - return _result; - } - factory BlockHeaderInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory BlockHeaderInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - BlockHeaderInfo clone() => BlockHeaderInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - BlockHeaderInfo copyWith(void Function(BlockHeaderInfo) updates) => super.copyWith((message) => updates(message as BlockHeaderInfo)) as BlockHeaderInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static BlockHeaderInfo create() => BlockHeaderInfo._(); - BlockHeaderInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static BlockHeaderInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static BlockHeaderInfo? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get version => $_getIZ(0); - @$pb.TagNumber(1) - set version($core.int v) { $_setSignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasVersion() => $_has(0); - @$pb.TagNumber(1) - void clearVersion() => clearField(1); - - @$pb.TagNumber(2) - $core.String get prevBlockHash => $_getSZ(1); - @$pb.TagNumber(2) - set prevBlockHash($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasPrevBlockHash() => $_has(1); - @$pb.TagNumber(2) - void clearPrevBlockHash() => clearField(2); - - @$pb.TagNumber(3) - $core.String get stateRoot => $_getSZ(2); - @$pb.TagNumber(3) - set stateRoot($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasStateRoot() => $_has(2); - @$pb.TagNumber(3) - void clearStateRoot() => clearField(3); - - @$pb.TagNumber(4) - $core.String get sortitionSeed => $_getSZ(3); - @$pb.TagNumber(4) - set sortitionSeed($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasSortitionSeed() => $_has(3); - @$pb.TagNumber(4) - void clearSortitionSeed() => clearField(4); - - @$pb.TagNumber(5) - $core.String get proposerAddress => $_getSZ(4); - @$pb.TagNumber(5) - set proposerAddress($core.String v) { $_setString(4, v); } - @$pb.TagNumber(5) - $core.bool hasProposerAddress() => $_has(4); - @$pb.TagNumber(5) - void clearProposerAddress() => clearField(5); -} - -class CertificateInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CertificateInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') - ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'round', $pb.PbFieldType.O3) - ..p<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'committers', $pb.PbFieldType.K3) - ..p<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'absentees', $pb.PbFieldType.K3) - ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature') - ..hasRequiredFields = false - ; - - CertificateInfo._() : super(); - factory CertificateInfo({ - $core.String? hash, - $core.int? round, - $core.Iterable<$core.int>? committers, - $core.Iterable<$core.int>? absentees, - $core.String? signature, - }) { - final _result = create(); - if (hash != null) { - _result.hash = hash; - } - if (round != null) { - _result.round = round; - } - if (committers != null) { - _result.committers.addAll(committers); - } - if (absentees != null) { - _result.absentees.addAll(absentees); - } - if (signature != null) { - _result.signature = signature; - } - return _result; - } - factory CertificateInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CertificateInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CertificateInfo clone() => CertificateInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CertificateInfo copyWith(void Function(CertificateInfo) updates) => super.copyWith((message) => updates(message as CertificateInfo)) as CertificateInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static CertificateInfo create() => CertificateInfo._(); - CertificateInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static CertificateInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CertificateInfo? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get hash => $_getSZ(0); - @$pb.TagNumber(1) - set hash($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasHash() => $_has(0); - @$pb.TagNumber(1) - void clearHash() => clearField(1); - - @$pb.TagNumber(2) - $core.int get round => $_getIZ(1); - @$pb.TagNumber(2) - set round($core.int v) { $_setSignedInt32(1, v); } - @$pb.TagNumber(2) - $core.bool hasRound() => $_has(1); - @$pb.TagNumber(2) - void clearRound() => clearField(2); - - @$pb.TagNumber(3) - $core.List<$core.int> get committers => $_getList(2); - - @$pb.TagNumber(4) - $core.List<$core.int> get absentees => $_getList(3); - - @$pb.TagNumber(5) - $core.String get signature => $_getSZ(4); - @$pb.TagNumber(5) - set signature($core.String v) { $_setString(4, v); } - @$pb.TagNumber(5) - $core.bool hasSignature() => $_has(4); - @$pb.TagNumber(5) - void clearSignature() => clearField(5); -} - -class VoteInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'VoteInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: VoteType.VOTE_UNKNOWN, valueOf: VoteType.valueOf, enumValues: VoteType.values) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'voter') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockHash') - ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'round', $pb.PbFieldType.O3) - ..a<$core.int>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cpRound', $pb.PbFieldType.O3) - ..a<$core.int>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cpValue', $pb.PbFieldType.O3) - ..hasRequiredFields = false - ; - - VoteInfo._() : super(); - factory VoteInfo({ - VoteType? type, - $core.String? voter, - $core.String? blockHash, - $core.int? round, - $core.int? cpRound, - $core.int? cpValue, - }) { - final _result = create(); - if (type != null) { - _result.type = type; - } - if (voter != null) { - _result.voter = voter; - } - if (blockHash != null) { - _result.blockHash = blockHash; - } - if (round != null) { - _result.round = round; - } - if (cpRound != null) { - _result.cpRound = cpRound; - } - if (cpValue != null) { - _result.cpValue = cpValue; - } - return _result; - } - factory VoteInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory VoteInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - VoteInfo clone() => VoteInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - VoteInfo copyWith(void Function(VoteInfo) updates) => super.copyWith((message) => updates(message as VoteInfo)) as VoteInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static VoteInfo create() => VoteInfo._(); - VoteInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static VoteInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static VoteInfo? _defaultInstance; - - @$pb.TagNumber(1) - VoteType get type => $_getN(0); - @$pb.TagNumber(1) - set type(VoteType v) { setField(1, v); } - @$pb.TagNumber(1) - $core.bool hasType() => $_has(0); - @$pb.TagNumber(1) - void clearType() => clearField(1); - - @$pb.TagNumber(2) - $core.String get voter => $_getSZ(1); - @$pb.TagNumber(2) - set voter($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasVoter() => $_has(1); - @$pb.TagNumber(2) - void clearVoter() => clearField(2); - - @$pb.TagNumber(3) - $core.String get blockHash => $_getSZ(2); - @$pb.TagNumber(3) - set blockHash($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasBlockHash() => $_has(2); - @$pb.TagNumber(3) - void clearBlockHash() => clearField(3); - - @$pb.TagNumber(4) - $core.int get round => $_getIZ(3); - @$pb.TagNumber(4) - set round($core.int v) { $_setSignedInt32(3, v); } - @$pb.TagNumber(4) - $core.bool hasRound() => $_has(3); - @$pb.TagNumber(4) - void clearRound() => clearField(4); - - @$pb.TagNumber(5) - $core.int get cpRound => $_getIZ(4); - @$pb.TagNumber(5) - set cpRound($core.int v) { $_setSignedInt32(4, v); } - @$pb.TagNumber(5) - $core.bool hasCpRound() => $_has(4); - @$pb.TagNumber(5) - void clearCpRound() => clearField(5); - - @$pb.TagNumber(6) - $core.int get cpValue => $_getIZ(5); - @$pb.TagNumber(6) - set cpValue($core.int v) { $_setSignedInt32(5, v); } - @$pb.TagNumber(6) - $core.bool hasCpValue() => $_has(5); - @$pb.TagNumber(6) - void clearCpValue() => clearField(6); -} - -class ConsensusInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ConsensusInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..aOB(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'active') - ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) - ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'round', $pb.PbFieldType.O3) - ..pc(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'votes', $pb.PbFieldType.PM, subBuilder: VoteInfo.create) - ..hasRequiredFields = false - ; - - ConsensusInfo._() : super(); - factory ConsensusInfo({ - $core.String? address, - $core.bool? active, - $core.int? height, - $core.int? round, - $core.Iterable? votes, - }) { - final _result = create(); - if (address != null) { - _result.address = address; - } - if (active != null) { - _result.active = active; - } - if (height != null) { - _result.height = height; - } - if (round != null) { - _result.round = round; - } - if (votes != null) { - _result.votes.addAll(votes); - } - return _result; - } - factory ConsensusInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory ConsensusInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ConsensusInfo clone() => ConsensusInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ConsensusInfo copyWith(void Function(ConsensusInfo) updates) => super.copyWith((message) => updates(message as ConsensusInfo)) as ConsensusInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static ConsensusInfo create() => ConsensusInfo._(); - ConsensusInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static ConsensusInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static ConsensusInfo? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get address => $_getSZ(0); - @$pb.TagNumber(1) - set address($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasAddress() => $_has(0); - @$pb.TagNumber(1) - void clearAddress() => clearField(1); - - @$pb.TagNumber(2) - $core.bool get active => $_getBF(1); - @$pb.TagNumber(2) - set active($core.bool v) { $_setBool(1, v); } - @$pb.TagNumber(2) - $core.bool hasActive() => $_has(1); - @$pb.TagNumber(2) - void clearActive() => clearField(2); - - @$pb.TagNumber(3) - $core.int get height => $_getIZ(2); - @$pb.TagNumber(3) - set height($core.int v) { $_setUnsignedInt32(2, v); } - @$pb.TagNumber(3) - $core.bool hasHeight() => $_has(2); - @$pb.TagNumber(3) - void clearHeight() => clearField(3); - - @$pb.TagNumber(4) - $core.int get round => $_getIZ(3); - @$pb.TagNumber(4) - set round($core.int v) { $_setSignedInt32(3, v); } - @$pb.TagNumber(4) - $core.bool hasRound() => $_has(3); - @$pb.TagNumber(4) - void clearRound() => clearField(4); - - @$pb.TagNumber(5) - $core.List get votes => $_getList(4); -} - -class Proposal extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Proposal', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) - ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'round', $pb.PbFieldType.O3) - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockData') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signatureData') - ..hasRequiredFields = false - ; - - Proposal._() : super(); - factory Proposal({ - $core.int? height, - $core.int? round, - $core.String? blockData, - $core.String? signatureData, - }) { - final _result = create(); - if (height != null) { - _result.height = height; - } - if (round != null) { - _result.round = round; - } - if (blockData != null) { - _result.blockData = blockData; - } - if (signatureData != null) { - _result.signatureData = signatureData; - } - return _result; - } - factory Proposal.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory Proposal.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - Proposal clone() => Proposal()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - Proposal copyWith(void Function(Proposal) updates) => super.copyWith((message) => updates(message as Proposal)) as Proposal; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static Proposal create() => Proposal._(); - Proposal createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static Proposal getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Proposal? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get height => $_getIZ(0); - @$pb.TagNumber(1) - set height($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasHeight() => $_has(0); - @$pb.TagNumber(1) - void clearHeight() => clearField(1); - - @$pb.TagNumber(2) - $core.int get round => $_getIZ(1); - @$pb.TagNumber(2) - set round($core.int v) { $_setSignedInt32(1, v); } - @$pb.TagNumber(2) - $core.bool hasRound() => $_has(1); - @$pb.TagNumber(2) - void clearRound() => clearField(2); - - @$pb.TagNumber(3) - $core.String get blockData => $_getSZ(2); - @$pb.TagNumber(3) - set blockData($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasBlockData() => $_has(2); - @$pb.TagNumber(3) - void clearBlockData() => clearField(3); - - @$pb.TagNumber(4) - $core.String get signatureData => $_getSZ(3); - @$pb.TagNumber(4) - set signatureData($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasSignatureData() => $_has(3); - @$pb.TagNumber(4) - void clearSignatureData() => clearField(4); -} - -class BlockchainApi { - $pb.RpcClient _client; - BlockchainApi(this._client); - - $async.Future getBlock($pb.ClientContext? ctx, GetBlockRequest request) { - var emptyResponse = GetBlockResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetBlock', request, emptyResponse); - } - $async.Future getBlockHash($pb.ClientContext? ctx, GetBlockHashRequest request) { - var emptyResponse = GetBlockHashResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetBlockHash', request, emptyResponse); - } - $async.Future getBlockHeight($pb.ClientContext? ctx, GetBlockHeightRequest request) { - var emptyResponse = GetBlockHeightResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetBlockHeight', request, emptyResponse); - } - $async.Future getBlockchainInfo($pb.ClientContext? ctx, GetBlockchainInfoRequest request) { - var emptyResponse = GetBlockchainInfoResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetBlockchainInfo', request, emptyResponse); - } - $async.Future getConsensusInfo($pb.ClientContext? ctx, GetConsensusInfoRequest request) { - var emptyResponse = GetConsensusInfoResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetConsensusInfo', request, emptyResponse); - } - $async.Future getAccount($pb.ClientContext? ctx, GetAccountRequest request) { - var emptyResponse = GetAccountResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetAccount', request, emptyResponse); - } - $async.Future getValidator($pb.ClientContext? ctx, GetValidatorRequest request) { - var emptyResponse = GetValidatorResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetValidator', request, emptyResponse); - } - $async.Future getValidatorByNumber($pb.ClientContext? ctx, GetValidatorByNumberRequest request) { - var emptyResponse = GetValidatorResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetValidatorByNumber', request, emptyResponse); - } - $async.Future getValidatorAddresses($pb.ClientContext? ctx, GetValidatorAddressesRequest request) { - var emptyResponse = GetValidatorAddressesResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetValidatorAddresses', request, emptyResponse); - } - $async.Future getPublicKey($pb.ClientContext? ctx, GetPublicKeyRequest request) { - var emptyResponse = GetPublicKeyResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetPublicKey', request, emptyResponse); - } - $async.Future getTxPoolContent($pb.ClientContext? ctx, GetTxPoolContentRequest request) { - var emptyResponse = GetTxPoolContentResponse(); - return _client.invoke(ctx, 'Blockchain', 'GetTxPoolContent', request, emptyResponse); - } -} - diff --git a/www/grpc/gen/dart/blockchain.pbenum.dart b/www/grpc/gen/dart/blockchain.pbenum.dart deleted file mode 100644 index 0d609fd6f..000000000 --- a/www/grpc/gen/dart/blockchain.pbenum.dart +++ /dev/null @@ -1,47 +0,0 @@ -/// -// Generated code. Do not modify. -// source: blockchain.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -// ignore_for_file: UNDEFINED_SHOWN_NAME -import 'dart:core' as $core; -import 'package:protobuf/protobuf.dart' as $pb; - -class BlockVerbosity extends $pb.ProtobufEnum { - static const BlockVerbosity BLOCK_DATA = BlockVerbosity._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'BLOCK_DATA'); - static const BlockVerbosity BLOCK_INFO = BlockVerbosity._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'BLOCK_INFO'); - static const BlockVerbosity BLOCK_TRANSACTIONS = BlockVerbosity._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'BLOCK_TRANSACTIONS'); - - static const $core.List values = [ - BLOCK_DATA, - BLOCK_INFO, - BLOCK_TRANSACTIONS, - ]; - - static final $core.Map<$core.int, BlockVerbosity> _byValue = $pb.ProtobufEnum.initByValue(values); - static BlockVerbosity? valueOf($core.int value) => _byValue[value]; - - const BlockVerbosity._($core.int v, $core.String n) : super(v, n); -} - -class VoteType extends $pb.ProtobufEnum { - static const VoteType VOTE_UNKNOWN = VoteType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_UNKNOWN'); - static const VoteType VOTE_PREPARE = VoteType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_PREPARE'); - static const VoteType VOTE_PRECOMMIT = VoteType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_PRECOMMIT'); - static const VoteType VOTE_CHANGE_PROPOSER = VoteType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CHANGE_PROPOSER'); - - static const $core.List values = [ - VOTE_UNKNOWN, - VOTE_PREPARE, - VOTE_PRECOMMIT, - VOTE_CHANGE_PROPOSER, - ]; - - static final $core.Map<$core.int, VoteType> _byValue = $pb.ProtobufEnum.initByValue(values); - static VoteType? valueOf($core.int value) => _byValue[value]; - - const VoteType._($core.int v, $core.String n) : super(v, n); -} - diff --git a/www/grpc/gen/dart/blockchain.pbjson.dart b/www/grpc/gen/dart/blockchain.pbjson.dart deleted file mode 100644 index 4203fb851..000000000 --- a/www/grpc/gen/dart/blockchain.pbjson.dart +++ /dev/null @@ -1,415 +0,0 @@ -/// -// Generated code. Do not modify. -// source: blockchain.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:core' as $core; -import 'dart:convert' as $convert; -import 'dart:typed_data' as $typed_data; -import 'transaction.pbjson.dart' as $0; - -@$core.Deprecated('Use blockVerbosityDescriptor instead') -const BlockVerbosity$json = const { - '1': 'BlockVerbosity', - '2': const [ - const {'1': 'BLOCK_DATA', '2': 0}, - const {'1': 'BLOCK_INFO', '2': 1}, - const {'1': 'BLOCK_TRANSACTIONS', '2': 2}, - ], -}; - -/// Descriptor for `BlockVerbosity`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List blockVerbosityDescriptor = $convert.base64Decode('Cg5CbG9ja1ZlcmJvc2l0eRIOCgpCTE9DS19EQVRBEAASDgoKQkxPQ0tfSU5GTxABEhYKEkJMT0NLX1RSQU5TQUNUSU9OUxAC'); -@$core.Deprecated('Use voteTypeDescriptor instead') -const VoteType$json = const { - '1': 'VoteType', - '2': const [ - const {'1': 'VOTE_UNKNOWN', '2': 0}, - const {'1': 'VOTE_PREPARE', '2': 1}, - const {'1': 'VOTE_PRECOMMIT', '2': 2}, - const {'1': 'VOTE_CHANGE_PROPOSER', '2': 3}, - ], -}; - -/// Descriptor for `VoteType`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List voteTypeDescriptor = $convert.base64Decode('CghWb3RlVHlwZRIQCgxWT1RFX1VOS05PV04QABIQCgxWT1RFX1BSRVBBUkUQARISCg5WT1RFX1BSRUNPTU1JVBACEhgKFFZPVEVfQ0hBTkdFX1BST1BPU0VSEAM='); -@$core.Deprecated('Use getAccountRequestDescriptor instead') -const GetAccountRequest$json = const { - '1': 'GetAccountRequest', - '2': const [ - const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, - ], -}; - -/// Descriptor for `GetAccountRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getAccountRequestDescriptor = $convert.base64Decode('ChFHZXRBY2NvdW50UmVxdWVzdBIYCgdhZGRyZXNzGAEgASgJUgdhZGRyZXNz'); -@$core.Deprecated('Use getAccountResponseDescriptor instead') -const GetAccountResponse$json = const { - '1': 'GetAccountResponse', - '2': const [ - const {'1': 'account', '3': 1, '4': 1, '5': 11, '6': '.pactus.AccountInfo', '10': 'account'}, - ], -}; - -/// Descriptor for `GetAccountResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getAccountResponseDescriptor = $convert.base64Decode('ChJHZXRBY2NvdW50UmVzcG9uc2USLQoHYWNjb3VudBgBIAEoCzITLnBhY3R1cy5BY2NvdW50SW5mb1IHYWNjb3VudA=='); -@$core.Deprecated('Use getValidatorAddressesRequestDescriptor instead') -const GetValidatorAddressesRequest$json = const { - '1': 'GetValidatorAddressesRequest', -}; - -/// Descriptor for `GetValidatorAddressesRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getValidatorAddressesRequestDescriptor = $convert.base64Decode('ChxHZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXF1ZXN0'); -@$core.Deprecated('Use getValidatorAddressesResponseDescriptor instead') -const GetValidatorAddressesResponse$json = const { - '1': 'GetValidatorAddressesResponse', - '2': const [ - const {'1': 'addresses', '3': 1, '4': 3, '5': 9, '10': 'addresses'}, - ], -}; - -/// Descriptor for `GetValidatorAddressesResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getValidatorAddressesResponseDescriptor = $convert.base64Decode('Ch1HZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXNwb25zZRIcCglhZGRyZXNzZXMYASADKAlSCWFkZHJlc3Nlcw=='); -@$core.Deprecated('Use getValidatorRequestDescriptor instead') -const GetValidatorRequest$json = const { - '1': 'GetValidatorRequest', - '2': const [ - const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, - ], -}; - -/// Descriptor for `GetValidatorRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getValidatorRequestDescriptor = $convert.base64Decode('ChNHZXRWYWxpZGF0b3JSZXF1ZXN0EhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3M='); -@$core.Deprecated('Use getValidatorByNumberRequestDescriptor instead') -const GetValidatorByNumberRequest$json = const { - '1': 'GetValidatorByNumberRequest', - '2': const [ - const {'1': 'number', '3': 1, '4': 1, '5': 5, '10': 'number'}, - ], -}; - -/// Descriptor for `GetValidatorByNumberRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getValidatorByNumberRequestDescriptor = $convert.base64Decode('ChtHZXRWYWxpZGF0b3JCeU51bWJlclJlcXVlc3QSFgoGbnVtYmVyGAEgASgFUgZudW1iZXI='); -@$core.Deprecated('Use getValidatorResponseDescriptor instead') -const GetValidatorResponse$json = const { - '1': 'GetValidatorResponse', - '2': const [ - const {'1': 'validator', '3': 1, '4': 1, '5': 11, '6': '.pactus.ValidatorInfo', '10': 'validator'}, - ], -}; - -/// Descriptor for `GetValidatorResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getValidatorResponseDescriptor = $convert.base64Decode('ChRHZXRWYWxpZGF0b3JSZXNwb25zZRIzCgl2YWxpZGF0b3IYASABKAsyFS5wYWN0dXMuVmFsaWRhdG9ySW5mb1IJdmFsaWRhdG9y'); -@$core.Deprecated('Use getPublicKeyRequestDescriptor instead') -const GetPublicKeyRequest$json = const { - '1': 'GetPublicKeyRequest', - '2': const [ - const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, - ], -}; - -/// Descriptor for `GetPublicKeyRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getPublicKeyRequestDescriptor = $convert.base64Decode('ChNHZXRQdWJsaWNLZXlSZXF1ZXN0EhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3M='); -@$core.Deprecated('Use getPublicKeyResponseDescriptor instead') -const GetPublicKeyResponse$json = const { - '1': 'GetPublicKeyResponse', - '2': const [ - const {'1': 'public_key', '3': 1, '4': 1, '5': 9, '10': 'publicKey'}, - ], -}; - -/// Descriptor for `GetPublicKeyResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getPublicKeyResponseDescriptor = $convert.base64Decode('ChRHZXRQdWJsaWNLZXlSZXNwb25zZRIdCgpwdWJsaWNfa2V5GAEgASgJUglwdWJsaWNLZXk='); -@$core.Deprecated('Use getBlockRequestDescriptor instead') -const GetBlockRequest$json = const { - '1': 'GetBlockRequest', - '2': const [ - const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, - const {'1': 'verbosity', '3': 2, '4': 1, '5': 14, '6': '.pactus.BlockVerbosity', '10': 'verbosity'}, - ], -}; - -/// Descriptor for `GetBlockRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getBlockRequestDescriptor = $convert.base64Decode('Cg9HZXRCbG9ja1JlcXVlc3QSFgoGaGVpZ2h0GAEgASgNUgZoZWlnaHQSNAoJdmVyYm9zaXR5GAIgASgOMhYucGFjdHVzLkJsb2NrVmVyYm9zaXR5Ugl2ZXJib3NpdHk='); -@$core.Deprecated('Use getBlockResponseDescriptor instead') -const GetBlockResponse$json = const { - '1': 'GetBlockResponse', - '2': const [ - const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, - const {'1': 'hash', '3': 2, '4': 1, '5': 9, '10': 'hash'}, - const {'1': 'data', '3': 3, '4': 1, '5': 9, '10': 'data'}, - const {'1': 'block_time', '3': 4, '4': 1, '5': 13, '10': 'blockTime'}, - const {'1': 'header', '3': 5, '4': 1, '5': 11, '6': '.pactus.BlockHeaderInfo', '10': 'header'}, - const {'1': 'prev_cert', '3': 6, '4': 1, '5': 11, '6': '.pactus.CertificateInfo', '10': 'prevCert'}, - const {'1': 'txs', '3': 7, '4': 3, '5': 11, '6': '.pactus.TransactionInfo', '10': 'txs'}, - ], -}; - -/// Descriptor for `GetBlockResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getBlockResponseDescriptor = $convert.base64Decode('ChBHZXRCbG9ja1Jlc3BvbnNlEhYKBmhlaWdodBgBIAEoDVIGaGVpZ2h0EhIKBGhhc2gYAiABKAlSBGhhc2gSEgoEZGF0YRgDIAEoCVIEZGF0YRIdCgpibG9ja190aW1lGAQgASgNUglibG9ja1RpbWUSLwoGaGVhZGVyGAUgASgLMhcucGFjdHVzLkJsb2NrSGVhZGVySW5mb1IGaGVhZGVyEjQKCXByZXZfY2VydBgGIAEoCzIXLnBhY3R1cy5DZXJ0aWZpY2F0ZUluZm9SCHByZXZDZXJ0EikKA3R4cxgHIAMoCzIXLnBhY3R1cy5UcmFuc2FjdGlvbkluZm9SA3R4cw=='); -@$core.Deprecated('Use getBlockHashRequestDescriptor instead') -const GetBlockHashRequest$json = const { - '1': 'GetBlockHashRequest', - '2': const [ - const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, - ], -}; - -/// Descriptor for `GetBlockHashRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getBlockHashRequestDescriptor = $convert.base64Decode('ChNHZXRCbG9ja0hhc2hSZXF1ZXN0EhYKBmhlaWdodBgBIAEoDVIGaGVpZ2h0'); -@$core.Deprecated('Use getBlockHashResponseDescriptor instead') -const GetBlockHashResponse$json = const { - '1': 'GetBlockHashResponse', - '2': const [ - const {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'}, - ], -}; - -/// Descriptor for `GetBlockHashResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getBlockHashResponseDescriptor = $convert.base64Decode('ChRHZXRCbG9ja0hhc2hSZXNwb25zZRISCgRoYXNoGAEgASgJUgRoYXNo'); -@$core.Deprecated('Use getBlockHeightRequestDescriptor instead') -const GetBlockHeightRequest$json = const { - '1': 'GetBlockHeightRequest', - '2': const [ - const {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'}, - ], -}; - -/// Descriptor for `GetBlockHeightRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getBlockHeightRequestDescriptor = $convert.base64Decode('ChVHZXRCbG9ja0hlaWdodFJlcXVlc3QSEgoEaGFzaBgBIAEoCVIEaGFzaA=='); -@$core.Deprecated('Use getBlockHeightResponseDescriptor instead') -const GetBlockHeightResponse$json = const { - '1': 'GetBlockHeightResponse', - '2': const [ - const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, - ], -}; - -/// Descriptor for `GetBlockHeightResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getBlockHeightResponseDescriptor = $convert.base64Decode('ChZHZXRCbG9ja0hlaWdodFJlc3BvbnNlEhYKBmhlaWdodBgBIAEoDVIGaGVpZ2h0'); -@$core.Deprecated('Use getBlockchainInfoRequestDescriptor instead') -const GetBlockchainInfoRequest$json = const { - '1': 'GetBlockchainInfoRequest', -}; - -/// Descriptor for `GetBlockchainInfoRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getBlockchainInfoRequestDescriptor = $convert.base64Decode('ChhHZXRCbG9ja2NoYWluSW5mb1JlcXVlc3Q='); -@$core.Deprecated('Use getBlockchainInfoResponseDescriptor instead') -const GetBlockchainInfoResponse$json = const { - '1': 'GetBlockchainInfoResponse', - '2': const [ - const {'1': 'last_block_height', '3': 1, '4': 1, '5': 13, '10': 'lastBlockHeight'}, - const {'1': 'last_block_hash', '3': 2, '4': 1, '5': 9, '10': 'lastBlockHash'}, - const {'1': 'total_accounts', '3': 3, '4': 1, '5': 5, '10': 'totalAccounts'}, - const {'1': 'total_validators', '3': 4, '4': 1, '5': 5, '10': 'totalValidators'}, - const {'1': 'total_power', '3': 5, '4': 1, '5': 3, '10': 'totalPower'}, - const {'1': 'committee_power', '3': 6, '4': 1, '5': 3, '10': 'committeePower'}, - const {'1': 'committee_validators', '3': 7, '4': 3, '5': 11, '6': '.pactus.ValidatorInfo', '10': 'committeeValidators'}, - const {'1': 'is_pruned', '3': 8, '4': 1, '5': 8, '10': 'isPruned'}, - const {'1': 'pruning_height', '3': 9, '4': 1, '5': 13, '10': 'pruningHeight'}, - const {'1': 'last_block_time', '3': 10, '4': 1, '5': 3, '10': 'lastBlockTime'}, - ], -}; - -/// Descriptor for `GetBlockchainInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getBlockchainInfoResponseDescriptor = $convert.base64Decode('ChlHZXRCbG9ja2NoYWluSW5mb1Jlc3BvbnNlEioKEWxhc3RfYmxvY2tfaGVpZ2h0GAEgASgNUg9sYXN0QmxvY2tIZWlnaHQSJgoPbGFzdF9ibG9ja19oYXNoGAIgASgJUg1sYXN0QmxvY2tIYXNoEiUKDnRvdGFsX2FjY291bnRzGAMgASgFUg10b3RhbEFjY291bnRzEikKEHRvdGFsX3ZhbGlkYXRvcnMYBCABKAVSD3RvdGFsVmFsaWRhdG9ycxIfCgt0b3RhbF9wb3dlchgFIAEoA1IKdG90YWxQb3dlchInCg9jb21taXR0ZWVfcG93ZXIYBiABKANSDmNvbW1pdHRlZVBvd2VyEkgKFGNvbW1pdHRlZV92YWxpZGF0b3JzGAcgAygLMhUucGFjdHVzLlZhbGlkYXRvckluZm9SE2NvbW1pdHRlZVZhbGlkYXRvcnMSGwoJaXNfcHJ1bmVkGAggASgIUghpc1BydW5lZBIlCg5wcnVuaW5nX2hlaWdodBgJIAEoDVINcHJ1bmluZ0hlaWdodBImCg9sYXN0X2Jsb2NrX3RpbWUYCiABKANSDWxhc3RCbG9ja1RpbWU='); -@$core.Deprecated('Use getConsensusInfoRequestDescriptor instead') -const GetConsensusInfoRequest$json = const { - '1': 'GetConsensusInfoRequest', -}; - -/// Descriptor for `GetConsensusInfoRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getConsensusInfoRequestDescriptor = $convert.base64Decode('ChdHZXRDb25zZW5zdXNJbmZvUmVxdWVzdA=='); -@$core.Deprecated('Use getConsensusInfoResponseDescriptor instead') -const GetConsensusInfoResponse$json = const { - '1': 'GetConsensusInfoResponse', - '2': const [ - const {'1': 'proposal', '3': 1, '4': 1, '5': 11, '6': '.pactus.Proposal', '10': 'proposal'}, - const {'1': 'instances', '3': 2, '4': 3, '5': 11, '6': '.pactus.ConsensusInfo', '10': 'instances'}, - ], -}; - -/// Descriptor for `GetConsensusInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getConsensusInfoResponseDescriptor = $convert.base64Decode('ChhHZXRDb25zZW5zdXNJbmZvUmVzcG9uc2USLAoIcHJvcG9zYWwYASABKAsyEC5wYWN0dXMuUHJvcG9zYWxSCHByb3Bvc2FsEjMKCWluc3RhbmNlcxgCIAMoCzIVLnBhY3R1cy5Db25zZW5zdXNJbmZvUglpbnN0YW5jZXM='); -@$core.Deprecated('Use getTxPoolContentRequestDescriptor instead') -const GetTxPoolContentRequest$json = const { - '1': 'GetTxPoolContentRequest', - '2': const [ - const {'1': 'payload_type', '3': 1, '4': 1, '5': 14, '6': '.pactus.PayloadType', '10': 'payloadType'}, - ], -}; - -/// Descriptor for `GetTxPoolContentRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getTxPoolContentRequestDescriptor = $convert.base64Decode('ChdHZXRUeFBvb2xDb250ZW50UmVxdWVzdBI2CgxwYXlsb2FkX3R5cGUYASABKA4yEy5wYWN0dXMuUGF5bG9hZFR5cGVSC3BheWxvYWRUeXBl'); -@$core.Deprecated('Use getTxPoolContentResponseDescriptor instead') -const GetTxPoolContentResponse$json = const { - '1': 'GetTxPoolContentResponse', - '2': const [ - const {'1': 'txs', '3': 1, '4': 3, '5': 11, '6': '.pactus.TransactionInfo', '10': 'txs'}, - ], -}; - -/// Descriptor for `GetTxPoolContentResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getTxPoolContentResponseDescriptor = $convert.base64Decode('ChhHZXRUeFBvb2xDb250ZW50UmVzcG9uc2USKQoDdHhzGAEgAygLMhcucGFjdHVzLlRyYW5zYWN0aW9uSW5mb1IDdHhz'); -@$core.Deprecated('Use validatorInfoDescriptor instead') -const ValidatorInfo$json = const { - '1': 'ValidatorInfo', - '2': const [ - const {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'}, - const {'1': 'data', '3': 2, '4': 1, '5': 9, '10': 'data'}, - const {'1': 'public_key', '3': 3, '4': 1, '5': 9, '10': 'publicKey'}, - const {'1': 'number', '3': 4, '4': 1, '5': 5, '10': 'number'}, - const {'1': 'stake', '3': 5, '4': 1, '5': 3, '10': 'stake'}, - const {'1': 'last_bonding_height', '3': 6, '4': 1, '5': 13, '10': 'lastBondingHeight'}, - const {'1': 'last_sortition_height', '3': 7, '4': 1, '5': 13, '10': 'lastSortitionHeight'}, - const {'1': 'unbonding_height', '3': 8, '4': 1, '5': 13, '10': 'unbondingHeight'}, - const {'1': 'address', '3': 9, '4': 1, '5': 9, '10': 'address'}, - const {'1': 'availability_score', '3': 10, '4': 1, '5': 1, '10': 'availabilityScore'}, - ], -}; - -/// Descriptor for `ValidatorInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List validatorInfoDescriptor = $convert.base64Decode('Cg1WYWxpZGF0b3JJbmZvEhIKBGhhc2gYASABKAlSBGhhc2gSEgoEZGF0YRgCIAEoCVIEZGF0YRIdCgpwdWJsaWNfa2V5GAMgASgJUglwdWJsaWNLZXkSFgoGbnVtYmVyGAQgASgFUgZudW1iZXISFAoFc3Rha2UYBSABKANSBXN0YWtlEi4KE2xhc3RfYm9uZGluZ19oZWlnaHQYBiABKA1SEWxhc3RCb25kaW5nSGVpZ2h0EjIKFWxhc3Rfc29ydGl0aW9uX2hlaWdodBgHIAEoDVITbGFzdFNvcnRpdGlvbkhlaWdodBIpChB1bmJvbmRpbmdfaGVpZ2h0GAggASgNUg91bmJvbmRpbmdIZWlnaHQSGAoHYWRkcmVzcxgJIAEoCVIHYWRkcmVzcxItChJhdmFpbGFiaWxpdHlfc2NvcmUYCiABKAFSEWF2YWlsYWJpbGl0eVNjb3Jl'); -@$core.Deprecated('Use accountInfoDescriptor instead') -const AccountInfo$json = const { - '1': 'AccountInfo', - '2': const [ - const {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'}, - const {'1': 'data', '3': 2, '4': 1, '5': 9, '10': 'data'}, - const {'1': 'number', '3': 3, '4': 1, '5': 5, '10': 'number'}, - const {'1': 'balance', '3': 4, '4': 1, '5': 3, '10': 'balance'}, - const {'1': 'address', '3': 5, '4': 1, '5': 9, '10': 'address'}, - ], -}; - -/// Descriptor for `AccountInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List accountInfoDescriptor = $convert.base64Decode('CgtBY2NvdW50SW5mbxISCgRoYXNoGAEgASgJUgRoYXNoEhIKBGRhdGEYAiABKAlSBGRhdGESFgoGbnVtYmVyGAMgASgFUgZudW1iZXISGAoHYmFsYW5jZRgEIAEoA1IHYmFsYW5jZRIYCgdhZGRyZXNzGAUgASgJUgdhZGRyZXNz'); -@$core.Deprecated('Use blockHeaderInfoDescriptor instead') -const BlockHeaderInfo$json = const { - '1': 'BlockHeaderInfo', - '2': const [ - const {'1': 'version', '3': 1, '4': 1, '5': 5, '10': 'version'}, - const {'1': 'prev_block_hash', '3': 2, '4': 1, '5': 9, '10': 'prevBlockHash'}, - const {'1': 'state_root', '3': 3, '4': 1, '5': 9, '10': 'stateRoot'}, - const {'1': 'sortition_seed', '3': 4, '4': 1, '5': 9, '10': 'sortitionSeed'}, - const {'1': 'proposer_address', '3': 5, '4': 1, '5': 9, '10': 'proposerAddress'}, - ], -}; - -/// Descriptor for `BlockHeaderInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List blockHeaderInfoDescriptor = $convert.base64Decode('Cg9CbG9ja0hlYWRlckluZm8SGAoHdmVyc2lvbhgBIAEoBVIHdmVyc2lvbhImCg9wcmV2X2Jsb2NrX2hhc2gYAiABKAlSDXByZXZCbG9ja0hhc2gSHQoKc3RhdGVfcm9vdBgDIAEoCVIJc3RhdGVSb290EiUKDnNvcnRpdGlvbl9zZWVkGAQgASgJUg1zb3J0aXRpb25TZWVkEikKEHByb3Bvc2VyX2FkZHJlc3MYBSABKAlSD3Byb3Bvc2VyQWRkcmVzcw=='); -@$core.Deprecated('Use certificateInfoDescriptor instead') -const CertificateInfo$json = const { - '1': 'CertificateInfo', - '2': const [ - const {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'}, - const {'1': 'round', '3': 2, '4': 1, '5': 5, '10': 'round'}, - const {'1': 'committers', '3': 3, '4': 3, '5': 5, '10': 'committers'}, - const {'1': 'absentees', '3': 4, '4': 3, '5': 5, '10': 'absentees'}, - const {'1': 'signature', '3': 5, '4': 1, '5': 9, '10': 'signature'}, - ], -}; - -/// Descriptor for `CertificateInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List certificateInfoDescriptor = $convert.base64Decode('Cg9DZXJ0aWZpY2F0ZUluZm8SEgoEaGFzaBgBIAEoCVIEaGFzaBIUCgVyb3VuZBgCIAEoBVIFcm91bmQSHgoKY29tbWl0dGVycxgDIAMoBVIKY29tbWl0dGVycxIcCglhYnNlbnRlZXMYBCADKAVSCWFic2VudGVlcxIcCglzaWduYXR1cmUYBSABKAlSCXNpZ25hdHVyZQ=='); -@$core.Deprecated('Use voteInfoDescriptor instead') -const VoteInfo$json = const { - '1': 'VoteInfo', - '2': const [ - const {'1': 'type', '3': 1, '4': 1, '5': 14, '6': '.pactus.VoteType', '10': 'type'}, - const {'1': 'voter', '3': 2, '4': 1, '5': 9, '10': 'voter'}, - const {'1': 'block_hash', '3': 3, '4': 1, '5': 9, '10': 'blockHash'}, - const {'1': 'round', '3': 4, '4': 1, '5': 5, '10': 'round'}, - const {'1': 'cp_round', '3': 5, '4': 1, '5': 5, '10': 'cpRound'}, - const {'1': 'cp_value', '3': 6, '4': 1, '5': 5, '10': 'cpValue'}, - ], -}; - -/// Descriptor for `VoteInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List voteInfoDescriptor = $convert.base64Decode('CghWb3RlSW5mbxIkCgR0eXBlGAEgASgOMhAucGFjdHVzLlZvdGVUeXBlUgR0eXBlEhQKBXZvdGVyGAIgASgJUgV2b3RlchIdCgpibG9ja19oYXNoGAMgASgJUglibG9ja0hhc2gSFAoFcm91bmQYBCABKAVSBXJvdW5kEhkKCGNwX3JvdW5kGAUgASgFUgdjcFJvdW5kEhkKCGNwX3ZhbHVlGAYgASgFUgdjcFZhbHVl'); -@$core.Deprecated('Use consensusInfoDescriptor instead') -const ConsensusInfo$json = const { - '1': 'ConsensusInfo', - '2': const [ - const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, - const {'1': 'active', '3': 2, '4': 1, '5': 8, '10': 'active'}, - const {'1': 'height', '3': 3, '4': 1, '5': 13, '10': 'height'}, - const {'1': 'round', '3': 4, '4': 1, '5': 5, '10': 'round'}, - const {'1': 'votes', '3': 5, '4': 3, '5': 11, '6': '.pactus.VoteInfo', '10': 'votes'}, - ], -}; - -/// Descriptor for `ConsensusInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List consensusInfoDescriptor = $convert.base64Decode('Cg1Db25zZW5zdXNJbmZvEhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3MSFgoGYWN0aXZlGAIgASgIUgZhY3RpdmUSFgoGaGVpZ2h0GAMgASgNUgZoZWlnaHQSFAoFcm91bmQYBCABKAVSBXJvdW5kEiYKBXZvdGVzGAUgAygLMhAucGFjdHVzLlZvdGVJbmZvUgV2b3Rlcw=='); -@$core.Deprecated('Use proposalDescriptor instead') -const Proposal$json = const { - '1': 'Proposal', - '2': const [ - const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, - const {'1': 'round', '3': 2, '4': 1, '5': 5, '10': 'round'}, - const {'1': 'block_data', '3': 3, '4': 1, '5': 9, '10': 'blockData'}, - const {'1': 'signature_data', '3': 4, '4': 1, '5': 9, '10': 'signatureData'}, - ], -}; - -/// Descriptor for `Proposal`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List proposalDescriptor = $convert.base64Decode('CghQcm9wb3NhbBIWCgZoZWlnaHQYASABKA1SBmhlaWdodBIUCgVyb3VuZBgCIAEoBVIFcm91bmQSHQoKYmxvY2tfZGF0YRgDIAEoCVIJYmxvY2tEYXRhEiUKDnNpZ25hdHVyZV9kYXRhGAQgASgJUg1zaWduYXR1cmVEYXRh'); -const $core.Map<$core.String, $core.dynamic> BlockchainServiceBase$json = const { - '1': 'Blockchain', - '2': const [ - const {'1': 'GetBlock', '2': '.pactus.GetBlockRequest', '3': '.pactus.GetBlockResponse'}, - const {'1': 'GetBlockHash', '2': '.pactus.GetBlockHashRequest', '3': '.pactus.GetBlockHashResponse'}, - const {'1': 'GetBlockHeight', '2': '.pactus.GetBlockHeightRequest', '3': '.pactus.GetBlockHeightResponse'}, - const {'1': 'GetBlockchainInfo', '2': '.pactus.GetBlockchainInfoRequest', '3': '.pactus.GetBlockchainInfoResponse'}, - const {'1': 'GetConsensusInfo', '2': '.pactus.GetConsensusInfoRequest', '3': '.pactus.GetConsensusInfoResponse'}, - const {'1': 'GetAccount', '2': '.pactus.GetAccountRequest', '3': '.pactus.GetAccountResponse'}, - const {'1': 'GetValidator', '2': '.pactus.GetValidatorRequest', '3': '.pactus.GetValidatorResponse'}, - const {'1': 'GetValidatorByNumber', '2': '.pactus.GetValidatorByNumberRequest', '3': '.pactus.GetValidatorResponse'}, - const {'1': 'GetValidatorAddresses', '2': '.pactus.GetValidatorAddressesRequest', '3': '.pactus.GetValidatorAddressesResponse'}, - const {'1': 'GetPublicKey', '2': '.pactus.GetPublicKeyRequest', '3': '.pactus.GetPublicKeyResponse'}, - const {'1': 'GetTxPoolContent', '2': '.pactus.GetTxPoolContentRequest', '3': '.pactus.GetTxPoolContentResponse'}, - ], -}; - -@$core.Deprecated('Use blockchainServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> BlockchainServiceBase$messageJson = const { - '.pactus.GetBlockRequest': GetBlockRequest$json, - '.pactus.GetBlockResponse': GetBlockResponse$json, - '.pactus.BlockHeaderInfo': BlockHeaderInfo$json, - '.pactus.CertificateInfo': CertificateInfo$json, - '.pactus.TransactionInfo': $0.TransactionInfo$json, - '.pactus.PayloadTransfer': $0.PayloadTransfer$json, - '.pactus.PayloadBond': $0.PayloadBond$json, - '.pactus.PayloadSortition': $0.PayloadSortition$json, - '.pactus.PayloadUnbond': $0.PayloadUnbond$json, - '.pactus.PayloadWithdraw': $0.PayloadWithdraw$json, - '.pactus.GetBlockHashRequest': GetBlockHashRequest$json, - '.pactus.GetBlockHashResponse': GetBlockHashResponse$json, - '.pactus.GetBlockHeightRequest': GetBlockHeightRequest$json, - '.pactus.GetBlockHeightResponse': GetBlockHeightResponse$json, - '.pactus.GetBlockchainInfoRequest': GetBlockchainInfoRequest$json, - '.pactus.GetBlockchainInfoResponse': GetBlockchainInfoResponse$json, - '.pactus.ValidatorInfo': ValidatorInfo$json, - '.pactus.GetConsensusInfoRequest': GetConsensusInfoRequest$json, - '.pactus.GetConsensusInfoResponse': GetConsensusInfoResponse$json, - '.pactus.Proposal': Proposal$json, - '.pactus.ConsensusInfo': ConsensusInfo$json, - '.pactus.VoteInfo': VoteInfo$json, - '.pactus.GetAccountRequest': GetAccountRequest$json, - '.pactus.GetAccountResponse': GetAccountResponse$json, - '.pactus.AccountInfo': AccountInfo$json, - '.pactus.GetValidatorRequest': GetValidatorRequest$json, - '.pactus.GetValidatorResponse': GetValidatorResponse$json, - '.pactus.GetValidatorByNumberRequest': GetValidatorByNumberRequest$json, - '.pactus.GetValidatorAddressesRequest': GetValidatorAddressesRequest$json, - '.pactus.GetValidatorAddressesResponse': GetValidatorAddressesResponse$json, - '.pactus.GetPublicKeyRequest': GetPublicKeyRequest$json, - '.pactus.GetPublicKeyResponse': GetPublicKeyResponse$json, - '.pactus.GetTxPoolContentRequest': GetTxPoolContentRequest$json, - '.pactus.GetTxPoolContentResponse': GetTxPoolContentResponse$json, -}; - -/// Descriptor for `Blockchain`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List blockchainServiceDescriptor = $convert.base64Decode('CgpCbG9ja2NoYWluEj0KCEdldEJsb2NrEhcucGFjdHVzLkdldEJsb2NrUmVxdWVzdBoYLnBhY3R1cy5HZXRCbG9ja1Jlc3BvbnNlEkkKDEdldEJsb2NrSGFzaBIbLnBhY3R1cy5HZXRCbG9ja0hhc2hSZXF1ZXN0GhwucGFjdHVzLkdldEJsb2NrSGFzaFJlc3BvbnNlEk8KDkdldEJsb2NrSGVpZ2h0Eh0ucGFjdHVzLkdldEJsb2NrSGVpZ2h0UmVxdWVzdBoeLnBhY3R1cy5HZXRCbG9ja0hlaWdodFJlc3BvbnNlElgKEUdldEJsb2NrY2hhaW5JbmZvEiAucGFjdHVzLkdldEJsb2NrY2hhaW5JbmZvUmVxdWVzdBohLnBhY3R1cy5HZXRCbG9ja2NoYWluSW5mb1Jlc3BvbnNlElUKEEdldENvbnNlbnN1c0luZm8SHy5wYWN0dXMuR2V0Q29uc2Vuc3VzSW5mb1JlcXVlc3QaIC5wYWN0dXMuR2V0Q29uc2Vuc3VzSW5mb1Jlc3BvbnNlEkMKCkdldEFjY291bnQSGS5wYWN0dXMuR2V0QWNjb3VudFJlcXVlc3QaGi5wYWN0dXMuR2V0QWNjb3VudFJlc3BvbnNlEkkKDEdldFZhbGlkYXRvchIbLnBhY3R1cy5HZXRWYWxpZGF0b3JSZXF1ZXN0GhwucGFjdHVzLkdldFZhbGlkYXRvclJlc3BvbnNlElkKFEdldFZhbGlkYXRvckJ5TnVtYmVyEiMucGFjdHVzLkdldFZhbGlkYXRvckJ5TnVtYmVyUmVxdWVzdBocLnBhY3R1cy5HZXRWYWxpZGF0b3JSZXNwb25zZRJkChVHZXRWYWxpZGF0b3JBZGRyZXNzZXMSJC5wYWN0dXMuR2V0VmFsaWRhdG9yQWRkcmVzc2VzUmVxdWVzdBolLnBhY3R1cy5HZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXNwb25zZRJJCgxHZXRQdWJsaWNLZXkSGy5wYWN0dXMuR2V0UHVibGljS2V5UmVxdWVzdBocLnBhY3R1cy5HZXRQdWJsaWNLZXlSZXNwb25zZRJVChBHZXRUeFBvb2xDb250ZW50Eh8ucGFjdHVzLkdldFR4UG9vbENvbnRlbnRSZXF1ZXN0GiAucGFjdHVzLkdldFR4UG9vbENvbnRlbnRSZXNwb25zZQ=='); diff --git a/www/grpc/gen/dart/blockchain.pbserver.dart b/www/grpc/gen/dart/blockchain.pbserver.dart deleted file mode 100644 index 7cfa896f3..000000000 --- a/www/grpc/gen/dart/blockchain.pbserver.dart +++ /dev/null @@ -1,68 +0,0 @@ -/// -// Generated code. Do not modify. -// source: blockchain.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:async' as $async; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'dart:core' as $core; -import 'blockchain.pb.dart' as $1; -import 'blockchain.pbjson.dart'; - -export 'blockchain.pb.dart'; - -abstract class BlockchainServiceBase extends $pb.GeneratedService { - $async.Future<$1.GetBlockResponse> getBlock($pb.ServerContext ctx, $1.GetBlockRequest request); - $async.Future<$1.GetBlockHashResponse> getBlockHash($pb.ServerContext ctx, $1.GetBlockHashRequest request); - $async.Future<$1.GetBlockHeightResponse> getBlockHeight($pb.ServerContext ctx, $1.GetBlockHeightRequest request); - $async.Future<$1.GetBlockchainInfoResponse> getBlockchainInfo($pb.ServerContext ctx, $1.GetBlockchainInfoRequest request); - $async.Future<$1.GetConsensusInfoResponse> getConsensusInfo($pb.ServerContext ctx, $1.GetConsensusInfoRequest request); - $async.Future<$1.GetAccountResponse> getAccount($pb.ServerContext ctx, $1.GetAccountRequest request); - $async.Future<$1.GetValidatorResponse> getValidator($pb.ServerContext ctx, $1.GetValidatorRequest request); - $async.Future<$1.GetValidatorResponse> getValidatorByNumber($pb.ServerContext ctx, $1.GetValidatorByNumberRequest request); - $async.Future<$1.GetValidatorAddressesResponse> getValidatorAddresses($pb.ServerContext ctx, $1.GetValidatorAddressesRequest request); - $async.Future<$1.GetPublicKeyResponse> getPublicKey($pb.ServerContext ctx, $1.GetPublicKeyRequest request); - $async.Future<$1.GetTxPoolContentResponse> getTxPoolContent($pb.ServerContext ctx, $1.GetTxPoolContentRequest request); - - $pb.GeneratedMessage createRequest($core.String method) { - switch (method) { - case 'GetBlock': return $1.GetBlockRequest(); - case 'GetBlockHash': return $1.GetBlockHashRequest(); - case 'GetBlockHeight': return $1.GetBlockHeightRequest(); - case 'GetBlockchainInfo': return $1.GetBlockchainInfoRequest(); - case 'GetConsensusInfo': return $1.GetConsensusInfoRequest(); - case 'GetAccount': return $1.GetAccountRequest(); - case 'GetValidator': return $1.GetValidatorRequest(); - case 'GetValidatorByNumber': return $1.GetValidatorByNumberRequest(); - case 'GetValidatorAddresses': return $1.GetValidatorAddressesRequest(); - case 'GetPublicKey': return $1.GetPublicKeyRequest(); - case 'GetTxPoolContent': return $1.GetTxPoolContentRequest(); - default: throw $core.ArgumentError('Unknown method: $method'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) { - switch (method) { - case 'GetBlock': return this.getBlock(ctx, request as $1.GetBlockRequest); - case 'GetBlockHash': return this.getBlockHash(ctx, request as $1.GetBlockHashRequest); - case 'GetBlockHeight': return this.getBlockHeight(ctx, request as $1.GetBlockHeightRequest); - case 'GetBlockchainInfo': return this.getBlockchainInfo(ctx, request as $1.GetBlockchainInfoRequest); - case 'GetConsensusInfo': return this.getConsensusInfo(ctx, request as $1.GetConsensusInfoRequest); - case 'GetAccount': return this.getAccount(ctx, request as $1.GetAccountRequest); - case 'GetValidator': return this.getValidator(ctx, request as $1.GetValidatorRequest); - case 'GetValidatorByNumber': return this.getValidatorByNumber(ctx, request as $1.GetValidatorByNumberRequest); - case 'GetValidatorAddresses': return this.getValidatorAddresses(ctx, request as $1.GetValidatorAddressesRequest); - case 'GetPublicKey': return this.getPublicKey(ctx, request as $1.GetPublicKeyRequest); - case 'GetTxPoolContent': return this.getTxPoolContent(ctx, request as $1.GetTxPoolContentRequest); - default: throw $core.ArgumentError('Unknown method: $method'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => BlockchainServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => BlockchainServiceBase$messageJson; -} - diff --git a/www/grpc/gen/dart/network.pb.dart b/www/grpc/gen/dart/network.pb.dart deleted file mode 100644 index caff37258..000000000 --- a/www/grpc/gen/dart/network.pb.dart +++ /dev/null @@ -1,751 +0,0 @@ -/// -// Generated code. Do not modify. -// source: network.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:fixnum/fixnum.dart' as $fixnum; -import 'package:protobuf/protobuf.dart' as $pb; - -class GetNetworkInfoRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNetworkInfoRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOB(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'onlyConnected') - ..hasRequiredFields = false - ; - - GetNetworkInfoRequest._() : super(); - factory GetNetworkInfoRequest({ - $core.bool? onlyConnected, - }) { - final _result = create(); - if (onlyConnected != null) { - _result.onlyConnected = onlyConnected; - } - return _result; - } - factory GetNetworkInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetNetworkInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetNetworkInfoRequest clone() => GetNetworkInfoRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetNetworkInfoRequest copyWith(void Function(GetNetworkInfoRequest) updates) => super.copyWith((message) => updates(message as GetNetworkInfoRequest)) as GetNetworkInfoRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetNetworkInfoRequest create() => GetNetworkInfoRequest._(); - GetNetworkInfoRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetNetworkInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetNetworkInfoRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.bool get onlyConnected => $_getBF(0); - @$pb.TagNumber(1) - set onlyConnected($core.bool v) { $_setBool(0, v); } - @$pb.TagNumber(1) - $core.bool hasOnlyConnected() => $_has(0); - @$pb.TagNumber(1) - void clearOnlyConnected() => clearField(1); -} - -class GetNetworkInfoResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNetworkInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'networkName') - ..aInt64(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalSentBytes') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalReceivedBytes') - ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connectedPeersCount', $pb.PbFieldType.OU3) - ..pc(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connectedPeers', $pb.PbFieldType.PM, subBuilder: PeerInfo.create) - ..m<$core.int, $fixnum.Int64>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sentBytes', entryClassName: 'GetNetworkInfoResponse.SentBytesEntry', keyFieldType: $pb.PbFieldType.O3, valueFieldType: $pb.PbFieldType.O6, packageName: const $pb.PackageName('pactus')) - ..m<$core.int, $fixnum.Int64>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receivedBytes', entryClassName: 'GetNetworkInfoResponse.ReceivedBytesEntry', keyFieldType: $pb.PbFieldType.O3, valueFieldType: $pb.PbFieldType.O6, packageName: const $pb.PackageName('pactus')) - ..hasRequiredFields = false - ; - - GetNetworkInfoResponse._() : super(); - factory GetNetworkInfoResponse({ - $core.String? networkName, - $fixnum.Int64? totalSentBytes, - $fixnum.Int64? totalReceivedBytes, - $core.int? connectedPeersCount, - $core.Iterable? connectedPeers, - $core.Map<$core.int, $fixnum.Int64>? sentBytes, - $core.Map<$core.int, $fixnum.Int64>? receivedBytes, - }) { - final _result = create(); - if (networkName != null) { - _result.networkName = networkName; - } - if (totalSentBytes != null) { - _result.totalSentBytes = totalSentBytes; - } - if (totalReceivedBytes != null) { - _result.totalReceivedBytes = totalReceivedBytes; - } - if (connectedPeersCount != null) { - _result.connectedPeersCount = connectedPeersCount; - } - if (connectedPeers != null) { - _result.connectedPeers.addAll(connectedPeers); - } - if (sentBytes != null) { - _result.sentBytes.addAll(sentBytes); - } - if (receivedBytes != null) { - _result.receivedBytes.addAll(receivedBytes); - } - return _result; - } - factory GetNetworkInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetNetworkInfoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetNetworkInfoResponse clone() => GetNetworkInfoResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetNetworkInfoResponse copyWith(void Function(GetNetworkInfoResponse) updates) => super.copyWith((message) => updates(message as GetNetworkInfoResponse)) as GetNetworkInfoResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetNetworkInfoResponse create() => GetNetworkInfoResponse._(); - GetNetworkInfoResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetNetworkInfoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetNetworkInfoResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get networkName => $_getSZ(0); - @$pb.TagNumber(1) - set networkName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasNetworkName() => $_has(0); - @$pb.TagNumber(1) - void clearNetworkName() => clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get totalSentBytes => $_getI64(1); - @$pb.TagNumber(2) - set totalSentBytes($fixnum.Int64 v) { $_setInt64(1, v); } - @$pb.TagNumber(2) - $core.bool hasTotalSentBytes() => $_has(1); - @$pb.TagNumber(2) - void clearTotalSentBytes() => clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get totalReceivedBytes => $_getI64(2); - @$pb.TagNumber(3) - set totalReceivedBytes($fixnum.Int64 v) { $_setInt64(2, v); } - @$pb.TagNumber(3) - $core.bool hasTotalReceivedBytes() => $_has(2); - @$pb.TagNumber(3) - void clearTotalReceivedBytes() => clearField(3); - - @$pb.TagNumber(4) - $core.int get connectedPeersCount => $_getIZ(3); - @$pb.TagNumber(4) - set connectedPeersCount($core.int v) { $_setUnsignedInt32(3, v); } - @$pb.TagNumber(4) - $core.bool hasConnectedPeersCount() => $_has(3); - @$pb.TagNumber(4) - void clearConnectedPeersCount() => clearField(4); - - @$pb.TagNumber(5) - $core.List get connectedPeers => $_getList(4); - - @$pb.TagNumber(6) - $core.Map<$core.int, $fixnum.Int64> get sentBytes => $_getMap(5); - - @$pb.TagNumber(7) - $core.Map<$core.int, $fixnum.Int64> get receivedBytes => $_getMap(6); -} - -class GetNodeInfoRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNodeInfoRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..hasRequiredFields = false - ; - - GetNodeInfoRequest._() : super(); - factory GetNodeInfoRequest() => create(); - factory GetNodeInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetNodeInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetNodeInfoRequest clone() => GetNodeInfoRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetNodeInfoRequest copyWith(void Function(GetNodeInfoRequest) updates) => super.copyWith((message) => updates(message as GetNodeInfoRequest)) as GetNodeInfoRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetNodeInfoRequest create() => GetNodeInfoRequest._(); - GetNodeInfoRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetNodeInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetNodeInfoRequest? _defaultInstance; -} - -class GetNodeInfoResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNodeInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'moniker') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'agent') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'peerId') - ..a<$fixnum.Int64>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'startedAt', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) - ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'reachability') - ..a<$core.int>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'services', $pb.PbFieldType.O3) - ..aOS(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'servicesNames') - ..pPS(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'localAddrs') - ..pPS(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'protocols') - ..a<$core.double>(13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'clockOffset', $pb.PbFieldType.OD) - ..aOM(14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connectionInfo', subBuilder: ConnectionInfo.create) - ..hasRequiredFields = false - ; - - GetNodeInfoResponse._() : super(); - factory GetNodeInfoResponse({ - $core.String? moniker, - $core.String? agent, - $core.String? peerId, - $fixnum.Int64? startedAt, - $core.String? reachability, - $core.int? services, - $core.String? servicesNames, - $core.Iterable<$core.String>? localAddrs, - $core.Iterable<$core.String>? protocols, - $core.double? clockOffset, - ConnectionInfo? connectionInfo, - }) { - final _result = create(); - if (moniker != null) { - _result.moniker = moniker; - } - if (agent != null) { - _result.agent = agent; - } - if (peerId != null) { - _result.peerId = peerId; - } - if (startedAt != null) { - _result.startedAt = startedAt; - } - if (reachability != null) { - _result.reachability = reachability; - } - if (services != null) { - _result.services = services; - } - if (servicesNames != null) { - _result.servicesNames = servicesNames; - } - if (localAddrs != null) { - _result.localAddrs.addAll(localAddrs); - } - if (protocols != null) { - _result.protocols.addAll(protocols); - } - if (clockOffset != null) { - _result.clockOffset = clockOffset; - } - if (connectionInfo != null) { - _result.connectionInfo = connectionInfo; - } - return _result; - } - factory GetNodeInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetNodeInfoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetNodeInfoResponse clone() => GetNodeInfoResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetNodeInfoResponse copyWith(void Function(GetNodeInfoResponse) updates) => super.copyWith((message) => updates(message as GetNodeInfoResponse)) as GetNodeInfoResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetNodeInfoResponse create() => GetNodeInfoResponse._(); - GetNodeInfoResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetNodeInfoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetNodeInfoResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get moniker => $_getSZ(0); - @$pb.TagNumber(1) - set moniker($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasMoniker() => $_has(0); - @$pb.TagNumber(1) - void clearMoniker() => clearField(1); - - @$pb.TagNumber(2) - $core.String get agent => $_getSZ(1); - @$pb.TagNumber(2) - set agent($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasAgent() => $_has(1); - @$pb.TagNumber(2) - void clearAgent() => clearField(2); - - @$pb.TagNumber(3) - $core.String get peerId => $_getSZ(2); - @$pb.TagNumber(3) - set peerId($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasPeerId() => $_has(2); - @$pb.TagNumber(3) - void clearPeerId() => clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get startedAt => $_getI64(3); - @$pb.TagNumber(4) - set startedAt($fixnum.Int64 v) { $_setInt64(3, v); } - @$pb.TagNumber(4) - $core.bool hasStartedAt() => $_has(3); - @$pb.TagNumber(4) - void clearStartedAt() => clearField(4); - - @$pb.TagNumber(5) - $core.String get reachability => $_getSZ(4); - @$pb.TagNumber(5) - set reachability($core.String v) { $_setString(4, v); } - @$pb.TagNumber(5) - $core.bool hasReachability() => $_has(4); - @$pb.TagNumber(5) - void clearReachability() => clearField(5); - - @$pb.TagNumber(6) - $core.int get services => $_getIZ(5); - @$pb.TagNumber(6) - set services($core.int v) { $_setSignedInt32(5, v); } - @$pb.TagNumber(6) - $core.bool hasServices() => $_has(5); - @$pb.TagNumber(6) - void clearServices() => clearField(6); - - @$pb.TagNumber(7) - $core.String get servicesNames => $_getSZ(6); - @$pb.TagNumber(7) - set servicesNames($core.String v) { $_setString(6, v); } - @$pb.TagNumber(7) - $core.bool hasServicesNames() => $_has(6); - @$pb.TagNumber(7) - void clearServicesNames() => clearField(7); - - @$pb.TagNumber(8) - $core.List<$core.String> get localAddrs => $_getList(7); - - @$pb.TagNumber(9) - $core.List<$core.String> get protocols => $_getList(8); - - @$pb.TagNumber(13) - $core.double get clockOffset => $_getN(9); - @$pb.TagNumber(13) - set clockOffset($core.double v) { $_setDouble(9, v); } - @$pb.TagNumber(13) - $core.bool hasClockOffset() => $_has(9); - @$pb.TagNumber(13) - void clearClockOffset() => clearField(13); - - @$pb.TagNumber(14) - ConnectionInfo get connectionInfo => $_getN(10); - @$pb.TagNumber(14) - set connectionInfo(ConnectionInfo v) { setField(14, v); } - @$pb.TagNumber(14) - $core.bool hasConnectionInfo() => $_has(10); - @$pb.TagNumber(14) - void clearConnectionInfo() => clearField(14); - @$pb.TagNumber(14) - ConnectionInfo ensureConnectionInfo() => $_ensure(10); -} - -class PeerInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PeerInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'status', $pb.PbFieldType.O3) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'moniker') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'agent') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'peerId') - ..pPS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'consensusKeys') - ..pPS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'consensusAddresses') - ..a<$core.int>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'services', $pb.PbFieldType.OU3) - ..aOS(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastBlockHash') - ..a<$core.int>(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) - ..a<$core.int>(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receivedBundles', $pb.PbFieldType.O3) - ..a<$core.int>(11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'invalidBundles', $pb.PbFieldType.O3) - ..aInt64(12, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastSent') - ..aInt64(13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastReceived') - ..m<$core.int, $fixnum.Int64>(14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sentBytes', entryClassName: 'PeerInfo.SentBytesEntry', keyFieldType: $pb.PbFieldType.O3, valueFieldType: $pb.PbFieldType.O6, packageName: const $pb.PackageName('pactus')) - ..m<$core.int, $fixnum.Int64>(15, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receivedBytes', entryClassName: 'PeerInfo.ReceivedBytesEntry', keyFieldType: $pb.PbFieldType.O3, valueFieldType: $pb.PbFieldType.O6, packageName: const $pb.PackageName('pactus')) - ..aOS(16, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..aOS(17, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'direction') - ..pPS(18, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'protocols') - ..a<$core.int>(19, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalSessions', $pb.PbFieldType.O3) - ..a<$core.int>(20, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'completedSessions', $pb.PbFieldType.O3) - ..hasRequiredFields = false - ; - - PeerInfo._() : super(); - factory PeerInfo({ - $core.int? status, - $core.String? moniker, - $core.String? agent, - $core.String? peerId, - $core.Iterable<$core.String>? consensusKeys, - $core.Iterable<$core.String>? consensusAddresses, - $core.int? services, - $core.String? lastBlockHash, - $core.int? height, - $core.int? receivedBundles, - $core.int? invalidBundles, - $fixnum.Int64? lastSent, - $fixnum.Int64? lastReceived, - $core.Map<$core.int, $fixnum.Int64>? sentBytes, - $core.Map<$core.int, $fixnum.Int64>? receivedBytes, - $core.String? address, - $core.String? direction, - $core.Iterable<$core.String>? protocols, - $core.int? totalSessions, - $core.int? completedSessions, - }) { - final _result = create(); - if (status != null) { - _result.status = status; - } - if (moniker != null) { - _result.moniker = moniker; - } - if (agent != null) { - _result.agent = agent; - } - if (peerId != null) { - _result.peerId = peerId; - } - if (consensusKeys != null) { - _result.consensusKeys.addAll(consensusKeys); - } - if (consensusAddresses != null) { - _result.consensusAddresses.addAll(consensusAddresses); - } - if (services != null) { - _result.services = services; - } - if (lastBlockHash != null) { - _result.lastBlockHash = lastBlockHash; - } - if (height != null) { - _result.height = height; - } - if (receivedBundles != null) { - _result.receivedBundles = receivedBundles; - } - if (invalidBundles != null) { - _result.invalidBundles = invalidBundles; - } - if (lastSent != null) { - _result.lastSent = lastSent; - } - if (lastReceived != null) { - _result.lastReceived = lastReceived; - } - if (sentBytes != null) { - _result.sentBytes.addAll(sentBytes); - } - if (receivedBytes != null) { - _result.receivedBytes.addAll(receivedBytes); - } - if (address != null) { - _result.address = address; - } - if (direction != null) { - _result.direction = direction; - } - if (protocols != null) { - _result.protocols.addAll(protocols); - } - if (totalSessions != null) { - _result.totalSessions = totalSessions; - } - if (completedSessions != null) { - _result.completedSessions = completedSessions; - } - return _result; - } - factory PeerInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PeerInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PeerInfo clone() => PeerInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PeerInfo copyWith(void Function(PeerInfo) updates) => super.copyWith((message) => updates(message as PeerInfo)) as PeerInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static PeerInfo create() => PeerInfo._(); - PeerInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PeerInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PeerInfo? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get status => $_getIZ(0); - @$pb.TagNumber(1) - set status($core.int v) { $_setSignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasStatus() => $_has(0); - @$pb.TagNumber(1) - void clearStatus() => clearField(1); - - @$pb.TagNumber(2) - $core.String get moniker => $_getSZ(1); - @$pb.TagNumber(2) - set moniker($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasMoniker() => $_has(1); - @$pb.TagNumber(2) - void clearMoniker() => clearField(2); - - @$pb.TagNumber(3) - $core.String get agent => $_getSZ(2); - @$pb.TagNumber(3) - set agent($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasAgent() => $_has(2); - @$pb.TagNumber(3) - void clearAgent() => clearField(3); - - @$pb.TagNumber(4) - $core.String get peerId => $_getSZ(3); - @$pb.TagNumber(4) - set peerId($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasPeerId() => $_has(3); - @$pb.TagNumber(4) - void clearPeerId() => clearField(4); - - @$pb.TagNumber(5) - $core.List<$core.String> get consensusKeys => $_getList(4); - - @$pb.TagNumber(6) - $core.List<$core.String> get consensusAddresses => $_getList(5); - - @$pb.TagNumber(7) - $core.int get services => $_getIZ(6); - @$pb.TagNumber(7) - set services($core.int v) { $_setUnsignedInt32(6, v); } - @$pb.TagNumber(7) - $core.bool hasServices() => $_has(6); - @$pb.TagNumber(7) - void clearServices() => clearField(7); - - @$pb.TagNumber(8) - $core.String get lastBlockHash => $_getSZ(7); - @$pb.TagNumber(8) - set lastBlockHash($core.String v) { $_setString(7, v); } - @$pb.TagNumber(8) - $core.bool hasLastBlockHash() => $_has(7); - @$pb.TagNumber(8) - void clearLastBlockHash() => clearField(8); - - @$pb.TagNumber(9) - $core.int get height => $_getIZ(8); - @$pb.TagNumber(9) - set height($core.int v) { $_setUnsignedInt32(8, v); } - @$pb.TagNumber(9) - $core.bool hasHeight() => $_has(8); - @$pb.TagNumber(9) - void clearHeight() => clearField(9); - - @$pb.TagNumber(10) - $core.int get receivedBundles => $_getIZ(9); - @$pb.TagNumber(10) - set receivedBundles($core.int v) { $_setSignedInt32(9, v); } - @$pb.TagNumber(10) - $core.bool hasReceivedBundles() => $_has(9); - @$pb.TagNumber(10) - void clearReceivedBundles() => clearField(10); - - @$pb.TagNumber(11) - $core.int get invalidBundles => $_getIZ(10); - @$pb.TagNumber(11) - set invalidBundles($core.int v) { $_setSignedInt32(10, v); } - @$pb.TagNumber(11) - $core.bool hasInvalidBundles() => $_has(10); - @$pb.TagNumber(11) - void clearInvalidBundles() => clearField(11); - - @$pb.TagNumber(12) - $fixnum.Int64 get lastSent => $_getI64(11); - @$pb.TagNumber(12) - set lastSent($fixnum.Int64 v) { $_setInt64(11, v); } - @$pb.TagNumber(12) - $core.bool hasLastSent() => $_has(11); - @$pb.TagNumber(12) - void clearLastSent() => clearField(12); - - @$pb.TagNumber(13) - $fixnum.Int64 get lastReceived => $_getI64(12); - @$pb.TagNumber(13) - set lastReceived($fixnum.Int64 v) { $_setInt64(12, v); } - @$pb.TagNumber(13) - $core.bool hasLastReceived() => $_has(12); - @$pb.TagNumber(13) - void clearLastReceived() => clearField(13); - - @$pb.TagNumber(14) - $core.Map<$core.int, $fixnum.Int64> get sentBytes => $_getMap(13); - - @$pb.TagNumber(15) - $core.Map<$core.int, $fixnum.Int64> get receivedBytes => $_getMap(14); - - @$pb.TagNumber(16) - $core.String get address => $_getSZ(15); - @$pb.TagNumber(16) - set address($core.String v) { $_setString(15, v); } - @$pb.TagNumber(16) - $core.bool hasAddress() => $_has(15); - @$pb.TagNumber(16) - void clearAddress() => clearField(16); - - @$pb.TagNumber(17) - $core.String get direction => $_getSZ(16); - @$pb.TagNumber(17) - set direction($core.String v) { $_setString(16, v); } - @$pb.TagNumber(17) - $core.bool hasDirection() => $_has(16); - @$pb.TagNumber(17) - void clearDirection() => clearField(17); - - @$pb.TagNumber(18) - $core.List<$core.String> get protocols => $_getList(17); - - @$pb.TagNumber(19) - $core.int get totalSessions => $_getIZ(18); - @$pb.TagNumber(19) - set totalSessions($core.int v) { $_setSignedInt32(18, v); } - @$pb.TagNumber(19) - $core.bool hasTotalSessions() => $_has(18); - @$pb.TagNumber(19) - void clearTotalSessions() => clearField(19); - - @$pb.TagNumber(20) - $core.int get completedSessions => $_getIZ(19); - @$pb.TagNumber(20) - set completedSessions($core.int v) { $_setSignedInt32(19, v); } - @$pb.TagNumber(20) - $core.bool hasCompletedSessions() => $_has(19); - @$pb.TagNumber(20) - void clearCompletedSessions() => clearField(20); -} - -class ConnectionInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ConnectionInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$fixnum.Int64>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) - ..a<$fixnum.Int64>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'inboundConnections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) - ..a<$fixnum.Int64>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'outboundConnections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) - ..hasRequiredFields = false - ; - - ConnectionInfo._() : super(); - factory ConnectionInfo({ - $fixnum.Int64? connections, - $fixnum.Int64? inboundConnections, - $fixnum.Int64? outboundConnections, - }) { - final _result = create(); - if (connections != null) { - _result.connections = connections; - } - if (inboundConnections != null) { - _result.inboundConnections = inboundConnections; - } - if (outboundConnections != null) { - _result.outboundConnections = outboundConnections; - } - return _result; - } - factory ConnectionInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory ConnectionInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - ConnectionInfo clone() => ConnectionInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - ConnectionInfo copyWith(void Function(ConnectionInfo) updates) => super.copyWith((message) => updates(message as ConnectionInfo)) as ConnectionInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static ConnectionInfo create() => ConnectionInfo._(); - ConnectionInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static ConnectionInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static ConnectionInfo? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get connections => $_getI64(0); - @$pb.TagNumber(1) - set connections($fixnum.Int64 v) { $_setInt64(0, v); } - @$pb.TagNumber(1) - $core.bool hasConnections() => $_has(0); - @$pb.TagNumber(1) - void clearConnections() => clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get inboundConnections => $_getI64(1); - @$pb.TagNumber(2) - set inboundConnections($fixnum.Int64 v) { $_setInt64(1, v); } - @$pb.TagNumber(2) - $core.bool hasInboundConnections() => $_has(1); - @$pb.TagNumber(2) - void clearInboundConnections() => clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get outboundConnections => $_getI64(2); - @$pb.TagNumber(3) - set outboundConnections($fixnum.Int64 v) { $_setInt64(2, v); } - @$pb.TagNumber(3) - $core.bool hasOutboundConnections() => $_has(2); - @$pb.TagNumber(3) - void clearOutboundConnections() => clearField(3); -} - -class NetworkApi { - $pb.RpcClient _client; - NetworkApi(this._client); - - $async.Future getNetworkInfo($pb.ClientContext? ctx, GetNetworkInfoRequest request) { - var emptyResponse = GetNetworkInfoResponse(); - return _client.invoke(ctx, 'Network', 'GetNetworkInfo', request, emptyResponse); - } - $async.Future getNodeInfo($pb.ClientContext? ctx, GetNodeInfoRequest request) { - var emptyResponse = GetNodeInfoResponse(); - return _client.invoke(ctx, 'Network', 'GetNodeInfo', request, emptyResponse); - } -} - diff --git a/www/grpc/gen/dart/network.pbenum.dart b/www/grpc/gen/dart/network.pbenum.dart deleted file mode 100644 index 781e22185..000000000 --- a/www/grpc/gen/dart/network.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: network.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - diff --git a/www/grpc/gen/dart/network.pbjson.dart b/www/grpc/gen/dart/network.pbjson.dart deleted file mode 100644 index c8a708dcf..000000000 --- a/www/grpc/gen/dart/network.pbjson.dart +++ /dev/null @@ -1,170 +0,0 @@ -/// -// Generated code. Do not modify. -// source: network.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:core' as $core; -import 'dart:convert' as $convert; -import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use getNetworkInfoRequestDescriptor instead') -const GetNetworkInfoRequest$json = const { - '1': 'GetNetworkInfoRequest', - '2': const [ - const {'1': 'only_connected', '3': 1, '4': 1, '5': 8, '10': 'onlyConnected'}, - ], -}; - -/// Descriptor for `GetNetworkInfoRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getNetworkInfoRequestDescriptor = $convert.base64Decode('ChVHZXROZXR3b3JrSW5mb1JlcXVlc3QSJQoOb25seV9jb25uZWN0ZWQYASABKAhSDW9ubHlDb25uZWN0ZWQ='); -@$core.Deprecated('Use getNetworkInfoResponseDescriptor instead') -const GetNetworkInfoResponse$json = const { - '1': 'GetNetworkInfoResponse', - '2': const [ - const {'1': 'network_name', '3': 1, '4': 1, '5': 9, '10': 'networkName'}, - const {'1': 'total_sent_bytes', '3': 2, '4': 1, '5': 3, '10': 'totalSentBytes'}, - const {'1': 'total_received_bytes', '3': 3, '4': 1, '5': 3, '10': 'totalReceivedBytes'}, - const {'1': 'connected_peers_count', '3': 4, '4': 1, '5': 13, '10': 'connectedPeersCount'}, - const {'1': 'connected_peers', '3': 5, '4': 3, '5': 11, '6': '.pactus.PeerInfo', '10': 'connectedPeers'}, - const {'1': 'sent_bytes', '3': 6, '4': 3, '5': 11, '6': '.pactus.GetNetworkInfoResponse.SentBytesEntry', '10': 'sentBytes'}, - const {'1': 'received_bytes', '3': 7, '4': 3, '5': 11, '6': '.pactus.GetNetworkInfoResponse.ReceivedBytesEntry', '10': 'receivedBytes'}, - ], - '3': const [GetNetworkInfoResponse_SentBytesEntry$json, GetNetworkInfoResponse_ReceivedBytesEntry$json], -}; - -@$core.Deprecated('Use getNetworkInfoResponseDescriptor instead') -const GetNetworkInfoResponse_SentBytesEntry$json = const { - '1': 'SentBytesEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, - const {'1': 'value', '3': 2, '4': 1, '5': 3, '10': 'value'}, - ], - '7': const {'7': true}, -}; - -@$core.Deprecated('Use getNetworkInfoResponseDescriptor instead') -const GetNetworkInfoResponse_ReceivedBytesEntry$json = const { - '1': 'ReceivedBytesEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, - const {'1': 'value', '3': 2, '4': 1, '5': 3, '10': 'value'}, - ], - '7': const {'7': true}, -}; - -/// Descriptor for `GetNetworkInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getNetworkInfoResponseDescriptor = $convert.base64Decode('ChZHZXROZXR3b3JrSW5mb1Jlc3BvbnNlEiEKDG5ldHdvcmtfbmFtZRgBIAEoCVILbmV0d29ya05hbWUSKAoQdG90YWxfc2VudF9ieXRlcxgCIAEoA1IOdG90YWxTZW50Qnl0ZXMSMAoUdG90YWxfcmVjZWl2ZWRfYnl0ZXMYAyABKANSEnRvdGFsUmVjZWl2ZWRCeXRlcxIyChVjb25uZWN0ZWRfcGVlcnNfY291bnQYBCABKA1SE2Nvbm5lY3RlZFBlZXJzQ291bnQSOQoPY29ubmVjdGVkX3BlZXJzGAUgAygLMhAucGFjdHVzLlBlZXJJbmZvUg5jb25uZWN0ZWRQZWVycxJMCgpzZW50X2J5dGVzGAYgAygLMi0ucGFjdHVzLkdldE5ldHdvcmtJbmZvUmVzcG9uc2UuU2VudEJ5dGVzRW50cnlSCXNlbnRCeXRlcxJYCg5yZWNlaXZlZF9ieXRlcxgHIAMoCzIxLnBhY3R1cy5HZXROZXR3b3JrSW5mb1Jlc3BvbnNlLlJlY2VpdmVkQnl0ZXNFbnRyeVINcmVjZWl2ZWRCeXRlcxo8Cg5TZW50Qnl0ZXNFbnRyeRIQCgNrZXkYASABKAVSA2tleRIUCgV2YWx1ZRgCIAEoA1IFdmFsdWU6AjgBGkAKElJlY2VpdmVkQnl0ZXNFbnRyeRIQCgNrZXkYASABKAVSA2tleRIUCgV2YWx1ZRgCIAEoA1IFdmFsdWU6AjgB'); -@$core.Deprecated('Use getNodeInfoRequestDescriptor instead') -const GetNodeInfoRequest$json = const { - '1': 'GetNodeInfoRequest', -}; - -/// Descriptor for `GetNodeInfoRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getNodeInfoRequestDescriptor = $convert.base64Decode('ChJHZXROb2RlSW5mb1JlcXVlc3Q='); -@$core.Deprecated('Use getNodeInfoResponseDescriptor instead') -const GetNodeInfoResponse$json = const { - '1': 'GetNodeInfoResponse', - '2': const [ - const {'1': 'moniker', '3': 1, '4': 1, '5': 9, '10': 'moniker'}, - const {'1': 'agent', '3': 2, '4': 1, '5': 9, '10': 'agent'}, - const {'1': 'peer_id', '3': 3, '4': 1, '5': 9, '10': 'peerId'}, - const {'1': 'started_at', '3': 4, '4': 1, '5': 4, '10': 'startedAt'}, - const {'1': 'reachability', '3': 5, '4': 1, '5': 9, '10': 'reachability'}, - const {'1': 'services', '3': 6, '4': 1, '5': 5, '10': 'services'}, - const {'1': 'services_names', '3': 7, '4': 1, '5': 9, '10': 'servicesNames'}, - const {'1': 'local_addrs', '3': 8, '4': 3, '5': 9, '10': 'localAddrs'}, - const {'1': 'protocols', '3': 9, '4': 3, '5': 9, '10': 'protocols'}, - const {'1': 'clock_offset', '3': 13, '4': 1, '5': 1, '10': 'clockOffset'}, - const {'1': 'connection_info', '3': 14, '4': 1, '5': 11, '6': '.pactus.ConnectionInfo', '10': 'connectionInfo'}, - ], -}; - -/// Descriptor for `GetNodeInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getNodeInfoResponseDescriptor = $convert.base64Decode('ChNHZXROb2RlSW5mb1Jlc3BvbnNlEhgKB21vbmlrZXIYASABKAlSB21vbmlrZXISFAoFYWdlbnQYAiABKAlSBWFnZW50EhcKB3BlZXJfaWQYAyABKAlSBnBlZXJJZBIdCgpzdGFydGVkX2F0GAQgASgEUglzdGFydGVkQXQSIgoMcmVhY2hhYmlsaXR5GAUgASgJUgxyZWFjaGFiaWxpdHkSGgoIc2VydmljZXMYBiABKAVSCHNlcnZpY2VzEiUKDnNlcnZpY2VzX25hbWVzGAcgASgJUg1zZXJ2aWNlc05hbWVzEh8KC2xvY2FsX2FkZHJzGAggAygJUgpsb2NhbEFkZHJzEhwKCXByb3RvY29scxgJIAMoCVIJcHJvdG9jb2xzEiEKDGNsb2NrX29mZnNldBgNIAEoAVILY2xvY2tPZmZzZXQSPwoPY29ubmVjdGlvbl9pbmZvGA4gASgLMhYucGFjdHVzLkNvbm5lY3Rpb25JbmZvUg5jb25uZWN0aW9uSW5mbw=='); -@$core.Deprecated('Use peerInfoDescriptor instead') -const PeerInfo$json = const { - '1': 'PeerInfo', - '2': const [ - const {'1': 'status', '3': 1, '4': 1, '5': 5, '10': 'status'}, - const {'1': 'moniker', '3': 2, '4': 1, '5': 9, '10': 'moniker'}, - const {'1': 'agent', '3': 3, '4': 1, '5': 9, '10': 'agent'}, - const {'1': 'peer_id', '3': 4, '4': 1, '5': 9, '10': 'peerId'}, - const {'1': 'consensus_keys', '3': 5, '4': 3, '5': 9, '10': 'consensusKeys'}, - const {'1': 'consensus_addresses', '3': 6, '4': 3, '5': 9, '10': 'consensusAddresses'}, - const {'1': 'services', '3': 7, '4': 1, '5': 13, '10': 'services'}, - const {'1': 'last_block_hash', '3': 8, '4': 1, '5': 9, '10': 'lastBlockHash'}, - const {'1': 'height', '3': 9, '4': 1, '5': 13, '10': 'height'}, - const {'1': 'received_bundles', '3': 10, '4': 1, '5': 5, '10': 'receivedBundles'}, - const {'1': 'invalid_bundles', '3': 11, '4': 1, '5': 5, '10': 'invalidBundles'}, - const {'1': 'last_sent', '3': 12, '4': 1, '5': 3, '10': 'lastSent'}, - const {'1': 'last_received', '3': 13, '4': 1, '5': 3, '10': 'lastReceived'}, - const {'1': 'sent_bytes', '3': 14, '4': 3, '5': 11, '6': '.pactus.PeerInfo.SentBytesEntry', '10': 'sentBytes'}, - const {'1': 'received_bytes', '3': 15, '4': 3, '5': 11, '6': '.pactus.PeerInfo.ReceivedBytesEntry', '10': 'receivedBytes'}, - const {'1': 'address', '3': 16, '4': 1, '5': 9, '10': 'address'}, - const {'1': 'direction', '3': 17, '4': 1, '5': 9, '10': 'direction'}, - const {'1': 'protocols', '3': 18, '4': 3, '5': 9, '10': 'protocols'}, - const {'1': 'total_sessions', '3': 19, '4': 1, '5': 5, '10': 'totalSessions'}, - const {'1': 'completed_sessions', '3': 20, '4': 1, '5': 5, '10': 'completedSessions'}, - ], - '3': const [PeerInfo_SentBytesEntry$json, PeerInfo_ReceivedBytesEntry$json], -}; - -@$core.Deprecated('Use peerInfoDescriptor instead') -const PeerInfo_SentBytesEntry$json = const { - '1': 'SentBytesEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, - const {'1': 'value', '3': 2, '4': 1, '5': 3, '10': 'value'}, - ], - '7': const {'7': true}, -}; - -@$core.Deprecated('Use peerInfoDescriptor instead') -const PeerInfo_ReceivedBytesEntry$json = const { - '1': 'ReceivedBytesEntry', - '2': const [ - const {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, - const {'1': 'value', '3': 2, '4': 1, '5': 3, '10': 'value'}, - ], - '7': const {'7': true}, -}; - -/// Descriptor for `PeerInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List peerInfoDescriptor = $convert.base64Decode('CghQZWVySW5mbxIWCgZzdGF0dXMYASABKAVSBnN0YXR1cxIYCgdtb25pa2VyGAIgASgJUgdtb25pa2VyEhQKBWFnZW50GAMgASgJUgVhZ2VudBIXCgdwZWVyX2lkGAQgASgJUgZwZWVySWQSJQoOY29uc2Vuc3VzX2tleXMYBSADKAlSDWNvbnNlbnN1c0tleXMSLwoTY29uc2Vuc3VzX2FkZHJlc3NlcxgGIAMoCVISY29uc2Vuc3VzQWRkcmVzc2VzEhoKCHNlcnZpY2VzGAcgASgNUghzZXJ2aWNlcxImCg9sYXN0X2Jsb2NrX2hhc2gYCCABKAlSDWxhc3RCbG9ja0hhc2gSFgoGaGVpZ2h0GAkgASgNUgZoZWlnaHQSKQoQcmVjZWl2ZWRfYnVuZGxlcxgKIAEoBVIPcmVjZWl2ZWRCdW5kbGVzEicKD2ludmFsaWRfYnVuZGxlcxgLIAEoBVIOaW52YWxpZEJ1bmRsZXMSGwoJbGFzdF9zZW50GAwgASgDUghsYXN0U2VudBIjCg1sYXN0X3JlY2VpdmVkGA0gASgDUgxsYXN0UmVjZWl2ZWQSPgoKc2VudF9ieXRlcxgOIAMoCzIfLnBhY3R1cy5QZWVySW5mby5TZW50Qnl0ZXNFbnRyeVIJc2VudEJ5dGVzEkoKDnJlY2VpdmVkX2J5dGVzGA8gAygLMiMucGFjdHVzLlBlZXJJbmZvLlJlY2VpdmVkQnl0ZXNFbnRyeVINcmVjZWl2ZWRCeXRlcxIYCgdhZGRyZXNzGBAgASgJUgdhZGRyZXNzEhwKCWRpcmVjdGlvbhgRIAEoCVIJZGlyZWN0aW9uEhwKCXByb3RvY29scxgSIAMoCVIJcHJvdG9jb2xzEiUKDnRvdGFsX3Nlc3Npb25zGBMgASgFUg10b3RhbFNlc3Npb25zEi0KEmNvbXBsZXRlZF9zZXNzaW9ucxgUIAEoBVIRY29tcGxldGVkU2Vzc2lvbnMaPAoOU2VudEJ5dGVzRW50cnkSEAoDa2V5GAEgASgFUgNrZXkSFAoFdmFsdWUYAiABKANSBXZhbHVlOgI4ARpAChJSZWNlaXZlZEJ5dGVzRW50cnkSEAoDa2V5GAEgASgFUgNrZXkSFAoFdmFsdWUYAiABKANSBXZhbHVlOgI4AQ=='); -@$core.Deprecated('Use connectionInfoDescriptor instead') -const ConnectionInfo$json = const { - '1': 'ConnectionInfo', - '2': const [ - const {'1': 'connections', '3': 1, '4': 1, '5': 4, '10': 'connections'}, - const {'1': 'inbound_connections', '3': 2, '4': 1, '5': 4, '10': 'inboundConnections'}, - const {'1': 'outbound_connections', '3': 3, '4': 1, '5': 4, '10': 'outboundConnections'}, - ], -}; - -/// Descriptor for `ConnectionInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List connectionInfoDescriptor = $convert.base64Decode('Cg5Db25uZWN0aW9uSW5mbxIgCgtjb25uZWN0aW9ucxgBIAEoBFILY29ubmVjdGlvbnMSLwoTaW5ib3VuZF9jb25uZWN0aW9ucxgCIAEoBFISaW5ib3VuZENvbm5lY3Rpb25zEjEKFG91dGJvdW5kX2Nvbm5lY3Rpb25zGAMgASgEUhNvdXRib3VuZENvbm5lY3Rpb25z'); -const $core.Map<$core.String, $core.dynamic> NetworkServiceBase$json = const { - '1': 'Network', - '2': const [ - const {'1': 'GetNetworkInfo', '2': '.pactus.GetNetworkInfoRequest', '3': '.pactus.GetNetworkInfoResponse'}, - const {'1': 'GetNodeInfo', '2': '.pactus.GetNodeInfoRequest', '3': '.pactus.GetNodeInfoResponse'}, - ], -}; - -@$core.Deprecated('Use networkServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> NetworkServiceBase$messageJson = const { - '.pactus.GetNetworkInfoRequest': GetNetworkInfoRequest$json, - '.pactus.GetNetworkInfoResponse': GetNetworkInfoResponse$json, - '.pactus.PeerInfo': PeerInfo$json, - '.pactus.PeerInfo.SentBytesEntry': PeerInfo_SentBytesEntry$json, - '.pactus.PeerInfo.ReceivedBytesEntry': PeerInfo_ReceivedBytesEntry$json, - '.pactus.GetNetworkInfoResponse.SentBytesEntry': GetNetworkInfoResponse_SentBytesEntry$json, - '.pactus.GetNetworkInfoResponse.ReceivedBytesEntry': GetNetworkInfoResponse_ReceivedBytesEntry$json, - '.pactus.GetNodeInfoRequest': GetNodeInfoRequest$json, - '.pactus.GetNodeInfoResponse': GetNodeInfoResponse$json, - '.pactus.ConnectionInfo': ConnectionInfo$json, -}; - -/// Descriptor for `Network`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List networkServiceDescriptor = $convert.base64Decode('CgdOZXR3b3JrEk8KDkdldE5ldHdvcmtJbmZvEh0ucGFjdHVzLkdldE5ldHdvcmtJbmZvUmVxdWVzdBoeLnBhY3R1cy5HZXROZXR3b3JrSW5mb1Jlc3BvbnNlEkYKC0dldE5vZGVJbmZvEhoucGFjdHVzLkdldE5vZGVJbmZvUmVxdWVzdBobLnBhY3R1cy5HZXROb2RlSW5mb1Jlc3BvbnNl'); diff --git a/www/grpc/gen/dart/network.pbserver.dart b/www/grpc/gen/dart/network.pbserver.dart deleted file mode 100644 index 7224d070b..000000000 --- a/www/grpc/gen/dart/network.pbserver.dart +++ /dev/null @@ -1,41 +0,0 @@ -/// -// Generated code. Do not modify. -// source: network.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:async' as $async; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'dart:core' as $core; -import 'network.pb.dart' as $2; -import 'network.pbjson.dart'; - -export 'network.pb.dart'; - -abstract class NetworkServiceBase extends $pb.GeneratedService { - $async.Future<$2.GetNetworkInfoResponse> getNetworkInfo($pb.ServerContext ctx, $2.GetNetworkInfoRequest request); - $async.Future<$2.GetNodeInfoResponse> getNodeInfo($pb.ServerContext ctx, $2.GetNodeInfoRequest request); - - $pb.GeneratedMessage createRequest($core.String method) { - switch (method) { - case 'GetNetworkInfo': return $2.GetNetworkInfoRequest(); - case 'GetNodeInfo': return $2.GetNodeInfoRequest(); - default: throw $core.ArgumentError('Unknown method: $method'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) { - switch (method) { - case 'GetNetworkInfo': return this.getNetworkInfo(ctx, request as $2.GetNetworkInfoRequest); - case 'GetNodeInfo': return this.getNodeInfo(ctx, request as $2.GetNodeInfoRequest); - default: throw $core.ArgumentError('Unknown method: $method'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => NetworkServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => NetworkServiceBase$messageJson; -} - diff --git a/www/grpc/gen/dart/transaction.pb.dart b/www/grpc/gen/dart/transaction.pb.dart deleted file mode 100644 index 14d0c9125..000000000 --- a/www/grpc/gen/dart/transaction.pb.dart +++ /dev/null @@ -1,1513 +0,0 @@ -/// -// Generated code. Do not modify. -// source: transaction.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:fixnum/fixnum.dart' as $fixnum; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'transaction.pbenum.dart'; - -export 'transaction.pbenum.dart'; - -class GetTransactionRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') - ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'verbosity', $pb.PbFieldType.OE, defaultOrMaker: TransactionVerbosity.TRANSACTION_DATA, valueOf: TransactionVerbosity.valueOf, enumValues: TransactionVerbosity.values) - ..hasRequiredFields = false - ; - - GetTransactionRequest._() : super(); - factory GetTransactionRequest({ - $core.String? id, - TransactionVerbosity? verbosity, - }) { - final _result = create(); - if (id != null) { - _result.id = id; - } - if (verbosity != null) { - _result.verbosity = verbosity; - } - return _result; - } - factory GetTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetTransactionRequest clone() => GetTransactionRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetTransactionRequest copyWith(void Function(GetTransactionRequest) updates) => super.copyWith((message) => updates(message as GetTransactionRequest)) as GetTransactionRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetTransactionRequest create() => GetTransactionRequest._(); - GetTransactionRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetTransactionRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); - - @$pb.TagNumber(2) - TransactionVerbosity get verbosity => $_getN(1); - @$pb.TagNumber(2) - set verbosity(TransactionVerbosity v) { setField(2, v); } - @$pb.TagNumber(2) - $core.bool hasVerbosity() => $_has(1); - @$pb.TagNumber(2) - void clearVerbosity() => clearField(2); -} - -class GetTransactionResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTransactionResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockHeight', $pb.PbFieldType.OU3) - ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockTime', $pb.PbFieldType.OU3) - ..aOM(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transaction', subBuilder: TransactionInfo.create) - ..hasRequiredFields = false - ; - - GetTransactionResponse._() : super(); - factory GetTransactionResponse({ - $core.int? blockHeight, - $core.int? blockTime, - TransactionInfo? transaction, - }) { - final _result = create(); - if (blockHeight != null) { - _result.blockHeight = blockHeight; - } - if (blockTime != null) { - _result.blockTime = blockTime; - } - if (transaction != null) { - _result.transaction = transaction; - } - return _result; - } - factory GetTransactionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetTransactionResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetTransactionResponse clone() => GetTransactionResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetTransactionResponse copyWith(void Function(GetTransactionResponse) updates) => super.copyWith((message) => updates(message as GetTransactionResponse)) as GetTransactionResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetTransactionResponse create() => GetTransactionResponse._(); - GetTransactionResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetTransactionResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetTransactionResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get blockHeight => $_getIZ(0); - @$pb.TagNumber(1) - set blockHeight($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasBlockHeight() => $_has(0); - @$pb.TagNumber(1) - void clearBlockHeight() => clearField(1); - - @$pb.TagNumber(2) - $core.int get blockTime => $_getIZ(1); - @$pb.TagNumber(2) - set blockTime($core.int v) { $_setUnsignedInt32(1, v); } - @$pb.TagNumber(2) - $core.bool hasBlockTime() => $_has(1); - @$pb.TagNumber(2) - void clearBlockTime() => clearField(2); - - @$pb.TagNumber(3) - TransactionInfo get transaction => $_getN(2); - @$pb.TagNumber(3) - set transaction(TransactionInfo v) { setField(3, v); } - @$pb.TagNumber(3) - $core.bool hasTransaction() => $_has(2); - @$pb.TagNumber(3) - void clearTransaction() => clearField(3); - @$pb.TagNumber(3) - TransactionInfo ensureTransaction() => $_ensure(2); -} - -class CalculateFeeRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CalculateFeeRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aInt64(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payloadType', $pb.PbFieldType.OE, defaultOrMaker: PayloadType.UNKNOWN, valueOf: PayloadType.valueOf, enumValues: PayloadType.values) - ..aOB(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fixedAmount') - ..hasRequiredFields = false - ; - - CalculateFeeRequest._() : super(); - factory CalculateFeeRequest({ - $fixnum.Int64? amount, - PayloadType? payloadType, - $core.bool? fixedAmount, - }) { - final _result = create(); - if (amount != null) { - _result.amount = amount; - } - if (payloadType != null) { - _result.payloadType = payloadType; - } - if (fixedAmount != null) { - _result.fixedAmount = fixedAmount; - } - return _result; - } - factory CalculateFeeRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CalculateFeeRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CalculateFeeRequest clone() => CalculateFeeRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CalculateFeeRequest copyWith(void Function(CalculateFeeRequest) updates) => super.copyWith((message) => updates(message as CalculateFeeRequest)) as CalculateFeeRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static CalculateFeeRequest create() => CalculateFeeRequest._(); - CalculateFeeRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static CalculateFeeRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CalculateFeeRequest? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get amount => $_getI64(0); - @$pb.TagNumber(1) - set amount($fixnum.Int64 v) { $_setInt64(0, v); } - @$pb.TagNumber(1) - $core.bool hasAmount() => $_has(0); - @$pb.TagNumber(1) - void clearAmount() => clearField(1); - - @$pb.TagNumber(2) - PayloadType get payloadType => $_getN(1); - @$pb.TagNumber(2) - set payloadType(PayloadType v) { setField(2, v); } - @$pb.TagNumber(2) - $core.bool hasPayloadType() => $_has(1); - @$pb.TagNumber(2) - void clearPayloadType() => clearField(2); - - @$pb.TagNumber(3) - $core.bool get fixedAmount => $_getBF(2); - @$pb.TagNumber(3) - set fixedAmount($core.bool v) { $_setBool(2, v); } - @$pb.TagNumber(3) - $core.bool hasFixedAmount() => $_has(2); - @$pb.TagNumber(3) - void clearFixedAmount() => clearField(3); -} - -class CalculateFeeResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CalculateFeeResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aInt64(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..aInt64(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') - ..hasRequiredFields = false - ; - - CalculateFeeResponse._() : super(); - factory CalculateFeeResponse({ - $fixnum.Int64? amount, - $fixnum.Int64? fee, - }) { - final _result = create(); - if (amount != null) { - _result.amount = amount; - } - if (fee != null) { - _result.fee = fee; - } - return _result; - } - factory CalculateFeeResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CalculateFeeResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CalculateFeeResponse clone() => CalculateFeeResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CalculateFeeResponse copyWith(void Function(CalculateFeeResponse) updates) => super.copyWith((message) => updates(message as CalculateFeeResponse)) as CalculateFeeResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static CalculateFeeResponse create() => CalculateFeeResponse._(); - CalculateFeeResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static CalculateFeeResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CalculateFeeResponse? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get amount => $_getI64(0); - @$pb.TagNumber(1) - set amount($fixnum.Int64 v) { $_setInt64(0, v); } - @$pb.TagNumber(1) - $core.bool hasAmount() => $_has(0); - @$pb.TagNumber(1) - void clearAmount() => clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get fee => $_getI64(1); - @$pb.TagNumber(2) - set fee($fixnum.Int64 v) { $_setInt64(1, v); } - @$pb.TagNumber(2) - $core.bool hasFee() => $_has(1); - @$pb.TagNumber(2) - void clearFee() => clearField(2); -} - -class BroadcastTransactionRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BroadcastTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signedRawTransaction') - ..hasRequiredFields = false - ; - - BroadcastTransactionRequest._() : super(); - factory BroadcastTransactionRequest({ - $core.String? signedRawTransaction, - }) { - final _result = create(); - if (signedRawTransaction != null) { - _result.signedRawTransaction = signedRawTransaction; - } - return _result; - } - factory BroadcastTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory BroadcastTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - BroadcastTransactionRequest clone() => BroadcastTransactionRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - BroadcastTransactionRequest copyWith(void Function(BroadcastTransactionRequest) updates) => super.copyWith((message) => updates(message as BroadcastTransactionRequest)) as BroadcastTransactionRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static BroadcastTransactionRequest create() => BroadcastTransactionRequest._(); - BroadcastTransactionRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static BroadcastTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static BroadcastTransactionRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get signedRawTransaction => $_getSZ(0); - @$pb.TagNumber(1) - set signedRawTransaction($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasSignedRawTransaction() => $_has(0); - @$pb.TagNumber(1) - void clearSignedRawTransaction() => clearField(1); -} - -class BroadcastTransactionResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BroadcastTransactionResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') - ..hasRequiredFields = false - ; - - BroadcastTransactionResponse._() : super(); - factory BroadcastTransactionResponse({ - $core.String? id, - }) { - final _result = create(); - if (id != null) { - _result.id = id; - } - return _result; - } - factory BroadcastTransactionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory BroadcastTransactionResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - BroadcastTransactionResponse clone() => BroadcastTransactionResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - BroadcastTransactionResponse copyWith(void Function(BroadcastTransactionResponse) updates) => super.copyWith((message) => updates(message as BroadcastTransactionResponse)) as BroadcastTransactionResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static BroadcastTransactionResponse create() => BroadcastTransactionResponse._(); - BroadcastTransactionResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static BroadcastTransactionResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static BroadcastTransactionResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); -} - -class GetRawTransferTransactionRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawTransferTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') - ..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') - ..hasRequiredFields = false - ; - - GetRawTransferTransactionRequest._() : super(); - factory GetRawTransferTransactionRequest({ - $core.int? lockTime, - $core.String? sender, - $core.String? receiver, - $fixnum.Int64? amount, - $fixnum.Int64? fee, - $core.String? memo, - }) { - final _result = create(); - if (lockTime != null) { - _result.lockTime = lockTime; - } - if (sender != null) { - _result.sender = sender; - } - if (receiver != null) { - _result.receiver = receiver; - } - if (amount != null) { - _result.amount = amount; - } - if (fee != null) { - _result.fee = fee; - } - if (memo != null) { - _result.memo = memo; - } - return _result; - } - factory GetRawTransferTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetRawTransferTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetRawTransferTransactionRequest clone() => GetRawTransferTransactionRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetRawTransferTransactionRequest copyWith(void Function(GetRawTransferTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawTransferTransactionRequest)) as GetRawTransferTransactionRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetRawTransferTransactionRequest create() => GetRawTransferTransactionRequest._(); - GetRawTransferTransactionRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetRawTransferTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetRawTransferTransactionRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get lockTime => $_getIZ(0); - @$pb.TagNumber(1) - set lockTime($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasLockTime() => $_has(0); - @$pb.TagNumber(1) - void clearLockTime() => clearField(1); - - @$pb.TagNumber(2) - $core.String get sender => $_getSZ(1); - @$pb.TagNumber(2) - set sender($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasSender() => $_has(1); - @$pb.TagNumber(2) - void clearSender() => clearField(2); - - @$pb.TagNumber(3) - $core.String get receiver => $_getSZ(2); - @$pb.TagNumber(3) - set receiver($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasReceiver() => $_has(2); - @$pb.TagNumber(3) - void clearReceiver() => clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get amount => $_getI64(3); - @$pb.TagNumber(4) - set amount($fixnum.Int64 v) { $_setInt64(3, v); } - @$pb.TagNumber(4) - $core.bool hasAmount() => $_has(3); - @$pb.TagNumber(4) - void clearAmount() => clearField(4); - - @$pb.TagNumber(5) - $fixnum.Int64 get fee => $_getI64(4); - @$pb.TagNumber(5) - set fee($fixnum.Int64 v) { $_setInt64(4, v); } - @$pb.TagNumber(5) - $core.bool hasFee() => $_has(4); - @$pb.TagNumber(5) - void clearFee() => clearField(5); - - @$pb.TagNumber(6) - $core.String get memo => $_getSZ(5); - @$pb.TagNumber(6) - set memo($core.String v) { $_setString(5, v); } - @$pb.TagNumber(6) - $core.bool hasMemo() => $_has(5); - @$pb.TagNumber(6) - void clearMemo() => clearField(6); -} - -class GetRawBondTransactionRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawBondTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') - ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') - ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') - ..aOS(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') - ..hasRequiredFields = false - ; - - GetRawBondTransactionRequest._() : super(); - factory GetRawBondTransactionRequest({ - $core.int? lockTime, - $core.String? sender, - $core.String? receiver, - $fixnum.Int64? stake, - $core.String? publicKey, - $fixnum.Int64? fee, - $core.String? memo, - }) { - final _result = create(); - if (lockTime != null) { - _result.lockTime = lockTime; - } - if (sender != null) { - _result.sender = sender; - } - if (receiver != null) { - _result.receiver = receiver; - } - if (stake != null) { - _result.stake = stake; - } - if (publicKey != null) { - _result.publicKey = publicKey; - } - if (fee != null) { - _result.fee = fee; - } - if (memo != null) { - _result.memo = memo; - } - return _result; - } - factory GetRawBondTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetRawBondTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetRawBondTransactionRequest clone() => GetRawBondTransactionRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetRawBondTransactionRequest copyWith(void Function(GetRawBondTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawBondTransactionRequest)) as GetRawBondTransactionRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetRawBondTransactionRequest create() => GetRawBondTransactionRequest._(); - GetRawBondTransactionRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetRawBondTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetRawBondTransactionRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get lockTime => $_getIZ(0); - @$pb.TagNumber(1) - set lockTime($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasLockTime() => $_has(0); - @$pb.TagNumber(1) - void clearLockTime() => clearField(1); - - @$pb.TagNumber(2) - $core.String get sender => $_getSZ(1); - @$pb.TagNumber(2) - set sender($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasSender() => $_has(1); - @$pb.TagNumber(2) - void clearSender() => clearField(2); - - @$pb.TagNumber(3) - $core.String get receiver => $_getSZ(2); - @$pb.TagNumber(3) - set receiver($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasReceiver() => $_has(2); - @$pb.TagNumber(3) - void clearReceiver() => clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get stake => $_getI64(3); - @$pb.TagNumber(4) - set stake($fixnum.Int64 v) { $_setInt64(3, v); } - @$pb.TagNumber(4) - $core.bool hasStake() => $_has(3); - @$pb.TagNumber(4) - void clearStake() => clearField(4); - - @$pb.TagNumber(5) - $core.String get publicKey => $_getSZ(4); - @$pb.TagNumber(5) - set publicKey($core.String v) { $_setString(4, v); } - @$pb.TagNumber(5) - $core.bool hasPublicKey() => $_has(4); - @$pb.TagNumber(5) - void clearPublicKey() => clearField(5); - - @$pb.TagNumber(6) - $fixnum.Int64 get fee => $_getI64(5); - @$pb.TagNumber(6) - set fee($fixnum.Int64 v) { $_setInt64(5, v); } - @$pb.TagNumber(6) - $core.bool hasFee() => $_has(5); - @$pb.TagNumber(6) - void clearFee() => clearField(6); - - @$pb.TagNumber(7) - $core.String get memo => $_getSZ(6); - @$pb.TagNumber(7) - set memo($core.String v) { $_setString(6, v); } - @$pb.TagNumber(7) - $core.bool hasMemo() => $_has(6); - @$pb.TagNumber(7) - void clearMemo() => clearField(7); -} - -class GetRawUnbondTransactionRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawUnbondTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') - ..hasRequiredFields = false - ; - - GetRawUnbondTransactionRequest._() : super(); - factory GetRawUnbondTransactionRequest({ - $core.int? lockTime, - $core.String? validatorAddress, - $core.String? memo, - }) { - final _result = create(); - if (lockTime != null) { - _result.lockTime = lockTime; - } - if (validatorAddress != null) { - _result.validatorAddress = validatorAddress; - } - if (memo != null) { - _result.memo = memo; - } - return _result; - } - factory GetRawUnbondTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetRawUnbondTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetRawUnbondTransactionRequest clone() => GetRawUnbondTransactionRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetRawUnbondTransactionRequest copyWith(void Function(GetRawUnbondTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawUnbondTransactionRequest)) as GetRawUnbondTransactionRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetRawUnbondTransactionRequest create() => GetRawUnbondTransactionRequest._(); - GetRawUnbondTransactionRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetRawUnbondTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetRawUnbondTransactionRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get lockTime => $_getIZ(0); - @$pb.TagNumber(1) - set lockTime($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasLockTime() => $_has(0); - @$pb.TagNumber(1) - void clearLockTime() => clearField(1); - - @$pb.TagNumber(3) - $core.String get validatorAddress => $_getSZ(1); - @$pb.TagNumber(3) - set validatorAddress($core.String v) { $_setString(1, v); } - @$pb.TagNumber(3) - $core.bool hasValidatorAddress() => $_has(1); - @$pb.TagNumber(3) - void clearValidatorAddress() => clearField(3); - - @$pb.TagNumber(4) - $core.String get memo => $_getSZ(2); - @$pb.TagNumber(4) - set memo($core.String v) { $_setString(2, v); } - @$pb.TagNumber(4) - $core.bool hasMemo() => $_has(2); - @$pb.TagNumber(4) - void clearMemo() => clearField(4); -} - -class GetRawWithdrawTransactionRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawWithdrawTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'accountAddress') - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') - ..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') - ..hasRequiredFields = false - ; - - GetRawWithdrawTransactionRequest._() : super(); - factory GetRawWithdrawTransactionRequest({ - $core.int? lockTime, - $core.String? validatorAddress, - $core.String? accountAddress, - $fixnum.Int64? amount, - $fixnum.Int64? fee, - $core.String? memo, - }) { - final _result = create(); - if (lockTime != null) { - _result.lockTime = lockTime; - } - if (validatorAddress != null) { - _result.validatorAddress = validatorAddress; - } - if (accountAddress != null) { - _result.accountAddress = accountAddress; - } - if (amount != null) { - _result.amount = amount; - } - if (fee != null) { - _result.fee = fee; - } - if (memo != null) { - _result.memo = memo; - } - return _result; - } - factory GetRawWithdrawTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetRawWithdrawTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetRawWithdrawTransactionRequest clone() => GetRawWithdrawTransactionRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetRawWithdrawTransactionRequest copyWith(void Function(GetRawWithdrawTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawWithdrawTransactionRequest)) as GetRawWithdrawTransactionRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetRawWithdrawTransactionRequest create() => GetRawWithdrawTransactionRequest._(); - GetRawWithdrawTransactionRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetRawWithdrawTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetRawWithdrawTransactionRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.int get lockTime => $_getIZ(0); - @$pb.TagNumber(1) - set lockTime($core.int v) { $_setUnsignedInt32(0, v); } - @$pb.TagNumber(1) - $core.bool hasLockTime() => $_has(0); - @$pb.TagNumber(1) - void clearLockTime() => clearField(1); - - @$pb.TagNumber(2) - $core.String get validatorAddress => $_getSZ(1); - @$pb.TagNumber(2) - set validatorAddress($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasValidatorAddress() => $_has(1); - @$pb.TagNumber(2) - void clearValidatorAddress() => clearField(2); - - @$pb.TagNumber(3) - $core.String get accountAddress => $_getSZ(2); - @$pb.TagNumber(3) - set accountAddress($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasAccountAddress() => $_has(2); - @$pb.TagNumber(3) - void clearAccountAddress() => clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get amount => $_getI64(3); - @$pb.TagNumber(4) - set amount($fixnum.Int64 v) { $_setInt64(3, v); } - @$pb.TagNumber(4) - $core.bool hasAmount() => $_has(3); - @$pb.TagNumber(4) - void clearAmount() => clearField(4); - - @$pb.TagNumber(5) - $fixnum.Int64 get fee => $_getI64(4); - @$pb.TagNumber(5) - set fee($fixnum.Int64 v) { $_setInt64(4, v); } - @$pb.TagNumber(5) - $core.bool hasFee() => $_has(4); - @$pb.TagNumber(5) - void clearFee() => clearField(5); - - @$pb.TagNumber(6) - $core.String get memo => $_getSZ(5); - @$pb.TagNumber(6) - set memo($core.String v) { $_setString(5, v); } - @$pb.TagNumber(6) - $core.bool hasMemo() => $_has(5); - @$pb.TagNumber(6) - void clearMemo() => clearField(6); -} - -class GetRawTransactionResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawTransactionResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'rawTransaction') - ..hasRequiredFields = false - ; - - GetRawTransactionResponse._() : super(); - factory GetRawTransactionResponse({ - $core.String? rawTransaction, - }) { - final _result = create(); - if (rawTransaction != null) { - _result.rawTransaction = rawTransaction; - } - return _result; - } - factory GetRawTransactionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetRawTransactionResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetRawTransactionResponse clone() => GetRawTransactionResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetRawTransactionResponse copyWith(void Function(GetRawTransactionResponse) updates) => super.copyWith((message) => updates(message as GetRawTransactionResponse)) as GetRawTransactionResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetRawTransactionResponse create() => GetRawTransactionResponse._(); - GetRawTransactionResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetRawTransactionResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetRawTransactionResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get rawTransaction => $_getSZ(0); - @$pb.TagNumber(1) - set rawTransaction($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasRawTransaction() => $_has(0); - @$pb.TagNumber(1) - void clearRawTransaction() => clearField(1); -} - -class PayloadTransfer extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadTransfer', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..hasRequiredFields = false - ; - - PayloadTransfer._() : super(); - factory PayloadTransfer({ - $core.String? sender, - $core.String? receiver, - $fixnum.Int64? amount, - }) { - final _result = create(); - if (sender != null) { - _result.sender = sender; - } - if (receiver != null) { - _result.receiver = receiver; - } - if (amount != null) { - _result.amount = amount; - } - return _result; - } - factory PayloadTransfer.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PayloadTransfer.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PayloadTransfer clone() => PayloadTransfer()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PayloadTransfer copyWith(void Function(PayloadTransfer) updates) => super.copyWith((message) => updates(message as PayloadTransfer)) as PayloadTransfer; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static PayloadTransfer create() => PayloadTransfer._(); - PayloadTransfer createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PayloadTransfer getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PayloadTransfer? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get sender => $_getSZ(0); - @$pb.TagNumber(1) - set sender($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasSender() => $_has(0); - @$pb.TagNumber(1) - void clearSender() => clearField(1); - - @$pb.TagNumber(2) - $core.String get receiver => $_getSZ(1); - @$pb.TagNumber(2) - set receiver($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasReceiver() => $_has(1); - @$pb.TagNumber(2) - void clearReceiver() => clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get amount => $_getI64(2); - @$pb.TagNumber(3) - set amount($fixnum.Int64 v) { $_setInt64(2, v); } - @$pb.TagNumber(3) - $core.bool hasAmount() => $_has(2); - @$pb.TagNumber(3) - void clearAmount() => clearField(3); -} - -class PayloadBond extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadBond', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') - ..hasRequiredFields = false - ; - - PayloadBond._() : super(); - factory PayloadBond({ - $core.String? sender, - $core.String? receiver, - $fixnum.Int64? stake, - }) { - final _result = create(); - if (sender != null) { - _result.sender = sender; - } - if (receiver != null) { - _result.receiver = receiver; - } - if (stake != null) { - _result.stake = stake; - } - return _result; - } - factory PayloadBond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PayloadBond.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PayloadBond clone() => PayloadBond()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PayloadBond copyWith(void Function(PayloadBond) updates) => super.copyWith((message) => updates(message as PayloadBond)) as PayloadBond; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static PayloadBond create() => PayloadBond._(); - PayloadBond createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PayloadBond getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PayloadBond? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get sender => $_getSZ(0); - @$pb.TagNumber(1) - set sender($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasSender() => $_has(0); - @$pb.TagNumber(1) - void clearSender() => clearField(1); - - @$pb.TagNumber(2) - $core.String get receiver => $_getSZ(1); - @$pb.TagNumber(2) - set receiver($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasReceiver() => $_has(1); - @$pb.TagNumber(2) - void clearReceiver() => clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get stake => $_getI64(2); - @$pb.TagNumber(3) - set stake($fixnum.Int64 v) { $_setInt64(2, v); } - @$pb.TagNumber(3) - $core.bool hasStake() => $_has(2); - @$pb.TagNumber(3) - void clearStake() => clearField(3); -} - -class PayloadSortition extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadSortition', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'proof') - ..hasRequiredFields = false - ; - - PayloadSortition._() : super(); - factory PayloadSortition({ - $core.String? address, - $core.String? proof, - }) { - final _result = create(); - if (address != null) { - _result.address = address; - } - if (proof != null) { - _result.proof = proof; - } - return _result; - } - factory PayloadSortition.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PayloadSortition.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PayloadSortition clone() => PayloadSortition()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PayloadSortition copyWith(void Function(PayloadSortition) updates) => super.copyWith((message) => updates(message as PayloadSortition)) as PayloadSortition; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static PayloadSortition create() => PayloadSortition._(); - PayloadSortition createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PayloadSortition getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PayloadSortition? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get address => $_getSZ(0); - @$pb.TagNumber(1) - set address($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasAddress() => $_has(0); - @$pb.TagNumber(1) - void clearAddress() => clearField(1); - - @$pb.TagNumber(2) - $core.String get proof => $_getSZ(1); - @$pb.TagNumber(2) - set proof($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasProof() => $_has(1); - @$pb.TagNumber(2) - void clearProof() => clearField(2); -} - -class PayloadUnbond extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadUnbond', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validator') - ..hasRequiredFields = false - ; - - PayloadUnbond._() : super(); - factory PayloadUnbond({ - $core.String? validator, - }) { - final _result = create(); - if (validator != null) { - _result.validator = validator; - } - return _result; - } - factory PayloadUnbond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PayloadUnbond.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PayloadUnbond clone() => PayloadUnbond()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PayloadUnbond copyWith(void Function(PayloadUnbond) updates) => super.copyWith((message) => updates(message as PayloadUnbond)) as PayloadUnbond; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static PayloadUnbond create() => PayloadUnbond._(); - PayloadUnbond createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PayloadUnbond getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PayloadUnbond? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get validator => $_getSZ(0); - @$pb.TagNumber(1) - set validator($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasValidator() => $_has(0); - @$pb.TagNumber(1) - void clearValidator() => clearField(1); -} - -class PayloadWithdraw extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadWithdraw', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'from') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'to') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..hasRequiredFields = false - ; - - PayloadWithdraw._() : super(); - factory PayloadWithdraw({ - $core.String? from, - $core.String? to, - $fixnum.Int64? amount, - }) { - final _result = create(); - if (from != null) { - _result.from = from; - } - if (to != null) { - _result.to = to; - } - if (amount != null) { - _result.amount = amount; - } - return _result; - } - factory PayloadWithdraw.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory PayloadWithdraw.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - PayloadWithdraw clone() => PayloadWithdraw()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - PayloadWithdraw copyWith(void Function(PayloadWithdraw) updates) => super.copyWith((message) => updates(message as PayloadWithdraw)) as PayloadWithdraw; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static PayloadWithdraw create() => PayloadWithdraw._(); - PayloadWithdraw createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static PayloadWithdraw getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static PayloadWithdraw? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get from => $_getSZ(0); - @$pb.TagNumber(1) - set from($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasFrom() => $_has(0); - @$pb.TagNumber(1) - void clearFrom() => clearField(1); - - @$pb.TagNumber(2) - $core.String get to => $_getSZ(1); - @$pb.TagNumber(2) - set to($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasTo() => $_has(1); - @$pb.TagNumber(2) - void clearTo() => clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get amount => $_getI64(2); - @$pb.TagNumber(3) - set amount($fixnum.Int64 v) { $_setInt64(2, v); } - @$pb.TagNumber(3) - $core.bool hasAmount() => $_has(2); - @$pb.TagNumber(3) - void clearAmount() => clearField(3); -} - -enum TransactionInfo_Payload { - transfer, - bond, - sortition, - unbond, - withdraw, - notSet -} - -class TransactionInfo extends $pb.GeneratedMessage { - static const $core.Map<$core.int, TransactionInfo_Payload> _TransactionInfo_PayloadByTag = { - 30 : TransactionInfo_Payload.transfer, - 31 : TransactionInfo_Payload.bond, - 32 : TransactionInfo_Payload.sortition, - 33 : TransactionInfo_Payload.unbond, - 34 : TransactionInfo_Payload.withdraw, - 0 : TransactionInfo_Payload.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'TransactionInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..oo(0, [30, 31, 32, 33, 34]) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'data') - ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version', $pb.PbFieldType.O3) - ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) - ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value') - ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') - ..e(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payloadType', $pb.PbFieldType.OE, defaultOrMaker: PayloadType.UNKNOWN, valueOf: PayloadType.valueOf, enumValues: PayloadType.values) - ..aOS(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') - ..aOS(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') - ..aOS(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature') - ..aOM(30, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: PayloadTransfer.create) - ..aOM(31, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: PayloadBond.create) - ..aOM(32, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sortition', subBuilder: PayloadSortition.create) - ..aOM(33, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: PayloadUnbond.create) - ..aOM(34, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: PayloadWithdraw.create) - ..hasRequiredFields = false - ; - - TransactionInfo._() : super(); - factory TransactionInfo({ - $core.String? id, - $core.String? data, - $core.int? version, - $core.int? lockTime, - $fixnum.Int64? value, - $fixnum.Int64? fee, - PayloadType? payloadType, - $core.String? memo, - $core.String? publicKey, - $core.String? signature, - PayloadTransfer? transfer, - PayloadBond? bond, - PayloadSortition? sortition, - PayloadUnbond? unbond, - PayloadWithdraw? withdraw, - }) { - final _result = create(); - if (id != null) { - _result.id = id; - } - if (data != null) { - _result.data = data; - } - if (version != null) { - _result.version = version; - } - if (lockTime != null) { - _result.lockTime = lockTime; - } - if (value != null) { - _result.value = value; - } - if (fee != null) { - _result.fee = fee; - } - if (payloadType != null) { - _result.payloadType = payloadType; - } - if (memo != null) { - _result.memo = memo; - } - if (publicKey != null) { - _result.publicKey = publicKey; - } - if (signature != null) { - _result.signature = signature; - } - if (transfer != null) { - _result.transfer = transfer; - } - if (bond != null) { - _result.bond = bond; - } - if (sortition != null) { - _result.sortition = sortition; - } - if (unbond != null) { - _result.unbond = unbond; - } - if (withdraw != null) { - _result.withdraw = withdraw; - } - return _result; - } - factory TransactionInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory TransactionInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - TransactionInfo clone() => TransactionInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - TransactionInfo copyWith(void Function(TransactionInfo) updates) => super.copyWith((message) => updates(message as TransactionInfo)) as TransactionInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static TransactionInfo create() => TransactionInfo._(); - TransactionInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static TransactionInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static TransactionInfo? _defaultInstance; - - TransactionInfo_Payload whichPayload() => _TransactionInfo_PayloadByTag[$_whichOneof(0)]!; - void clearPayload() => clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - $core.String get id => $_getSZ(0); - @$pb.TagNumber(1) - set id($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get data => $_getSZ(1); - @$pb.TagNumber(2) - set data($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasData() => $_has(1); - @$pb.TagNumber(2) - void clearData() => clearField(2); - - @$pb.TagNumber(3) - $core.int get version => $_getIZ(2); - @$pb.TagNumber(3) - set version($core.int v) { $_setSignedInt32(2, v); } - @$pb.TagNumber(3) - $core.bool hasVersion() => $_has(2); - @$pb.TagNumber(3) - void clearVersion() => clearField(3); - - @$pb.TagNumber(4) - $core.int get lockTime => $_getIZ(3); - @$pb.TagNumber(4) - set lockTime($core.int v) { $_setUnsignedInt32(3, v); } - @$pb.TagNumber(4) - $core.bool hasLockTime() => $_has(3); - @$pb.TagNumber(4) - void clearLockTime() => clearField(4); - - @$pb.TagNumber(5) - $fixnum.Int64 get value => $_getI64(4); - @$pb.TagNumber(5) - set value($fixnum.Int64 v) { $_setInt64(4, v); } - @$pb.TagNumber(5) - $core.bool hasValue() => $_has(4); - @$pb.TagNumber(5) - void clearValue() => clearField(5); - - @$pb.TagNumber(6) - $fixnum.Int64 get fee => $_getI64(5); - @$pb.TagNumber(6) - set fee($fixnum.Int64 v) { $_setInt64(5, v); } - @$pb.TagNumber(6) - $core.bool hasFee() => $_has(5); - @$pb.TagNumber(6) - void clearFee() => clearField(6); - - @$pb.TagNumber(7) - PayloadType get payloadType => $_getN(6); - @$pb.TagNumber(7) - set payloadType(PayloadType v) { setField(7, v); } - @$pb.TagNumber(7) - $core.bool hasPayloadType() => $_has(6); - @$pb.TagNumber(7) - void clearPayloadType() => clearField(7); - - @$pb.TagNumber(8) - $core.String get memo => $_getSZ(7); - @$pb.TagNumber(8) - set memo($core.String v) { $_setString(7, v); } - @$pb.TagNumber(8) - $core.bool hasMemo() => $_has(7); - @$pb.TagNumber(8) - void clearMemo() => clearField(8); - - @$pb.TagNumber(9) - $core.String get publicKey => $_getSZ(8); - @$pb.TagNumber(9) - set publicKey($core.String v) { $_setString(8, v); } - @$pb.TagNumber(9) - $core.bool hasPublicKey() => $_has(8); - @$pb.TagNumber(9) - void clearPublicKey() => clearField(9); - - @$pb.TagNumber(10) - $core.String get signature => $_getSZ(9); - @$pb.TagNumber(10) - set signature($core.String v) { $_setString(9, v); } - @$pb.TagNumber(10) - $core.bool hasSignature() => $_has(9); - @$pb.TagNumber(10) - void clearSignature() => clearField(10); - - @$pb.TagNumber(30) - PayloadTransfer get transfer => $_getN(10); - @$pb.TagNumber(30) - set transfer(PayloadTransfer v) { setField(30, v); } - @$pb.TagNumber(30) - $core.bool hasTransfer() => $_has(10); - @$pb.TagNumber(30) - void clearTransfer() => clearField(30); - @$pb.TagNumber(30) - PayloadTransfer ensureTransfer() => $_ensure(10); - - @$pb.TagNumber(31) - PayloadBond get bond => $_getN(11); - @$pb.TagNumber(31) - set bond(PayloadBond v) { setField(31, v); } - @$pb.TagNumber(31) - $core.bool hasBond() => $_has(11); - @$pb.TagNumber(31) - void clearBond() => clearField(31); - @$pb.TagNumber(31) - PayloadBond ensureBond() => $_ensure(11); - - @$pb.TagNumber(32) - PayloadSortition get sortition => $_getN(12); - @$pb.TagNumber(32) - set sortition(PayloadSortition v) { setField(32, v); } - @$pb.TagNumber(32) - $core.bool hasSortition() => $_has(12); - @$pb.TagNumber(32) - void clearSortition() => clearField(32); - @$pb.TagNumber(32) - PayloadSortition ensureSortition() => $_ensure(12); - - @$pb.TagNumber(33) - PayloadUnbond get unbond => $_getN(13); - @$pb.TagNumber(33) - set unbond(PayloadUnbond v) { setField(33, v); } - @$pb.TagNumber(33) - $core.bool hasUnbond() => $_has(13); - @$pb.TagNumber(33) - void clearUnbond() => clearField(33); - @$pb.TagNumber(33) - PayloadUnbond ensureUnbond() => $_ensure(13); - - @$pb.TagNumber(34) - PayloadWithdraw get withdraw => $_getN(14); - @$pb.TagNumber(34) - set withdraw(PayloadWithdraw v) { setField(34, v); } - @$pb.TagNumber(34) - $core.bool hasWithdraw() => $_has(14); - @$pb.TagNumber(34) - void clearWithdraw() => clearField(34); - @$pb.TagNumber(34) - PayloadWithdraw ensureWithdraw() => $_ensure(14); -} - -class TransactionApi { - $pb.RpcClient _client; - TransactionApi(this._client); - - $async.Future getTransaction($pb.ClientContext? ctx, GetTransactionRequest request) { - var emptyResponse = GetTransactionResponse(); - return _client.invoke(ctx, 'Transaction', 'GetTransaction', request, emptyResponse); - } - $async.Future calculateFee($pb.ClientContext? ctx, CalculateFeeRequest request) { - var emptyResponse = CalculateFeeResponse(); - return _client.invoke(ctx, 'Transaction', 'CalculateFee', request, emptyResponse); - } - $async.Future broadcastTransaction($pb.ClientContext? ctx, BroadcastTransactionRequest request) { - var emptyResponse = BroadcastTransactionResponse(); - return _client.invoke(ctx, 'Transaction', 'BroadcastTransaction', request, emptyResponse); - } - $async.Future getRawTransferTransaction($pb.ClientContext? ctx, GetRawTransferTransactionRequest request) { - var emptyResponse = GetRawTransactionResponse(); - return _client.invoke(ctx, 'Transaction', 'GetRawTransferTransaction', request, emptyResponse); - } - $async.Future getRawBondTransaction($pb.ClientContext? ctx, GetRawBondTransactionRequest request) { - var emptyResponse = GetRawTransactionResponse(); - return _client.invoke(ctx, 'Transaction', 'GetRawBondTransaction', request, emptyResponse); - } - $async.Future getRawUnbondTransaction($pb.ClientContext? ctx, GetRawUnbondTransactionRequest request) { - var emptyResponse = GetRawTransactionResponse(); - return _client.invoke(ctx, 'Transaction', 'GetRawUnbondTransaction', request, emptyResponse); - } - $async.Future getRawWithdrawTransaction($pb.ClientContext? ctx, GetRawWithdrawTransactionRequest request) { - var emptyResponse = GetRawTransactionResponse(); - return _client.invoke(ctx, 'Transaction', 'GetRawWithdrawTransaction', request, emptyResponse); - } -} - diff --git a/www/grpc/gen/dart/transaction.pbenum.dart b/www/grpc/gen/dart/transaction.pbenum.dart deleted file mode 100644 index 4830d517d..000000000 --- a/www/grpc/gen/dart/transaction.pbenum.dart +++ /dev/null @@ -1,49 +0,0 @@ -/// -// Generated code. Do not modify. -// source: transaction.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -// ignore_for_file: UNDEFINED_SHOWN_NAME -import 'dart:core' as $core; -import 'package:protobuf/protobuf.dart' as $pb; - -class PayloadType extends $pb.ProtobufEnum { - static const PayloadType UNKNOWN = PayloadType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UNKNOWN'); - static const PayloadType TRANSFER_PAYLOAD = PayloadType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TRANSFER_PAYLOAD'); - static const PayloadType BOND_PAYLOAD = PayloadType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'BOND_PAYLOAD'); - static const PayloadType SORTITION_PAYLOAD = PayloadType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SORTITION_PAYLOAD'); - static const PayloadType UNBOND_PAYLOAD = PayloadType._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UNBOND_PAYLOAD'); - static const PayloadType WITHDRAW_PAYLOAD = PayloadType._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WITHDRAW_PAYLOAD'); - - static const $core.List values = [ - UNKNOWN, - TRANSFER_PAYLOAD, - BOND_PAYLOAD, - SORTITION_PAYLOAD, - UNBOND_PAYLOAD, - WITHDRAW_PAYLOAD, - ]; - - static final $core.Map<$core.int, PayloadType> _byValue = $pb.ProtobufEnum.initByValue(values); - static PayloadType? valueOf($core.int value) => _byValue[value]; - - const PayloadType._($core.int v, $core.String n) : super(v, n); -} - -class TransactionVerbosity extends $pb.ProtobufEnum { - static const TransactionVerbosity TRANSACTION_DATA = TransactionVerbosity._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TRANSACTION_DATA'); - static const TransactionVerbosity TRANSACTION_INFO = TransactionVerbosity._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TRANSACTION_INFO'); - - static const $core.List values = [ - TRANSACTION_DATA, - TRANSACTION_INFO, - ]; - - static final $core.Map<$core.int, TransactionVerbosity> _byValue = $pb.ProtobufEnum.initByValue(values); - static TransactionVerbosity? valueOf($core.int value) => _byValue[value]; - - const TransactionVerbosity._($core.int v, $core.String n) : super(v, n); -} - diff --git a/www/grpc/gen/dart/transaction.pbjson.dart b/www/grpc/gen/dart/transaction.pbjson.dart deleted file mode 100644 index a9b78e9bb..000000000 --- a/www/grpc/gen/dart/transaction.pbjson.dart +++ /dev/null @@ -1,290 +0,0 @@ -/// -// Generated code. Do not modify. -// source: transaction.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:core' as $core; -import 'dart:convert' as $convert; -import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use payloadTypeDescriptor instead') -const PayloadType$json = const { - '1': 'PayloadType', - '2': const [ - const {'1': 'UNKNOWN', '2': 0}, - const {'1': 'TRANSFER_PAYLOAD', '2': 1}, - const {'1': 'BOND_PAYLOAD', '2': 2}, - const {'1': 'SORTITION_PAYLOAD', '2': 3}, - const {'1': 'UNBOND_PAYLOAD', '2': 4}, - const {'1': 'WITHDRAW_PAYLOAD', '2': 5}, - ], -}; - -/// Descriptor for `PayloadType`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List payloadTypeDescriptor = $convert.base64Decode('CgtQYXlsb2FkVHlwZRILCgdVTktOT1dOEAASFAoQVFJBTlNGRVJfUEFZTE9BRBABEhAKDEJPTkRfUEFZTE9BRBACEhUKEVNPUlRJVElPTl9QQVlMT0FEEAMSEgoOVU5CT05EX1BBWUxPQUQQBBIUChBXSVRIRFJBV19QQVlMT0FEEAU='); -@$core.Deprecated('Use transactionVerbosityDescriptor instead') -const TransactionVerbosity$json = const { - '1': 'TransactionVerbosity', - '2': const [ - const {'1': 'TRANSACTION_DATA', '2': 0}, - const {'1': 'TRANSACTION_INFO', '2': 1}, - ], -}; - -/// Descriptor for `TransactionVerbosity`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List transactionVerbosityDescriptor = $convert.base64Decode('ChRUcmFuc2FjdGlvblZlcmJvc2l0eRIUChBUUkFOU0FDVElPTl9EQVRBEAASFAoQVFJBTlNBQ1RJT05fSU5GTxAB'); -@$core.Deprecated('Use getTransactionRequestDescriptor instead') -const GetTransactionRequest$json = const { - '1': 'GetTransactionRequest', - '2': const [ - const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - const {'1': 'verbosity', '3': 2, '4': 1, '5': 14, '6': '.pactus.TransactionVerbosity', '10': 'verbosity'}, - ], -}; - -/// Descriptor for `GetTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getTransactionRequestDescriptor = $convert.base64Decode('ChVHZXRUcmFuc2FjdGlvblJlcXVlc3QSDgoCaWQYASABKAlSAmlkEjoKCXZlcmJvc2l0eRgCIAEoDjIcLnBhY3R1cy5UcmFuc2FjdGlvblZlcmJvc2l0eVIJdmVyYm9zaXR5'); -@$core.Deprecated('Use getTransactionResponseDescriptor instead') -const GetTransactionResponse$json = const { - '1': 'GetTransactionResponse', - '2': const [ - const {'1': 'block_height', '3': 1, '4': 1, '5': 13, '10': 'blockHeight'}, - const {'1': 'block_time', '3': 2, '4': 1, '5': 13, '10': 'blockTime'}, - const {'1': 'transaction', '3': 3, '4': 1, '5': 11, '6': '.pactus.TransactionInfo', '10': 'transaction'}, - ], -}; - -/// Descriptor for `GetTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getTransactionResponseDescriptor = $convert.base64Decode('ChZHZXRUcmFuc2FjdGlvblJlc3BvbnNlEiEKDGJsb2NrX2hlaWdodBgBIAEoDVILYmxvY2tIZWlnaHQSHQoKYmxvY2tfdGltZRgCIAEoDVIJYmxvY2tUaW1lEjkKC3RyYW5zYWN0aW9uGAMgASgLMhcucGFjdHVzLlRyYW5zYWN0aW9uSW5mb1ILdHJhbnNhY3Rpb24='); -@$core.Deprecated('Use calculateFeeRequestDescriptor instead') -const CalculateFeeRequest$json = const { - '1': 'CalculateFeeRequest', - '2': const [ - const {'1': 'amount', '3': 1, '4': 1, '5': 3, '10': 'amount'}, - const {'1': 'payload_type', '3': 2, '4': 1, '5': 14, '6': '.pactus.PayloadType', '10': 'payloadType'}, - const {'1': 'fixed_amount', '3': 3, '4': 1, '5': 8, '10': 'fixedAmount'}, - ], -}; - -/// Descriptor for `CalculateFeeRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List calculateFeeRequestDescriptor = $convert.base64Decode('ChNDYWxjdWxhdGVGZWVSZXF1ZXN0EhYKBmFtb3VudBgBIAEoA1IGYW1vdW50EjYKDHBheWxvYWRfdHlwZRgCIAEoDjITLnBhY3R1cy5QYXlsb2FkVHlwZVILcGF5bG9hZFR5cGUSIQoMZml4ZWRfYW1vdW50GAMgASgIUgtmaXhlZEFtb3VudA=='); -@$core.Deprecated('Use calculateFeeResponseDescriptor instead') -const CalculateFeeResponse$json = const { - '1': 'CalculateFeeResponse', - '2': const [ - const {'1': 'amount', '3': 1, '4': 1, '5': 3, '10': 'amount'}, - const {'1': 'fee', '3': 2, '4': 1, '5': 3, '10': 'fee'}, - ], -}; - -/// Descriptor for `CalculateFeeResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List calculateFeeResponseDescriptor = $convert.base64Decode('ChRDYWxjdWxhdGVGZWVSZXNwb25zZRIWCgZhbW91bnQYASABKANSBmFtb3VudBIQCgNmZWUYAiABKANSA2ZlZQ=='); -@$core.Deprecated('Use broadcastTransactionRequestDescriptor instead') -const BroadcastTransactionRequest$json = const { - '1': 'BroadcastTransactionRequest', - '2': const [ - const {'1': 'signed_raw_transaction', '3': 1, '4': 1, '5': 9, '10': 'signedRawTransaction'}, - ], -}; - -/// Descriptor for `BroadcastTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List broadcastTransactionRequestDescriptor = $convert.base64Decode('ChtCcm9hZGNhc3RUcmFuc2FjdGlvblJlcXVlc3QSNAoWc2lnbmVkX3Jhd190cmFuc2FjdGlvbhgBIAEoCVIUc2lnbmVkUmF3VHJhbnNhY3Rpb24='); -@$core.Deprecated('Use broadcastTransactionResponseDescriptor instead') -const BroadcastTransactionResponse$json = const { - '1': 'BroadcastTransactionResponse', - '2': const [ - const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - ], -}; - -/// Descriptor for `BroadcastTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List broadcastTransactionResponseDescriptor = $convert.base64Decode('ChxCcm9hZGNhc3RUcmFuc2FjdGlvblJlc3BvbnNlEg4KAmlkGAEgASgJUgJpZA=='); -@$core.Deprecated('Use getRawTransferTransactionRequestDescriptor instead') -const GetRawTransferTransactionRequest$json = const { - '1': 'GetRawTransferTransactionRequest', - '2': const [ - const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, - const {'1': 'sender', '3': 2, '4': 1, '5': 9, '10': 'sender'}, - const {'1': 'receiver', '3': 3, '4': 1, '5': 9, '10': 'receiver'}, - const {'1': 'amount', '3': 4, '4': 1, '5': 3, '10': 'amount'}, - const {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'}, - const {'1': 'memo', '3': 6, '4': 1, '5': 9, '10': 'memo'}, - ], -}; - -/// Descriptor for `GetRawTransferTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawTransferTransactionRequestDescriptor = $convert.base64Decode('CiBHZXRSYXdUcmFuc2ZlclRyYW5zYWN0aW9uUmVxdWVzdBIbCglsb2NrX3RpbWUYASABKA1SCGxvY2tUaW1lEhYKBnNlbmRlchgCIAEoCVIGc2VuZGVyEhoKCHJlY2VpdmVyGAMgASgJUghyZWNlaXZlchIWCgZhbW91bnQYBCABKANSBmFtb3VudBIQCgNmZWUYBSABKANSA2ZlZRISCgRtZW1vGAYgASgJUgRtZW1v'); -@$core.Deprecated('Use getRawBondTransactionRequestDescriptor instead') -const GetRawBondTransactionRequest$json = const { - '1': 'GetRawBondTransactionRequest', - '2': const [ - const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, - const {'1': 'sender', '3': 2, '4': 1, '5': 9, '10': 'sender'}, - const {'1': 'receiver', '3': 3, '4': 1, '5': 9, '10': 'receiver'}, - const {'1': 'stake', '3': 4, '4': 1, '5': 3, '10': 'stake'}, - const {'1': 'public_key', '3': 5, '4': 1, '5': 9, '10': 'publicKey'}, - const {'1': 'fee', '3': 6, '4': 1, '5': 3, '10': 'fee'}, - const {'1': 'memo', '3': 7, '4': 1, '5': 9, '10': 'memo'}, - ], -}; - -/// Descriptor for `GetRawBondTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawBondTransactionRequestDescriptor = $convert.base64Decode('ChxHZXRSYXdCb25kVHJhbnNhY3Rpb25SZXF1ZXN0EhsKCWxvY2tfdGltZRgBIAEoDVIIbG9ja1RpbWUSFgoGc2VuZGVyGAIgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAyABKAlSCHJlY2VpdmVyEhQKBXN0YWtlGAQgASgDUgVzdGFrZRIdCgpwdWJsaWNfa2V5GAUgASgJUglwdWJsaWNLZXkSEAoDZmVlGAYgASgDUgNmZWUSEgoEbWVtbxgHIAEoCVIEbWVtbw=='); -@$core.Deprecated('Use getRawUnbondTransactionRequestDescriptor instead') -const GetRawUnbondTransactionRequest$json = const { - '1': 'GetRawUnbondTransactionRequest', - '2': const [ - const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, - const {'1': 'validator_address', '3': 3, '4': 1, '5': 9, '10': 'validatorAddress'}, - const {'1': 'memo', '3': 4, '4': 1, '5': 9, '10': 'memo'}, - ], -}; - -/// Descriptor for `GetRawUnbondTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawUnbondTransactionRequestDescriptor = $convert.base64Decode('Ch5HZXRSYXdVbmJvbmRUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRIrChF2YWxpZGF0b3JfYWRkcmVzcxgDIAEoCVIQdmFsaWRhdG9yQWRkcmVzcxISCgRtZW1vGAQgASgJUgRtZW1v'); -@$core.Deprecated('Use getRawWithdrawTransactionRequestDescriptor instead') -const GetRawWithdrawTransactionRequest$json = const { - '1': 'GetRawWithdrawTransactionRequest', - '2': const [ - const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, - const {'1': 'validator_address', '3': 2, '4': 1, '5': 9, '10': 'validatorAddress'}, - const {'1': 'account_address', '3': 3, '4': 1, '5': 9, '10': 'accountAddress'}, - const {'1': 'amount', '3': 4, '4': 1, '5': 3, '10': 'amount'}, - const {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'}, - const {'1': 'memo', '3': 6, '4': 1, '5': 9, '10': 'memo'}, - ], -}; - -/// Descriptor for `GetRawWithdrawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawWithdrawTransactionRequestDescriptor = $convert.base64Decode('CiBHZXRSYXdXaXRoZHJhd1RyYW5zYWN0aW9uUmVxdWVzdBIbCglsb2NrX3RpbWUYASABKA1SCGxvY2tUaW1lEisKEXZhbGlkYXRvcl9hZGRyZXNzGAIgASgJUhB2YWxpZGF0b3JBZGRyZXNzEicKD2FjY291bnRfYWRkcmVzcxgDIAEoCVIOYWNjb3VudEFkZHJlc3MSFgoGYW1vdW50GAQgASgDUgZhbW91bnQSEAoDZmVlGAUgASgDUgNmZWUSEgoEbWVtbxgGIAEoCVIEbWVtbw=='); -@$core.Deprecated('Use getRawTransactionResponseDescriptor instead') -const GetRawTransactionResponse$json = const { - '1': 'GetRawTransactionResponse', - '2': const [ - const {'1': 'raw_transaction', '3': 1, '4': 1, '5': 9, '10': 'rawTransaction'}, - ], -}; - -/// Descriptor for `GetRawTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawTransactionResponseDescriptor = $convert.base64Decode('ChlHZXRSYXdUcmFuc2FjdGlvblJlc3BvbnNlEicKD3Jhd190cmFuc2FjdGlvbhgBIAEoCVIOcmF3VHJhbnNhY3Rpb24='); -@$core.Deprecated('Use payloadTransferDescriptor instead') -const PayloadTransfer$json = const { - '1': 'PayloadTransfer', - '2': const [ - const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, - const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, - const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, - ], -}; - -/// Descriptor for `PayloadTransfer`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadTransferDescriptor = $convert.base64Decode('Cg9QYXlsb2FkVHJhbnNmZXISFgoGc2VuZGVyGAEgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAiABKAlSCHJlY2VpdmVyEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50'); -@$core.Deprecated('Use payloadBondDescriptor instead') -const PayloadBond$json = const { - '1': 'PayloadBond', - '2': const [ - const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, - const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, - const {'1': 'stake', '3': 3, '4': 1, '5': 3, '10': 'stake'}, - ], -}; - -/// Descriptor for `PayloadBond`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadBondDescriptor = $convert.base64Decode('CgtQYXlsb2FkQm9uZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtl'); -@$core.Deprecated('Use payloadSortitionDescriptor instead') -const PayloadSortition$json = const { - '1': 'PayloadSortition', - '2': const [ - const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, - const {'1': 'proof', '3': 2, '4': 1, '5': 9, '10': 'proof'}, - ], -}; - -/// Descriptor for `PayloadSortition`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadSortitionDescriptor = $convert.base64Decode('ChBQYXlsb2FkU29ydGl0aW9uEhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3MSFAoFcHJvb2YYAiABKAlSBXByb29m'); -@$core.Deprecated('Use payloadUnbondDescriptor instead') -const PayloadUnbond$json = const { - '1': 'PayloadUnbond', - '2': const [ - const {'1': 'validator', '3': 1, '4': 1, '5': 9, '10': 'validator'}, - ], -}; - -/// Descriptor for `PayloadUnbond`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadUnbondDescriptor = $convert.base64Decode('Cg1QYXlsb2FkVW5ib25kEhwKCXZhbGlkYXRvchgBIAEoCVIJdmFsaWRhdG9y'); -@$core.Deprecated('Use payloadWithdrawDescriptor instead') -const PayloadWithdraw$json = const { - '1': 'PayloadWithdraw', - '2': const [ - const {'1': 'from', '3': 1, '4': 1, '5': 9, '10': 'from'}, - const {'1': 'to', '3': 2, '4': 1, '5': 9, '10': 'to'}, - const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, - ], -}; - -/// Descriptor for `PayloadWithdraw`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadWithdrawDescriptor = $convert.base64Decode('Cg9QYXlsb2FkV2l0aGRyYXcSEgoEZnJvbRgBIAEoCVIEZnJvbRIOCgJ0bxgCIAEoCVICdG8SFgoGYW1vdW50GAMgASgDUgZhbW91bnQ='); -@$core.Deprecated('Use transactionInfoDescriptor instead') -const TransactionInfo$json = const { - '1': 'TransactionInfo', - '2': const [ - const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, - const {'1': 'data', '3': 2, '4': 1, '5': 9, '10': 'data'}, - const {'1': 'version', '3': 3, '4': 1, '5': 5, '10': 'version'}, - const {'1': 'lock_time', '3': 4, '4': 1, '5': 13, '10': 'lockTime'}, - const {'1': 'value', '3': 5, '4': 1, '5': 3, '10': 'value'}, - const {'1': 'fee', '3': 6, '4': 1, '5': 3, '10': 'fee'}, - const {'1': 'payload_type', '3': 7, '4': 1, '5': 14, '6': '.pactus.PayloadType', '10': 'payloadType'}, - const {'1': 'transfer', '3': 30, '4': 1, '5': 11, '6': '.pactus.PayloadTransfer', '9': 0, '10': 'transfer'}, - const {'1': 'bond', '3': 31, '4': 1, '5': 11, '6': '.pactus.PayloadBond', '9': 0, '10': 'bond'}, - const {'1': 'sortition', '3': 32, '4': 1, '5': 11, '6': '.pactus.PayloadSortition', '9': 0, '10': 'sortition'}, - const {'1': 'unbond', '3': 33, '4': 1, '5': 11, '6': '.pactus.PayloadUnbond', '9': 0, '10': 'unbond'}, - const {'1': 'withdraw', '3': 34, '4': 1, '5': 11, '6': '.pactus.PayloadWithdraw', '9': 0, '10': 'withdraw'}, - const {'1': 'memo', '3': 8, '4': 1, '5': 9, '10': 'memo'}, - const {'1': 'public_key', '3': 9, '4': 1, '5': 9, '10': 'publicKey'}, - const {'1': 'signature', '3': 10, '4': 1, '5': 9, '10': 'signature'}, - ], - '8': const [ - const {'1': 'payload'}, - ], -}; - -/// Descriptor for `TransactionInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List transactionInfoDescriptor = $convert.base64Decode('Cg9UcmFuc2FjdGlvbkluZm8SDgoCaWQYASABKAlSAmlkEhIKBGRhdGEYAiABKAlSBGRhdGESGAoHdmVyc2lvbhgDIAEoBVIHdmVyc2lvbhIbCglsb2NrX3RpbWUYBCABKA1SCGxvY2tUaW1lEhQKBXZhbHVlGAUgASgDUgV2YWx1ZRIQCgNmZWUYBiABKANSA2ZlZRI2CgxwYXlsb2FkX3R5cGUYByABKA4yEy5wYWN0dXMuUGF5bG9hZFR5cGVSC3BheWxvYWRUeXBlEjUKCHRyYW5zZmVyGB4gASgLMhcucGFjdHVzLlBheWxvYWRUcmFuc2ZlckgAUgh0cmFuc2ZlchIpCgRib25kGB8gASgLMhMucGFjdHVzLlBheWxvYWRCb25kSABSBGJvbmQSOAoJc29ydGl0aW9uGCAgASgLMhgucGFjdHVzLlBheWxvYWRTb3J0aXRpb25IAFIJc29ydGl0aW9uEi8KBnVuYm9uZBghIAEoCzIVLnBhY3R1cy5QYXlsb2FkVW5ib25kSABSBnVuYm9uZBI1Cgh3aXRoZHJhdxgiIAEoCzIXLnBhY3R1cy5QYXlsb2FkV2l0aGRyYXdIAFIId2l0aGRyYXcSEgoEbWVtbxgIIAEoCVIEbWVtbxIdCgpwdWJsaWNfa2V5GAkgASgJUglwdWJsaWNLZXkSHAoJc2lnbmF0dXJlGAogASgJUglzaWduYXR1cmVCCQoHcGF5bG9hZA=='); -const $core.Map<$core.String, $core.dynamic> TransactionServiceBase$json = const { - '1': 'Transaction', - '2': const [ - const {'1': 'GetTransaction', '2': '.pactus.GetTransactionRequest', '3': '.pactus.GetTransactionResponse'}, - const {'1': 'CalculateFee', '2': '.pactus.CalculateFeeRequest', '3': '.pactus.CalculateFeeResponse'}, - const {'1': 'BroadcastTransaction', '2': '.pactus.BroadcastTransactionRequest', '3': '.pactus.BroadcastTransactionResponse'}, - const {'1': 'GetRawTransferTransaction', '2': '.pactus.GetRawTransferTransactionRequest', '3': '.pactus.GetRawTransactionResponse'}, - const {'1': 'GetRawBondTransaction', '2': '.pactus.GetRawBondTransactionRequest', '3': '.pactus.GetRawTransactionResponse'}, - const {'1': 'GetRawUnbondTransaction', '2': '.pactus.GetRawUnbondTransactionRequest', '3': '.pactus.GetRawTransactionResponse'}, - const {'1': 'GetRawWithdrawTransaction', '2': '.pactus.GetRawWithdrawTransactionRequest', '3': '.pactus.GetRawTransactionResponse'}, - ], -}; - -@$core.Deprecated('Use transactionServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> TransactionServiceBase$messageJson = const { - '.pactus.GetTransactionRequest': GetTransactionRequest$json, - '.pactus.GetTransactionResponse': GetTransactionResponse$json, - '.pactus.TransactionInfo': TransactionInfo$json, - '.pactus.PayloadTransfer': PayloadTransfer$json, - '.pactus.PayloadBond': PayloadBond$json, - '.pactus.PayloadSortition': PayloadSortition$json, - '.pactus.PayloadUnbond': PayloadUnbond$json, - '.pactus.PayloadWithdraw': PayloadWithdraw$json, - '.pactus.CalculateFeeRequest': CalculateFeeRequest$json, - '.pactus.CalculateFeeResponse': CalculateFeeResponse$json, - '.pactus.BroadcastTransactionRequest': BroadcastTransactionRequest$json, - '.pactus.BroadcastTransactionResponse': BroadcastTransactionResponse$json, - '.pactus.GetRawTransferTransactionRequest': GetRawTransferTransactionRequest$json, - '.pactus.GetRawTransactionResponse': GetRawTransactionResponse$json, - '.pactus.GetRawBondTransactionRequest': GetRawBondTransactionRequest$json, - '.pactus.GetRawUnbondTransactionRequest': GetRawUnbondTransactionRequest$json, - '.pactus.GetRawWithdrawTransactionRequest': GetRawWithdrawTransactionRequest$json, -}; - -/// Descriptor for `Transaction`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List transactionServiceDescriptor = $convert.base64Decode('CgtUcmFuc2FjdGlvbhJPCg5HZXRUcmFuc2FjdGlvbhIdLnBhY3R1cy5HZXRUcmFuc2FjdGlvblJlcXVlc3QaHi5wYWN0dXMuR2V0VHJhbnNhY3Rpb25SZXNwb25zZRJJCgxDYWxjdWxhdGVGZWUSGy5wYWN0dXMuQ2FsY3VsYXRlRmVlUmVxdWVzdBocLnBhY3R1cy5DYWxjdWxhdGVGZWVSZXNwb25zZRJhChRCcm9hZGNhc3RUcmFuc2FjdGlvbhIjLnBhY3R1cy5Ccm9hZGNhc3RUcmFuc2FjdGlvblJlcXVlc3QaJC5wYWN0dXMuQnJvYWRjYXN0VHJhbnNhY3Rpb25SZXNwb25zZRJoChlHZXRSYXdUcmFuc2ZlclRyYW5zYWN0aW9uEigucGFjdHVzLkdldFJhd1RyYW5zZmVyVHJhbnNhY3Rpb25SZXF1ZXN0GiEucGFjdHVzLkdldFJhd1RyYW5zYWN0aW9uUmVzcG9uc2USYAoVR2V0UmF3Qm9uZFRyYW5zYWN0aW9uEiQucGFjdHVzLkdldFJhd0JvbmRUcmFuc2FjdGlvblJlcXVlc3QaIS5wYWN0dXMuR2V0UmF3VHJhbnNhY3Rpb25SZXNwb25zZRJkChdHZXRSYXdVbmJvbmRUcmFuc2FjdGlvbhImLnBhY3R1cy5HZXRSYXdVbmJvbmRUcmFuc2FjdGlvblJlcXVlc3QaIS5wYWN0dXMuR2V0UmF3VHJhbnNhY3Rpb25SZXNwb25zZRJoChlHZXRSYXdXaXRoZHJhd1RyYW5zYWN0aW9uEigucGFjdHVzLkdldFJhd1dpdGhkcmF3VHJhbnNhY3Rpb25SZXF1ZXN0GiEucGFjdHVzLkdldFJhd1RyYW5zYWN0aW9uUmVzcG9uc2U='); diff --git a/www/grpc/gen/dart/transaction.pbserver.dart b/www/grpc/gen/dart/transaction.pbserver.dart deleted file mode 100644 index 35b1a75cb..000000000 --- a/www/grpc/gen/dart/transaction.pbserver.dart +++ /dev/null @@ -1,56 +0,0 @@ -/// -// Generated code. Do not modify. -// source: transaction.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:async' as $async; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'dart:core' as $core; -import 'transaction.pb.dart' as $0; -import 'transaction.pbjson.dart'; - -export 'transaction.pb.dart'; - -abstract class TransactionServiceBase extends $pb.GeneratedService { - $async.Future<$0.GetTransactionResponse> getTransaction($pb.ServerContext ctx, $0.GetTransactionRequest request); - $async.Future<$0.CalculateFeeResponse> calculateFee($pb.ServerContext ctx, $0.CalculateFeeRequest request); - $async.Future<$0.BroadcastTransactionResponse> broadcastTransaction($pb.ServerContext ctx, $0.BroadcastTransactionRequest request); - $async.Future<$0.GetRawTransactionResponse> getRawTransferTransaction($pb.ServerContext ctx, $0.GetRawTransferTransactionRequest request); - $async.Future<$0.GetRawTransactionResponse> getRawBondTransaction($pb.ServerContext ctx, $0.GetRawBondTransactionRequest request); - $async.Future<$0.GetRawTransactionResponse> getRawUnbondTransaction($pb.ServerContext ctx, $0.GetRawUnbondTransactionRequest request); - $async.Future<$0.GetRawTransactionResponse> getRawWithdrawTransaction($pb.ServerContext ctx, $0.GetRawWithdrawTransactionRequest request); - - $pb.GeneratedMessage createRequest($core.String method) { - switch (method) { - case 'GetTransaction': return $0.GetTransactionRequest(); - case 'CalculateFee': return $0.CalculateFeeRequest(); - case 'BroadcastTransaction': return $0.BroadcastTransactionRequest(); - case 'GetRawTransferTransaction': return $0.GetRawTransferTransactionRequest(); - case 'GetRawBondTransaction': return $0.GetRawBondTransactionRequest(); - case 'GetRawUnbondTransaction': return $0.GetRawUnbondTransactionRequest(); - case 'GetRawWithdrawTransaction': return $0.GetRawWithdrawTransactionRequest(); - default: throw $core.ArgumentError('Unknown method: $method'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) { - switch (method) { - case 'GetTransaction': return this.getTransaction(ctx, request as $0.GetTransactionRequest); - case 'CalculateFee': return this.calculateFee(ctx, request as $0.CalculateFeeRequest); - case 'BroadcastTransaction': return this.broadcastTransaction(ctx, request as $0.BroadcastTransactionRequest); - case 'GetRawTransferTransaction': return this.getRawTransferTransaction(ctx, request as $0.GetRawTransferTransactionRequest); - case 'GetRawBondTransaction': return this.getRawBondTransaction(ctx, request as $0.GetRawBondTransactionRequest); - case 'GetRawUnbondTransaction': return this.getRawUnbondTransaction(ctx, request as $0.GetRawUnbondTransactionRequest); - case 'GetRawWithdrawTransaction': return this.getRawWithdrawTransaction(ctx, request as $0.GetRawWithdrawTransactionRequest); - default: throw $core.ArgumentError('Unknown method: $method'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => TransactionServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => TransactionServiceBase$messageJson; -} - diff --git a/www/grpc/gen/dart/utils.pb.dart b/www/grpc/gen/dart/utils.pb.dart deleted file mode 100644 index b44ff7e68..000000000 --- a/www/grpc/gen/dart/utils.pb.dart +++ /dev/null @@ -1,256 +0,0 @@ -/// -// Generated code. Do not modify. -// source: utils.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -class SignMessageWithPrivateKeyRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignMessageWithPrivateKeyRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'privateKey') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'message') - ..hasRequiredFields = false - ; - - SignMessageWithPrivateKeyRequest._() : super(); - factory SignMessageWithPrivateKeyRequest({ - $core.String? privateKey, - $core.String? message, - }) { - final _result = create(); - if (privateKey != null) { - _result.privateKey = privateKey; - } - if (message != null) { - _result.message = message; - } - return _result; - } - factory SignMessageWithPrivateKeyRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory SignMessageWithPrivateKeyRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - SignMessageWithPrivateKeyRequest clone() => SignMessageWithPrivateKeyRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - SignMessageWithPrivateKeyRequest copyWith(void Function(SignMessageWithPrivateKeyRequest) updates) => super.copyWith((message) => updates(message as SignMessageWithPrivateKeyRequest)) as SignMessageWithPrivateKeyRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static SignMessageWithPrivateKeyRequest create() => SignMessageWithPrivateKeyRequest._(); - SignMessageWithPrivateKeyRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static SignMessageWithPrivateKeyRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SignMessageWithPrivateKeyRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get privateKey => $_getSZ(0); - @$pb.TagNumber(1) - set privateKey($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasPrivateKey() => $_has(0); - @$pb.TagNumber(1) - void clearPrivateKey() => clearField(1); - - @$pb.TagNumber(2) - $core.String get message => $_getSZ(1); - @$pb.TagNumber(2) - set message($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasMessage() => $_has(1); - @$pb.TagNumber(2) - void clearMessage() => clearField(2); -} - -class SignMessageWithPrivateKeyResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignMessageWithPrivateKeyResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature') - ..hasRequiredFields = false - ; - - SignMessageWithPrivateKeyResponse._() : super(); - factory SignMessageWithPrivateKeyResponse({ - $core.String? signature, - }) { - final _result = create(); - if (signature != null) { - _result.signature = signature; - } - return _result; - } - factory SignMessageWithPrivateKeyResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory SignMessageWithPrivateKeyResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - SignMessageWithPrivateKeyResponse clone() => SignMessageWithPrivateKeyResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - SignMessageWithPrivateKeyResponse copyWith(void Function(SignMessageWithPrivateKeyResponse) updates) => super.copyWith((message) => updates(message as SignMessageWithPrivateKeyResponse)) as SignMessageWithPrivateKeyResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static SignMessageWithPrivateKeyResponse create() => SignMessageWithPrivateKeyResponse._(); - SignMessageWithPrivateKeyResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static SignMessageWithPrivateKeyResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SignMessageWithPrivateKeyResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get signature => $_getSZ(0); - @$pb.TagNumber(1) - set signature($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasSignature() => $_has(0); - @$pb.TagNumber(1) - void clearSignature() => clearField(1); -} - -class VerifyMessageRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'VerifyMessageRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'message') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') - ..hasRequiredFields = false - ; - - VerifyMessageRequest._() : super(); - factory VerifyMessageRequest({ - $core.String? message, - $core.String? signature, - $core.String? publicKey, - }) { - final _result = create(); - if (message != null) { - _result.message = message; - } - if (signature != null) { - _result.signature = signature; - } - if (publicKey != null) { - _result.publicKey = publicKey; - } - return _result; - } - factory VerifyMessageRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory VerifyMessageRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - VerifyMessageRequest clone() => VerifyMessageRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - VerifyMessageRequest copyWith(void Function(VerifyMessageRequest) updates) => super.copyWith((message) => updates(message as VerifyMessageRequest)) as VerifyMessageRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static VerifyMessageRequest create() => VerifyMessageRequest._(); - VerifyMessageRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static VerifyMessageRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static VerifyMessageRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get message => $_getSZ(0); - @$pb.TagNumber(1) - set message($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasMessage() => $_has(0); - @$pb.TagNumber(1) - void clearMessage() => clearField(1); - - @$pb.TagNumber(2) - $core.String get signature => $_getSZ(1); - @$pb.TagNumber(2) - set signature($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasSignature() => $_has(1); - @$pb.TagNumber(2) - void clearSignature() => clearField(2); - - @$pb.TagNumber(3) - $core.String get publicKey => $_getSZ(2); - @$pb.TagNumber(3) - set publicKey($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasPublicKey() => $_has(2); - @$pb.TagNumber(3) - void clearPublicKey() => clearField(3); -} - -class VerifyMessageResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'VerifyMessageResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOB(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isValid') - ..hasRequiredFields = false - ; - - VerifyMessageResponse._() : super(); - factory VerifyMessageResponse({ - $core.bool? isValid, - }) { - final _result = create(); - if (isValid != null) { - _result.isValid = isValid; - } - return _result; - } - factory VerifyMessageResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory VerifyMessageResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - VerifyMessageResponse clone() => VerifyMessageResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - VerifyMessageResponse copyWith(void Function(VerifyMessageResponse) updates) => super.copyWith((message) => updates(message as VerifyMessageResponse)) as VerifyMessageResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static VerifyMessageResponse create() => VerifyMessageResponse._(); - VerifyMessageResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static VerifyMessageResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static VerifyMessageResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.bool get isValid => $_getBF(0); - @$pb.TagNumber(1) - set isValid($core.bool v) { $_setBool(0, v); } - @$pb.TagNumber(1) - $core.bool hasIsValid() => $_has(0); - @$pb.TagNumber(1) - void clearIsValid() => clearField(1); -} - -class UtilsApi { - $pb.RpcClient _client; - UtilsApi(this._client); - - $async.Future signMessageWithPrivateKey($pb.ClientContext? ctx, SignMessageWithPrivateKeyRequest request) { - var emptyResponse = SignMessageWithPrivateKeyResponse(); - return _client.invoke(ctx, 'Utils', 'SignMessageWithPrivateKey', request, emptyResponse); - } - $async.Future verifyMessage($pb.ClientContext? ctx, VerifyMessageRequest request) { - var emptyResponse = VerifyMessageResponse(); - return _client.invoke(ctx, 'Utils', 'VerifyMessage', request, emptyResponse); - } -} - diff --git a/www/grpc/gen/dart/utils.pbenum.dart b/www/grpc/gen/dart/utils.pbenum.dart deleted file mode 100644 index e5fa14ccf..000000000 --- a/www/grpc/gen/dart/utils.pbenum.dart +++ /dev/null @@ -1,7 +0,0 @@ -/// -// Generated code. Do not modify. -// source: utils.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - diff --git a/www/grpc/gen/dart/utils.pbjson.dart b/www/grpc/gen/dart/utils.pbjson.dart deleted file mode 100644 index 1ce27d7a4..000000000 --- a/www/grpc/gen/dart/utils.pbjson.dart +++ /dev/null @@ -1,71 +0,0 @@ -/// -// Generated code. Do not modify. -// source: utils.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:core' as $core; -import 'dart:convert' as $convert; -import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use signMessageWithPrivateKeyRequestDescriptor instead') -const SignMessageWithPrivateKeyRequest$json = const { - '1': 'SignMessageWithPrivateKeyRequest', - '2': const [ - const {'1': 'private_key', '3': 1, '4': 1, '5': 9, '10': 'privateKey'}, - const {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, - ], -}; - -/// Descriptor for `SignMessageWithPrivateKeyRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List signMessageWithPrivateKeyRequestDescriptor = $convert.base64Decode('CiBTaWduTWVzc2FnZVdpdGhQcml2YXRlS2V5UmVxdWVzdBIfCgtwcml2YXRlX2tleRgBIAEoCVIKcHJpdmF0ZUtleRIYCgdtZXNzYWdlGAIgASgJUgdtZXNzYWdl'); -@$core.Deprecated('Use signMessageWithPrivateKeyResponseDescriptor instead') -const SignMessageWithPrivateKeyResponse$json = const { - '1': 'SignMessageWithPrivateKeyResponse', - '2': const [ - const {'1': 'signature', '3': 1, '4': 1, '5': 9, '10': 'signature'}, - ], -}; - -/// Descriptor for `SignMessageWithPrivateKeyResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List signMessageWithPrivateKeyResponseDescriptor = $convert.base64Decode('CiFTaWduTWVzc2FnZVdpdGhQcml2YXRlS2V5UmVzcG9uc2USHAoJc2lnbmF0dXJlGAEgASgJUglzaWduYXR1cmU='); -@$core.Deprecated('Use verifyMessageRequestDescriptor instead') -const VerifyMessageRequest$json = const { - '1': 'VerifyMessageRequest', - '2': const [ - const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, - const {'1': 'signature', '3': 2, '4': 1, '5': 9, '10': 'signature'}, - const {'1': 'public_key', '3': 3, '4': 1, '5': 9, '10': 'publicKey'}, - ], -}; - -/// Descriptor for `VerifyMessageRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List verifyMessageRequestDescriptor = $convert.base64Decode('ChRWZXJpZnlNZXNzYWdlUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdlEhwKCXNpZ25hdHVyZRgCIAEoCVIJc2lnbmF0dXJlEh0KCnB1YmxpY19rZXkYAyABKAlSCXB1YmxpY0tleQ=='); -@$core.Deprecated('Use verifyMessageResponseDescriptor instead') -const VerifyMessageResponse$json = const { - '1': 'VerifyMessageResponse', - '2': const [ - const {'1': 'is_valid', '3': 1, '4': 1, '5': 8, '10': 'isValid'}, - ], -}; - -/// Descriptor for `VerifyMessageResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List verifyMessageResponseDescriptor = $convert.base64Decode('ChVWZXJpZnlNZXNzYWdlUmVzcG9uc2USGQoIaXNfdmFsaWQYASABKAhSB2lzVmFsaWQ='); -const $core.Map<$core.String, $core.dynamic> UtilsServiceBase$json = const { - '1': 'Utils', - '2': const [ - const {'1': 'SignMessageWithPrivateKey', '2': '.pactus.SignMessageWithPrivateKeyRequest', '3': '.pactus.SignMessageWithPrivateKeyResponse'}, - const {'1': 'VerifyMessage', '2': '.pactus.VerifyMessageRequest', '3': '.pactus.VerifyMessageResponse'}, - ], -}; - -@$core.Deprecated('Use utilsServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> UtilsServiceBase$messageJson = const { - '.pactus.SignMessageWithPrivateKeyRequest': SignMessageWithPrivateKeyRequest$json, - '.pactus.SignMessageWithPrivateKeyResponse': SignMessageWithPrivateKeyResponse$json, - '.pactus.VerifyMessageRequest': VerifyMessageRequest$json, - '.pactus.VerifyMessageResponse': VerifyMessageResponse$json, -}; - -/// Descriptor for `Utils`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List utilsServiceDescriptor = $convert.base64Decode('CgVVdGlscxJwChlTaWduTWVzc2FnZVdpdGhQcml2YXRlS2V5EigucGFjdHVzLlNpZ25NZXNzYWdlV2l0aFByaXZhdGVLZXlSZXF1ZXN0GikucGFjdHVzLlNpZ25NZXNzYWdlV2l0aFByaXZhdGVLZXlSZXNwb25zZRJMCg1WZXJpZnlNZXNzYWdlEhwucGFjdHVzLlZlcmlmeU1lc3NhZ2VSZXF1ZXN0Gh0ucGFjdHVzLlZlcmlmeU1lc3NhZ2VSZXNwb25zZQ=='); diff --git a/www/grpc/gen/dart/utils.pbserver.dart b/www/grpc/gen/dart/utils.pbserver.dart deleted file mode 100644 index 083835287..000000000 --- a/www/grpc/gen/dart/utils.pbserver.dart +++ /dev/null @@ -1,41 +0,0 @@ -/// -// Generated code. Do not modify. -// source: utils.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:async' as $async; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'dart:core' as $core; -import 'utils.pb.dart' as $3; -import 'utils.pbjson.dart'; - -export 'utils.pb.dart'; - -abstract class UtilsServiceBase extends $pb.GeneratedService { - $async.Future<$3.SignMessageWithPrivateKeyResponse> signMessageWithPrivateKey($pb.ServerContext ctx, $3.SignMessageWithPrivateKeyRequest request); - $async.Future<$3.VerifyMessageResponse> verifyMessage($pb.ServerContext ctx, $3.VerifyMessageRequest request); - - $pb.GeneratedMessage createRequest($core.String method) { - switch (method) { - case 'SignMessageWithPrivateKey': return $3.SignMessageWithPrivateKeyRequest(); - case 'VerifyMessage': return $3.VerifyMessageRequest(); - default: throw $core.ArgumentError('Unknown method: $method'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) { - switch (method) { - case 'SignMessageWithPrivateKey': return this.signMessageWithPrivateKey(ctx, request as $3.SignMessageWithPrivateKeyRequest); - case 'VerifyMessage': return this.verifyMessage(ctx, request as $3.VerifyMessageRequest); - default: throw $core.ArgumentError('Unknown method: $method'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => UtilsServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => UtilsServiceBase$messageJson; -} - diff --git a/www/grpc/gen/dart/wallet.pb.dart b/www/grpc/gen/dart/wallet.pb.dart deleted file mode 100644 index 779f3ee1c..000000000 --- a/www/grpc/gen/dart/wallet.pb.dart +++ /dev/null @@ -1,1401 +0,0 @@ -/// -// Generated code. Do not modify. -// source: wallet.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:async' as $async; -import 'dart:core' as $core; - -import 'package:fixnum/fixnum.dart' as $fixnum; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'wallet.pbenum.dart'; - -export 'wallet.pbenum.dart'; - -class AddressInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'AddressInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'label') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'path') - ..hasRequiredFields = false - ; - - AddressInfo._() : super(); - factory AddressInfo({ - $core.String? address, - $core.String? publicKey, - $core.String? label, - $core.String? path, - }) { - final _result = create(); - if (address != null) { - _result.address = address; - } - if (publicKey != null) { - _result.publicKey = publicKey; - } - if (label != null) { - _result.label = label; - } - if (path != null) { - _result.path = path; - } - return _result; - } - factory AddressInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory AddressInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - AddressInfo clone() => AddressInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - AddressInfo copyWith(void Function(AddressInfo) updates) => super.copyWith((message) => updates(message as AddressInfo)) as AddressInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static AddressInfo create() => AddressInfo._(); - AddressInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static AddressInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static AddressInfo? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get address => $_getSZ(0); - @$pb.TagNumber(1) - set address($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasAddress() => $_has(0); - @$pb.TagNumber(1) - void clearAddress() => clearField(1); - - @$pb.TagNumber(2) - $core.String get publicKey => $_getSZ(1); - @$pb.TagNumber(2) - set publicKey($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasPublicKey() => $_has(1); - @$pb.TagNumber(2) - void clearPublicKey() => clearField(2); - - @$pb.TagNumber(3) - $core.String get label => $_getSZ(2); - @$pb.TagNumber(3) - set label($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasLabel() => $_has(2); - @$pb.TagNumber(3) - void clearLabel() => clearField(3); - - @$pb.TagNumber(4) - $core.String get path => $_getSZ(3); - @$pb.TagNumber(4) - set path($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasPath() => $_has(3); - @$pb.TagNumber(4) - void clearPath() => clearField(4); -} - -class HistoryInfo extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'HistoryInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transactionId') - ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'time', $pb.PbFieldType.OU3) - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payloadType') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'description') - ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..hasRequiredFields = false - ; - - HistoryInfo._() : super(); - factory HistoryInfo({ - $core.String? transactionId, - $core.int? time, - $core.String? payloadType, - $core.String? description, - $fixnum.Int64? amount, - }) { - final _result = create(); - if (transactionId != null) { - _result.transactionId = transactionId; - } - if (time != null) { - _result.time = time; - } - if (payloadType != null) { - _result.payloadType = payloadType; - } - if (description != null) { - _result.description = description; - } - if (amount != null) { - _result.amount = amount; - } - return _result; - } - factory HistoryInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory HistoryInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - HistoryInfo clone() => HistoryInfo()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - HistoryInfo copyWith(void Function(HistoryInfo) updates) => super.copyWith((message) => updates(message as HistoryInfo)) as HistoryInfo; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static HistoryInfo create() => HistoryInfo._(); - HistoryInfo createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static HistoryInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static HistoryInfo? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get transactionId => $_getSZ(0); - @$pb.TagNumber(1) - set transactionId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasTransactionId() => $_has(0); - @$pb.TagNumber(1) - void clearTransactionId() => clearField(1); - - @$pb.TagNumber(2) - $core.int get time => $_getIZ(1); - @$pb.TagNumber(2) - set time($core.int v) { $_setUnsignedInt32(1, v); } - @$pb.TagNumber(2) - $core.bool hasTime() => $_has(1); - @$pb.TagNumber(2) - void clearTime() => clearField(2); - - @$pb.TagNumber(3) - $core.String get payloadType => $_getSZ(2); - @$pb.TagNumber(3) - set payloadType($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasPayloadType() => $_has(2); - @$pb.TagNumber(3) - void clearPayloadType() => clearField(3); - - @$pb.TagNumber(4) - $core.String get description => $_getSZ(3); - @$pb.TagNumber(4) - set description($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasDescription() => $_has(3); - @$pb.TagNumber(4) - void clearDescription() => clearField(4); - - @$pb.TagNumber(5) - $fixnum.Int64 get amount => $_getI64(4); - @$pb.TagNumber(5) - set amount($fixnum.Int64 v) { $_setInt64(4, v); } - @$pb.TagNumber(5) - $core.bool hasAmount() => $_has(4); - @$pb.TagNumber(5) - void clearAmount() => clearField(5); -} - -class GetAddressHistoryRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetAddressHistoryRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..hasRequiredFields = false - ; - - GetAddressHistoryRequest._() : super(); - factory GetAddressHistoryRequest({ - $core.String? walletName, - $core.String? address, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - if (address != null) { - _result.address = address; - } - return _result; - } - factory GetAddressHistoryRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetAddressHistoryRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetAddressHistoryRequest clone() => GetAddressHistoryRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetAddressHistoryRequest copyWith(void Function(GetAddressHistoryRequest) updates) => super.copyWith((message) => updates(message as GetAddressHistoryRequest)) as GetAddressHistoryRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetAddressHistoryRequest create() => GetAddressHistoryRequest._(); - GetAddressHistoryRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetAddressHistoryRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetAddressHistoryRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); - - @$pb.TagNumber(2) - $core.String get address => $_getSZ(1); - @$pb.TagNumber(2) - set address($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasAddress() => $_has(1); - @$pb.TagNumber(2) - void clearAddress() => clearField(2); -} - -class GetAddressHistoryResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetAddressHistoryResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'historyInfo', $pb.PbFieldType.PM, subBuilder: HistoryInfo.create) - ..hasRequiredFields = false - ; - - GetAddressHistoryResponse._() : super(); - factory GetAddressHistoryResponse({ - $core.Iterable? historyInfo, - }) { - final _result = create(); - if (historyInfo != null) { - _result.historyInfo.addAll(historyInfo); - } - return _result; - } - factory GetAddressHistoryResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetAddressHistoryResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetAddressHistoryResponse clone() => GetAddressHistoryResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetAddressHistoryResponse copyWith(void Function(GetAddressHistoryResponse) updates) => super.copyWith((message) => updates(message as GetAddressHistoryResponse)) as GetAddressHistoryResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetAddressHistoryResponse create() => GetAddressHistoryResponse._(); - GetAddressHistoryResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetAddressHistoryResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetAddressHistoryResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.List get historyInfo => $_getList(0); -} - -class GetNewAddressRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNewAddressRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'addressType', $pb.PbFieldType.OE, defaultOrMaker: AddressType.ADDRESS_TYPE_TREASURY, valueOf: AddressType.valueOf, enumValues: AddressType.values) - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'label') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password') - ..hasRequiredFields = false - ; - - GetNewAddressRequest._() : super(); - factory GetNewAddressRequest({ - $core.String? walletName, - AddressType? addressType, - $core.String? label, - $core.String? password, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - if (addressType != null) { - _result.addressType = addressType; - } - if (label != null) { - _result.label = label; - } - if (password != null) { - _result.password = password; - } - return _result; - } - factory GetNewAddressRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetNewAddressRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetNewAddressRequest clone() => GetNewAddressRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetNewAddressRequest copyWith(void Function(GetNewAddressRequest) updates) => super.copyWith((message) => updates(message as GetNewAddressRequest)) as GetNewAddressRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetNewAddressRequest create() => GetNewAddressRequest._(); - GetNewAddressRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetNewAddressRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetNewAddressRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); - - @$pb.TagNumber(2) - AddressType get addressType => $_getN(1); - @$pb.TagNumber(2) - set addressType(AddressType v) { setField(2, v); } - @$pb.TagNumber(2) - $core.bool hasAddressType() => $_has(1); - @$pb.TagNumber(2) - void clearAddressType() => clearField(2); - - @$pb.TagNumber(3) - $core.String get label => $_getSZ(2); - @$pb.TagNumber(3) - set label($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasLabel() => $_has(2); - @$pb.TagNumber(3) - void clearLabel() => clearField(3); - - @$pb.TagNumber(4) - $core.String get password => $_getSZ(3); - @$pb.TagNumber(4) - set password($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasPassword() => $_has(3); - @$pb.TagNumber(4) - void clearPassword() => clearField(4); -} - -class GetNewAddressResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNewAddressResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..aOM(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'addressInfo', subBuilder: AddressInfo.create) - ..hasRequiredFields = false - ; - - GetNewAddressResponse._() : super(); - factory GetNewAddressResponse({ - $core.String? walletName, - AddressInfo? addressInfo, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - if (addressInfo != null) { - _result.addressInfo = addressInfo; - } - return _result; - } - factory GetNewAddressResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetNewAddressResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetNewAddressResponse clone() => GetNewAddressResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetNewAddressResponse copyWith(void Function(GetNewAddressResponse) updates) => super.copyWith((message) => updates(message as GetNewAddressResponse)) as GetNewAddressResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetNewAddressResponse create() => GetNewAddressResponse._(); - GetNewAddressResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetNewAddressResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetNewAddressResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); - - @$pb.TagNumber(2) - AddressInfo get addressInfo => $_getN(1); - @$pb.TagNumber(2) - set addressInfo(AddressInfo v) { setField(2, v); } - @$pb.TagNumber(2) - $core.bool hasAddressInfo() => $_has(1); - @$pb.TagNumber(2) - void clearAddressInfo() => clearField(2); - @$pb.TagNumber(2) - AddressInfo ensureAddressInfo() => $_ensure(1); -} - -class RestoreWalletRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RestoreWalletRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'mnemonic') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password') - ..hasRequiredFields = false - ; - - RestoreWalletRequest._() : super(); - factory RestoreWalletRequest({ - $core.String? walletName, - $core.String? mnemonic, - $core.String? password, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - if (mnemonic != null) { - _result.mnemonic = mnemonic; - } - if (password != null) { - _result.password = password; - } - return _result; - } - factory RestoreWalletRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory RestoreWalletRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - RestoreWalletRequest clone() => RestoreWalletRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - RestoreWalletRequest copyWith(void Function(RestoreWalletRequest) updates) => super.copyWith((message) => updates(message as RestoreWalletRequest)) as RestoreWalletRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static RestoreWalletRequest create() => RestoreWalletRequest._(); - RestoreWalletRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static RestoreWalletRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RestoreWalletRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); - - @$pb.TagNumber(2) - $core.String get mnemonic => $_getSZ(1); - @$pb.TagNumber(2) - set mnemonic($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasMnemonic() => $_has(1); - @$pb.TagNumber(2) - void clearMnemonic() => clearField(2); - - @$pb.TagNumber(3) - $core.String get password => $_getSZ(2); - @$pb.TagNumber(3) - set password($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasPassword() => $_has(2); - @$pb.TagNumber(3) - void clearPassword() => clearField(3); -} - -class RestoreWalletResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RestoreWalletResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..hasRequiredFields = false - ; - - RestoreWalletResponse._() : super(); - factory RestoreWalletResponse({ - $core.String? walletName, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - return _result; - } - factory RestoreWalletResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory RestoreWalletResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - RestoreWalletResponse clone() => RestoreWalletResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - RestoreWalletResponse copyWith(void Function(RestoreWalletResponse) updates) => super.copyWith((message) => updates(message as RestoreWalletResponse)) as RestoreWalletResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static RestoreWalletResponse create() => RestoreWalletResponse._(); - RestoreWalletResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static RestoreWalletResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RestoreWalletResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); -} - -class CreateWalletRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateWalletRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password') - ..hasRequiredFields = false - ; - - CreateWalletRequest._() : super(); - factory CreateWalletRequest({ - $core.String? walletName, - $core.String? password, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - if (password != null) { - _result.password = password; - } - return _result; - } - factory CreateWalletRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CreateWalletRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CreateWalletRequest clone() => CreateWalletRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CreateWalletRequest copyWith(void Function(CreateWalletRequest) updates) => super.copyWith((message) => updates(message as CreateWalletRequest)) as CreateWalletRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static CreateWalletRequest create() => CreateWalletRequest._(); - CreateWalletRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static CreateWalletRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CreateWalletRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); - - @$pb.TagNumber(4) - $core.String get password => $_getSZ(1); - @$pb.TagNumber(4) - set password($core.String v) { $_setString(1, v); } - @$pb.TagNumber(4) - $core.bool hasPassword() => $_has(1); - @$pb.TagNumber(4) - void clearPassword() => clearField(4); -} - -class CreateWalletResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateWalletResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'mnemonic') - ..hasRequiredFields = false - ; - - CreateWalletResponse._() : super(); - factory CreateWalletResponse({ - $core.String? mnemonic, - }) { - final _result = create(); - if (mnemonic != null) { - _result.mnemonic = mnemonic; - } - return _result; - } - factory CreateWalletResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory CreateWalletResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - CreateWalletResponse clone() => CreateWalletResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - CreateWalletResponse copyWith(void Function(CreateWalletResponse) updates) => super.copyWith((message) => updates(message as CreateWalletResponse)) as CreateWalletResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static CreateWalletResponse create() => CreateWalletResponse._(); - CreateWalletResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static CreateWalletResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static CreateWalletResponse? _defaultInstance; - - @$pb.TagNumber(2) - $core.String get mnemonic => $_getSZ(0); - @$pb.TagNumber(2) - set mnemonic($core.String v) { $_setString(0, v); } - @$pb.TagNumber(2) - $core.bool hasMnemonic() => $_has(0); - @$pb.TagNumber(2) - void clearMnemonic() => clearField(2); -} - -class LoadWalletRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'LoadWalletRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..hasRequiredFields = false - ; - - LoadWalletRequest._() : super(); - factory LoadWalletRequest({ - $core.String? walletName, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - return _result; - } - factory LoadWalletRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory LoadWalletRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - LoadWalletRequest clone() => LoadWalletRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - LoadWalletRequest copyWith(void Function(LoadWalletRequest) updates) => super.copyWith((message) => updates(message as LoadWalletRequest)) as LoadWalletRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static LoadWalletRequest create() => LoadWalletRequest._(); - LoadWalletRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static LoadWalletRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static LoadWalletRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); -} - -class LoadWalletResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'LoadWalletResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..hasRequiredFields = false - ; - - LoadWalletResponse._() : super(); - factory LoadWalletResponse({ - $core.String? walletName, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - return _result; - } - factory LoadWalletResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory LoadWalletResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - LoadWalletResponse clone() => LoadWalletResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - LoadWalletResponse copyWith(void Function(LoadWalletResponse) updates) => super.copyWith((message) => updates(message as LoadWalletResponse)) as LoadWalletResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static LoadWalletResponse create() => LoadWalletResponse._(); - LoadWalletResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static LoadWalletResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static LoadWalletResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); -} - -class UnloadWalletRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UnloadWalletRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..hasRequiredFields = false - ; - - UnloadWalletRequest._() : super(); - factory UnloadWalletRequest({ - $core.String? walletName, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - return _result; - } - factory UnloadWalletRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UnloadWalletRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - UnloadWalletRequest clone() => UnloadWalletRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UnloadWalletRequest copyWith(void Function(UnloadWalletRequest) updates) => super.copyWith((message) => updates(message as UnloadWalletRequest)) as UnloadWalletRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static UnloadWalletRequest create() => UnloadWalletRequest._(); - UnloadWalletRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static UnloadWalletRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UnloadWalletRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); -} - -class UnloadWalletResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UnloadWalletResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..hasRequiredFields = false - ; - - UnloadWalletResponse._() : super(); - factory UnloadWalletResponse({ - $core.String? walletName, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - return _result; - } - factory UnloadWalletResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UnloadWalletResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - UnloadWalletResponse clone() => UnloadWalletResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UnloadWalletResponse copyWith(void Function(UnloadWalletResponse) updates) => super.copyWith((message) => updates(message as UnloadWalletResponse)) as UnloadWalletResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static UnloadWalletResponse create() => UnloadWalletResponse._(); - UnloadWalletResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static UnloadWalletResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UnloadWalletResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); -} - -class GetValidatorAddressRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorAddressRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') - ..hasRequiredFields = false - ; - - GetValidatorAddressRequest._() : super(); - factory GetValidatorAddressRequest({ - $core.String? publicKey, - }) { - final _result = create(); - if (publicKey != null) { - _result.publicKey = publicKey; - } - return _result; - } - factory GetValidatorAddressRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetValidatorAddressRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetValidatorAddressRequest clone() => GetValidatorAddressRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetValidatorAddressRequest copyWith(void Function(GetValidatorAddressRequest) updates) => super.copyWith((message) => updates(message as GetValidatorAddressRequest)) as GetValidatorAddressRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetValidatorAddressRequest create() => GetValidatorAddressRequest._(); - GetValidatorAddressRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetValidatorAddressRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetValidatorAddressRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get publicKey => $_getSZ(0); - @$pb.TagNumber(1) - set publicKey($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasPublicKey() => $_has(0); - @$pb.TagNumber(1) - void clearPublicKey() => clearField(1); -} - -class GetValidatorAddressResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorAddressResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..hasRequiredFields = false - ; - - GetValidatorAddressResponse._() : super(); - factory GetValidatorAddressResponse({ - $core.String? address, - }) { - final _result = create(); - if (address != null) { - _result.address = address; - } - return _result; - } - factory GetValidatorAddressResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetValidatorAddressResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetValidatorAddressResponse clone() => GetValidatorAddressResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetValidatorAddressResponse copyWith(void Function(GetValidatorAddressResponse) updates) => super.copyWith((message) => updates(message as GetValidatorAddressResponse)) as GetValidatorAddressResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetValidatorAddressResponse create() => GetValidatorAddressResponse._(); - GetValidatorAddressResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetValidatorAddressResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetValidatorAddressResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get address => $_getSZ(0); - @$pb.TagNumber(1) - set address($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasAddress() => $_has(0); - @$pb.TagNumber(1) - void clearAddress() => clearField(1); -} - -class SignRawTransactionRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignRawTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'rawTransaction') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password') - ..hasRequiredFields = false - ; - - SignRawTransactionRequest._() : super(); - factory SignRawTransactionRequest({ - $core.String? walletName, - $core.String? rawTransaction, - $core.String? password, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - if (rawTransaction != null) { - _result.rawTransaction = rawTransaction; - } - if (password != null) { - _result.password = password; - } - return _result; - } - factory SignRawTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory SignRawTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - SignRawTransactionRequest clone() => SignRawTransactionRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - SignRawTransactionRequest copyWith(void Function(SignRawTransactionRequest) updates) => super.copyWith((message) => updates(message as SignRawTransactionRequest)) as SignRawTransactionRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static SignRawTransactionRequest create() => SignRawTransactionRequest._(); - SignRawTransactionRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static SignRawTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SignRawTransactionRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); - - @$pb.TagNumber(2) - $core.String get rawTransaction => $_getSZ(1); - @$pb.TagNumber(2) - set rawTransaction($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasRawTransaction() => $_has(1); - @$pb.TagNumber(2) - void clearRawTransaction() => clearField(2); - - @$pb.TagNumber(3) - $core.String get password => $_getSZ(2); - @$pb.TagNumber(3) - set password($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasPassword() => $_has(2); - @$pb.TagNumber(3) - void clearPassword() => clearField(3); -} - -class SignRawTransactionResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignRawTransactionResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transactionId') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signedRawTransaction') - ..hasRequiredFields = false - ; - - SignRawTransactionResponse._() : super(); - factory SignRawTransactionResponse({ - $core.String? transactionId, - $core.String? signedRawTransaction, - }) { - final _result = create(); - if (transactionId != null) { - _result.transactionId = transactionId; - } - if (signedRawTransaction != null) { - _result.signedRawTransaction = signedRawTransaction; - } - return _result; - } - factory SignRawTransactionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory SignRawTransactionResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - SignRawTransactionResponse clone() => SignRawTransactionResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - SignRawTransactionResponse copyWith(void Function(SignRawTransactionResponse) updates) => super.copyWith((message) => updates(message as SignRawTransactionResponse)) as SignRawTransactionResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static SignRawTransactionResponse create() => SignRawTransactionResponse._(); - SignRawTransactionResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static SignRawTransactionResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SignRawTransactionResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get transactionId => $_getSZ(0); - @$pb.TagNumber(1) - set transactionId($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasTransactionId() => $_has(0); - @$pb.TagNumber(1) - void clearTransactionId() => clearField(1); - - @$pb.TagNumber(2) - $core.String get signedRawTransaction => $_getSZ(1); - @$pb.TagNumber(2) - set signedRawTransaction($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasSignedRawTransaction() => $_has(1); - @$pb.TagNumber(2) - void clearSignedRawTransaction() => clearField(2); -} - -class GetTotalBalanceRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTotalBalanceRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..hasRequiredFields = false - ; - - GetTotalBalanceRequest._() : super(); - factory GetTotalBalanceRequest({ - $core.String? walletName, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - return _result; - } - factory GetTotalBalanceRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetTotalBalanceRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetTotalBalanceRequest clone() => GetTotalBalanceRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetTotalBalanceRequest copyWith(void Function(GetTotalBalanceRequest) updates) => super.copyWith((message) => updates(message as GetTotalBalanceRequest)) as GetTotalBalanceRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetTotalBalanceRequest create() => GetTotalBalanceRequest._(); - GetTotalBalanceRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetTotalBalanceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetTotalBalanceRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); -} - -class GetTotalBalanceResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTotalBalanceResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..aInt64(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalBalance') - ..hasRequiredFields = false - ; - - GetTotalBalanceResponse._() : super(); - factory GetTotalBalanceResponse({ - $core.String? walletName, - $fixnum.Int64? totalBalance, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - if (totalBalance != null) { - _result.totalBalance = totalBalance; - } - return _result; - } - factory GetTotalBalanceResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetTotalBalanceResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - GetTotalBalanceResponse clone() => GetTotalBalanceResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - GetTotalBalanceResponse copyWith(void Function(GetTotalBalanceResponse) updates) => super.copyWith((message) => updates(message as GetTotalBalanceResponse)) as GetTotalBalanceResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static GetTotalBalanceResponse create() => GetTotalBalanceResponse._(); - GetTotalBalanceResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static GetTotalBalanceResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetTotalBalanceResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get totalBalance => $_getI64(1); - @$pb.TagNumber(2) - set totalBalance($fixnum.Int64 v) { $_setInt64(1, v); } - @$pb.TagNumber(2) - $core.bool hasTotalBalance() => $_has(1); - @$pb.TagNumber(2) - void clearTotalBalance() => clearField(2); -} - -class SignMessageRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignMessageRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password') - ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'message') - ..hasRequiredFields = false - ; - - SignMessageRequest._() : super(); - factory SignMessageRequest({ - $core.String? walletName, - $core.String? password, - $core.String? address, - $core.String? message, - }) { - final _result = create(); - if (walletName != null) { - _result.walletName = walletName; - } - if (password != null) { - _result.password = password; - } - if (address != null) { - _result.address = address; - } - if (message != null) { - _result.message = message; - } - return _result; - } - factory SignMessageRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory SignMessageRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - SignMessageRequest clone() => SignMessageRequest()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - SignMessageRequest copyWith(void Function(SignMessageRequest) updates) => super.copyWith((message) => updates(message as SignMessageRequest)) as SignMessageRequest; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static SignMessageRequest create() => SignMessageRequest._(); - SignMessageRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static SignMessageRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SignMessageRequest? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get walletName => $_getSZ(0); - @$pb.TagNumber(1) - set walletName($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasWalletName() => $_has(0); - @$pb.TagNumber(1) - void clearWalletName() => clearField(1); - - @$pb.TagNumber(2) - $core.String get password => $_getSZ(1); - @$pb.TagNumber(2) - set password($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasPassword() => $_has(1); - @$pb.TagNumber(2) - void clearPassword() => clearField(2); - - @$pb.TagNumber(3) - $core.String get address => $_getSZ(2); - @$pb.TagNumber(3) - set address($core.String v) { $_setString(2, v); } - @$pb.TagNumber(3) - $core.bool hasAddress() => $_has(2); - @$pb.TagNumber(3) - void clearAddress() => clearField(3); - - @$pb.TagNumber(4) - $core.String get message => $_getSZ(3); - @$pb.TagNumber(4) - set message($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasMessage() => $_has(3); - @$pb.TagNumber(4) - void clearMessage() => clearField(4); -} - -class SignMessageResponse extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignMessageResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature') - ..hasRequiredFields = false - ; - - SignMessageResponse._() : super(); - factory SignMessageResponse({ - $core.String? signature, - }) { - final _result = create(); - if (signature != null) { - _result.signature = signature; - } - return _result; - } - factory SignMessageResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory SignMessageResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - SignMessageResponse clone() => SignMessageResponse()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - SignMessageResponse copyWith(void Function(SignMessageResponse) updates) => super.copyWith((message) => updates(message as SignMessageResponse)) as SignMessageResponse; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static SignMessageResponse create() => SignMessageResponse._(); - SignMessageResponse createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static SignMessageResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static SignMessageResponse? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get signature => $_getSZ(0); - @$pb.TagNumber(1) - set signature($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasSignature() => $_has(0); - @$pb.TagNumber(1) - void clearSignature() => clearField(1); -} - -class WalletApi { - $pb.RpcClient _client; - WalletApi(this._client); - - $async.Future createWallet($pb.ClientContext? ctx, CreateWalletRequest request) { - var emptyResponse = CreateWalletResponse(); - return _client.invoke(ctx, 'Wallet', 'CreateWallet', request, emptyResponse); - } - $async.Future restoreWallet($pb.ClientContext? ctx, RestoreWalletRequest request) { - var emptyResponse = RestoreWalletResponse(); - return _client.invoke(ctx, 'Wallet', 'RestoreWallet', request, emptyResponse); - } - $async.Future loadWallet($pb.ClientContext? ctx, LoadWalletRequest request) { - var emptyResponse = LoadWalletResponse(); - return _client.invoke(ctx, 'Wallet', 'LoadWallet', request, emptyResponse); - } - $async.Future unloadWallet($pb.ClientContext? ctx, UnloadWalletRequest request) { - var emptyResponse = UnloadWalletResponse(); - return _client.invoke(ctx, 'Wallet', 'UnloadWallet', request, emptyResponse); - } - $async.Future getTotalBalance($pb.ClientContext? ctx, GetTotalBalanceRequest request) { - var emptyResponse = GetTotalBalanceResponse(); - return _client.invoke(ctx, 'Wallet', 'GetTotalBalance', request, emptyResponse); - } - $async.Future signRawTransaction($pb.ClientContext? ctx, SignRawTransactionRequest request) { - var emptyResponse = SignRawTransactionResponse(); - return _client.invoke(ctx, 'Wallet', 'SignRawTransaction', request, emptyResponse); - } - $async.Future getValidatorAddress($pb.ClientContext? ctx, GetValidatorAddressRequest request) { - var emptyResponse = GetValidatorAddressResponse(); - return _client.invoke(ctx, 'Wallet', 'GetValidatorAddress', request, emptyResponse); - } - $async.Future getNewAddress($pb.ClientContext? ctx, GetNewAddressRequest request) { - var emptyResponse = GetNewAddressResponse(); - return _client.invoke(ctx, 'Wallet', 'GetNewAddress', request, emptyResponse); - } - $async.Future getAddressHistory($pb.ClientContext? ctx, GetAddressHistoryRequest request) { - var emptyResponse = GetAddressHistoryResponse(); - return _client.invoke(ctx, 'Wallet', 'GetAddressHistory', request, emptyResponse); - } - $async.Future signMessage($pb.ClientContext? ctx, SignMessageRequest request) { - var emptyResponse = SignMessageResponse(); - return _client.invoke(ctx, 'Wallet', 'SignMessage', request, emptyResponse); - } -} - diff --git a/www/grpc/gen/dart/wallet.pbenum.dart b/www/grpc/gen/dart/wallet.pbenum.dart deleted file mode 100644 index bc78ae45d..000000000 --- a/www/grpc/gen/dart/wallet.pbenum.dart +++ /dev/null @@ -1,30 +0,0 @@ -/// -// Generated code. Do not modify. -// source: wallet.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -// ignore_for_file: UNDEFINED_SHOWN_NAME -import 'dart:core' as $core; -import 'package:protobuf/protobuf.dart' as $pb; - -class AddressType extends $pb.ProtobufEnum { - static const AddressType ADDRESS_TYPE_TREASURY = AddressType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ADDRESS_TYPE_TREASURY'); - static const AddressType ADDRESS_TYPE_VALIDATOR = AddressType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ADDRESS_TYPE_VALIDATOR'); - static const AddressType ADDRESS_TYPE_BLS_ACCOUNT = AddressType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ADDRESS_TYPE_BLS_ACCOUNT'); - static const AddressType ADDRESS_TYPE_ED25519_ACCOUNT = AddressType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ADDRESS_TYPE_ED25519_ACCOUNT'); - - static const $core.List values = [ - ADDRESS_TYPE_TREASURY, - ADDRESS_TYPE_VALIDATOR, - ADDRESS_TYPE_BLS_ACCOUNT, - ADDRESS_TYPE_ED25519_ACCOUNT, - ]; - - static final $core.Map<$core.int, AddressType> _byValue = $pb.ProtobufEnum.initByValue(values); - static AddressType? valueOf($core.int value) => _byValue[value]; - - const AddressType._($core.int v, $core.String n) : super(v, n); -} - diff --git a/www/grpc/gen/dart/wallet.pbjson.dart b/www/grpc/gen/dart/wallet.pbjson.dart deleted file mode 100644 index 64d87bbeb..000000000 --- a/www/grpc/gen/dart/wallet.pbjson.dart +++ /dev/null @@ -1,309 +0,0 @@ -/// -// Generated code. Do not modify. -// source: wallet.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:core' as $core; -import 'dart:convert' as $convert; -import 'dart:typed_data' as $typed_data; -@$core.Deprecated('Use addressTypeDescriptor instead') -const AddressType$json = const { - '1': 'AddressType', - '2': const [ - const {'1': 'ADDRESS_TYPE_TREASURY', '2': 0}, - const {'1': 'ADDRESS_TYPE_VALIDATOR', '2': 1}, - const {'1': 'ADDRESS_TYPE_BLS_ACCOUNT', '2': 2}, - const {'1': 'ADDRESS_TYPE_ED25519_ACCOUNT', '2': 3}, - ], -}; - -/// Descriptor for `AddressType`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List addressTypeDescriptor = $convert.base64Decode('CgtBZGRyZXNzVHlwZRIZChVBRERSRVNTX1RZUEVfVFJFQVNVUlkQABIaChZBRERSRVNTX1RZUEVfVkFMSURBVE9SEAESHAoYQUREUkVTU19UWVBFX0JMU19BQ0NPVU5UEAISIAocQUREUkVTU19UWVBFX0VEMjU1MTlfQUNDT1VOVBAD'); -@$core.Deprecated('Use addressInfoDescriptor instead') -const AddressInfo$json = const { - '1': 'AddressInfo', - '2': const [ - const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, - const {'1': 'public_key', '3': 2, '4': 1, '5': 9, '10': 'publicKey'}, - const {'1': 'label', '3': 3, '4': 1, '5': 9, '10': 'label'}, - const {'1': 'path', '3': 4, '4': 1, '5': 9, '10': 'path'}, - ], -}; - -/// Descriptor for `AddressInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List addressInfoDescriptor = $convert.base64Decode('CgtBZGRyZXNzSW5mbxIYCgdhZGRyZXNzGAEgASgJUgdhZGRyZXNzEh0KCnB1YmxpY19rZXkYAiABKAlSCXB1YmxpY0tleRIUCgVsYWJlbBgDIAEoCVIFbGFiZWwSEgoEcGF0aBgEIAEoCVIEcGF0aA=='); -@$core.Deprecated('Use historyInfoDescriptor instead') -const HistoryInfo$json = const { - '1': 'HistoryInfo', - '2': const [ - const {'1': 'transaction_id', '3': 1, '4': 1, '5': 9, '10': 'transactionId'}, - const {'1': 'time', '3': 2, '4': 1, '5': 13, '10': 'time'}, - const {'1': 'payload_type', '3': 3, '4': 1, '5': 9, '10': 'payloadType'}, - const {'1': 'description', '3': 4, '4': 1, '5': 9, '10': 'description'}, - const {'1': 'amount', '3': 5, '4': 1, '5': 3, '10': 'amount'}, - ], -}; - -/// Descriptor for `HistoryInfo`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List historyInfoDescriptor = $convert.base64Decode('CgtIaXN0b3J5SW5mbxIlCg50cmFuc2FjdGlvbl9pZBgBIAEoCVINdHJhbnNhY3Rpb25JZBISCgR0aW1lGAIgASgNUgR0aW1lEiEKDHBheWxvYWRfdHlwZRgDIAEoCVILcGF5bG9hZFR5cGUSIAoLZGVzY3JpcHRpb24YBCABKAlSC2Rlc2NyaXB0aW9uEhYKBmFtb3VudBgFIAEoA1IGYW1vdW50'); -@$core.Deprecated('Use getAddressHistoryRequestDescriptor instead') -const GetAddressHistoryRequest$json = const { - '1': 'GetAddressHistoryRequest', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - const {'1': 'address', '3': 2, '4': 1, '5': 9, '10': 'address'}, - ], -}; - -/// Descriptor for `GetAddressHistoryRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getAddressHistoryRequestDescriptor = $convert.base64Decode('ChhHZXRBZGRyZXNzSGlzdG9yeVJlcXVlc3QSHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWUSGAoHYWRkcmVzcxgCIAEoCVIHYWRkcmVzcw=='); -@$core.Deprecated('Use getAddressHistoryResponseDescriptor instead') -const GetAddressHistoryResponse$json = const { - '1': 'GetAddressHistoryResponse', - '2': const [ - const {'1': 'history_info', '3': 1, '4': 3, '5': 11, '6': '.pactus.HistoryInfo', '10': 'historyInfo'}, - ], -}; - -/// Descriptor for `GetAddressHistoryResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getAddressHistoryResponseDescriptor = $convert.base64Decode('ChlHZXRBZGRyZXNzSGlzdG9yeVJlc3BvbnNlEjYKDGhpc3RvcnlfaW5mbxgBIAMoCzITLnBhY3R1cy5IaXN0b3J5SW5mb1ILaGlzdG9yeUluZm8='); -@$core.Deprecated('Use getNewAddressRequestDescriptor instead') -const GetNewAddressRequest$json = const { - '1': 'GetNewAddressRequest', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - const {'1': 'address_type', '3': 2, '4': 1, '5': 14, '6': '.pactus.AddressType', '10': 'addressType'}, - const {'1': 'label', '3': 3, '4': 1, '5': 9, '10': 'label'}, - const {'1': 'password', '3': 4, '4': 1, '5': 9, '10': 'password'}, - ], -}; - -/// Descriptor for `GetNewAddressRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getNewAddressRequestDescriptor = $convert.base64Decode('ChRHZXROZXdBZGRyZXNzUmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZRI2CgxhZGRyZXNzX3R5cGUYAiABKA4yEy5wYWN0dXMuQWRkcmVzc1R5cGVSC2FkZHJlc3NUeXBlEhQKBWxhYmVsGAMgASgJUgVsYWJlbBIaCghwYXNzd29yZBgEIAEoCVIIcGFzc3dvcmQ='); -@$core.Deprecated('Use getNewAddressResponseDescriptor instead') -const GetNewAddressResponse$json = const { - '1': 'GetNewAddressResponse', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - const {'1': 'address_info', '3': 2, '4': 1, '5': 11, '6': '.pactus.AddressInfo', '10': 'addressInfo'}, - ], -}; - -/// Descriptor for `GetNewAddressResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getNewAddressResponseDescriptor = $convert.base64Decode('ChVHZXROZXdBZGRyZXNzUmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWUSNgoMYWRkcmVzc19pbmZvGAIgASgLMhMucGFjdHVzLkFkZHJlc3NJbmZvUgthZGRyZXNzSW5mbw=='); -@$core.Deprecated('Use restoreWalletRequestDescriptor instead') -const RestoreWalletRequest$json = const { - '1': 'RestoreWalletRequest', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - const {'1': 'mnemonic', '3': 2, '4': 1, '5': 9, '10': 'mnemonic'}, - const {'1': 'password', '3': 3, '4': 1, '5': 9, '10': 'password'}, - ], -}; - -/// Descriptor for `RestoreWalletRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List restoreWalletRequestDescriptor = $convert.base64Decode('ChRSZXN0b3JlV2FsbGV0UmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZRIaCghtbmVtb25pYxgCIAEoCVIIbW5lbW9uaWMSGgoIcGFzc3dvcmQYAyABKAlSCHBhc3N3b3Jk'); -@$core.Deprecated('Use restoreWalletResponseDescriptor instead') -const RestoreWalletResponse$json = const { - '1': 'RestoreWalletResponse', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - ], -}; - -/// Descriptor for `RestoreWalletResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List restoreWalletResponseDescriptor = $convert.base64Decode('ChVSZXN0b3JlV2FsbGV0UmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWU='); -@$core.Deprecated('Use createWalletRequestDescriptor instead') -const CreateWalletRequest$json = const { - '1': 'CreateWalletRequest', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - const {'1': 'password', '3': 4, '4': 1, '5': 9, '10': 'password'}, - ], -}; - -/// Descriptor for `CreateWalletRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List createWalletRequestDescriptor = $convert.base64Decode('ChNDcmVhdGVXYWxsZXRSZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW1lEhoKCHBhc3N3b3JkGAQgASgJUghwYXNzd29yZA=='); -@$core.Deprecated('Use createWalletResponseDescriptor instead') -const CreateWalletResponse$json = const { - '1': 'CreateWalletResponse', - '2': const [ - const {'1': 'mnemonic', '3': 2, '4': 1, '5': 9, '10': 'mnemonic'}, - ], -}; - -/// Descriptor for `CreateWalletResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List createWalletResponseDescriptor = $convert.base64Decode('ChRDcmVhdGVXYWxsZXRSZXNwb25zZRIaCghtbmVtb25pYxgCIAEoCVIIbW5lbW9uaWM='); -@$core.Deprecated('Use loadWalletRequestDescriptor instead') -const LoadWalletRequest$json = const { - '1': 'LoadWalletRequest', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - ], -}; - -/// Descriptor for `LoadWalletRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List loadWalletRequestDescriptor = $convert.base64Decode('ChFMb2FkV2FsbGV0UmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZQ=='); -@$core.Deprecated('Use loadWalletResponseDescriptor instead') -const LoadWalletResponse$json = const { - '1': 'LoadWalletResponse', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - ], -}; - -/// Descriptor for `LoadWalletResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List loadWalletResponseDescriptor = $convert.base64Decode('ChJMb2FkV2FsbGV0UmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWU='); -@$core.Deprecated('Use unloadWalletRequestDescriptor instead') -const UnloadWalletRequest$json = const { - '1': 'UnloadWalletRequest', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - ], -}; - -/// Descriptor for `UnloadWalletRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List unloadWalletRequestDescriptor = $convert.base64Decode('ChNVbmxvYWRXYWxsZXRSZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW1l'); -@$core.Deprecated('Use unloadWalletResponseDescriptor instead') -const UnloadWalletResponse$json = const { - '1': 'UnloadWalletResponse', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - ], -}; - -/// Descriptor for `UnloadWalletResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List unloadWalletResponseDescriptor = $convert.base64Decode('ChRVbmxvYWRXYWxsZXRSZXNwb25zZRIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZQ=='); -@$core.Deprecated('Use getValidatorAddressRequestDescriptor instead') -const GetValidatorAddressRequest$json = const { - '1': 'GetValidatorAddressRequest', - '2': const [ - const {'1': 'public_key', '3': 1, '4': 1, '5': 9, '10': 'publicKey'}, - ], -}; - -/// Descriptor for `GetValidatorAddressRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getValidatorAddressRequestDescriptor = $convert.base64Decode('ChpHZXRWYWxpZGF0b3JBZGRyZXNzUmVxdWVzdBIdCgpwdWJsaWNfa2V5GAEgASgJUglwdWJsaWNLZXk='); -@$core.Deprecated('Use getValidatorAddressResponseDescriptor instead') -const GetValidatorAddressResponse$json = const { - '1': 'GetValidatorAddressResponse', - '2': const [ - const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, - ], -}; - -/// Descriptor for `GetValidatorAddressResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getValidatorAddressResponseDescriptor = $convert.base64Decode('ChtHZXRWYWxpZGF0b3JBZGRyZXNzUmVzcG9uc2USGAoHYWRkcmVzcxgBIAEoCVIHYWRkcmVzcw=='); -@$core.Deprecated('Use signRawTransactionRequestDescriptor instead') -const SignRawTransactionRequest$json = const { - '1': 'SignRawTransactionRequest', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - const {'1': 'raw_transaction', '3': 2, '4': 1, '5': 9, '10': 'rawTransaction'}, - const {'1': 'password', '3': 3, '4': 1, '5': 9, '10': 'password'}, - ], -}; - -/// Descriptor for `SignRawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List signRawTransactionRequestDescriptor = $convert.base64Decode('ChlTaWduUmF3VHJhbnNhY3Rpb25SZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW1lEicKD3Jhd190cmFuc2FjdGlvbhgCIAEoCVIOcmF3VHJhbnNhY3Rpb24SGgoIcGFzc3dvcmQYAyABKAlSCHBhc3N3b3Jk'); -@$core.Deprecated('Use signRawTransactionResponseDescriptor instead') -const SignRawTransactionResponse$json = const { - '1': 'SignRawTransactionResponse', - '2': const [ - const {'1': 'transaction_id', '3': 1, '4': 1, '5': 9, '10': 'transactionId'}, - const {'1': 'signed_raw_transaction', '3': 2, '4': 1, '5': 9, '10': 'signedRawTransaction'}, - ], -}; - -/// Descriptor for `SignRawTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List signRawTransactionResponseDescriptor = $convert.base64Decode('ChpTaWduUmF3VHJhbnNhY3Rpb25SZXNwb25zZRIlCg50cmFuc2FjdGlvbl9pZBgBIAEoCVINdHJhbnNhY3Rpb25JZBI0ChZzaWduZWRfcmF3X3RyYW5zYWN0aW9uGAIgASgJUhRzaWduZWRSYXdUcmFuc2FjdGlvbg=='); -@$core.Deprecated('Use getTotalBalanceRequestDescriptor instead') -const GetTotalBalanceRequest$json = const { - '1': 'GetTotalBalanceRequest', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - ], -}; - -/// Descriptor for `GetTotalBalanceRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getTotalBalanceRequestDescriptor = $convert.base64Decode('ChZHZXRUb3RhbEJhbGFuY2VSZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW1l'); -@$core.Deprecated('Use getTotalBalanceResponseDescriptor instead') -const GetTotalBalanceResponse$json = const { - '1': 'GetTotalBalanceResponse', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - const {'1': 'total_balance', '3': 2, '4': 1, '5': 3, '10': 'totalBalance'}, - ], -}; - -/// Descriptor for `GetTotalBalanceResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getTotalBalanceResponseDescriptor = $convert.base64Decode('ChdHZXRUb3RhbEJhbGFuY2VSZXNwb25zZRIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZRIjCg10b3RhbF9iYWxhbmNlGAIgASgDUgx0b3RhbEJhbGFuY2U='); -@$core.Deprecated('Use signMessageRequestDescriptor instead') -const SignMessageRequest$json = const { - '1': 'SignMessageRequest', - '2': const [ - const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, - const {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'}, - const {'1': 'address', '3': 3, '4': 1, '5': 9, '10': 'address'}, - const {'1': 'message', '3': 4, '4': 1, '5': 9, '10': 'message'}, - ], -}; - -/// Descriptor for `SignMessageRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List signMessageRequestDescriptor = $convert.base64Decode('ChJTaWduTWVzc2FnZVJlcXVlc3QSHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWUSGgoIcGFzc3dvcmQYAiABKAlSCHBhc3N3b3JkEhgKB2FkZHJlc3MYAyABKAlSB2FkZHJlc3MSGAoHbWVzc2FnZRgEIAEoCVIHbWVzc2FnZQ=='); -@$core.Deprecated('Use signMessageResponseDescriptor instead') -const SignMessageResponse$json = const { - '1': 'SignMessageResponse', - '2': const [ - const {'1': 'signature', '3': 1, '4': 1, '5': 9, '10': 'signature'}, - ], -}; - -/// Descriptor for `SignMessageResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List signMessageResponseDescriptor = $convert.base64Decode('ChNTaWduTWVzc2FnZVJlc3BvbnNlEhwKCXNpZ25hdHVyZRgBIAEoCVIJc2lnbmF0dXJl'); -const $core.Map<$core.String, $core.dynamic> WalletServiceBase$json = const { - '1': 'Wallet', - '2': const [ - const {'1': 'CreateWallet', '2': '.pactus.CreateWalletRequest', '3': '.pactus.CreateWalletResponse'}, - const {'1': 'RestoreWallet', '2': '.pactus.RestoreWalletRequest', '3': '.pactus.RestoreWalletResponse'}, - const {'1': 'LoadWallet', '2': '.pactus.LoadWalletRequest', '3': '.pactus.LoadWalletResponse'}, - const {'1': 'UnloadWallet', '2': '.pactus.UnloadWalletRequest', '3': '.pactus.UnloadWalletResponse'}, - const {'1': 'GetTotalBalance', '2': '.pactus.GetTotalBalanceRequest', '3': '.pactus.GetTotalBalanceResponse'}, - const {'1': 'SignRawTransaction', '2': '.pactus.SignRawTransactionRequest', '3': '.pactus.SignRawTransactionResponse'}, - const {'1': 'GetValidatorAddress', '2': '.pactus.GetValidatorAddressRequest', '3': '.pactus.GetValidatorAddressResponse'}, - const {'1': 'GetNewAddress', '2': '.pactus.GetNewAddressRequest', '3': '.pactus.GetNewAddressResponse'}, - const {'1': 'GetAddressHistory', '2': '.pactus.GetAddressHistoryRequest', '3': '.pactus.GetAddressHistoryResponse'}, - const {'1': 'SignMessage', '2': '.pactus.SignMessageRequest', '3': '.pactus.SignMessageResponse'}, - ], -}; - -@$core.Deprecated('Use walletServiceDescriptor instead') -const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> WalletServiceBase$messageJson = const { - '.pactus.CreateWalletRequest': CreateWalletRequest$json, - '.pactus.CreateWalletResponse': CreateWalletResponse$json, - '.pactus.RestoreWalletRequest': RestoreWalletRequest$json, - '.pactus.RestoreWalletResponse': RestoreWalletResponse$json, - '.pactus.LoadWalletRequest': LoadWalletRequest$json, - '.pactus.LoadWalletResponse': LoadWalletResponse$json, - '.pactus.UnloadWalletRequest': UnloadWalletRequest$json, - '.pactus.UnloadWalletResponse': UnloadWalletResponse$json, - '.pactus.GetTotalBalanceRequest': GetTotalBalanceRequest$json, - '.pactus.GetTotalBalanceResponse': GetTotalBalanceResponse$json, - '.pactus.SignRawTransactionRequest': SignRawTransactionRequest$json, - '.pactus.SignRawTransactionResponse': SignRawTransactionResponse$json, - '.pactus.GetValidatorAddressRequest': GetValidatorAddressRequest$json, - '.pactus.GetValidatorAddressResponse': GetValidatorAddressResponse$json, - '.pactus.GetNewAddressRequest': GetNewAddressRequest$json, - '.pactus.GetNewAddressResponse': GetNewAddressResponse$json, - '.pactus.AddressInfo': AddressInfo$json, - '.pactus.GetAddressHistoryRequest': GetAddressHistoryRequest$json, - '.pactus.GetAddressHistoryResponse': GetAddressHistoryResponse$json, - '.pactus.HistoryInfo': HistoryInfo$json, - '.pactus.SignMessageRequest': SignMessageRequest$json, - '.pactus.SignMessageResponse': SignMessageResponse$json, -}; - -/// Descriptor for `Wallet`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List walletServiceDescriptor = $convert.base64Decode('CgZXYWxsZXQSSQoMQ3JlYXRlV2FsbGV0EhsucGFjdHVzLkNyZWF0ZVdhbGxldFJlcXVlc3QaHC5wYWN0dXMuQ3JlYXRlV2FsbGV0UmVzcG9uc2USTAoNUmVzdG9yZVdhbGxldBIcLnBhY3R1cy5SZXN0b3JlV2FsbGV0UmVxdWVzdBodLnBhY3R1cy5SZXN0b3JlV2FsbGV0UmVzcG9uc2USQwoKTG9hZFdhbGxldBIZLnBhY3R1cy5Mb2FkV2FsbGV0UmVxdWVzdBoaLnBhY3R1cy5Mb2FkV2FsbGV0UmVzcG9uc2USSQoMVW5sb2FkV2FsbGV0EhsucGFjdHVzLlVubG9hZFdhbGxldFJlcXVlc3QaHC5wYWN0dXMuVW5sb2FkV2FsbGV0UmVzcG9uc2USUgoPR2V0VG90YWxCYWxhbmNlEh4ucGFjdHVzLkdldFRvdGFsQmFsYW5jZVJlcXVlc3QaHy5wYWN0dXMuR2V0VG90YWxCYWxhbmNlUmVzcG9uc2USWwoSU2lnblJhd1RyYW5zYWN0aW9uEiEucGFjdHVzLlNpZ25SYXdUcmFuc2FjdGlvblJlcXVlc3QaIi5wYWN0dXMuU2lnblJhd1RyYW5zYWN0aW9uUmVzcG9uc2USXgoTR2V0VmFsaWRhdG9yQWRkcmVzcxIiLnBhY3R1cy5HZXRWYWxpZGF0b3JBZGRyZXNzUmVxdWVzdBojLnBhY3R1cy5HZXRWYWxpZGF0b3JBZGRyZXNzUmVzcG9uc2USTAoNR2V0TmV3QWRkcmVzcxIcLnBhY3R1cy5HZXROZXdBZGRyZXNzUmVxdWVzdBodLnBhY3R1cy5HZXROZXdBZGRyZXNzUmVzcG9uc2USWAoRR2V0QWRkcmVzc0hpc3RvcnkSIC5wYWN0dXMuR2V0QWRkcmVzc0hpc3RvcnlSZXF1ZXN0GiEucGFjdHVzLkdldEFkZHJlc3NIaXN0b3J5UmVzcG9uc2USRgoLU2lnbk1lc3NhZ2USGi5wYWN0dXMuU2lnbk1lc3NhZ2VSZXF1ZXN0GhsucGFjdHVzLlNpZ25NZXNzYWdlUmVzcG9uc2U='); diff --git a/www/grpc/gen/dart/wallet.pbserver.dart b/www/grpc/gen/dart/wallet.pbserver.dart deleted file mode 100644 index dd38d8997..000000000 --- a/www/grpc/gen/dart/wallet.pbserver.dart +++ /dev/null @@ -1,65 +0,0 @@ -/// -// Generated code. Do not modify. -// source: wallet.proto -// -// @dart = 2.12 -// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name - -import 'dart:async' as $async; - -import 'package:protobuf/protobuf.dart' as $pb; - -import 'dart:core' as $core; -import 'wallet.pb.dart' as $4; -import 'wallet.pbjson.dart'; - -export 'wallet.pb.dart'; - -abstract class WalletServiceBase extends $pb.GeneratedService { - $async.Future<$4.CreateWalletResponse> createWallet($pb.ServerContext ctx, $4.CreateWalletRequest request); - $async.Future<$4.RestoreWalletResponse> restoreWallet($pb.ServerContext ctx, $4.RestoreWalletRequest request); - $async.Future<$4.LoadWalletResponse> loadWallet($pb.ServerContext ctx, $4.LoadWalletRequest request); - $async.Future<$4.UnloadWalletResponse> unloadWallet($pb.ServerContext ctx, $4.UnloadWalletRequest request); - $async.Future<$4.GetTotalBalanceResponse> getTotalBalance($pb.ServerContext ctx, $4.GetTotalBalanceRequest request); - $async.Future<$4.SignRawTransactionResponse> signRawTransaction($pb.ServerContext ctx, $4.SignRawTransactionRequest request); - $async.Future<$4.GetValidatorAddressResponse> getValidatorAddress($pb.ServerContext ctx, $4.GetValidatorAddressRequest request); - $async.Future<$4.GetNewAddressResponse> getNewAddress($pb.ServerContext ctx, $4.GetNewAddressRequest request); - $async.Future<$4.GetAddressHistoryResponse> getAddressHistory($pb.ServerContext ctx, $4.GetAddressHistoryRequest request); - $async.Future<$4.SignMessageResponse> signMessage($pb.ServerContext ctx, $4.SignMessageRequest request); - - $pb.GeneratedMessage createRequest($core.String method) { - switch (method) { - case 'CreateWallet': return $4.CreateWalletRequest(); - case 'RestoreWallet': return $4.RestoreWalletRequest(); - case 'LoadWallet': return $4.LoadWalletRequest(); - case 'UnloadWallet': return $4.UnloadWalletRequest(); - case 'GetTotalBalance': return $4.GetTotalBalanceRequest(); - case 'SignRawTransaction': return $4.SignRawTransactionRequest(); - case 'GetValidatorAddress': return $4.GetValidatorAddressRequest(); - case 'GetNewAddress': return $4.GetNewAddressRequest(); - case 'GetAddressHistory': return $4.GetAddressHistoryRequest(); - case 'SignMessage': return $4.SignMessageRequest(); - default: throw $core.ArgumentError('Unknown method: $method'); - } - } - - $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) { - switch (method) { - case 'CreateWallet': return this.createWallet(ctx, request as $4.CreateWalletRequest); - case 'RestoreWallet': return this.restoreWallet(ctx, request as $4.RestoreWalletRequest); - case 'LoadWallet': return this.loadWallet(ctx, request as $4.LoadWalletRequest); - case 'UnloadWallet': return this.unloadWallet(ctx, request as $4.UnloadWalletRequest); - case 'GetTotalBalance': return this.getTotalBalance(ctx, request as $4.GetTotalBalanceRequest); - case 'SignRawTransaction': return this.signRawTransaction(ctx, request as $4.SignRawTransactionRequest); - case 'GetValidatorAddress': return this.getValidatorAddress(ctx, request as $4.GetValidatorAddressRequest); - case 'GetNewAddress': return this.getNewAddress(ctx, request as $4.GetNewAddressRequest); - case 'GetAddressHistory': return this.getAddressHistory(ctx, request as $4.GetAddressHistoryRequest); - case 'SignMessage': return this.signMessage(ctx, request as $4.SignMessageRequest); - default: throw $core.ArgumentError('Unknown method: $method'); - } - } - - $core.Map<$core.String, $core.dynamic> get $json => WalletServiceBase$json; - $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => WalletServiceBase$messageJson; -} - diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md deleted file mode 100644 index b0c4bc67a..000000000 --- a/www/grpc/gen/docs/grpc.md +++ /dev/null @@ -1,3280 +0,0 @@ ---- -title: GRPC API Reference -weight: 1 ---- - -Each node in the Pactus network can be configured to use the [gRPC](https://grpc.io/) protocol for communication. -Here you can find the list of all gRPC methods and messages. - -All the amounts and values in gRPC endpoints are in NanoPAC units, which are atomic and the smallest unit in the Pactus blockchain. -Each PAC is equivalent to 1,000,000,000 or 109 NanoPACs. - -

gRPC Services

- - - -
- -## Transaction Service - -

Transaction service defines various RPC methods for interacting with -transactions.

- -### GetTransaction - -

GetTransaction retrieves transaction details based on the provided request -parameters.

- -

GetTransactionRequest Request

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
id string - The unique ID of the transaction to retrieve. -
verbosity TransactionVerbosity - (Enum) The verbosity level for transaction details. -
Available values:
    -
  • TRANSACTION_DATA = 0 (Request transaction data only.)
  • -
  • TRANSACTION_INFO = 1 (Request detailed transaction information.)
  • -
-
-

GetTransactionResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
block_height uint32 - The height of the block containing the transaction. -
block_time uint32 - The UNIX timestamp of the block containing the transaction. -
transaction TransactionInfo - Detailed information about the transaction. -
transaction.id string - The unique ID of the transaction. -
transaction.data string - The raw transaction data. -
transaction.version int32 - The version of the transaction. -
transaction.lock_time uint32 - The lock time for the transaction. -
transaction.value int64 - The value of the transaction in NanoPAC. -
transaction.fee int64 - The fee for the transaction in NanoPAC. -
transaction.payload_type PayloadType - (Enum) The type of transaction payload. -
Available values:
    -
  • UNKNOWN = 0 (Unknown payload type.)
  • -
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • -
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • -
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • -
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • -
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • -
-
transaction.transfer PayloadTransfer - (OneOf) Transfer transaction payload. -
transaction.transfer.sender string - The sender's address. -
transaction.transfer.receiver string - The receiver's address. -
transaction.transfer.amount int64 - The amount to be transferred in NanoPAC. -
transaction.bond PayloadBond - (OneOf) Bond transaction payload. -
transaction.bond.sender string - The sender's address. -
transaction.bond.receiver string - The receiver's address. -
transaction.bond.stake int64 - The stake amount in NanoPAC. -
transaction.sortition PayloadSortition - (OneOf) Sortition transaction payload. -
transaction.sortition.address string - The validator address associated with the sortition proof. -
transaction.sortition.proof string - The proof for the sortition. -
transaction.unbond PayloadUnbond - (OneOf) Unbond transaction payload. -
transaction.unbond.validator string - The address of the validator to unbond from. -
transaction.withdraw PayloadWithdraw - (OneOf) Withdraw transaction payload. -
transaction.withdraw.from string - The address to withdraw from. -
transaction.withdraw.to string - The address to withdraw to. -
transaction.withdraw.amount int64 - The withdrawal amount in NanoPAC. -
transaction.memo string - A memo string for the transaction. -
transaction.public_key string - The public key associated with the transaction. -
transaction.signature string - The signature for the transaction. -
- -### CalculateFee - -

CalculateFee calculates the transaction fee based on the specified amount -and payload type.

- -

CalculateFeeRequest Request

- - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
amount int64 - The amount involved in the transaction, specified in NanoPAC. -
payload_type PayloadType - (Enum) The type of transaction payload. -
Available values:
    -
  • UNKNOWN = 0 (Unknown payload type.)
  • -
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • -
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • -
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • -
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • -
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • -
-
fixed_amount bool - Indicates if the amount should be fixed and include the fee. -
-

CalculateFeeResponse Response

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
amount int64 - The calculated amount in NanoPAC. -
fee int64 - The calculated transaction fee in NanoPAC. -
- -### BroadcastTransaction - -

BroadcastTransaction broadcasts a signed transaction to the network.

- -

BroadcastTransactionRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
signed_raw_transaction string - The signed raw transaction data to be broadcasted. -
-

BroadcastTransactionResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
id string - The unique ID of the broadcasted transaction. -
- -### GetRawTransferTransaction - -

GetRawTransferTransaction retrieves raw details of a transfer transaction.

- -

GetRawTransferTransactionRequest Request

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
lock_time uint32 - The lock time for the transaction. If not set, defaults to the last block -height. -
sender string - The sender's account address. -
receiver string - The receiver's account address. -
amount int64 - The amount to be transferred, specified in NanoPAC. Must be greater than 0. -
fee int64 - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. -
memo string - A memo string for the transaction. -
-

GetRawTransactionResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
raw_transaction string - The raw transaction data. -
- -### GetRawBondTransaction - -

GetRawBondTransaction retrieves raw details of a bond transaction.

- -

GetRawBondTransactionRequest Request

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
lock_time uint32 - The lock time for the transaction. If not set, defaults to the last block -height. -
sender string - The sender's account address. -
receiver string - The receiver's validator address. -
stake int64 - The stake amount in NanoPAC. Must be greater than 0. -
public_key string - The public key of the validator. -
fee int64 - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. -
memo string - A memo string for the transaction. -
-

GetRawTransactionResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
raw_transaction string - The raw transaction data. -
- -### GetRawUnbondTransaction - -

GetRawUnbondTransaction retrieves raw details of an unbond transaction.

- -

GetRawUnbondTransactionRequest Request

- - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
lock_time uint32 - The lock time for the transaction. If not set, defaults to the last block -height. -
validator_address string - The address of the validator to unbond from. -
memo string - A memo string for the transaction. -
-

GetRawTransactionResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
raw_transaction string - The raw transaction data. -
- -### GetRawWithdrawTransaction - -

GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.

- -

GetRawWithdrawTransactionRequest Request

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
lock_time uint32 - The lock time for the transaction. If not set, defaults to the last block -height. -
validator_address string - The address of the validator to withdraw from. -
account_address string - The address of the account to withdraw to. -
amount int64 - The withdrawal amount in NanoPAC. Must be greater than 0. -
fee int64 - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. -
memo string - A memo string for the transaction. -
-

GetRawTransactionResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
raw_transaction string - The raw transaction data. -
- -## Blockchain Service - -

Blockchain service defines RPC methods for interacting with the blockchain.

- -### GetBlock - -

GetBlock retrieves information about a block based on the provided request -parameters.

- -

GetBlockRequest Request

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
height uint32 - The height of the block to retrieve. -
verbosity BlockVerbosity - (Enum) The verbosity level for block information. -
Available values:
    -
  • BLOCK_DATA = 0 (Request only block data.)
  • -
  • BLOCK_INFO = 1 (Request block information and transaction IDs.)
  • -
  • BLOCK_TRANSACTIONS = 2 (Request block information and detailed transaction data.)
  • -
-
-

GetBlockResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
height uint32 - The height of the block. -
hash string - The hash of the block. -
data string - Block data, available only if verbosity level is set to BLOCK_DATA. -
block_time uint32 - The timestamp of the block. -
header BlockHeaderInfo - Header information of the block. -
header.version int32 - The version of the block. -
header.prev_block_hash string - The hash of the previous block. -
header.state_root string - The state root hash of the blockchain. -
header.sortition_seed string - The sortition seed of the block. -
header.proposer_address string - The address of the proposer of the block. -
prev_cert CertificateInfo - Certificate information of the previous block. -
prev_cert.hash string - The hash of the certificate. -
prev_cert.round int32 - The round of the certificate. -
prev_cert.committersrepeated int32 - List of committers in the certificate. -
prev_cert.absenteesrepeated int32 - List of absentees in the certificate. -
prev_cert.signature string - The signature of the certificate. -
txsrepeated TransactionInfo - List of transactions in the block, available when verbosity level is set to -BLOCK_TRANSACTIONS. -
txs[].id string - The unique ID of the transaction. -
txs[].data string - The raw transaction data. -
txs[].version int32 - The version of the transaction. -
txs[].lock_time uint32 - The lock time for the transaction. -
txs[].value int64 - The value of the transaction in NanoPAC. -
txs[].fee int64 - The fee for the transaction in NanoPAC. -
txs[].payload_type PayloadType - (Enum) The type of transaction payload. -
Available values:
    -
  • UNKNOWN = 0 (Unknown payload type.)
  • -
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • -
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • -
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • -
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • -
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • -
-
txs[].transfer PayloadTransfer - (OneOf) Transfer transaction payload. -
txs[].transfer.sender string - The sender's address. -
txs[].transfer.receiver string - The receiver's address. -
txs[].transfer.amount int64 - The amount to be transferred in NanoPAC. -
txs[].bond PayloadBond - (OneOf) Bond transaction payload. -
txs[].bond.sender string - The sender's address. -
txs[].bond.receiver string - The receiver's address. -
txs[].bond.stake int64 - The stake amount in NanoPAC. -
txs[].sortition PayloadSortition - (OneOf) Sortition transaction payload. -
txs[].sortition.address string - The validator address associated with the sortition proof. -
txs[].sortition.proof string - The proof for the sortition. -
txs[].unbond PayloadUnbond - (OneOf) Unbond transaction payload. -
txs[].unbond.validator string - The address of the validator to unbond from. -
txs[].withdraw PayloadWithdraw - (OneOf) Withdraw transaction payload. -
txs[].withdraw.from string - The address to withdraw from. -
txs[].withdraw.to string - The address to withdraw to. -
txs[].withdraw.amount int64 - The withdrawal amount in NanoPAC. -
txs[].memo string - A memo string for the transaction. -
txs[].public_key string - The public key associated with the transaction. -
txs[].signature string - The signature for the transaction. -
- -### GetBlockHash - -

GetBlockHash retrieves the hash of a block at the specified height.

- -

GetBlockHashRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
height uint32 - The height of the block to retrieve the hash for. -
-

GetBlockHashResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
hash string - The hash of the block. -
- -### GetBlockHeight - -

GetBlockHeight retrieves the height of a block with the specified hash.

- -

GetBlockHeightRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
hash string - The hash of the block to retrieve the height for. -
-

GetBlockHeightResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
height uint32 - The height of the block. -
- -### GetBlockchainInfo - -

GetBlockchainInfo retrieves general information about the blockchain.

- -

GetBlockchainInfoRequest Request

- -Message has no fields. -

GetBlockchainInfoResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
last_block_height uint32 - The height of the last block in the blockchain. -
last_block_hash string - The hash of the last block in the blockchain. -
total_accounts int32 - The total number of accounts in the blockchain. -
total_validators int32 - The total number of validators in the blockchain. -
total_power int64 - The total power of the blockchain. -
committee_power int64 - The power of the committee. -
committee_validatorsrepeated ValidatorInfo - List of committee validators. -
committee_validators[].hash string - The hash of the validator. -
committee_validators[].data string - The serialized data of the validator. -
committee_validators[].public_key string - The public key of the validator. -
committee_validators[].number int32 - The unique number assigned to the validator. -
committee_validators[].stake int64 - The stake of the validator in NanoPAC. -
committee_validators[].last_bonding_height uint32 - The height at which the validator last bonded. -
committee_validators[].last_sortition_height uint32 - The height at which the validator last participated in sortition. -
committee_validators[].unbonding_height uint32 - The height at which the validator will unbond. -
committee_validators[].address string - The address of the validator. -
committee_validators[].availability_score double - The availability score of the validator. -
is_pruned bool - If the blocks are subject to pruning. -
pruning_height uint32 - Lowest-height block stored (only present if pruning is enabled) -
last_block_time int64 - Timestamp of the last block in Unix format -
- -### GetConsensusInfo - -

GetConsensusInfo retrieves information about the consensus instances.

- -

GetConsensusInfoRequest Request

- -Message has no fields. -

GetConsensusInfoResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
proposal Proposal - The proposal of the consensus info. -
proposal.height uint32 - The height of the proposal. -
proposal.round int32 - The round of the proposal. -
proposal.block_data string - The block data of the proposal. -
proposal.signature_data string - The signature data of the proposal. -
instancesrepeated ConsensusInfo - List of consensus instances. -
instances[].address string - The address of the consensus instance. -
instances[].active bool - Indicates whether the consensus instance is active and part of the -committee. -
instances[].height uint32 - The height of the consensus instance. -
instances[].round int32 - The round of the consensus instance. -
instances[].votesrepeated VoteInfo - List of votes in the consensus instance. -
instances[].votes[].type VoteType - (Enum) The type of the vote. -
Available values:
    -
  • VOTE_UNKNOWN = 0 (Unknown vote type.)
  • -
  • VOTE_PREPARE = 1 (Prepare vote type.)
  • -
  • VOTE_PRECOMMIT = 2 (Precommit vote type.)
  • -
  • VOTE_CHANGE_PROPOSER = 3 (Change proposer vote type.)
  • -
-
instances[].votes[].voter string - The address of the voter. -
instances[].votes[].block_hash string - The hash of the block being voted on. -
instances[].votes[].round int32 - The consensus round of the vote. -
instances[].votes[].cp_round int32 - The change-proposer round of the vote. -
instances[].votes[].cp_value int32 - The change-proposer value of the vote. -
- -### GetAccount - -

GetAccount retrieves information about an account based on the provided -address.

- -

GetAccountRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
address string - The address of the account to retrieve information for. -
-

GetAccountResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
account AccountInfo - Detailed information about the account. -
account.hash string - The hash of the account. -
account.data string - The serialized data of the account. -
account.number int32 - The unique number assigned to the account. -
account.balance int64 - The balance of the account in NanoPAC. -
account.address string - The address of the account. -
- -### GetValidator - -

GetValidator retrieves information about a validator based on the provided -address.

- -

GetValidatorRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
address string - The address of the validator to retrieve information for. -
-

GetValidatorResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
validator ValidatorInfo - Detailed information about the validator. -
validator.hash string - The hash of the validator. -
validator.data string - The serialized data of the validator. -
validator.public_key string - The public key of the validator. -
validator.number int32 - The unique number assigned to the validator. -
validator.stake int64 - The stake of the validator in NanoPAC. -
validator.last_bonding_height uint32 - The height at which the validator last bonded. -
validator.last_sortition_height uint32 - The height at which the validator last participated in sortition. -
validator.unbonding_height uint32 - The height at which the validator will unbond. -
validator.address string - The address of the validator. -
validator.availability_score double - The availability score of the validator. -
- -### GetValidatorByNumber - -

GetValidatorByNumber retrieves information about a validator based on the -provided number.

- -

GetValidatorByNumberRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
number int32 - The unique number of the validator to retrieve information for. -
-

GetValidatorResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
validator ValidatorInfo - Detailed information about the validator. -
validator.hash string - The hash of the validator. -
validator.data string - The serialized data of the validator. -
validator.public_key string - The public key of the validator. -
validator.number int32 - The unique number assigned to the validator. -
validator.stake int64 - The stake of the validator in NanoPAC. -
validator.last_bonding_height uint32 - The height at which the validator last bonded. -
validator.last_sortition_height uint32 - The height at which the validator last participated in sortition. -
validator.unbonding_height uint32 - The height at which the validator will unbond. -
validator.address string - The address of the validator. -
validator.availability_score double - The availability score of the validator. -
- -### GetValidatorAddresses - -

GetValidatorAddresses retrieves a list of all validator addresses.

- -

GetValidatorAddressesRequest Request

- -Message has no fields. -

GetValidatorAddressesResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
addressesrepeated string - List of validator addresses. -
- -### GetPublicKey - -

GetPublicKey retrieves the public key of an account based on the provided -address.

- -

GetPublicKeyRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
address string - The address for which to retrieve the public key. -
-

GetPublicKeyResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
public_key string - The public key associated with the provided address. -
- -### GetTxPoolContent - -

GetTxPoolContent retrieves current transactions in the transaction pool.

- -

GetTxPoolContentRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
payload_type PayloadType - (Enum) The type of transactions to retrieve from the transaction pool. 0 means all -types. -
Available values:
    -
  • UNKNOWN = 0 (Unknown payload type.)
  • -
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • -
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • -
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • -
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • -
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • -
-
-

GetTxPoolContentResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
txsrepeated TransactionInfo - List of transactions currently in the pool. -
txs[].id string - The unique ID of the transaction. -
txs[].data string - The raw transaction data. -
txs[].version int32 - The version of the transaction. -
txs[].lock_time uint32 - The lock time for the transaction. -
txs[].value int64 - The value of the transaction in NanoPAC. -
txs[].fee int64 - The fee for the transaction in NanoPAC. -
txs[].payload_type PayloadType - (Enum) The type of transaction payload. -
Available values:
    -
  • UNKNOWN = 0 (Unknown payload type.)
  • -
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • -
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • -
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • -
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • -
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • -
-
txs[].transfer PayloadTransfer - (OneOf) Transfer transaction payload. -
txs[].transfer.sender string - The sender's address. -
txs[].transfer.receiver string - The receiver's address. -
txs[].transfer.amount int64 - The amount to be transferred in NanoPAC. -
txs[].bond PayloadBond - (OneOf) Bond transaction payload. -
txs[].bond.sender string - The sender's address. -
txs[].bond.receiver string - The receiver's address. -
txs[].bond.stake int64 - The stake amount in NanoPAC. -
txs[].sortition PayloadSortition - (OneOf) Sortition transaction payload. -
txs[].sortition.address string - The validator address associated with the sortition proof. -
txs[].sortition.proof string - The proof for the sortition. -
txs[].unbond PayloadUnbond - (OneOf) Unbond transaction payload. -
txs[].unbond.validator string - The address of the validator to unbond from. -
txs[].withdraw PayloadWithdraw - (OneOf) Withdraw transaction payload. -
txs[].withdraw.from string - The address to withdraw from. -
txs[].withdraw.to string - The address to withdraw to. -
txs[].withdraw.amount int64 - The withdrawal amount in NanoPAC. -
txs[].memo string - A memo string for the transaction. -
txs[].public_key string - The public key associated with the transaction. -
txs[].signature string - The signature for the transaction. -
- -## Network Service - -

Network service provides RPCs for retrieving information about the network.

- -### GetNetworkInfo - -

GetNetworkInfo retrieves information about the overall network.

- -

GetNetworkInfoRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
only_connected bool - If true, only returns peers with connected status. -
-

GetNetworkInfoResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
network_name string - Name of the network. -
total_sent_bytes int64 - Total bytes sent across the network. -
total_received_bytes int64 - Total bytes received across the network. -
connected_peers_count uint32 - Number of connected peers. -
connected_peersrepeated PeerInfo - List of connected peers. -
connected_peers[].status int32 - Status of the peer. -
connected_peers[].moniker string - Moniker of the peer. -
connected_peers[].agent string - Agent information of the peer. -
connected_peers[].peer_id string - Peer ID of the peer. -
connected_peers[].consensus_keysrepeated string - Consensus keys used by the peer. -
connected_peers[].consensus_addressesrepeated string - Consensus addresses of the peer. -
connected_peers[].services uint32 - Services provided by the peer. -
connected_peers[].last_block_hash string - Hash of the last block the peer knows. -
connected_peers[].height uint32 - Blockchain height of the peer. -
connected_peers[].received_bundles int32 - Number of received bundles. -
connected_peers[].invalid_bundles int32 - Number of invalid bundles received. -
connected_peers[].last_sent int64 - Timestamp of the last sent bundle. -
connected_peers[].last_received int64 - Timestamp of the last received bundle. -
connected_peers[].sent_bytes map<int32, int64> - Bytes sent per message type. -
connected_peers[].received_bytes map<int32, int64> - Bytes received per message type. -
connected_peers[].address string - Network address of the peer. -
connected_peers[].direction string - Direction of connection with the peer. -
connected_peers[].protocolsrepeated string - List of protocols supported by the peer. -
connected_peers[].total_sessions int32 - Total download sessions with the peer. -
connected_peers[].completed_sessions int32 - Completed download sessions with the peer. -
sent_bytes map<int32, int64> - Bytes sent per peer ID. -
received_bytes map<int32, int64> - Bytes received per peer ID. -
- -### GetNodeInfo - -

GetNodeInfo retrieves information about a specific node in the network.

- -

GetNodeInfoRequest Request

- -Message has no fields. -

GetNodeInfoResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
moniker string - Moniker of the node. -
agent string - Agent information of the node. -
peer_id string - Peer ID of the node. -
started_at uint64 - Timestamp when the node started. -
reachability string - Reachability status of the node. -
services int32 - A bitfield indicating the services provided by the node. -
services_names string - Names of services provided by the node. -
local_addrsrepeated string - List of addresses associated with the node. -
protocolsrepeated string - List of protocols supported by the node. -
clock_offset double - Clock offset of the node. -
connection_info ConnectionInfo - Information about the node's connections. -
connection_info.connections uint64 - Total number of connections. -
connection_info.inbound_connections uint64 - Number of inbound connections. -
connection_info.outbound_connections uint64 - Number of outbound connections. -
- -## Utils Service - -

Utils service defines RPC methods for utility functions such as message -signing and verification.

- -### SignMessageWithPrivateKey - -

SignMessageWithPrivateKey sign message with provided private key.

- -

SignMessageWithPrivateKeyRequest Request

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
private_key string - The private key to sign the message. -
message string - The message to sign. -
-

SignMessageWithPrivateKeyResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
signature string - The signature of the message. -
- -### VerifyMessage - -

VerifyMessage verify signature with public key and message

- -

VerifyMessageRequest Request

- - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
message string - The signed message. -
signature string - The signature of the message. -
public_key string - The public key of the signer. -
-

VerifyMessageResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
is_valid bool - Indicates if the signature is valid (true) or not (false). -
- -## Wallet Service - -

Define the Wallet service with various RPC methods for wallet management.

- -### CreateWallet - -

CreateWallet creates a new wallet with the specified parameters.

- -

CreateWalletRequest Request

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the new wallet. -
password string - The password for securing the wallet. -
-

CreateWalletResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
mnemonic string - The mnemonic for wallet recovery. -
- -### RestoreWallet - -

RestoreWallet restores an existing wallet with the given mnemonic.

- -

RestoreWalletRequest Request

- - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet to restore. -
mnemonic string - The mnemonic for wallet recovery. -
password string - The password for securing the wallet. -
-

RestoreWalletResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the restored wallet. -
- -### LoadWallet - -

LoadWallet loads an existing wallet with the given name.

- -

LoadWalletRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet to load. -
-

LoadWalletResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the loaded wallet. -
- -### UnloadWallet - -

UnloadWallet unloads a currently loaded wallet with the specified name.

- -

UnloadWalletRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet to unload. -
-

UnloadWalletResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the unloaded wallet. -
- -### GetTotalBalance - -

GetTotalBalance returns the total available balance of the wallet.

- -

GetTotalBalanceRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet to get the total balance. -
-

GetTotalBalanceResponse Response

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet. -
total_balance int64 - The total balance of the wallet in NanoPAC. -
- -### SignRawTransaction - -

SignRawTransaction signs a raw transaction for a specified wallet.

- -

SignRawTransactionRequest Request

- - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet used for signing. -
raw_transaction string - The raw transaction data to be signed. -
password string - The password for unlocking the wallet for signing. -
-

SignRawTransactionResponse Response

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
transaction_id string - The ID of the signed transaction. -
signed_raw_transaction string - The signed raw transaction data. -
- -### GetValidatorAddress - -

GetValidatorAddress retrieves the validator address associated with a -public key.

- -

GetValidatorAddressRequest Request

- - - - - - - - - - - - -
FieldTypeDescription
public_key string - The public key for which the validator address is requested. -
-

GetValidatorAddressResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
address string - The validator address associated with the public key. -
- -### GetNewAddress - -

GetNewAddress generates a new address for the specified wallet.

- -

GetNewAddressRequest Request

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet to generate a new address. -
address_type AddressType - (Enum) The type of address to generate. -
Available values:
    -
  • ADDRESS_TYPE_TREASURY = 0 (Treasury address type. -Should not be used to generate new addresses.)
  • -
  • ADDRESS_TYPE_VALIDATOR = 1 (Validator address type.)
  • -
  • ADDRESS_TYPE_BLS_ACCOUNT = 2 (Account address type with BLS signature scheme.)
  • -
  • ADDRESS_TYPE_ED25519_ACCOUNT = 3 (Account address type with Ed25519 signature scheme. -Note: Generating a new Ed25519 address requires the wallet password.)
  • -
-
label string - A label for the new address. -
password string - Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. -
-

GetNewAddressResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet from which the address is generated. -
address_info AddressInfo - Information about the newly generated address. -
address_info.address string - The address string. -
address_info.public_key string - The public key associated with the address. -
address_info.label string - A label associated with the address. -
address_info.path string - The Hierarchical Deterministic path of the address within the wallet. -
- -### GetAddressHistory - -

GetAddressHistory retrieves the transaction history of an address.

- -

GetAddressHistoryRequest Request

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet. -
address string - The address to retrieve the transaction history for. -
-

GetAddressHistoryResponse Response

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
history_inforepeated HistoryInfo - Array of history information for the address. -
history_info[].transaction_id string - The transaction ID hash. -
history_info[].time uint32 - The timestamp of the transaction. -
history_info[].payload_type string - The payload type of the transaction. -
history_info[].description string - A description of the transaction. -
history_info[].amount int64 - The amount involved in the transaction. -
- -### SignMessage - -

SignMessage signs an arbitrary message.

- -

SignMessageRequest Request

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet. -
password string - The password for unlocking the wallet for signing. -
address string - The account address associated with the private key. -
message string - The arbitrary message to be signed. -
-

SignMessageResponse Response

- - - - - - - - - - - - -
FieldTypeDescription
signature string - Signature of the message. -
- -## Scalar Value Types - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.proto TypeGoC++RustJavaPythonC#
doublefloat64doublef64doublefloatdouble
floatfloat32floatf32floatfloatfloat
int32int32int32i32intintint
int64int64int64i64longint/longlong
uint32uint32uint32u32intint/longuint
uint64uint64uint64u64longint/longulong
sint32int32int32i32intintint
sint64int64int64i64longint/longlong
fixed32uint32uint32u64intintuint
fixed64uint64uint64u64longint/longulong
sfixed32int32int32i32intintint
sfixed64int64int64i64longint/longlong
boolboolboolboolbooleanbooleanbool
stringstringstringStringStringstr/unicodestring
bytes[]bytestringVecByteStringstrByteString
diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md deleted file mode 100644 index ee6ec9275..000000000 --- a/www/grpc/gen/docs/json-rpc.md +++ /dev/null @@ -1,3186 +0,0 @@ ---- -title: JSON-RPC API Reference -weight: 2 ---- - -Each node in the Pactus network can be configured to use the [gRPC](https://grpc.io/) protocol for communication. -Here, you can find the list of all gRPC methods and messages. - -All the amounts and values in gRPC endpoints are in NanoPAC units, -which are atomic and the smallest unit in the Pactus blockchain. -Each PAC is equivalent to 1,000,000,000 or 109 NanoPACs. - -## Example - -To call JSON-RPC methods, you need to create the JSON-RPC request: - -```json -{ - "jsonrpc": "2.0", - "id": 1, - "method": "pactus.network.get_node_info", - "params": {} -} -``` - -> Make sure you always add the `params` field, even if no parameters are needed, and ensure you use curly braces. - -Then you use the `curl` command to send the request to the node: - -```bash -curl --location 'http://localhost:8545/' \ ---header 'Content-Type: application/json' \ ---data '{ - "jsonrpc": "2.0", - "id": 1, - "method": "pactus.network.get_node_info", - "params": {} -}' -``` - -> Before sending the request, you need to enable the JSON-RPC service inside the -> [configuration](/get-started/configuration/). - -### Using Basic Auth - -If you have enabled the [gRPC Basic Authentication](/tutorials/grpc-sign-transactions/), -then you need to set the `Authorization` header. - -```bash -curl --location 'http://localhost:8545/' \ ---header 'Content-Type: application/json' \ ---header 'Authorization: Basic ' \ ---data '{ - "jsonrpc": "2.0", - "id": 1, - "method": "pactus.blockchain.get_account", - "params": { - "address": "pc1z2r0fmu8sg2ffa0tgrr08gnefcxl2kq7wvquf8z" - } -}' -``` - -

JSON-RPC Methods

- -
- -
- -
- -## Transaction Service - -

Transaction service defines various RPC methods for interacting with -transactions.

- -### pactus.transaction.get_transaction - -

GetTransaction retrieves transaction details based on the provided request -parameters.

- -

Parameters

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
id string - The unique ID of the transaction to retrieve. -
verbosity string - (Enum) The verbosity level for transaction details. -
Available values:
    -
  • TRANSACTION_DATA = 0 (Request transaction data only.)
  • -
  • TRANSACTION_INFO = 1 (Request detailed transaction information.)
  • -
-
-

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
block_height numeric - The height of the block containing the transaction. -
block_time numeric - The UNIX timestamp of the block containing the transaction. -
transaction object - Detailed information about the transaction. -
transaction.id string - The unique ID of the transaction. -
transaction.data string - The raw transaction data. -
transaction.version numeric - The version of the transaction. -
transaction.lock_time numeric - The lock time for the transaction. -
transaction.value numeric - The value of the transaction in NanoPAC. -
transaction.fee numeric - The fee for the transaction in NanoPAC. -
transaction.payload_type string - (Enum) The type of transaction payload. -
Available values:
    -
  • UNKNOWN = 0 (Unknown payload type.)
  • -
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • -
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • -
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • -
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • -
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • -
-
transaction.transfer object - (OneOf) Transfer transaction payload. -
transaction.transfer.sender string - The sender's address. -
transaction.transfer.receiver string - The receiver's address. -
transaction.transfer.amount numeric - The amount to be transferred in NanoPAC. -
transaction.bond object - (OneOf) Bond transaction payload. -
transaction.bond.sender string - The sender's address. -
transaction.bond.receiver string - The receiver's address. -
transaction.bond.stake numeric - The stake amount in NanoPAC. -
transaction.sortition object - (OneOf) Sortition transaction payload. -
transaction.sortition.address string - The validator address associated with the sortition proof. -
transaction.sortition.proof string - The proof for the sortition. -
transaction.unbond object - (OneOf) Unbond transaction payload. -
transaction.unbond.validator string - The address of the validator to unbond from. -
transaction.withdraw object - (OneOf) Withdraw transaction payload. -
transaction.withdraw.from string - The address to withdraw from. -
transaction.withdraw.to string - The address to withdraw to. -
transaction.withdraw.amount numeric - The withdrawal amount in NanoPAC. -
transaction.memo string - A memo string for the transaction. -
transaction.public_key string - The public key associated with the transaction. -
transaction.signature string - The signature for the transaction. -
- -### pactus.transaction.calculate_fee - -

CalculateFee calculates the transaction fee based on the specified amount -and payload type.

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
amount numeric - The amount involved in the transaction, specified in NanoPAC. -
payload_type string - (Enum) The type of transaction payload. -
Available values:
    -
  • UNKNOWN = 0 (Unknown payload type.)
  • -
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • -
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • -
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • -
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • -
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • -
-
fixed_amount boolean - Indicates if the amount should be fixed and include the fee. -
-

Result

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
amount numeric - The calculated amount in NanoPAC. -
fee numeric - The calculated transaction fee in NanoPAC. -
- -### pactus.transaction.broadcast_transaction - -

BroadcastTransaction broadcasts a signed transaction to the network.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
signed_raw_transaction string - The signed raw transaction data to be broadcasted. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
id string - The unique ID of the broadcasted transaction. -
- -### pactus.transaction.get_raw_transfer_transaction - -

GetRawTransferTransaction retrieves raw details of a transfer transaction.

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
lock_time numeric - The lock time for the transaction. If not set, defaults to the last block -height. -
sender string - The sender's account address. -
receiver string - The receiver's account address. -
amount numeric - The amount to be transferred, specified in NanoPAC. Must be greater than 0. -
fee numeric - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. -
memo string - A memo string for the transaction. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
raw_transaction string - The raw transaction data. -
- -### pactus.transaction.get_raw_bond_transaction - -

GetRawBondTransaction retrieves raw details of a bond transaction.

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
lock_time numeric - The lock time for the transaction. If not set, defaults to the last block -height. -
sender string - The sender's account address. -
receiver string - The receiver's validator address. -
stake numeric - The stake amount in NanoPAC. Must be greater than 0. -
public_key string - The public key of the validator. -
fee numeric - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. -
memo string - A memo string for the transaction. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
raw_transaction string - The raw transaction data. -
- -### pactus.transaction.get_raw_unbond_transaction - -

GetRawUnbondTransaction retrieves raw details of an unbond transaction.

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
lock_time numeric - The lock time for the transaction. If not set, defaults to the last block -height. -
validator_address string - The address of the validator to unbond from. -
memo string - A memo string for the transaction. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
raw_transaction string - The raw transaction data. -
- -### pactus.transaction.get_raw_withdraw_transaction - -

GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
lock_time numeric - The lock time for the transaction. If not set, defaults to the last block -height. -
validator_address string - The address of the validator to withdraw from. -
account_address string - The address of the account to withdraw to. -
amount numeric - The withdrawal amount in NanoPAC. Must be greater than 0. -
fee numeric - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. -
memo string - A memo string for the transaction. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
raw_transaction string - The raw transaction data. -
- -## Blockchain Service - -

Blockchain service defines RPC methods for interacting with the blockchain.

- -### pactus.blockchain.get_block - -

GetBlock retrieves information about a block based on the provided request -parameters.

- -

Parameters

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
height numeric - The height of the block to retrieve. -
verbosity string - (Enum) The verbosity level for block information. -
Available values:
    -
  • BLOCK_DATA = 0 (Request only block data.)
  • -
  • BLOCK_INFO = 1 (Request block information and transaction IDs.)
  • -
  • BLOCK_TRANSACTIONS = 2 (Request block information and detailed transaction data.)
  • -
-
-

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
height numeric - The height of the block. -
hash string - The hash of the block. -
data string - Block data, available only if verbosity level is set to BLOCK_DATA. -
block_time numeric - The timestamp of the block. -
header object - Header information of the block. -
header.version numeric - The version of the block. -
header.prev_block_hash string - The hash of the previous block. -
header.state_root string - The state root hash of the blockchain. -
header.sortition_seed string - The sortition seed of the block. -
header.proposer_address string - The address of the proposer of the block. -
prev_cert object - Certificate information of the previous block. -
prev_cert.hash string - The hash of the certificate. -
prev_cert.round numeric - The round of the certificate. -
prev_cert.committersrepeated numeric - List of committers in the certificate. -
prev_cert.absenteesrepeated numeric - List of absentees in the certificate. -
prev_cert.signature string - The signature of the certificate. -
txsrepeated object - List of transactions in the block, available when verbosity level is set to -BLOCK_TRANSACTIONS. -
txs[].id string - The unique ID of the transaction. -
txs[].data string - The raw transaction data. -
txs[].version numeric - The version of the transaction. -
txs[].lock_time numeric - The lock time for the transaction. -
txs[].value numeric - The value of the transaction in NanoPAC. -
txs[].fee numeric - The fee for the transaction in NanoPAC. -
txs[].payload_type string - (Enum) The type of transaction payload. -
Available values:
    -
  • UNKNOWN = 0 (Unknown payload type.)
  • -
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • -
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • -
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • -
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • -
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • -
-
txs[].transfer object - (OneOf) Transfer transaction payload. -
txs[].transfer.sender string - The sender's address. -
txs[].transfer.receiver string - The receiver's address. -
txs[].transfer.amount numeric - The amount to be transferred in NanoPAC. -
txs[].bond object - (OneOf) Bond transaction payload. -
txs[].bond.sender string - The sender's address. -
txs[].bond.receiver string - The receiver's address. -
txs[].bond.stake numeric - The stake amount in NanoPAC. -
txs[].sortition object - (OneOf) Sortition transaction payload. -
txs[].sortition.address string - The validator address associated with the sortition proof. -
txs[].sortition.proof string - The proof for the sortition. -
txs[].unbond object - (OneOf) Unbond transaction payload. -
txs[].unbond.validator string - The address of the validator to unbond from. -
txs[].withdraw object - (OneOf) Withdraw transaction payload. -
txs[].withdraw.from string - The address to withdraw from. -
txs[].withdraw.to string - The address to withdraw to. -
txs[].withdraw.amount numeric - The withdrawal amount in NanoPAC. -
txs[].memo string - A memo string for the transaction. -
txs[].public_key string - The public key associated with the transaction. -
txs[].signature string - The signature for the transaction. -
- -### pactus.blockchain.get_block_hash - -

GetBlockHash retrieves the hash of a block at the specified height.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
height numeric - The height of the block to retrieve the hash for. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
hash string - The hash of the block. -
- -### pactus.blockchain.get_block_height - -

GetBlockHeight retrieves the height of a block with the specified hash.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
hash string - The hash of the block to retrieve the height for. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
height numeric - The height of the block. -
- -### pactus.blockchain.get_blockchain_info - -

GetBlockchainInfo retrieves general information about the blockchain.

- -

Parameters

- -Parameters has no fields. -

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
last_block_height numeric - The height of the last block in the blockchain. -
last_block_hash string - The hash of the last block in the blockchain. -
total_accounts numeric - The total number of accounts in the blockchain. -
total_validators numeric - The total number of validators in the blockchain. -
total_power numeric - The total power of the blockchain. -
committee_power numeric - The power of the committee. -
committee_validatorsrepeated object - List of committee validators. -
committee_validators[].hash string - The hash of the validator. -
committee_validators[].data string - The serialized data of the validator. -
committee_validators[].public_key string - The public key of the validator. -
committee_validators[].number numeric - The unique number assigned to the validator. -
committee_validators[].stake numeric - The stake of the validator in NanoPAC. -
committee_validators[].last_bonding_height numeric - The height at which the validator last bonded. -
committee_validators[].last_sortition_height numeric - The height at which the validator last participated in sortition. -
committee_validators[].unbonding_height numeric - The height at which the validator will unbond. -
committee_validators[].address string - The address of the validator. -
committee_validators[].availability_score numeric - The availability score of the validator. -
is_pruned boolean - If the blocks are subject to pruning. -
pruning_height numeric - Lowest-height block stored (only present if pruning is enabled) -
last_block_time numeric - Timestamp of the last block in Unix format -
- -### pactus.blockchain.get_consensus_info - -

GetConsensusInfo retrieves information about the consensus instances.

- -

Parameters

- -Parameters has no fields. -

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
proposal object - The proposal of the consensus info. -
proposal.height numeric - The height of the proposal. -
proposal.round numeric - The round of the proposal. -
proposal.block_data string - The block data of the proposal. -
proposal.signature_data string - The signature data of the proposal. -
instancesrepeated object - List of consensus instances. -
instances[].address string - The address of the consensus instance. -
instances[].active boolean - Indicates whether the consensus instance is active and part of the -committee. -
instances[].height numeric - The height of the consensus instance. -
instances[].round numeric - The round of the consensus instance. -
instances[].votesrepeated object - List of votes in the consensus instance. -
instances[].votes[].type string - (Enum) The type of the vote. -
Available values:
    -
  • VOTE_UNKNOWN = 0 (Unknown vote type.)
  • -
  • VOTE_PREPARE = 1 (Prepare vote type.)
  • -
  • VOTE_PRECOMMIT = 2 (Precommit vote type.)
  • -
  • VOTE_CHANGE_PROPOSER = 3 (Change proposer vote type.)
  • -
-
instances[].votes[].voter string - The address of the voter. -
instances[].votes[].block_hash string - The hash of the block being voted on. -
instances[].votes[].round numeric - The consensus round of the vote. -
instances[].votes[].cp_round numeric - The change-proposer round of the vote. -
instances[].votes[].cp_value numeric - The change-proposer value of the vote. -
- -### pactus.blockchain.get_account - -

GetAccount retrieves information about an account based on the provided -address.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
address string - The address of the account to retrieve information for. -
-

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
account object - Detailed information about the account. -
account.hash string - The hash of the account. -
account.data string - The serialized data of the account. -
account.number numeric - The unique number assigned to the account. -
account.balance numeric - The balance of the account in NanoPAC. -
account.address string - The address of the account. -
- -### pactus.blockchain.get_validator - -

GetValidator retrieves information about a validator based on the provided -address.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
address string - The address of the validator to retrieve information for. -
-

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
validator object - Detailed information about the validator. -
validator.hash string - The hash of the validator. -
validator.data string - The serialized data of the validator. -
validator.public_key string - The public key of the validator. -
validator.number numeric - The unique number assigned to the validator. -
validator.stake numeric - The stake of the validator in NanoPAC. -
validator.last_bonding_height numeric - The height at which the validator last bonded. -
validator.last_sortition_height numeric - The height at which the validator last participated in sortition. -
validator.unbonding_height numeric - The height at which the validator will unbond. -
validator.address string - The address of the validator. -
validator.availability_score numeric - The availability score of the validator. -
- -### pactus.blockchain.get_validator_by_number - -

GetValidatorByNumber retrieves information about a validator based on the -provided number.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
number numeric - The unique number of the validator to retrieve information for. -
-

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
validator object - Detailed information about the validator. -
validator.hash string - The hash of the validator. -
validator.data string - The serialized data of the validator. -
validator.public_key string - The public key of the validator. -
validator.number numeric - The unique number assigned to the validator. -
validator.stake numeric - The stake of the validator in NanoPAC. -
validator.last_bonding_height numeric - The height at which the validator last bonded. -
validator.last_sortition_height numeric - The height at which the validator last participated in sortition. -
validator.unbonding_height numeric - The height at which the validator will unbond. -
validator.address string - The address of the validator. -
validator.availability_score numeric - The availability score of the validator. -
- -### pactus.blockchain.get_validator_addresses - -

GetValidatorAddresses retrieves a list of all validator addresses.

- -

Parameters

- -Parameters has no fields. -

Result

- - - - - - - - - - - - -
FieldTypeDescription
addressesrepeated string - List of validator addresses. -
- -### pactus.blockchain.get_public_key - -

GetPublicKey retrieves the public key of an account based on the provided -address.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
address string - The address for which to retrieve the public key. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
public_key string - The public key associated with the provided address. -
- -### pactus.blockchain.get_tx_pool_content - -

GetTxPoolContent retrieves current transactions in the transaction pool.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
payload_type string - (Enum) The type of transactions to retrieve from the transaction pool. 0 means all -types. -
Available values:
    -
  • UNKNOWN = 0 (Unknown payload type.)
  • -
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • -
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • -
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • -
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • -
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • -
-
-

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
txsrepeated object - List of transactions currently in the pool. -
txs[].id string - The unique ID of the transaction. -
txs[].data string - The raw transaction data. -
txs[].version numeric - The version of the transaction. -
txs[].lock_time numeric - The lock time for the transaction. -
txs[].value numeric - The value of the transaction in NanoPAC. -
txs[].fee numeric - The fee for the transaction in NanoPAC. -
txs[].payload_type string - (Enum) The type of transaction payload. -
Available values:
    -
  • UNKNOWN = 0 (Unknown payload type.)
  • -
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • -
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • -
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • -
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • -
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • -
-
txs[].transfer object - (OneOf) Transfer transaction payload. -
txs[].transfer.sender string - The sender's address. -
txs[].transfer.receiver string - The receiver's address. -
txs[].transfer.amount numeric - The amount to be transferred in NanoPAC. -
txs[].bond object - (OneOf) Bond transaction payload. -
txs[].bond.sender string - The sender's address. -
txs[].bond.receiver string - The receiver's address. -
txs[].bond.stake numeric - The stake amount in NanoPAC. -
txs[].sortition object - (OneOf) Sortition transaction payload. -
txs[].sortition.address string - The validator address associated with the sortition proof. -
txs[].sortition.proof string - The proof for the sortition. -
txs[].unbond object - (OneOf) Unbond transaction payload. -
txs[].unbond.validator string - The address of the validator to unbond from. -
txs[].withdraw object - (OneOf) Withdraw transaction payload. -
txs[].withdraw.from string - The address to withdraw from. -
txs[].withdraw.to string - The address to withdraw to. -
txs[].withdraw.amount numeric - The withdrawal amount in NanoPAC. -
txs[].memo string - A memo string for the transaction. -
txs[].public_key string - The public key associated with the transaction. -
txs[].signature string - The signature for the transaction. -
- -## Network Service - -

Network service provides RPCs for retrieving information about the network.

- -### pactus.network.get_network_info - -

GetNetworkInfo retrieves information about the overall network.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
only_connected boolean - If true, only returns peers with connected status. -
-

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
network_name string - Name of the network. -
total_sent_bytes numeric - Total bytes sent across the network. -
total_received_bytes numeric - Total bytes received across the network. -
connected_peers_count numeric - Number of connected peers. -
connected_peersrepeated object - List of connected peers. -
connected_peers[].status numeric - Status of the peer. -
connected_peers[].moniker string - Moniker of the peer. -
connected_peers[].agent string - Agent information of the peer. -
connected_peers[].peer_id string - Peer ID of the peer. -
connected_peers[].consensus_keysrepeated string - Consensus keys used by the peer. -
connected_peers[].consensus_addressesrepeated string - Consensus addresses of the peer. -
connected_peers[].services numeric - Services provided by the peer. -
connected_peers[].last_block_hash string - Hash of the last block the peer knows. -
connected_peers[].height numeric - Blockchain height of the peer. -
connected_peers[].received_bundles numeric - Number of received bundles. -
connected_peers[].invalid_bundles numeric - Number of invalid bundles received. -
connected_peers[].last_sent numeric - Timestamp of the last sent bundle. -
connected_peers[].last_received numeric - Timestamp of the last received bundle. -
connected_peers[].sent_bytes object - Bytes sent per message type. -
connected_peers[].received_bytes object - Bytes received per message type. -
connected_peers[].address string - Network address of the peer. -
connected_peers[].direction string - Direction of connection with the peer. -
connected_peers[].protocolsrepeated string - List of protocols supported by the peer. -
connected_peers[].total_sessions numeric - Total download sessions with the peer. -
connected_peers[].completed_sessions numeric - Completed download sessions with the peer. -
sent_bytes object - Bytes sent per peer ID. -
received_bytes object - Bytes received per peer ID. -
- -### pactus.network.get_node_info - -

GetNodeInfo retrieves information about a specific node in the network.

- -

Parameters

- -Parameters has no fields. -

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
moniker string - Moniker of the node. -
agent string - Agent information of the node. -
peer_id string - Peer ID of the node. -
started_at numeric - Timestamp when the node started. -
reachability string - Reachability status of the node. -
services numeric - A bitfield indicating the services provided by the node. -
services_names string - Names of services provided by the node. -
local_addrsrepeated string - List of addresses associated with the node. -
protocolsrepeated string - List of protocols supported by the node. -
clock_offset numeric - Clock offset of the node. -
connection_info object - Information about the node's connections. -
connection_info.connections numeric - Total number of connections. -
connection_info.inbound_connections numeric - Number of inbound connections. -
connection_info.outbound_connections numeric - Number of outbound connections. -
- -## Utils Service - -

Utils service defines RPC methods for utility functions such as message -signing and verification.

- -### pactus.utils.sign_message_with_private_key - -

SignMessageWithPrivateKey sign message with provided private key.

- -

Parameters

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
private_key string - The private key to sign the message. -
message string - The message to sign. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
signature string - The signature of the message. -
- -### pactus.utils.verify_message - -

VerifyMessage verify signature with public key and message

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
message string - The signed message. -
signature string - The signature of the message. -
public_key string - The public key of the signer. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
is_valid boolean - Indicates if the signature is valid (true) or not (false). -
- -## Wallet Service - -

Define the Wallet service with various RPC methods for wallet management.

- -### pactus.wallet.create_wallet - -

CreateWallet creates a new wallet with the specified parameters.

- -

Parameters

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the new wallet. -
password string - The password for securing the wallet. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
mnemonic string - The mnemonic for wallet recovery. -
- -### pactus.wallet.restore_wallet - -

RestoreWallet restores an existing wallet with the given mnemonic.

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet to restore. -
mnemonic string - The mnemonic for wallet recovery. -
password string - The password for securing the wallet. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the restored wallet. -
- -### pactus.wallet.load_wallet - -

LoadWallet loads an existing wallet with the given name.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet to load. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the loaded wallet. -
- -### pactus.wallet.unload_wallet - -

UnloadWallet unloads a currently loaded wallet with the specified name.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet to unload. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the unloaded wallet. -
- -### pactus.wallet.get_total_balance - -

GetTotalBalance returns the total available balance of the wallet.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet to get the total balance. -
-

Result

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet. -
total_balance numeric - The total balance of the wallet in NanoPAC. -
- -### pactus.wallet.sign_raw_transaction - -

SignRawTransaction signs a raw transaction for a specified wallet.

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet used for signing. -
raw_transaction string - The raw transaction data to be signed. -
password string - The password for unlocking the wallet for signing. -
-

Result

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
transaction_id string - The ID of the signed transaction. -
signed_raw_transaction string - The signed raw transaction data. -
- -### pactus.wallet.get_validator_address - -

GetValidatorAddress retrieves the validator address associated with a -public key.

- -

Parameters

- - - - - - - - - - - - -
FieldTypeDescription
public_key string - The public key for which the validator address is requested. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
address string - The validator address associated with the public key. -
- -### pactus.wallet.get_new_address - -

GetNewAddress generates a new address for the specified wallet.

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet to generate a new address. -
address_type string - (Enum) The type of address to generate. -
Available values:
    -
  • ADDRESS_TYPE_TREASURY = 0 (Treasury address type. -Should not be used to generate new addresses.)
  • -
  • ADDRESS_TYPE_VALIDATOR = 1 (Validator address type.)
  • -
  • ADDRESS_TYPE_BLS_ACCOUNT = 2 (Account address type with BLS signature scheme.)
  • -
  • ADDRESS_TYPE_ED25519_ACCOUNT = 3 (Account address type with Ed25519 signature scheme. -Note: Generating a new Ed25519 address requires the wallet password.)
  • -
-
label string - A label for the new address. -
password string - Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. -
-

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet from which the address is generated. -
address_info object - Information about the newly generated address. -
address_info.address string - The address string. -
address_info.public_key string - The public key associated with the address. -
address_info.label string - A label associated with the address. -
address_info.path string - The Hierarchical Deterministic path of the address within the wallet. -
- -### pactus.wallet.get_address_history - -

GetAddressHistory retrieves the transaction history of an address.

- -

Parameters

- - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet. -
address string - The address to retrieve the transaction history for. -
-

Result

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
history_inforepeated object - Array of history information for the address. -
history_info[].transaction_id string - The transaction ID hash. -
history_info[].time numeric - The timestamp of the transaction. -
history_info[].payload_type string - The payload type of the transaction. -
history_info[].description string - A description of the transaction. -
history_info[].amount numeric - The amount involved in the transaction. -
- -### pactus.wallet.sign_message - -

SignMessage signs an arbitrary message.

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FieldTypeDescription
wallet_name string - The name of the wallet. -
password string - The password for unlocking the wallet for signing. -
address string - The account address associated with the private key. -
message string - The arbitrary message to be signed. -
-

Result

- - - - - - - - - - - - -
FieldTypeDescription
signature string - Signature of the message. -
diff --git a/www/grpc/gen/go/blockchain.cobra.pb.go b/www/grpc/gen/go/blockchain.cobra.pb.go deleted file mode 100644 index eefb6b270..000000000 --- a/www/grpc/gen/go/blockchain.cobra.pb.go +++ /dev/null @@ -1,493 +0,0 @@ -// Code generated by protoc-gen-cobra. DO NOT EDIT. - -package pactus - -import ( - client "github.com/NathanBaulch/protoc-gen-cobra/client" - flag "github.com/NathanBaulch/protoc-gen-cobra/flag" - iocodec "github.com/NathanBaulch/protoc-gen-cobra/iocodec" - cobra "github.com/spf13/cobra" - grpc "google.golang.org/grpc" - proto "google.golang.org/protobuf/proto" -) - -func BlockchainClientCommand(options ...client.Option) *cobra.Command { - cfg := client.NewConfig(options...) - cmd := &cobra.Command{ - Use: cfg.CommandNamer("Blockchain"), - Short: "Blockchain service client", - Long: "Blockchain service defines RPC methods for interacting with the blockchain.", - } - cfg.BindFlags(cmd.PersistentFlags()) - cmd.AddCommand( - _BlockchainGetBlockCommand(cfg), - _BlockchainGetBlockHashCommand(cfg), - _BlockchainGetBlockHeightCommand(cfg), - _BlockchainGetBlockchainInfoCommand(cfg), - _BlockchainGetConsensusInfoCommand(cfg), - _BlockchainGetAccountCommand(cfg), - _BlockchainGetValidatorCommand(cfg), - _BlockchainGetValidatorByNumberCommand(cfg), - _BlockchainGetValidatorAddressesCommand(cfg), - _BlockchainGetPublicKeyCommand(cfg), - _BlockchainGetTxPoolContentCommand(cfg), - ) - return cmd -} - -func _BlockchainGetBlockCommand(cfg *client.Config) *cobra.Command { - req := &GetBlockRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetBlock"), - Short: "GetBlock RPC client", - Long: "GetBlock retrieves information about a block based on the provided request\n parameters.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetBlock"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetBlockRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetBlock(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().Uint32Var(&req.Height, cfg.FlagNamer("Height"), 0, "The height of the block to retrieve.") - flag.EnumVar(cmd.PersistentFlags(), &req.Verbosity, cfg.FlagNamer("Verbosity"), "The verbosity level for block information.") - - return cmd -} - -func _BlockchainGetBlockHashCommand(cfg *client.Config) *cobra.Command { - req := &GetBlockHashRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetBlockHash"), - Short: "GetBlockHash RPC client", - Long: "GetBlockHash retrieves the hash of a block at the specified height.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetBlockHash"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetBlockHashRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetBlockHash(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().Uint32Var(&req.Height, cfg.FlagNamer("Height"), 0, "The height of the block to retrieve the hash for.") - - return cmd -} - -func _BlockchainGetBlockHeightCommand(cfg *client.Config) *cobra.Command { - req := &GetBlockHeightRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetBlockHeight"), - Short: "GetBlockHeight RPC client", - Long: "GetBlockHeight retrieves the height of a block with the specified hash.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetBlockHeight"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetBlockHeightRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetBlockHeight(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.Hash, cfg.FlagNamer("Hash"), "", "The hash of the block to retrieve the height for.") - - return cmd -} - -func _BlockchainGetBlockchainInfoCommand(cfg *client.Config) *cobra.Command { - req := &GetBlockchainInfoRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetBlockchainInfo"), - Short: "GetBlockchainInfo RPC client", - Long: "GetBlockchainInfo retrieves general information about the blockchain.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetBlockchainInfo"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetBlockchainInfoRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetBlockchainInfo(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - return cmd -} - -func _BlockchainGetConsensusInfoCommand(cfg *client.Config) *cobra.Command { - req := &GetConsensusInfoRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetConsensusInfo"), - Short: "GetConsensusInfo RPC client", - Long: "GetConsensusInfo retrieves information about the consensus instances.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetConsensusInfo"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetConsensusInfoRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetConsensusInfo(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - return cmd -} - -func _BlockchainGetAccountCommand(cfg *client.Config) *cobra.Command { - req := &GetAccountRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetAccount"), - Short: "GetAccount RPC client", - Long: "GetAccount retrieves information about an account based on the provided\n address.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetAccount"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetAccountRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetAccount(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer("Address"), "", "The address of the account to retrieve information for.") - - return cmd -} - -func _BlockchainGetValidatorCommand(cfg *client.Config) *cobra.Command { - req := &GetValidatorRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetValidator"), - Short: "GetValidator RPC client", - Long: "GetValidator retrieves information about a validator based on the provided\n address.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetValidator"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetValidatorRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetValidator(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer("Address"), "", "The address of the validator to retrieve information for.") - - return cmd -} - -func _BlockchainGetValidatorByNumberCommand(cfg *client.Config) *cobra.Command { - req := &GetValidatorByNumberRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetValidatorByNumber"), - Short: "GetValidatorByNumber RPC client", - Long: "GetValidatorByNumber retrieves information about a validator based on the\n provided number.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetValidatorByNumber"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetValidatorByNumberRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetValidatorByNumber(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().Int32Var(&req.Number, cfg.FlagNamer("Number"), 0, "The unique number of the validator to retrieve information for.") - - return cmd -} - -func _BlockchainGetValidatorAddressesCommand(cfg *client.Config) *cobra.Command { - req := &GetValidatorAddressesRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetValidatorAddresses"), - Short: "GetValidatorAddresses RPC client", - Long: "GetValidatorAddresses retrieves a list of all validator addresses.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetValidatorAddresses"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetValidatorAddressesRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetValidatorAddresses(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - return cmd -} - -func _BlockchainGetPublicKeyCommand(cfg *client.Config) *cobra.Command { - req := &GetPublicKeyRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetPublicKey"), - Short: "GetPublicKey RPC client", - Long: "GetPublicKey retrieves the public key of an account based on the provided\n address.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetPublicKey"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetPublicKeyRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetPublicKey(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer("Address"), "", "The address for which to retrieve the public key.") - - return cmd -} - -func _BlockchainGetTxPoolContentCommand(cfg *client.Config) *cobra.Command { - req := &GetTxPoolContentRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetTxPoolContent"), - Short: "GetTxPoolContent RPC client", - Long: "GetTxPoolContent retrieves current transactions in the transaction pool.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetTxPoolContent"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewBlockchainClient(cc) - v := &GetTxPoolContentRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetTxPoolContent(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - flag.EnumVar(cmd.PersistentFlags(), &req.PayloadType, cfg.FlagNamer("PayloadType"), "The type of transactions to retrieve from the transaction pool. 0 means all\n types.") - - return cmd -} diff --git a/www/grpc/gen/go/blockchain.pb.go b/www/grpc/gen/go/blockchain.pb.go deleted file mode 100644 index 70d8f6336..000000000 --- a/www/grpc/gen/go/blockchain.pb.go +++ /dev/null @@ -1,2658 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc (unknown) -// source: blockchain.proto - -package pactus - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Enumeration for verbosity levels when requesting block information. -type BlockVerbosity int32 - -const ( - // Request only block data. - BlockVerbosity_BLOCK_DATA BlockVerbosity = 0 - // Request block information and transaction IDs. - BlockVerbosity_BLOCK_INFO BlockVerbosity = 1 - // Request block information and detailed transaction data. - BlockVerbosity_BLOCK_TRANSACTIONS BlockVerbosity = 2 -) - -// Enum value maps for BlockVerbosity. -var ( - BlockVerbosity_name = map[int32]string{ - 0: "BLOCK_DATA", - 1: "BLOCK_INFO", - 2: "BLOCK_TRANSACTIONS", - } - BlockVerbosity_value = map[string]int32{ - "BLOCK_DATA": 0, - "BLOCK_INFO": 1, - "BLOCK_TRANSACTIONS": 2, - } -) - -func (x BlockVerbosity) Enum() *BlockVerbosity { - p := new(BlockVerbosity) - *p = x - return p -} - -func (x BlockVerbosity) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (BlockVerbosity) Descriptor() protoreflect.EnumDescriptor { - return file_blockchain_proto_enumTypes[0].Descriptor() -} - -func (BlockVerbosity) Type() protoreflect.EnumType { - return &file_blockchain_proto_enumTypes[0] -} - -func (x BlockVerbosity) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use BlockVerbosity.Descriptor instead. -func (BlockVerbosity) EnumDescriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{0} -} - -// Enumeration for types of votes. -type VoteType int32 - -const ( - // Unknown vote type. - VoteType_VOTE_UNKNOWN VoteType = 0 - // Prepare vote type. - VoteType_VOTE_PREPARE VoteType = 1 - // Precommit vote type. - VoteType_VOTE_PRECOMMIT VoteType = 2 - // Change proposer vote type. - VoteType_VOTE_CHANGE_PROPOSER VoteType = 3 -) - -// Enum value maps for VoteType. -var ( - VoteType_name = map[int32]string{ - 0: "VOTE_UNKNOWN", - 1: "VOTE_PREPARE", - 2: "VOTE_PRECOMMIT", - 3: "VOTE_CHANGE_PROPOSER", - } - VoteType_value = map[string]int32{ - "VOTE_UNKNOWN": 0, - "VOTE_PREPARE": 1, - "VOTE_PRECOMMIT": 2, - "VOTE_CHANGE_PROPOSER": 3, - } -) - -func (x VoteType) Enum() *VoteType { - p := new(VoteType) - *p = x - return p -} - -func (x VoteType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (VoteType) Descriptor() protoreflect.EnumDescriptor { - return file_blockchain_proto_enumTypes[1].Descriptor() -} - -func (VoteType) Type() protoreflect.EnumType { - return &file_blockchain_proto_enumTypes[1] -} - -func (x VoteType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use VoteType.Descriptor instead. -func (VoteType) EnumDescriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{1} -} - -// Message to request account information based on an address. -type GetAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the account to retrieve information for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *GetAccountRequest) Reset() { - *x = GetAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountRequest) ProtoMessage() {} - -func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[0] - 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 GetAccountRequest.ProtoReflect.Descriptor instead. -func (*GetAccountRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{0} -} - -func (x *GetAccountRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// Message containing the response with account information. -type GetAccountResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Detailed information about the account. - Account *AccountInfo `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` -} - -func (x *GetAccountResponse) Reset() { - *x = GetAccountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountResponse) ProtoMessage() {} - -func (x *GetAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[1] - 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 GetAccountResponse.ProtoReflect.Descriptor instead. -func (*GetAccountResponse) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{1} -} - -func (x *GetAccountResponse) GetAccount() *AccountInfo { - if x != nil { - return x.Account - } - return nil -} - -// Message to request validator addresses. -type GetValidatorAddressesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetValidatorAddressesRequest) Reset() { - *x = GetValidatorAddressesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorAddressesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorAddressesRequest) ProtoMessage() {} - -func (x *GetValidatorAddressesRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[2] - 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 GetValidatorAddressesRequest.ProtoReflect.Descriptor instead. -func (*GetValidatorAddressesRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{2} -} - -// Message containing the response with a list of validator addresses. -type GetValidatorAddressesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of validator addresses. - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` -} - -func (x *GetValidatorAddressesResponse) Reset() { - *x = GetValidatorAddressesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorAddressesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorAddressesResponse) ProtoMessage() {} - -func (x *GetValidatorAddressesResponse) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[3] - 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 GetValidatorAddressesResponse.ProtoReflect.Descriptor instead. -func (*GetValidatorAddressesResponse) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{3} -} - -func (x *GetValidatorAddressesResponse) GetAddresses() []string { - if x != nil { - return x.Addresses - } - return nil -} - -// Message to request validator information based on an address. -type GetValidatorRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the validator to retrieve information for. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *GetValidatorRequest) Reset() { - *x = GetValidatorRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorRequest) ProtoMessage() {} - -func (x *GetValidatorRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[4] - 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 GetValidatorRequest.ProtoReflect.Descriptor instead. -func (*GetValidatorRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{4} -} - -func (x *GetValidatorRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// Message to request validator information based on a validator number. -type GetValidatorByNumberRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique number of the validator to retrieve information for. - Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` -} - -func (x *GetValidatorByNumberRequest) Reset() { - *x = GetValidatorByNumberRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorByNumberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorByNumberRequest) ProtoMessage() {} - -func (x *GetValidatorByNumberRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[5] - 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 GetValidatorByNumberRequest.ProtoReflect.Descriptor instead. -func (*GetValidatorByNumberRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{5} -} - -func (x *GetValidatorByNumberRequest) GetNumber() int32 { - if x != nil { - return x.Number - } - return 0 -} - -// Message containing the response with validator information. -type GetValidatorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Detailed information about the validator. - Validator *ValidatorInfo `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` -} - -func (x *GetValidatorResponse) Reset() { - *x = GetValidatorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorResponse) ProtoMessage() {} - -func (x *GetValidatorResponse) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[6] - 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 GetValidatorResponse.ProtoReflect.Descriptor instead. -func (*GetValidatorResponse) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{6} -} - -func (x *GetValidatorResponse) GetValidator() *ValidatorInfo { - if x != nil { - return x.Validator - } - return nil -} - -// Message to request public key based on an address. -type GetPublicKeyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address for which to retrieve the public key. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *GetPublicKeyRequest) Reset() { - *x = GetPublicKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPublicKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPublicKeyRequest) ProtoMessage() {} - -func (x *GetPublicKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[7] - 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 GetPublicKeyRequest.ProtoReflect.Descriptor instead. -func (*GetPublicKeyRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{7} -} - -func (x *GetPublicKeyRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// Message containing the response with the public key. -type GetPublicKeyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The public key associated with the provided address. - PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` -} - -func (x *GetPublicKeyResponse) Reset() { - *x = GetPublicKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPublicKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPublicKeyResponse) ProtoMessage() {} - -func (x *GetPublicKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[8] - 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 GetPublicKeyResponse.ProtoReflect.Descriptor instead. -func (*GetPublicKeyResponse) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{8} -} - -func (x *GetPublicKeyResponse) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -// Message to request block information based on height and verbosity level. -type GetBlockRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The height of the block to retrieve. - Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // The verbosity level for block information. - Verbosity BlockVerbosity `protobuf:"varint,2,opt,name=verbosity,proto3,enum=pactus.BlockVerbosity" json:"verbosity,omitempty"` -} - -func (x *GetBlockRequest) Reset() { - *x = GetBlockRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockRequest) ProtoMessage() {} - -func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[9] - 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 GetBlockRequest.ProtoReflect.Descriptor instead. -func (*GetBlockRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{9} -} - -func (x *GetBlockRequest) GetHeight() uint32 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *GetBlockRequest) GetVerbosity() BlockVerbosity { - if x != nil { - return x.Verbosity - } - return BlockVerbosity_BLOCK_DATA -} - -// Message containing the response with block information. -type GetBlockResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The height of the block. - Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // The hash of the block. - Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` - // Block data, available only if verbosity level is set to BLOCK_DATA. - Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - // The timestamp of the block. - BlockTime uint32 `protobuf:"varint,4,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` - // Header information of the block. - Header *BlockHeaderInfo `protobuf:"bytes,5,opt,name=header,proto3" json:"header,omitempty"` - // Certificate information of the previous block. - PrevCert *CertificateInfo `protobuf:"bytes,6,opt,name=prev_cert,json=prevCert,proto3" json:"prev_cert,omitempty"` - // List of transactions in the block, available when verbosity level is set to - // BLOCK_TRANSACTIONS. - Txs []*TransactionInfo `protobuf:"bytes,7,rep,name=txs,proto3" json:"txs,omitempty"` -} - -func (x *GetBlockResponse) Reset() { - *x = GetBlockResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockResponse) ProtoMessage() {} - -func (x *GetBlockResponse) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[10] - 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 GetBlockResponse.ProtoReflect.Descriptor instead. -func (*GetBlockResponse) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{10} -} - -func (x *GetBlockResponse) GetHeight() uint32 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *GetBlockResponse) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -func (x *GetBlockResponse) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -func (x *GetBlockResponse) GetBlockTime() uint32 { - if x != nil { - return x.BlockTime - } - return 0 -} - -func (x *GetBlockResponse) GetHeader() *BlockHeaderInfo { - if x != nil { - return x.Header - } - return nil -} - -func (x *GetBlockResponse) GetPrevCert() *CertificateInfo { - if x != nil { - return x.PrevCert - } - return nil -} - -func (x *GetBlockResponse) GetTxs() []*TransactionInfo { - if x != nil { - return x.Txs - } - return nil -} - -// Message to request block hash based on height. -type GetBlockHashRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The height of the block to retrieve the hash for. - Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (x *GetBlockHashRequest) Reset() { - *x = GetBlockHashRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockHashRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockHashRequest) ProtoMessage() {} - -func (x *GetBlockHashRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[11] - 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 GetBlockHashRequest.ProtoReflect.Descriptor instead. -func (*GetBlockHashRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{11} -} - -func (x *GetBlockHashRequest) GetHeight() uint32 { - if x != nil { - return x.Height - } - return 0 -} - -// Message containing the response with the block hash. -type GetBlockHashResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The hash of the block. - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (x *GetBlockHashResponse) Reset() { - *x = GetBlockHashResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockHashResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockHashResponse) ProtoMessage() {} - -func (x *GetBlockHashResponse) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[12] - 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 GetBlockHashResponse.ProtoReflect.Descriptor instead. -func (*GetBlockHashResponse) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{12} -} - -func (x *GetBlockHashResponse) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -// Message to request block height based on hash. -type GetBlockHeightRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The hash of the block to retrieve the height for. - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (x *GetBlockHeightRequest) Reset() { - *x = GetBlockHeightRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockHeightRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockHeightRequest) ProtoMessage() {} - -func (x *GetBlockHeightRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[13] - 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 GetBlockHeightRequest.ProtoReflect.Descriptor instead. -func (*GetBlockHeightRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{13} -} - -func (x *GetBlockHeightRequest) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -// Message containing the response with the block height. -type GetBlockHeightResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The height of the block. - Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (x *GetBlockHeightResponse) Reset() { - *x = GetBlockHeightResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockHeightResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockHeightResponse) ProtoMessage() {} - -func (x *GetBlockHeightResponse) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[14] - 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 GetBlockHeightResponse.ProtoReflect.Descriptor instead. -func (*GetBlockHeightResponse) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{14} -} - -func (x *GetBlockHeightResponse) GetHeight() uint32 { - if x != nil { - return x.Height - } - return 0 -} - -// Message to request general information about the blockchain. -type GetBlockchainInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetBlockchainInfoRequest) Reset() { - *x = GetBlockchainInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockchainInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockchainInfoRequest) ProtoMessage() {} - -func (x *GetBlockchainInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[15] - 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 GetBlockchainInfoRequest.ProtoReflect.Descriptor instead. -func (*GetBlockchainInfoRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{15} -} - -// Message containing the response with general blockchain information. -type GetBlockchainInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The height of the last block in the blockchain. - LastBlockHeight uint32 `protobuf:"varint,1,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` - // The hash of the last block in the blockchain. - LastBlockHash string `protobuf:"bytes,2,opt,name=last_block_hash,json=lastBlockHash,proto3" json:"last_block_hash,omitempty"` - // The total number of accounts in the blockchain. - TotalAccounts int32 `protobuf:"varint,3,opt,name=total_accounts,json=totalAccounts,proto3" json:"total_accounts,omitempty"` - // The total number of validators in the blockchain. - TotalValidators int32 `protobuf:"varint,4,opt,name=total_validators,json=totalValidators,proto3" json:"total_validators,omitempty"` - // The total power of the blockchain. - TotalPower int64 `protobuf:"varint,5,opt,name=total_power,json=totalPower,proto3" json:"total_power,omitempty"` - // The power of the committee. - CommitteePower int64 `protobuf:"varint,6,opt,name=committee_power,json=committeePower,proto3" json:"committee_power,omitempty"` - // List of committee validators. - CommitteeValidators []*ValidatorInfo `protobuf:"bytes,7,rep,name=committee_validators,json=committeeValidators,proto3" json:"committee_validators,omitempty"` - // If the blocks are subject to pruning. - IsPruned bool `protobuf:"varint,8,opt,name=is_pruned,json=isPruned,proto3" json:"is_pruned,omitempty"` - // Lowest-height block stored (only present if pruning is enabled) - PruningHeight uint32 `protobuf:"varint,9,opt,name=pruning_height,json=pruningHeight,proto3" json:"pruning_height,omitempty"` - // Timestamp of the last block in Unix format - LastBlockTime int64 `protobuf:"varint,10,opt,name=last_block_time,json=lastBlockTime,proto3" json:"last_block_time,omitempty"` -} - -func (x *GetBlockchainInfoResponse) Reset() { - *x = GetBlockchainInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetBlockchainInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetBlockchainInfoResponse) ProtoMessage() {} - -func (x *GetBlockchainInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[16] - 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 GetBlockchainInfoResponse.ProtoReflect.Descriptor instead. -func (*GetBlockchainInfoResponse) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{16} -} - -func (x *GetBlockchainInfoResponse) GetLastBlockHeight() uint32 { - if x != nil { - return x.LastBlockHeight - } - return 0 -} - -func (x *GetBlockchainInfoResponse) GetLastBlockHash() string { - if x != nil { - return x.LastBlockHash - } - return "" -} - -func (x *GetBlockchainInfoResponse) GetTotalAccounts() int32 { - if x != nil { - return x.TotalAccounts - } - return 0 -} - -func (x *GetBlockchainInfoResponse) GetTotalValidators() int32 { - if x != nil { - return x.TotalValidators - } - return 0 -} - -func (x *GetBlockchainInfoResponse) GetTotalPower() int64 { - if x != nil { - return x.TotalPower - } - return 0 -} - -func (x *GetBlockchainInfoResponse) GetCommitteePower() int64 { - if x != nil { - return x.CommitteePower - } - return 0 -} - -func (x *GetBlockchainInfoResponse) GetCommitteeValidators() []*ValidatorInfo { - if x != nil { - return x.CommitteeValidators - } - return nil -} - -func (x *GetBlockchainInfoResponse) GetIsPruned() bool { - if x != nil { - return x.IsPruned - } - return false -} - -func (x *GetBlockchainInfoResponse) GetPruningHeight() uint32 { - if x != nil { - return x.PruningHeight - } - return 0 -} - -func (x *GetBlockchainInfoResponse) GetLastBlockTime() int64 { - if x != nil { - return x.LastBlockTime - } - return 0 -} - -// Message to request consensus information. -type GetConsensusInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetConsensusInfoRequest) Reset() { - *x = GetConsensusInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConsensusInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConsensusInfoRequest) ProtoMessage() {} - -func (x *GetConsensusInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[17] - 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 GetConsensusInfoRequest.ProtoReflect.Descriptor instead. -func (*GetConsensusInfoRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{17} -} - -// Message containing the response with consensus information. -type GetConsensusInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The proposal of the consensus info. - Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` - // List of consensus instances. - Instances []*ConsensusInfo `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"` -} - -func (x *GetConsensusInfoResponse) Reset() { - *x = GetConsensusInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConsensusInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConsensusInfoResponse) ProtoMessage() {} - -func (x *GetConsensusInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_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 GetConsensusInfoResponse.ProtoReflect.Descriptor instead. -func (*GetConsensusInfoResponse) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{18} -} - -func (x *GetConsensusInfoResponse) GetProposal() *Proposal { - if x != nil { - return x.Proposal - } - return nil -} - -func (x *GetConsensusInfoResponse) GetInstances() []*ConsensusInfo { - if x != nil { - return x.Instances - } - return nil -} - -// Request message to retrieve transactions in the transaction pool. -type GetTxPoolContentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type of transactions to retrieve from the transaction pool. 0 means all - // types. - PayloadType PayloadType `protobuf:"varint,1,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType" json:"payload_type,omitempty"` -} - -func (x *GetTxPoolContentRequest) Reset() { - *x = GetTxPoolContentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTxPoolContentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTxPoolContentRequest) ProtoMessage() {} - -func (x *GetTxPoolContentRequest) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[19] - 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 GetTxPoolContentRequest.ProtoReflect.Descriptor instead. -func (*GetTxPoolContentRequest) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{19} -} - -func (x *GetTxPoolContentRequest) GetPayloadType() PayloadType { - if x != nil { - return x.PayloadType - } - return PayloadType_UNKNOWN -} - -// Response message containing transactions in the transaction pool. -type GetTxPoolContentResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // List of transactions currently in the pool. - Txs []*TransactionInfo `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` -} - -func (x *GetTxPoolContentResponse) Reset() { - *x = GetTxPoolContentResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTxPoolContentResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTxPoolContentResponse) ProtoMessage() {} - -func (x *GetTxPoolContentResponse) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[20] - 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 GetTxPoolContentResponse.ProtoReflect.Descriptor instead. -func (*GetTxPoolContentResponse) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{20} -} - -func (x *GetTxPoolContentResponse) GetTxs() []*TransactionInfo { - if x != nil { - return x.Txs - } - return nil -} - -// Message containing information about a validator. -type ValidatorInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The hash of the validator. - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // The serialized data of the validator. - Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - // The public key of the validator. - PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The unique number assigned to the validator. - Number int32 `protobuf:"varint,4,opt,name=number,proto3" json:"number,omitempty"` - // The stake of the validator in NanoPAC. - Stake int64 `protobuf:"varint,5,opt,name=stake,proto3" json:"stake,omitempty"` - // The height at which the validator last bonded. - LastBondingHeight uint32 `protobuf:"varint,6,opt,name=last_bonding_height,json=lastBondingHeight,proto3" json:"last_bonding_height,omitempty"` - // The height at which the validator last participated in sortition. - LastSortitionHeight uint32 `protobuf:"varint,7,opt,name=last_sortition_height,json=lastSortitionHeight,proto3" json:"last_sortition_height,omitempty"` - // The height at which the validator will unbond. - UnbondingHeight uint32 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty"` - // The address of the validator. - Address string `protobuf:"bytes,9,opt,name=address,proto3" json:"address,omitempty"` - // The availability score of the validator. - AvailabilityScore float64 `protobuf:"fixed64,10,opt,name=availability_score,json=availabilityScore,proto3" json:"availability_score,omitempty"` -} - -func (x *ValidatorInfo) Reset() { - *x = ValidatorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorInfo) ProtoMessage() {} - -func (x *ValidatorInfo) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[21] - 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 ValidatorInfo.ProtoReflect.Descriptor instead. -func (*ValidatorInfo) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{21} -} - -func (x *ValidatorInfo) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -func (x *ValidatorInfo) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -func (x *ValidatorInfo) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *ValidatorInfo) GetNumber() int32 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *ValidatorInfo) GetStake() int64 { - if x != nil { - return x.Stake - } - return 0 -} - -func (x *ValidatorInfo) GetLastBondingHeight() uint32 { - if x != nil { - return x.LastBondingHeight - } - return 0 -} - -func (x *ValidatorInfo) GetLastSortitionHeight() uint32 { - if x != nil { - return x.LastSortitionHeight - } - return 0 -} - -func (x *ValidatorInfo) GetUnbondingHeight() uint32 { - if x != nil { - return x.UnbondingHeight - } - return 0 -} - -func (x *ValidatorInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *ValidatorInfo) GetAvailabilityScore() float64 { - if x != nil { - return x.AvailabilityScore - } - return 0 -} - -// Message containing information about an account. -type AccountInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The hash of the account. - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // The serialized data of the account. - Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - // The unique number assigned to the account. - Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` - // The balance of the account in NanoPAC. - Balance int64 `protobuf:"varint,4,opt,name=balance,proto3" json:"balance,omitempty"` - // The address of the account. - Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *AccountInfo) Reset() { - *x = AccountInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccountInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountInfo) ProtoMessage() {} - -func (x *AccountInfo) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[22] - 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 AccountInfo.ProtoReflect.Descriptor instead. -func (*AccountInfo) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{22} -} - -func (x *AccountInfo) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -func (x *AccountInfo) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -func (x *AccountInfo) GetNumber() int32 { - if x != nil { - return x.Number - } - return 0 -} - -func (x *AccountInfo) GetBalance() int64 { - if x != nil { - return x.Balance - } - return 0 -} - -func (x *AccountInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// Message containing information about the header of a block. -type BlockHeaderInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The version of the block. - Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - // The hash of the previous block. - PrevBlockHash string `protobuf:"bytes,2,opt,name=prev_block_hash,json=prevBlockHash,proto3" json:"prev_block_hash,omitempty"` - // The state root hash of the blockchain. - StateRoot string `protobuf:"bytes,3,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` - // The sortition seed of the block. - SortitionSeed string `protobuf:"bytes,4,opt,name=sortition_seed,json=sortitionSeed,proto3" json:"sortition_seed,omitempty"` - // The address of the proposer of the block. - ProposerAddress string `protobuf:"bytes,5,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` -} - -func (x *BlockHeaderInfo) Reset() { - *x = BlockHeaderInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlockHeaderInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlockHeaderInfo) ProtoMessage() {} - -func (x *BlockHeaderInfo) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[23] - 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 BlockHeaderInfo.ProtoReflect.Descriptor instead. -func (*BlockHeaderInfo) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{23} -} - -func (x *BlockHeaderInfo) GetVersion() int32 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *BlockHeaderInfo) GetPrevBlockHash() string { - if x != nil { - return x.PrevBlockHash - } - return "" -} - -func (x *BlockHeaderInfo) GetStateRoot() string { - if x != nil { - return x.StateRoot - } - return "" -} - -func (x *BlockHeaderInfo) GetSortitionSeed() string { - if x != nil { - return x.SortitionSeed - } - return "" -} - -func (x *BlockHeaderInfo) GetProposerAddress() string { - if x != nil { - return x.ProposerAddress - } - return "" -} - -// Message containing information about a certificate. -type CertificateInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The hash of the certificate. - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // The round of the certificate. - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - // List of committers in the certificate. - Committers []int32 `protobuf:"varint,3,rep,packed,name=committers,proto3" json:"committers,omitempty"` - // List of absentees in the certificate. - Absentees []int32 `protobuf:"varint,4,rep,packed,name=absentees,proto3" json:"absentees,omitempty"` - // The signature of the certificate. - Signature string `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *CertificateInfo) Reset() { - *x = CertificateInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CertificateInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CertificateInfo) ProtoMessage() {} - -func (x *CertificateInfo) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[24] - 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 CertificateInfo.ProtoReflect.Descriptor instead. -func (*CertificateInfo) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{24} -} - -func (x *CertificateInfo) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -func (x *CertificateInfo) GetRound() int32 { - if x != nil { - return x.Round - } - return 0 -} - -func (x *CertificateInfo) GetCommitters() []int32 { - if x != nil { - return x.Committers - } - return nil -} - -func (x *CertificateInfo) GetAbsentees() []int32 { - if x != nil { - return x.Absentees - } - return nil -} - -func (x *CertificateInfo) GetSignature() string { - if x != nil { - return x.Signature - } - return "" -} - -// Message containing information about a vote. -type VoteInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type of the vote. - Type VoteType `protobuf:"varint,1,opt,name=type,proto3,enum=pactus.VoteType" json:"type,omitempty"` - // The address of the voter. - Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - // The hash of the block being voted on. - BlockHash string `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` - // The consensus round of the vote. - Round int32 `protobuf:"varint,4,opt,name=round,proto3" json:"round,omitempty"` - // The change-proposer round of the vote. - CpRound int32 `protobuf:"varint,5,opt,name=cp_round,json=cpRound,proto3" json:"cp_round,omitempty"` - // The change-proposer value of the vote. - CpValue int32 `protobuf:"varint,6,opt,name=cp_value,json=cpValue,proto3" json:"cp_value,omitempty"` -} - -func (x *VoteInfo) Reset() { - *x = VoteInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VoteInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VoteInfo) ProtoMessage() {} - -func (x *VoteInfo) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[25] - 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 VoteInfo.ProtoReflect.Descriptor instead. -func (*VoteInfo) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{25} -} - -func (x *VoteInfo) GetType() VoteType { - if x != nil { - return x.Type - } - return VoteType_VOTE_UNKNOWN -} - -func (x *VoteInfo) GetVoter() string { - if x != nil { - return x.Voter - } - return "" -} - -func (x *VoteInfo) GetBlockHash() string { - if x != nil { - return x.BlockHash - } - return "" -} - -func (x *VoteInfo) GetRound() int32 { - if x != nil { - return x.Round - } - return 0 -} - -func (x *VoteInfo) GetCpRound() int32 { - if x != nil { - return x.CpRound - } - return 0 -} - -func (x *VoteInfo) GetCpValue() int32 { - if x != nil { - return x.CpValue - } - return 0 -} - -// Message containing information about a consensus instance. -type ConsensusInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the consensus instance. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // Indicates whether the consensus instance is active and part of the - // committee. - Active bool `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"` - // The height of the consensus instance. - Height uint32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` - // The round of the consensus instance. - Round int32 `protobuf:"varint,4,opt,name=round,proto3" json:"round,omitempty"` - // List of votes in the consensus instance. - Votes []*VoteInfo `protobuf:"bytes,5,rep,name=votes,proto3" json:"votes,omitempty"` -} - -func (x *ConsensusInfo) Reset() { - *x = ConsensusInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConsensusInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConsensusInfo) ProtoMessage() {} - -func (x *ConsensusInfo) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[26] - 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 ConsensusInfo.ProtoReflect.Descriptor instead. -func (*ConsensusInfo) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{26} -} - -func (x *ConsensusInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *ConsensusInfo) GetActive() bool { - if x != nil { - return x.Active - } - return false -} - -func (x *ConsensusInfo) GetHeight() uint32 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *ConsensusInfo) GetRound() int32 { - if x != nil { - return x.Round - } - return 0 -} - -func (x *ConsensusInfo) GetVotes() []*VoteInfo { - if x != nil { - return x.Votes - } - return nil -} - -// Message containing information about a proposal. -type Proposal struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The height of the proposal. - Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // The round of the proposal. - Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` - // The block data of the proposal. - BlockData string `protobuf:"bytes,3,opt,name=block_data,json=blockData,proto3" json:"block_data,omitempty"` - // The signature data of the proposal. - SignatureData string `protobuf:"bytes,4,opt,name=signature_data,json=signatureData,proto3" json:"signature_data,omitempty"` -} - -func (x *Proposal) Reset() { - *x = Proposal{} - if protoimpl.UnsafeEnabled { - mi := &file_blockchain_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Proposal) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Proposal) ProtoMessage() {} - -func (x *Proposal) ProtoReflect() protoreflect.Message { - mi := &file_blockchain_proto_msgTypes[27] - 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 Proposal.ProtoReflect.Descriptor instead. -func (*Proposal) Descriptor() ([]byte, []int) { - return file_blockchain_proto_rawDescGZIP(), []int{27} -} - -func (x *Proposal) GetHeight() uint32 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *Proposal) GetRound() int32 { - if x != nil { - return x.Round - } - return 0 -} - -func (x *Proposal) GetBlockData() string { - if x != nil { - return x.BlockData - } - return "" -} - -func (x *Proposal) GetSignatureData() string { - if x != nil { - return x.SignatureData - } - return "" -} - -var File_blockchain_proto protoreflect.FileDescriptor - -var file_blockchain_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x06, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x1a, 0x11, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x43, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x3d, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x22, 0x2f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x22, 0x35, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x4b, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x33, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x2f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x35, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x5f, 0x0a, - 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x34, 0x0a, 0x09, 0x76, 0x65, 0x72, 0x62, - 0x6f, 0x73, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x62, 0x6f, 0x73, - 0x69, 0x74, 0x79, 0x52, 0x09, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x22, 0x83, - 0x02, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, - 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x63, 0x65, 0x72, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x08, 0x70, 0x72, 0x65, 0x76, 0x43, 0x65, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x03, 0x74, 0x78, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x03, 0x74, 0x78, 0x73, 0x22, 0x2d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x22, 0x2a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, - 0x2b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x30, 0x0a, 0x16, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x1a, - 0x0a, 0x18, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc1, 0x03, 0x0a, 0x19, 0x47, - 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, - 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x25, 0x0a, 0x0e, - 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, - 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, - 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x70, 0x6f, 0x77, - 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x65, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x13, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x64, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x64, 0x12, - 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x70, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x19, - 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7d, 0x0a, 0x18, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, - 0x73, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, - 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, 0x45, 0x0a, 0x18, 0x47, - 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x74, - 0x78, 0x73, 0x22, 0xdc, 0x02, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6f, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x6f, - 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x29, 0x0a, - 0x10, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, - 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, - 0x65, 0x22, 0x81, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, - 0x65, 0x76, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6f, - 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x65, - 0x64, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, - 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x97, 0x01, 0x0a, - 0x0f, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x68, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, - 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, - 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x62, - 0x73, 0x65, 0x6e, 0x74, 0x65, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x61, - 0x62, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x56, 0x6f, 0x74, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x6f, 0x74, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, - 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, - 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, - 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x70, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, - 0x19, 0x0a, 0x08, 0x63, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x63, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x43, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x05, - 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, - 0x6f, 0x74, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, - 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x2a, 0x48, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, - 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, - 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, - 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, - 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x02, 0x2a, 0x5c, - 0x0a, 0x08, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x56, 0x4f, - 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, - 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x12, - 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, - 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, - 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, 0x52, 0x10, 0x03, 0x32, 0x8b, 0x07, 0x0a, - 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x08, 0x47, - 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, - 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, - 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x45, 0x0a, 0x11, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5a, - 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_blockchain_proto_rawDescOnce sync.Once - file_blockchain_proto_rawDescData = file_blockchain_proto_rawDesc -) - -func file_blockchain_proto_rawDescGZIP() []byte { - file_blockchain_proto_rawDescOnce.Do(func() { - file_blockchain_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_proto_rawDescData) - }) - return file_blockchain_proto_rawDescData -} - -var file_blockchain_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_blockchain_proto_msgTypes = make([]protoimpl.MessageInfo, 28) -var file_blockchain_proto_goTypes = []any{ - (BlockVerbosity)(0), // 0: pactus.BlockVerbosity - (VoteType)(0), // 1: pactus.VoteType - (*GetAccountRequest)(nil), // 2: pactus.GetAccountRequest - (*GetAccountResponse)(nil), // 3: pactus.GetAccountResponse - (*GetValidatorAddressesRequest)(nil), // 4: pactus.GetValidatorAddressesRequest - (*GetValidatorAddressesResponse)(nil), // 5: pactus.GetValidatorAddressesResponse - (*GetValidatorRequest)(nil), // 6: pactus.GetValidatorRequest - (*GetValidatorByNumberRequest)(nil), // 7: pactus.GetValidatorByNumberRequest - (*GetValidatorResponse)(nil), // 8: pactus.GetValidatorResponse - (*GetPublicKeyRequest)(nil), // 9: pactus.GetPublicKeyRequest - (*GetPublicKeyResponse)(nil), // 10: pactus.GetPublicKeyResponse - (*GetBlockRequest)(nil), // 11: pactus.GetBlockRequest - (*GetBlockResponse)(nil), // 12: pactus.GetBlockResponse - (*GetBlockHashRequest)(nil), // 13: pactus.GetBlockHashRequest - (*GetBlockHashResponse)(nil), // 14: pactus.GetBlockHashResponse - (*GetBlockHeightRequest)(nil), // 15: pactus.GetBlockHeightRequest - (*GetBlockHeightResponse)(nil), // 16: pactus.GetBlockHeightResponse - (*GetBlockchainInfoRequest)(nil), // 17: pactus.GetBlockchainInfoRequest - (*GetBlockchainInfoResponse)(nil), // 18: pactus.GetBlockchainInfoResponse - (*GetConsensusInfoRequest)(nil), // 19: pactus.GetConsensusInfoRequest - (*GetConsensusInfoResponse)(nil), // 20: pactus.GetConsensusInfoResponse - (*GetTxPoolContentRequest)(nil), // 21: pactus.GetTxPoolContentRequest - (*GetTxPoolContentResponse)(nil), // 22: pactus.GetTxPoolContentResponse - (*ValidatorInfo)(nil), // 23: pactus.ValidatorInfo - (*AccountInfo)(nil), // 24: pactus.AccountInfo - (*BlockHeaderInfo)(nil), // 25: pactus.BlockHeaderInfo - (*CertificateInfo)(nil), // 26: pactus.CertificateInfo - (*VoteInfo)(nil), // 27: pactus.VoteInfo - (*ConsensusInfo)(nil), // 28: pactus.ConsensusInfo - (*Proposal)(nil), // 29: pactus.Proposal - (*TransactionInfo)(nil), // 30: pactus.TransactionInfo - (PayloadType)(0), // 31: pactus.PayloadType -} -var file_blockchain_proto_depIdxs = []int32{ - 24, // 0: pactus.GetAccountResponse.account:type_name -> pactus.AccountInfo - 23, // 1: pactus.GetValidatorResponse.validator:type_name -> pactus.ValidatorInfo - 0, // 2: pactus.GetBlockRequest.verbosity:type_name -> pactus.BlockVerbosity - 25, // 3: pactus.GetBlockResponse.header:type_name -> pactus.BlockHeaderInfo - 26, // 4: pactus.GetBlockResponse.prev_cert:type_name -> pactus.CertificateInfo - 30, // 5: pactus.GetBlockResponse.txs:type_name -> pactus.TransactionInfo - 23, // 6: pactus.GetBlockchainInfoResponse.committee_validators:type_name -> pactus.ValidatorInfo - 29, // 7: pactus.GetConsensusInfoResponse.proposal:type_name -> pactus.Proposal - 28, // 8: pactus.GetConsensusInfoResponse.instances:type_name -> pactus.ConsensusInfo - 31, // 9: pactus.GetTxPoolContentRequest.payload_type:type_name -> pactus.PayloadType - 30, // 10: pactus.GetTxPoolContentResponse.txs:type_name -> pactus.TransactionInfo - 1, // 11: pactus.VoteInfo.type:type_name -> pactus.VoteType - 27, // 12: pactus.ConsensusInfo.votes:type_name -> pactus.VoteInfo - 11, // 13: pactus.Blockchain.GetBlock:input_type -> pactus.GetBlockRequest - 13, // 14: pactus.Blockchain.GetBlockHash:input_type -> pactus.GetBlockHashRequest - 15, // 15: pactus.Blockchain.GetBlockHeight:input_type -> pactus.GetBlockHeightRequest - 17, // 16: pactus.Blockchain.GetBlockchainInfo:input_type -> pactus.GetBlockchainInfoRequest - 19, // 17: pactus.Blockchain.GetConsensusInfo:input_type -> pactus.GetConsensusInfoRequest - 2, // 18: pactus.Blockchain.GetAccount:input_type -> pactus.GetAccountRequest - 6, // 19: pactus.Blockchain.GetValidator:input_type -> pactus.GetValidatorRequest - 7, // 20: pactus.Blockchain.GetValidatorByNumber:input_type -> pactus.GetValidatorByNumberRequest - 4, // 21: pactus.Blockchain.GetValidatorAddresses:input_type -> pactus.GetValidatorAddressesRequest - 9, // 22: pactus.Blockchain.GetPublicKey:input_type -> pactus.GetPublicKeyRequest - 21, // 23: pactus.Blockchain.GetTxPoolContent:input_type -> pactus.GetTxPoolContentRequest - 12, // 24: pactus.Blockchain.GetBlock:output_type -> pactus.GetBlockResponse - 14, // 25: pactus.Blockchain.GetBlockHash:output_type -> pactus.GetBlockHashResponse - 16, // 26: pactus.Blockchain.GetBlockHeight:output_type -> pactus.GetBlockHeightResponse - 18, // 27: pactus.Blockchain.GetBlockchainInfo:output_type -> pactus.GetBlockchainInfoResponse - 20, // 28: pactus.Blockchain.GetConsensusInfo:output_type -> pactus.GetConsensusInfoResponse - 3, // 29: pactus.Blockchain.GetAccount:output_type -> pactus.GetAccountResponse - 8, // 30: pactus.Blockchain.GetValidator:output_type -> pactus.GetValidatorResponse - 8, // 31: pactus.Blockchain.GetValidatorByNumber:output_type -> pactus.GetValidatorResponse - 5, // 32: pactus.Blockchain.GetValidatorAddresses:output_type -> pactus.GetValidatorAddressesResponse - 10, // 33: pactus.Blockchain.GetPublicKey:output_type -> pactus.GetPublicKeyResponse - 22, // 34: pactus.Blockchain.GetTxPoolContent:output_type -> pactus.GetTxPoolContentResponse - 24, // [24:35] is the sub-list for method output_type - 13, // [13:24] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name -} - -func init() { file_blockchain_proto_init() } -func file_blockchain_proto_init() { - if File_blockchain_proto != nil { - return - } - file_transaction_proto_init() - if !protoimpl.UnsafeEnabled { - file_blockchain_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetAccountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetValidatorAddressesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetValidatorAddressesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetValidatorRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetValidatorByNumberRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetValidatorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetPublicKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetPublicKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetBlockRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetBlockResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetBlockHashRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*GetBlockHashResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetBlockHeightRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetBlockHeightResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetBlockchainInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*GetBlockchainInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*GetConsensusInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetConsensusInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetTxPoolContentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*GetTxPoolContentResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*ValidatorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[22].Exporter = func(v any, i int) any { - switch v := v.(*AccountInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[23].Exporter = func(v any, i int) any { - switch v := v.(*BlockHeaderInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[24].Exporter = func(v any, i int) any { - switch v := v.(*CertificateInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[25].Exporter = func(v any, i int) any { - switch v := v.(*VoteInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[26].Exporter = func(v any, i int) any { - switch v := v.(*ConsensusInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_blockchain_proto_msgTypes[27].Exporter = func(v any, i int) any { - switch v := v.(*Proposal); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_blockchain_proto_rawDesc, - NumEnums: 2, - NumMessages: 28, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_blockchain_proto_goTypes, - DependencyIndexes: file_blockchain_proto_depIdxs, - EnumInfos: file_blockchain_proto_enumTypes, - MessageInfos: file_blockchain_proto_msgTypes, - }.Build() - File_blockchain_proto = out.File - file_blockchain_proto_rawDesc = nil - file_blockchain_proto_goTypes = nil - file_blockchain_proto_depIdxs = nil -} diff --git a/www/grpc/gen/go/blockchain.pb.gw.go b/www/grpc/gen/go/blockchain.pb.gw.go deleted file mode 100644 index f37d0cb57..000000000 --- a/www/grpc/gen/go/blockchain.pb.gw.go +++ /dev/null @@ -1,920 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: blockchain.proto - -/* -Package pactus is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pactus - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -var ( - filter_Blockchain_GetBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Blockchain_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlock_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Blockchain_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlock_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetBlock(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Blockchain_GetBlockHash_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Blockchain_GetBlockHash_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockHashRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHash_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetBlockHash(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Blockchain_GetBlockHash_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockHashRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHash_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetBlockHash(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Blockchain_GetBlockHeight_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Blockchain_GetBlockHeight_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockHeightRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHeight_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetBlockHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Blockchain_GetBlockHeight_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockHeightRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHeight_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetBlockHeight(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Blockchain_GetBlockchainInfo_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockchainInfoRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetBlockchainInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Blockchain_GetBlockchainInfo_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockchainInfoRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetBlockchainInfo(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Blockchain_GetConsensusInfo_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetConsensusInfoRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetConsensusInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Blockchain_GetConsensusInfo_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetConsensusInfoRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetConsensusInfo(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Blockchain_GetAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Blockchain_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetAccount_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Blockchain_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAccountRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetAccount_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetAccount(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Blockchain_GetValidator_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Blockchain_GetValidator_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetValidatorRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidator_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetValidator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Blockchain_GetValidator_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetValidatorRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidator_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetValidator(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Blockchain_GetValidatorByNumber_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Blockchain_GetValidatorByNumber_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetValidatorByNumberRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidatorByNumber_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetValidatorByNumber(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Blockchain_GetValidatorByNumber_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetValidatorByNumberRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidatorByNumber_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetValidatorByNumber(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Blockchain_GetPublicKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Blockchain_GetPublicKey_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPublicKeyRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetPublicKey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetPublicKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Blockchain_GetPublicKey_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPublicKeyRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetPublicKey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetPublicKey(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Blockchain_GetTxPoolContent_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Blockchain_GetTxPoolContent_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTxPoolContentRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetTxPoolContent_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetTxPoolContent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Blockchain_GetTxPoolContent_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTxPoolContentRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetTxPoolContent_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetTxPoolContent(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterBlockchainHandlerServer registers the http handlers for service Blockchain to "mux". -// UnaryRPC :call BlockchainServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBlockchainHandlerFromEndpoint instead. -func RegisterBlockchainHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockchainServer) error { - - mux.Handle("GET", pattern_Blockchain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetBlock", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Blockchain_GetBlock_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetBlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetBlockHash_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetBlockHash", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block_hash")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Blockchain_GetBlockHash_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetBlockHash_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetBlockHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetBlockHeight", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block_height")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Blockchain_GetBlockHeight_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetBlockHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetBlockchainInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetBlockchainInfo", runtime.WithHTTPPathPattern("/pactus/blockchain/get_blockchain_info")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Blockchain_GetBlockchainInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetBlockchainInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetConsensusInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetConsensusInfo", runtime.WithHTTPPathPattern("/pactus/blockchain/get_consensus_info")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Blockchain_GetConsensusInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetConsensusInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetAccount", runtime.WithHTTPPathPattern("/pactus/blockchain/get_account")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Blockchain_GetAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetValidator", runtime.WithHTTPPathPattern("/pactus/blockchain/get_validator")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Blockchain_GetValidator_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetValidator_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetValidatorByNumber_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetValidatorByNumber", runtime.WithHTTPPathPattern("/pactus/blockchain/get_validator_by_number")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Blockchain_GetValidatorByNumber_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetValidatorByNumber_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetPublicKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetPublicKey", runtime.WithHTTPPathPattern("/pactus/blockchain/get_public_key")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Blockchain_GetPublicKey_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetPublicKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetTxPoolContent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetTxPoolContent", runtime.WithHTTPPathPattern("/pactus/blockchain/get_txpool_content")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Blockchain_GetTxPoolContent_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetTxPoolContent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterBlockchainHandlerFromEndpoint is same as RegisterBlockchainHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterBlockchainHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterBlockchainHandler(ctx, mux, conn) -} - -// RegisterBlockchainHandler registers the http handlers for service Blockchain to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterBlockchainHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterBlockchainHandlerClient(ctx, mux, NewBlockchainClient(conn)) -} - -// RegisterBlockchainHandlerClient registers the http handlers for service Blockchain -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlockchainClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlockchainClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "BlockchainClient" to call the correct interceptors. -func RegisterBlockchainHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockchainClient) error { - - mux.Handle("GET", pattern_Blockchain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetBlock", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Blockchain_GetBlock_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetBlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetBlockHash_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetBlockHash", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block_hash")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Blockchain_GetBlockHash_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetBlockHash_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetBlockHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetBlockHeight", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block_height")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Blockchain_GetBlockHeight_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetBlockHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetBlockchainInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetBlockchainInfo", runtime.WithHTTPPathPattern("/pactus/blockchain/get_blockchain_info")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Blockchain_GetBlockchainInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetBlockchainInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetConsensusInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetConsensusInfo", runtime.WithHTTPPathPattern("/pactus/blockchain/get_consensus_info")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Blockchain_GetConsensusInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetConsensusInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetAccount", runtime.WithHTTPPathPattern("/pactus/blockchain/get_account")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Blockchain_GetAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetValidator", runtime.WithHTTPPathPattern("/pactus/blockchain/get_validator")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Blockchain_GetValidator_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetValidator_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetValidatorByNumber_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetValidatorByNumber", runtime.WithHTTPPathPattern("/pactus/blockchain/get_validator_by_number")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Blockchain_GetValidatorByNumber_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetValidatorByNumber_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetPublicKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetPublicKey", runtime.WithHTTPPathPattern("/pactus/blockchain/get_public_key")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Blockchain_GetPublicKey_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetPublicKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Blockchain_GetTxPoolContent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetTxPoolContent", runtime.WithHTTPPathPattern("/pactus/blockchain/get_txpool_content")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Blockchain_GetTxPoolContent_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Blockchain_GetTxPoolContent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Blockchain_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_block"}, "")) - - pattern_Blockchain_GetBlockHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_block_hash"}, "")) - - pattern_Blockchain_GetBlockHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_block_height"}, "")) - - pattern_Blockchain_GetBlockchainInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_blockchain_info"}, "")) - - pattern_Blockchain_GetConsensusInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_consensus_info"}, "")) - - pattern_Blockchain_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_account"}, "")) - - pattern_Blockchain_GetValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_validator"}, "")) - - pattern_Blockchain_GetValidatorByNumber_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_validator_by_number"}, "")) - - pattern_Blockchain_GetPublicKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_public_key"}, "")) - - pattern_Blockchain_GetTxPoolContent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_txpool_content"}, "")) -) - -var ( - forward_Blockchain_GetBlock_0 = runtime.ForwardResponseMessage - - forward_Blockchain_GetBlockHash_0 = runtime.ForwardResponseMessage - - forward_Blockchain_GetBlockHeight_0 = runtime.ForwardResponseMessage - - forward_Blockchain_GetBlockchainInfo_0 = runtime.ForwardResponseMessage - - forward_Blockchain_GetConsensusInfo_0 = runtime.ForwardResponseMessage - - forward_Blockchain_GetAccount_0 = runtime.ForwardResponseMessage - - forward_Blockchain_GetValidator_0 = runtime.ForwardResponseMessage - - forward_Blockchain_GetValidatorByNumber_0 = runtime.ForwardResponseMessage - - forward_Blockchain_GetPublicKey_0 = runtime.ForwardResponseMessage - - forward_Blockchain_GetTxPoolContent_0 = runtime.ForwardResponseMessage -) diff --git a/www/grpc/gen/go/blockchain_grpc.pb.go b/www/grpc/gen/go/blockchain_grpc.pb.go deleted file mode 100644 index 115ac61a4..000000000 --- a/www/grpc/gen/go/blockchain_grpc.pb.go +++ /dev/null @@ -1,524 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc (unknown) -// source: blockchain.proto - -package pactus - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// 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.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 - -const ( - Blockchain_GetBlock_FullMethodName = "/pactus.Blockchain/GetBlock" - Blockchain_GetBlockHash_FullMethodName = "/pactus.Blockchain/GetBlockHash" - Blockchain_GetBlockHeight_FullMethodName = "/pactus.Blockchain/GetBlockHeight" - Blockchain_GetBlockchainInfo_FullMethodName = "/pactus.Blockchain/GetBlockchainInfo" - Blockchain_GetConsensusInfo_FullMethodName = "/pactus.Blockchain/GetConsensusInfo" - Blockchain_GetAccount_FullMethodName = "/pactus.Blockchain/GetAccount" - Blockchain_GetValidator_FullMethodName = "/pactus.Blockchain/GetValidator" - Blockchain_GetValidatorByNumber_FullMethodName = "/pactus.Blockchain/GetValidatorByNumber" - Blockchain_GetValidatorAddresses_FullMethodName = "/pactus.Blockchain/GetValidatorAddresses" - Blockchain_GetPublicKey_FullMethodName = "/pactus.Blockchain/GetPublicKey" - Blockchain_GetTxPoolContent_FullMethodName = "/pactus.Blockchain/GetTxPoolContent" -) - -// BlockchainClient is the client API for Blockchain 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. -// -// Blockchain service defines RPC methods for interacting with the blockchain. -type BlockchainClient interface { - // GetBlock retrieves information about a block based on the provided request - // parameters. - GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) - // GetBlockHash retrieves the hash of a block at the specified height. - GetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error) - // GetBlockHeight retrieves the height of a block with the specified hash. - GetBlockHeight(ctx context.Context, in *GetBlockHeightRequest, opts ...grpc.CallOption) (*GetBlockHeightResponse, error) - // GetBlockchainInfo retrieves general information about the blockchain. - GetBlockchainInfo(ctx context.Context, in *GetBlockchainInfoRequest, opts ...grpc.CallOption) (*GetBlockchainInfoResponse, error) - // GetConsensusInfo retrieves information about the consensus instances. - GetConsensusInfo(ctx context.Context, in *GetConsensusInfoRequest, opts ...grpc.CallOption) (*GetConsensusInfoResponse, error) - // GetAccount retrieves information about an account based on the provided - // address. - GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) - // GetValidator retrieves information about a validator based on the provided - // address. - GetValidator(ctx context.Context, in *GetValidatorRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) - // GetValidatorByNumber retrieves information about a validator based on the - // provided number. - GetValidatorByNumber(ctx context.Context, in *GetValidatorByNumberRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) - // GetValidatorAddresses retrieves a list of all validator addresses. - GetValidatorAddresses(ctx context.Context, in *GetValidatorAddressesRequest, opts ...grpc.CallOption) (*GetValidatorAddressesResponse, error) - // GetPublicKey retrieves the public key of an account based on the provided - // address. - GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*GetPublicKeyResponse, error) - // GetTxPoolContent retrieves current transactions in the transaction pool. - GetTxPoolContent(ctx context.Context, in *GetTxPoolContentRequest, opts ...grpc.CallOption) (*GetTxPoolContentResponse, error) -} - -type blockchainClient struct { - cc grpc.ClientConnInterface -} - -func NewBlockchainClient(cc grpc.ClientConnInterface) BlockchainClient { - return &blockchainClient{cc} -} - -func (c *blockchainClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetBlockResponse) - err := c.cc.Invoke(ctx, Blockchain_GetBlock_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetBlockHashResponse) - err := c.cc.Invoke(ctx, Blockchain_GetBlockHash_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) 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, Blockchain_GetBlockHeight_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetBlockchainInfo(ctx context.Context, in *GetBlockchainInfoRequest, opts ...grpc.CallOption) (*GetBlockchainInfoResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetBlockchainInfoResponse) - err := c.cc.Invoke(ctx, Blockchain_GetBlockchainInfo_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetConsensusInfo(ctx context.Context, in *GetConsensusInfoRequest, opts ...grpc.CallOption) (*GetConsensusInfoResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetConsensusInfoResponse) - err := c.cc.Invoke(ctx, Blockchain_GetConsensusInfo_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAccountResponse) - err := c.cc.Invoke(ctx, Blockchain_GetAccount_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetValidator(ctx context.Context, in *GetValidatorRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetValidatorResponse) - err := c.cc.Invoke(ctx, Blockchain_GetValidator_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetValidatorByNumber(ctx context.Context, in *GetValidatorByNumberRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetValidatorResponse) - err := c.cc.Invoke(ctx, Blockchain_GetValidatorByNumber_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetValidatorAddresses(ctx context.Context, in *GetValidatorAddressesRequest, opts ...grpc.CallOption) (*GetValidatorAddressesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetValidatorAddressesResponse) - err := c.cc.Invoke(ctx, Blockchain_GetValidatorAddresses_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*GetPublicKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPublicKeyResponse) - err := c.cc.Invoke(ctx, Blockchain_GetPublicKey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *blockchainClient) GetTxPoolContent(ctx context.Context, in *GetTxPoolContentRequest, opts ...grpc.CallOption) (*GetTxPoolContentResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetTxPoolContentResponse) - err := c.cc.Invoke(ctx, Blockchain_GetTxPoolContent_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// BlockchainServer is the server API for Blockchain service. -// All implementations should embed UnimplementedBlockchainServer -// for forward compatibility -// -// Blockchain service defines RPC methods for interacting with the blockchain. -type BlockchainServer interface { - // GetBlock retrieves information about a block based on the provided request - // parameters. - GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) - // GetBlockHash retrieves the hash of a block at the specified height. - GetBlockHash(context.Context, *GetBlockHashRequest) (*GetBlockHashResponse, error) - // GetBlockHeight retrieves the height of a block with the specified hash. - GetBlockHeight(context.Context, *GetBlockHeightRequest) (*GetBlockHeightResponse, error) - // GetBlockchainInfo retrieves general information about the blockchain. - GetBlockchainInfo(context.Context, *GetBlockchainInfoRequest) (*GetBlockchainInfoResponse, error) - // GetConsensusInfo retrieves information about the consensus instances. - GetConsensusInfo(context.Context, *GetConsensusInfoRequest) (*GetConsensusInfoResponse, error) - // GetAccount retrieves information about an account based on the provided - // address. - GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) - // GetValidator retrieves information about a validator based on the provided - // address. - GetValidator(context.Context, *GetValidatorRequest) (*GetValidatorResponse, error) - // GetValidatorByNumber retrieves information about a validator based on the - // provided number. - GetValidatorByNumber(context.Context, *GetValidatorByNumberRequest) (*GetValidatorResponse, error) - // GetValidatorAddresses retrieves a list of all validator addresses. - GetValidatorAddresses(context.Context, *GetValidatorAddressesRequest) (*GetValidatorAddressesResponse, error) - // GetPublicKey retrieves the public key of an account based on the provided - // address. - GetPublicKey(context.Context, *GetPublicKeyRequest) (*GetPublicKeyResponse, error) - // GetTxPoolContent retrieves current transactions in the transaction pool. - GetTxPoolContent(context.Context, *GetTxPoolContentRequest) (*GetTxPoolContentResponse, error) -} - -// UnimplementedBlockchainServer should be embedded to have forward compatible implementations. -type UnimplementedBlockchainServer struct { -} - -func (UnimplementedBlockchainServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") -} -func (UnimplementedBlockchainServer) GetBlockHash(context.Context, *GetBlockHashRequest) (*GetBlockHashResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockHash not implemented") -} -func (UnimplementedBlockchainServer) GetBlockHeight(context.Context, *GetBlockHeightRequest) (*GetBlockHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeight not implemented") -} -func (UnimplementedBlockchainServer) GetBlockchainInfo(context.Context, *GetBlockchainInfoRequest) (*GetBlockchainInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockchainInfo not implemented") -} -func (UnimplementedBlockchainServer) GetConsensusInfo(context.Context, *GetConsensusInfoRequest) (*GetConsensusInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConsensusInfo not implemented") -} -func (UnimplementedBlockchainServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") -} -func (UnimplementedBlockchainServer) GetValidator(context.Context, *GetValidatorRequest) (*GetValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidator not implemented") -} -func (UnimplementedBlockchainServer) GetValidatorByNumber(context.Context, *GetValidatorByNumberRequest) (*GetValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorByNumber not implemented") -} -func (UnimplementedBlockchainServer) GetValidatorAddresses(context.Context, *GetValidatorAddressesRequest) (*GetValidatorAddressesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorAddresses not implemented") -} -func (UnimplementedBlockchainServer) GetPublicKey(context.Context, *GetPublicKeyRequest) (*GetPublicKeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPublicKey not implemented") -} -func (UnimplementedBlockchainServer) GetTxPoolContent(context.Context, *GetTxPoolContentRequest) (*GetTxPoolContentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTxPoolContent not implemented") -} - -// UnsafeBlockchainServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to BlockchainServer will -// result in compilation errors. -type UnsafeBlockchainServer interface { - mustEmbedUnimplementedBlockchainServer() -} - -func RegisterBlockchainServer(s grpc.ServiceRegistrar, srv BlockchainServer) { - s.RegisterService(&Blockchain_ServiceDesc, srv) -} - -func _Blockchain_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetBlock_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetBlock(ctx, req.(*GetBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetBlockHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockHashRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetBlockHash(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetBlockHash_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetBlockHash(ctx, req.(*GetBlockHashRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetBlockHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetBlockHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetBlockHeight_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetBlockHeight(ctx, req.(*GetBlockHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetBlockchainInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockchainInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetBlockchainInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetBlockchainInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetBlockchainInfo(ctx, req.(*GetBlockchainInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetConsensusInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConsensusInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetConsensusInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetConsensusInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetConsensusInfo(ctx, req.(*GetConsensusInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetAccount_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetAccount(ctx, req.(*GetAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetValidator_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetValidator(ctx, req.(*GetValidatorRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetValidatorByNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorByNumberRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetValidatorByNumber(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetValidatorByNumber_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetValidatorByNumber(ctx, req.(*GetValidatorByNumberRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetValidatorAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorAddressesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetValidatorAddresses(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetValidatorAddresses_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetValidatorAddresses(ctx, req.(*GetValidatorAddressesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPublicKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetPublicKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetPublicKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetPublicKey(ctx, req.(*GetPublicKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Blockchain_GetTxPoolContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTxPoolContentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BlockchainServer).GetTxPoolContent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Blockchain_GetTxPoolContent_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BlockchainServer).GetTxPoolContent(ctx, req.(*GetTxPoolContentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Blockchain_ServiceDesc is the grpc.ServiceDesc for Blockchain service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Blockchain_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "pactus.Blockchain", - HandlerType: (*BlockchainServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetBlock", - Handler: _Blockchain_GetBlock_Handler, - }, - { - MethodName: "GetBlockHash", - Handler: _Blockchain_GetBlockHash_Handler, - }, - { - MethodName: "GetBlockHeight", - Handler: _Blockchain_GetBlockHeight_Handler, - }, - { - MethodName: "GetBlockchainInfo", - Handler: _Blockchain_GetBlockchainInfo_Handler, - }, - { - MethodName: "GetConsensusInfo", - Handler: _Blockchain_GetConsensusInfo_Handler, - }, - { - MethodName: "GetAccount", - Handler: _Blockchain_GetAccount_Handler, - }, - { - MethodName: "GetValidator", - Handler: _Blockchain_GetValidator_Handler, - }, - { - MethodName: "GetValidatorByNumber", - Handler: _Blockchain_GetValidatorByNumber_Handler, - }, - { - MethodName: "GetValidatorAddresses", - Handler: _Blockchain_GetValidatorAddresses_Handler, - }, - { - MethodName: "GetPublicKey", - Handler: _Blockchain_GetPublicKey_Handler, - }, - { - MethodName: "GetTxPoolContent", - Handler: _Blockchain_GetTxPoolContent_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "blockchain.proto", -} diff --git a/www/grpc/gen/go/blockchain_jgw.pb.go b/www/grpc/gen/go/blockchain_jgw.pb.go deleted file mode 100644 index a6fd8d15e..000000000 --- a/www/grpc/gen/go/blockchain_jgw.pb.go +++ /dev/null @@ -1,227 +0,0 @@ -// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT. -// source: blockchain.proto - -/* -Package pactus is a reverse proxy. - -It translates gRPC into JSON-RPC 2.0 -*/ -package pactus - -import ( - "context" - "encoding/json" - - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "google.golang.org/protobuf/encoding/protojson" -) - -type BlockchainJsonRPC struct { - client BlockchainClient -} - -type paramsAndHeadersBlockchain struct { - Headers metadata.MD `json:"headers,omitempty"` - Params json.RawMessage `json:"params"` -} - -// RegisterBlockchainJsonRPC register the grpc client Blockchain for json-rpc. -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterBlockchainJsonRPC(conn *grpc.ClientConn) *BlockchainJsonRPC { - return &BlockchainJsonRPC{ - client: NewBlockchainClient(conn), - } -} - -func (s *BlockchainJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) { - return map[string]func(ctx context.Context, params json.RawMessage) (any, error){ - - "pactus.blockchain.get_block": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetBlockRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetBlock(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.blockchain.get_block_hash": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetBlockHashRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetBlockHash(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.blockchain.get_block_height": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetBlockHeightRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetBlockHeight(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.blockchain.get_blockchain_info": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetBlockchainInfoRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetBlockchainInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.blockchain.get_consensus_info": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetConsensusInfoRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetConsensusInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.blockchain.get_account": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetAccountRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetAccount(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.blockchain.get_validator": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetValidatorRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetValidator(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.blockchain.get_validator_by_number": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetValidatorByNumberRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetValidatorByNumber(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.blockchain.get_validator_addresses": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetValidatorAddressesRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetValidatorAddresses(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.blockchain.get_public_key": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetPublicKeyRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetPublicKey(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.blockchain.get_tx_pool_content": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetTxPoolContentRequest) - - var jrpcData paramsAndHeadersBlockchain - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetTxPoolContent(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - } -} diff --git a/www/grpc/gen/go/network.cobra.pb.go b/www/grpc/gen/go/network.cobra.pb.go deleted file mode 100644 index 90d152d8c..000000000 --- a/www/grpc/gen/go/network.cobra.pb.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by protoc-gen-cobra. DO NOT EDIT. - -package pactus - -import ( - client "github.com/NathanBaulch/protoc-gen-cobra/client" - flag "github.com/NathanBaulch/protoc-gen-cobra/flag" - iocodec "github.com/NathanBaulch/protoc-gen-cobra/iocodec" - cobra "github.com/spf13/cobra" - grpc "google.golang.org/grpc" - proto "google.golang.org/protobuf/proto" -) - -func NetworkClientCommand(options ...client.Option) *cobra.Command { - cfg := client.NewConfig(options...) - cmd := &cobra.Command{ - Use: cfg.CommandNamer("Network"), - Short: "Network service client", - Long: "Network service provides RPCs for retrieving information about the network.", - } - cfg.BindFlags(cmd.PersistentFlags()) - cmd.AddCommand( - _NetworkGetNetworkInfoCommand(cfg), - _NetworkGetNodeInfoCommand(cfg), - ) - return cmd -} - -func _NetworkGetNetworkInfoCommand(cfg *client.Config) *cobra.Command { - req := &GetNetworkInfoRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetNetworkInfo"), - Short: "GetNetworkInfo RPC client", - Long: "GetNetworkInfo retrieves information about the overall network.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Network"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Network", "GetNetworkInfo"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewNetworkClient(cc) - v := &GetNetworkInfoRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetNetworkInfo(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().BoolVar(&req.OnlyConnected, cfg.FlagNamer("OnlyConnected"), false, "If true, only returns peers with connected status.") - - return cmd -} - -func _NetworkGetNodeInfoCommand(cfg *client.Config) *cobra.Command { - req := &GetNodeInfoRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetNodeInfo"), - Short: "GetNodeInfo RPC client", - Long: "GetNodeInfo retrieves information about a specific node in the network.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Network"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Network", "GetNodeInfo"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewNetworkClient(cc) - v := &GetNodeInfoRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetNodeInfo(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - return cmd -} diff --git a/www/grpc/gen/go/network.pb.go b/www/grpc/gen/go/network.pb.go deleted file mode 100644 index d99205478..000000000 --- a/www/grpc/gen/go/network.pb.go +++ /dev/null @@ -1,933 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc (unknown) -// source: network.proto - -package pactus - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Request message for retrieving overall network information. -type GetNetworkInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If true, only returns peers with connected status. - OnlyConnected bool `protobuf:"varint,1,opt,name=only_connected,json=onlyConnected,proto3" json:"only_connected,omitempty"` -} - -func (x *GetNetworkInfoRequest) Reset() { - *x = GetNetworkInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_network_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNetworkInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNetworkInfoRequest) ProtoMessage() {} - -func (x *GetNetworkInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_network_proto_msgTypes[0] - 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 GetNetworkInfoRequest.ProtoReflect.Descriptor instead. -func (*GetNetworkInfoRequest) Descriptor() ([]byte, []int) { - return file_network_proto_rawDescGZIP(), []int{0} -} - -func (x *GetNetworkInfoRequest) GetOnlyConnected() bool { - if x != nil { - return x.OnlyConnected - } - return false -} - -// Response message containing information about the overall network. -type GetNetworkInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Name of the network. - NetworkName string `protobuf:"bytes,1,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"` - // Total bytes sent across the network. - TotalSentBytes int64 `protobuf:"varint,2,opt,name=total_sent_bytes,json=totalSentBytes,proto3" json:"total_sent_bytes,omitempty"` - // Total bytes received across the network. - TotalReceivedBytes int64 `protobuf:"varint,3,opt,name=total_received_bytes,json=totalReceivedBytes,proto3" json:"total_received_bytes,omitempty"` - // Number of connected peers. - ConnectedPeersCount uint32 `protobuf:"varint,4,opt,name=connected_peers_count,json=connectedPeersCount,proto3" json:"connected_peers_count,omitempty"` - // List of connected peers. - ConnectedPeers []*PeerInfo `protobuf:"bytes,5,rep,name=connected_peers,json=connectedPeers,proto3" json:"connected_peers,omitempty"` - // Bytes sent per peer ID. - SentBytes map[int32]int64 `protobuf:"bytes,6,rep,name=sent_bytes,json=sentBytes,proto3" json:"sent_bytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // Bytes received per peer ID. - ReceivedBytes map[int32]int64 `protobuf:"bytes,7,rep,name=received_bytes,json=receivedBytes,proto3" json:"received_bytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` -} - -func (x *GetNetworkInfoResponse) Reset() { - *x = GetNetworkInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_network_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNetworkInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNetworkInfoResponse) ProtoMessage() {} - -func (x *GetNetworkInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_network_proto_msgTypes[1] - 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 GetNetworkInfoResponse.ProtoReflect.Descriptor instead. -func (*GetNetworkInfoResponse) Descriptor() ([]byte, []int) { - return file_network_proto_rawDescGZIP(), []int{1} -} - -func (x *GetNetworkInfoResponse) GetNetworkName() string { - if x != nil { - return x.NetworkName - } - return "" -} - -func (x *GetNetworkInfoResponse) GetTotalSentBytes() int64 { - if x != nil { - return x.TotalSentBytes - } - return 0 -} - -func (x *GetNetworkInfoResponse) GetTotalReceivedBytes() int64 { - if x != nil { - return x.TotalReceivedBytes - } - return 0 -} - -func (x *GetNetworkInfoResponse) GetConnectedPeersCount() uint32 { - if x != nil { - return x.ConnectedPeersCount - } - return 0 -} - -func (x *GetNetworkInfoResponse) GetConnectedPeers() []*PeerInfo { - if x != nil { - return x.ConnectedPeers - } - return nil -} - -func (x *GetNetworkInfoResponse) GetSentBytes() map[int32]int64 { - if x != nil { - return x.SentBytes - } - return nil -} - -func (x *GetNetworkInfoResponse) GetReceivedBytes() map[int32]int64 { - if x != nil { - return x.ReceivedBytes - } - return nil -} - -// Request message for retrieving information about a specific node in the -// network. -type GetNodeInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetNodeInfoRequest) Reset() { - *x = GetNodeInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_network_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeInfoRequest) ProtoMessage() {} - -func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_network_proto_msgTypes[2] - 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 GetNodeInfoRequest.ProtoReflect.Descriptor instead. -func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { - return file_network_proto_rawDescGZIP(), []int{2} -} - -// Response message containing information about a specific node in the network. -type GetNodeInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Moniker of the node. - Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` - // Agent information of the node. - Agent string `protobuf:"bytes,2,opt,name=agent,proto3" json:"agent,omitempty"` - // Peer ID of the node. - PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` - // Timestamp when the node started. - StartedAt uint64 `protobuf:"varint,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` - // Reachability status of the node. - Reachability string `protobuf:"bytes,5,opt,name=reachability,proto3" json:"reachability,omitempty"` - // A bitfield indicating the services provided by the node. - Services int32 `protobuf:"varint,6,opt,name=services,proto3" json:"services,omitempty"` - // Names of services provided by the node. - ServicesNames string `protobuf:"bytes,7,opt,name=services_names,json=servicesNames,proto3" json:"services_names,omitempty"` - // List of addresses associated with the node. - LocalAddrs []string `protobuf:"bytes,8,rep,name=local_addrs,json=localAddrs,proto3" json:"local_addrs,omitempty"` - // List of protocols supported by the node. - Protocols []string `protobuf:"bytes,9,rep,name=protocols,proto3" json:"protocols,omitempty"` - // Clock offset of the node. - ClockOffset float64 `protobuf:"fixed64,13,opt,name=clock_offset,json=clockOffset,proto3" json:"clock_offset,omitempty"` - // Information about the node's connections. - ConnectionInfo *ConnectionInfo `protobuf:"bytes,14,opt,name=connection_info,json=connectionInfo,proto3" json:"connection_info,omitempty"` -} - -func (x *GetNodeInfoResponse) Reset() { - *x = GetNodeInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_network_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNodeInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNodeInfoResponse) ProtoMessage() {} - -func (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_network_proto_msgTypes[3] - 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 GetNodeInfoResponse.ProtoReflect.Descriptor instead. -func (*GetNodeInfoResponse) Descriptor() ([]byte, []int) { - return file_network_proto_rawDescGZIP(), []int{3} -} - -func (x *GetNodeInfoResponse) GetMoniker() string { - if x != nil { - return x.Moniker - } - return "" -} - -func (x *GetNodeInfoResponse) GetAgent() string { - if x != nil { - return x.Agent - } - return "" -} - -func (x *GetNodeInfoResponse) GetPeerId() string { - if x != nil { - return x.PeerId - } - return "" -} - -func (x *GetNodeInfoResponse) GetStartedAt() uint64 { - if x != nil { - return x.StartedAt - } - return 0 -} - -func (x *GetNodeInfoResponse) GetReachability() string { - if x != nil { - return x.Reachability - } - return "" -} - -func (x *GetNodeInfoResponse) GetServices() int32 { - if x != nil { - return x.Services - } - return 0 -} - -func (x *GetNodeInfoResponse) GetServicesNames() string { - if x != nil { - return x.ServicesNames - } - return "" -} - -func (x *GetNodeInfoResponse) GetLocalAddrs() []string { - if x != nil { - return x.LocalAddrs - } - return nil -} - -func (x *GetNodeInfoResponse) GetProtocols() []string { - if x != nil { - return x.Protocols - } - return nil -} - -func (x *GetNodeInfoResponse) GetClockOffset() float64 { - if x != nil { - return x.ClockOffset - } - return 0 -} - -func (x *GetNodeInfoResponse) GetConnectionInfo() *ConnectionInfo { - if x != nil { - return x.ConnectionInfo - } - return nil -} - -// Information about a peer in the network. -type PeerInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Status of the peer. - Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` - // Moniker of the peer. - Moniker string `protobuf:"bytes,2,opt,name=moniker,proto3" json:"moniker,omitempty"` - // Agent information of the peer. - Agent string `protobuf:"bytes,3,opt,name=agent,proto3" json:"agent,omitempty"` - // Peer ID of the peer. - PeerId string `protobuf:"bytes,4,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` - // Consensus keys used by the peer. - ConsensusKeys []string `protobuf:"bytes,5,rep,name=consensus_keys,json=consensusKeys,proto3" json:"consensus_keys,omitempty"` - // Consensus addresses of the peer. - ConsensusAddresses []string `protobuf:"bytes,6,rep,name=consensus_addresses,json=consensusAddresses,proto3" json:"consensus_addresses,omitempty"` - // Services provided by the peer. - Services uint32 `protobuf:"varint,7,opt,name=services,proto3" json:"services,omitempty"` - // Hash of the last block the peer knows. - LastBlockHash string `protobuf:"bytes,8,opt,name=last_block_hash,json=lastBlockHash,proto3" json:"last_block_hash,omitempty"` - // Blockchain height of the peer. - Height uint32 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` - // Number of received bundles. - ReceivedBundles int32 `protobuf:"varint,10,opt,name=received_bundles,json=receivedBundles,proto3" json:"received_bundles,omitempty"` - // Number of invalid bundles received. - InvalidBundles int32 `protobuf:"varint,11,opt,name=invalid_bundles,json=invalidBundles,proto3" json:"invalid_bundles,omitempty"` - // Timestamp of the last sent bundle. - LastSent int64 `protobuf:"varint,12,opt,name=last_sent,json=lastSent,proto3" json:"last_sent,omitempty"` - // Timestamp of the last received bundle. - LastReceived int64 `protobuf:"varint,13,opt,name=last_received,json=lastReceived,proto3" json:"last_received,omitempty"` - // Bytes sent per message type. - SentBytes map[int32]int64 `protobuf:"bytes,14,rep,name=sent_bytes,json=sentBytes,proto3" json:"sent_bytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // Bytes received per message type. - ReceivedBytes map[int32]int64 `protobuf:"bytes,15,rep,name=received_bytes,json=receivedBytes,proto3" json:"received_bytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - // Network address of the peer. - Address string `protobuf:"bytes,16,opt,name=address,proto3" json:"address,omitempty"` - // Direction of connection with the peer. - Direction string `protobuf:"bytes,17,opt,name=direction,proto3" json:"direction,omitempty"` - // List of protocols supported by the peer. - Protocols []string `protobuf:"bytes,18,rep,name=protocols,proto3" json:"protocols,omitempty"` - // Total download sessions with the peer. - TotalSessions int32 `protobuf:"varint,19,opt,name=total_sessions,json=totalSessions,proto3" json:"total_sessions,omitempty"` - // Completed download sessions with the peer. - CompletedSessions int32 `protobuf:"varint,20,opt,name=completed_sessions,json=completedSessions,proto3" json:"completed_sessions,omitempty"` -} - -func (x *PeerInfo) Reset() { - *x = PeerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_network_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PeerInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PeerInfo) ProtoMessage() {} - -func (x *PeerInfo) ProtoReflect() protoreflect.Message { - mi := &file_network_proto_msgTypes[4] - 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 PeerInfo.ProtoReflect.Descriptor instead. -func (*PeerInfo) Descriptor() ([]byte, []int) { - return file_network_proto_rawDescGZIP(), []int{4} -} - -func (x *PeerInfo) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *PeerInfo) GetMoniker() string { - if x != nil { - return x.Moniker - } - return "" -} - -func (x *PeerInfo) GetAgent() string { - if x != nil { - return x.Agent - } - return "" -} - -func (x *PeerInfo) GetPeerId() string { - if x != nil { - return x.PeerId - } - return "" -} - -func (x *PeerInfo) GetConsensusKeys() []string { - if x != nil { - return x.ConsensusKeys - } - return nil -} - -func (x *PeerInfo) GetConsensusAddresses() []string { - if x != nil { - return x.ConsensusAddresses - } - return nil -} - -func (x *PeerInfo) GetServices() uint32 { - if x != nil { - return x.Services - } - return 0 -} - -func (x *PeerInfo) GetLastBlockHash() string { - if x != nil { - return x.LastBlockHash - } - return "" -} - -func (x *PeerInfo) GetHeight() uint32 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *PeerInfo) GetReceivedBundles() int32 { - if x != nil { - return x.ReceivedBundles - } - return 0 -} - -func (x *PeerInfo) GetInvalidBundles() int32 { - if x != nil { - return x.InvalidBundles - } - return 0 -} - -func (x *PeerInfo) GetLastSent() int64 { - if x != nil { - return x.LastSent - } - return 0 -} - -func (x *PeerInfo) GetLastReceived() int64 { - if x != nil { - return x.LastReceived - } - return 0 -} - -func (x *PeerInfo) GetSentBytes() map[int32]int64 { - if x != nil { - return x.SentBytes - } - return nil -} - -func (x *PeerInfo) GetReceivedBytes() map[int32]int64 { - if x != nil { - return x.ReceivedBytes - } - return nil -} - -func (x *PeerInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *PeerInfo) GetDirection() string { - if x != nil { - return x.Direction - } - return "" -} - -func (x *PeerInfo) GetProtocols() []string { - if x != nil { - return x.Protocols - } - return nil -} - -func (x *PeerInfo) GetTotalSessions() int32 { - if x != nil { - return x.TotalSessions - } - return 0 -} - -func (x *PeerInfo) GetCompletedSessions() int32 { - if x != nil { - return x.CompletedSessions - } - return 0 -} - -// ConnectionInfo contains information about the node's connections. -type ConnectionInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Total number of connections. - Connections uint64 `protobuf:"varint,1,opt,name=connections,proto3" json:"connections,omitempty"` - // Number of inbound connections. - InboundConnections uint64 `protobuf:"varint,2,opt,name=inbound_connections,json=inboundConnections,proto3" json:"inbound_connections,omitempty"` - // Number of outbound connections. - OutboundConnections uint64 `protobuf:"varint,3,opt,name=outbound_connections,json=outboundConnections,proto3" json:"outbound_connections,omitempty"` -} - -func (x *ConnectionInfo) Reset() { - *x = ConnectionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_network_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConnectionInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConnectionInfo) ProtoMessage() {} - -func (x *ConnectionInfo) ProtoReflect() protoreflect.Message { - mi := &file_network_proto_msgTypes[5] - 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 ConnectionInfo.ProtoReflect.Descriptor instead. -func (*ConnectionInfo) Descriptor() ([]byte, []int) { - return file_network_proto_rawDescGZIP(), []int{5} -} - -func (x *ConnectionInfo) GetConnections() uint64 { - if x != nil { - return x.Connections - } - return 0 -} - -func (x *ConnectionInfo) GetInboundConnections() uint64 { - if x != nil { - return x.InboundConnections - } - return 0 -} - -func (x *ConnectionInfo) GetOutboundConnections() uint64 { - if x != nil { - return x.OutboundConnections - } - return 0 -} - -var File_network_proto protoreflect.FileDescriptor - -var file_network_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x06, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x22, 0x3e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0xae, 0x04, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, - 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, - 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, - 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, - 0x73, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x70, - 0x65, 0x65, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x73, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x65, 0x64, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x73, - 0x12, 0x4c, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, - 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x58, - 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x74, - 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, - 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x87, - 0x03, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x22, - 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, - 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6f, 0x66, - 0x66, 0x73, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x6f, 0x63, - 0x6b, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x3f, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xed, 0x06, 0x0a, 0x08, 0x50, 0x65, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, - 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x2f, 0x0a, - 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x73, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, - 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x75, - 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, - 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x1b, - 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, - 0x12, 0x3e, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0e, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x65, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x12, 0x4a, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x74, - 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, - 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, - 0x13, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x69, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, - 0x0a, 0x14, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x32, 0xa2, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x4f, 0x0a, - 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, - 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x42, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, - 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_network_proto_rawDescOnce sync.Once - file_network_proto_rawDescData = file_network_proto_rawDesc -) - -func file_network_proto_rawDescGZIP() []byte { - file_network_proto_rawDescOnce.Do(func() { - file_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_network_proto_rawDescData) - }) - return file_network_proto_rawDescData -} - -var file_network_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_network_proto_goTypes = []any{ - (*GetNetworkInfoRequest)(nil), // 0: pactus.GetNetworkInfoRequest - (*GetNetworkInfoResponse)(nil), // 1: pactus.GetNetworkInfoResponse - (*GetNodeInfoRequest)(nil), // 2: pactus.GetNodeInfoRequest - (*GetNodeInfoResponse)(nil), // 3: pactus.GetNodeInfoResponse - (*PeerInfo)(nil), // 4: pactus.PeerInfo - (*ConnectionInfo)(nil), // 5: pactus.ConnectionInfo - nil, // 6: pactus.GetNetworkInfoResponse.SentBytesEntry - nil, // 7: pactus.GetNetworkInfoResponse.ReceivedBytesEntry - nil, // 8: pactus.PeerInfo.SentBytesEntry - nil, // 9: pactus.PeerInfo.ReceivedBytesEntry -} -var file_network_proto_depIdxs = []int32{ - 4, // 0: pactus.GetNetworkInfoResponse.connected_peers:type_name -> pactus.PeerInfo - 6, // 1: pactus.GetNetworkInfoResponse.sent_bytes:type_name -> pactus.GetNetworkInfoResponse.SentBytesEntry - 7, // 2: pactus.GetNetworkInfoResponse.received_bytes:type_name -> pactus.GetNetworkInfoResponse.ReceivedBytesEntry - 5, // 3: pactus.GetNodeInfoResponse.connection_info:type_name -> pactus.ConnectionInfo - 8, // 4: pactus.PeerInfo.sent_bytes:type_name -> pactus.PeerInfo.SentBytesEntry - 9, // 5: pactus.PeerInfo.received_bytes:type_name -> pactus.PeerInfo.ReceivedBytesEntry - 0, // 6: pactus.Network.GetNetworkInfo:input_type -> pactus.GetNetworkInfoRequest - 2, // 7: pactus.Network.GetNodeInfo:input_type -> pactus.GetNodeInfoRequest - 1, // 8: pactus.Network.GetNetworkInfo:output_type -> pactus.GetNetworkInfoResponse - 3, // 9: pactus.Network.GetNodeInfo:output_type -> pactus.GetNodeInfoResponse - 8, // [8:10] is the sub-list for method output_type - 6, // [6:8] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_network_proto_init() } -func file_network_proto_init() { - if File_network_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_network_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_network_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetNetworkInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_network_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetNodeInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_network_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetNodeInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_network_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PeerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_network_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*ConnectionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_network_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_network_proto_goTypes, - DependencyIndexes: file_network_proto_depIdxs, - MessageInfos: file_network_proto_msgTypes, - }.Build() - File_network_proto = out.File - file_network_proto_rawDesc = nil - file_network_proto_goTypes = nil - file_network_proto_depIdxs = nil -} diff --git a/www/grpc/gen/go/network.pb.gw.go b/www/grpc/gen/go/network.pb.gw.go deleted file mode 100644 index 9089b05ab..000000000 --- a/www/grpc/gen/go/network.pb.gw.go +++ /dev/null @@ -1,242 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: network.proto - -/* -Package pactus is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pactus - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -var ( - filter_Network_GetNetworkInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Network_GetNetworkInfo_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNetworkInfoRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Network_GetNetworkInfo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetNetworkInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Network_GetNetworkInfo_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNetworkInfoRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Network_GetNetworkInfo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetNetworkInfo(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Network_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNodeInfoRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetNodeInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Network_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNodeInfoRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetNodeInfo(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterNetworkHandlerServer registers the http handlers for service Network to "mux". -// UnaryRPC :call NetworkServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNetworkHandlerFromEndpoint instead. -func RegisterNetworkHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NetworkServer) error { - - mux.Handle("GET", pattern_Network_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Network/GetNetworkInfo", runtime.WithHTTPPathPattern("/pactus/network/get_network_info")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Network_GetNetworkInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Network_GetNetworkInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Network_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Network/GetNodeInfo", runtime.WithHTTPPathPattern("/pactus/network/get_node_info")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Network_GetNodeInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Network_GetNodeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterNetworkHandlerFromEndpoint is same as RegisterNetworkHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterNetworkHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterNetworkHandler(ctx, mux, conn) -} - -// RegisterNetworkHandler registers the http handlers for service Network to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterNetworkHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterNetworkHandlerClient(ctx, mux, NewNetworkClient(conn)) -} - -// RegisterNetworkHandlerClient registers the http handlers for service Network -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NetworkClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NetworkClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "NetworkClient" to call the correct interceptors. -func RegisterNetworkHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NetworkClient) error { - - mux.Handle("GET", pattern_Network_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Network/GetNetworkInfo", runtime.WithHTTPPathPattern("/pactus/network/get_network_info")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Network_GetNetworkInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Network_GetNetworkInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Network_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Network/GetNodeInfo", runtime.WithHTTPPathPattern("/pactus/network/get_node_info")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Network_GetNodeInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Network_GetNodeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Network_GetNetworkInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "network", "get_network_info"}, "")) - - pattern_Network_GetNodeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "network", "get_node_info"}, "")) -) - -var ( - forward_Network_GetNetworkInfo_0 = runtime.ForwardResponseMessage - - forward_Network_GetNodeInfo_0 = runtime.ForwardResponseMessage -) diff --git a/www/grpc/gen/go/network_grpc.pb.go b/www/grpc/gen/go/network_grpc.pb.go deleted file mode 100644 index 19900a7dd..000000000 --- a/www/grpc/gen/go/network_grpc.pb.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc (unknown) -// source: network.proto - -package pactus - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// 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.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 - -const ( - Network_GetNetworkInfo_FullMethodName = "/pactus.Network/GetNetworkInfo" - Network_GetNodeInfo_FullMethodName = "/pactus.Network/GetNodeInfo" -) - -// NetworkClient is the client API for Network 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. -// -// Network service provides RPCs for retrieving information about the network. -type NetworkClient interface { - // GetNetworkInfo retrieves information about the overall network. - GetNetworkInfo(ctx context.Context, in *GetNetworkInfoRequest, opts ...grpc.CallOption) (*GetNetworkInfoResponse, error) - // GetNodeInfo retrieves information about a specific node in the network. - GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) -} - -type networkClient struct { - cc grpc.ClientConnInterface -} - -func NewNetworkClient(cc grpc.ClientConnInterface) NetworkClient { - return &networkClient{cc} -} - -func (c *networkClient) GetNetworkInfo(ctx context.Context, in *GetNetworkInfoRequest, opts ...grpc.CallOption) (*GetNetworkInfoResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetNetworkInfoResponse) - err := c.cc.Invoke(ctx, Network_GetNetworkInfo_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *networkClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetNodeInfoResponse) - err := c.cc.Invoke(ctx, Network_GetNodeInfo_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NetworkServer is the server API for Network service. -// All implementations should embed UnimplementedNetworkServer -// for forward compatibility -// -// Network service provides RPCs for retrieving information about the network. -type NetworkServer interface { - // GetNetworkInfo retrieves information about the overall network. - GetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*GetNetworkInfoResponse, error) - // GetNodeInfo retrieves information about a specific node in the network. - GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) -} - -// UnimplementedNetworkServer should be embedded to have forward compatible implementations. -type UnimplementedNetworkServer struct { -} - -func (UnimplementedNetworkServer) GetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*GetNetworkInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNetworkInfo not implemented") -} -func (UnimplementedNetworkServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") -} - -// UnsafeNetworkServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to NetworkServer will -// result in compilation errors. -type UnsafeNetworkServer interface { - mustEmbedUnimplementedNetworkServer() -} - -func RegisterNetworkServer(s grpc.ServiceRegistrar, srv NetworkServer) { - s.RegisterService(&Network_ServiceDesc, srv) -} - -func _Network_GetNetworkInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNetworkInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NetworkServer).GetNetworkInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Network_GetNetworkInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NetworkServer).GetNetworkInfo(ctx, req.(*GetNetworkInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Network_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodeInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NetworkServer).GetNodeInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Network_GetNodeInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NetworkServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Network_ServiceDesc is the grpc.ServiceDesc for Network service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Network_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "pactus.Network", - HandlerType: (*NetworkServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetNetworkInfo", - Handler: _Network_GetNetworkInfo_Handler, - }, - { - MethodName: "GetNodeInfo", - Handler: _Network_GetNodeInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "network.proto", -} diff --git a/www/grpc/gen/go/network_jgw.pb.go b/www/grpc/gen/go/network_jgw.pb.go deleted file mode 100644 index fa9d7692f..000000000 --- a/www/grpc/gen/go/network_jgw.pb.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT. -// source: network.proto - -/* -Package pactus is a reverse proxy. - -It translates gRPC into JSON-RPC 2.0 -*/ -package pactus - -import ( - "context" - "encoding/json" - - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "google.golang.org/protobuf/encoding/protojson" -) - -type NetworkJsonRPC struct { - client NetworkClient -} - -type paramsAndHeadersNetwork struct { - Headers metadata.MD `json:"headers,omitempty"` - Params json.RawMessage `json:"params"` -} - -// RegisterNetworkJsonRPC register the grpc client Network for json-rpc. -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterNetworkJsonRPC(conn *grpc.ClientConn) *NetworkJsonRPC { - return &NetworkJsonRPC{ - client: NewNetworkClient(conn), - } -} - -func (s *NetworkJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) { - return map[string]func(ctx context.Context, params json.RawMessage) (any, error){ - - "pactus.network.get_network_info": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetNetworkInfoRequest) - - var jrpcData paramsAndHeadersNetwork - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetNetworkInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.network.get_node_info": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetNodeInfoRequest) - - var jrpcData paramsAndHeadersNetwork - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetNodeInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - } -} diff --git a/www/grpc/gen/go/transaction.cobra.pb.go b/www/grpc/gen/go/transaction.cobra.pb.go deleted file mode 100644 index 899952b21..000000000 --- a/www/grpc/gen/go/transaction.cobra.pb.go +++ /dev/null @@ -1,347 +0,0 @@ -// Code generated by protoc-gen-cobra. DO NOT EDIT. - -package pactus - -import ( - client "github.com/NathanBaulch/protoc-gen-cobra/client" - flag "github.com/NathanBaulch/protoc-gen-cobra/flag" - iocodec "github.com/NathanBaulch/protoc-gen-cobra/iocodec" - cobra "github.com/spf13/cobra" - grpc "google.golang.org/grpc" - proto "google.golang.org/protobuf/proto" -) - -func TransactionClientCommand(options ...client.Option) *cobra.Command { - cfg := client.NewConfig(options...) - cmd := &cobra.Command{ - Use: cfg.CommandNamer("Transaction"), - Short: "Transaction service client", - Long: "Transaction service defines various RPC methods for interacting with\n transactions.", - } - cfg.BindFlags(cmd.PersistentFlags()) - cmd.AddCommand( - _TransactionGetTransactionCommand(cfg), - _TransactionCalculateFeeCommand(cfg), - _TransactionBroadcastTransactionCommand(cfg), - _TransactionGetRawTransferTransactionCommand(cfg), - _TransactionGetRawBondTransactionCommand(cfg), - _TransactionGetRawUnbondTransactionCommand(cfg), - _TransactionGetRawWithdrawTransactionCommand(cfg), - ) - return cmd -} - -func _TransactionGetTransactionCommand(cfg *client.Config) *cobra.Command { - req := &GetTransactionRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetTransaction"), - Short: "GetTransaction RPC client", - Long: "GetTransaction retrieves transaction details based on the provided request\n parameters.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetTransaction"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewTransactionClient(cc) - v := &GetTransactionRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetTransaction(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.Id, cfg.FlagNamer("Id"), "", "The unique ID of the transaction to retrieve.") - flag.EnumVar(cmd.PersistentFlags(), &req.Verbosity, cfg.FlagNamer("Verbosity"), "The verbosity level for transaction details.") - - return cmd -} - -func _TransactionCalculateFeeCommand(cfg *client.Config) *cobra.Command { - req := &CalculateFeeRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("CalculateFee"), - Short: "CalculateFee RPC client", - Long: "CalculateFee calculates the transaction fee based on the specified amount\n and payload type.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "CalculateFee"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewTransactionClient(cc) - v := &CalculateFeeRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.CalculateFee(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().Int64Var(&req.Amount, cfg.FlagNamer("Amount"), 0, "The amount involved in the transaction, specified in NanoPAC.") - flag.EnumVar(cmd.PersistentFlags(), &req.PayloadType, cfg.FlagNamer("PayloadType"), "The type of transaction payload.") - cmd.PersistentFlags().BoolVar(&req.FixedAmount, cfg.FlagNamer("FixedAmount"), false, "Indicates if the amount should be fixed and include the fee.") - - return cmd -} - -func _TransactionBroadcastTransactionCommand(cfg *client.Config) *cobra.Command { - req := &BroadcastTransactionRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("BroadcastTransaction"), - Short: "BroadcastTransaction RPC client", - Long: "BroadcastTransaction broadcasts a signed transaction to the network.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "BroadcastTransaction"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewTransactionClient(cc) - v := &BroadcastTransactionRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.BroadcastTransaction(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.SignedRawTransaction, cfg.FlagNamer("SignedRawTransaction"), "", "The signed raw transaction data to be broadcasted.") - - return cmd -} - -func _TransactionGetRawTransferTransactionCommand(cfg *client.Config) *cobra.Command { - req := &GetRawTransferTransactionRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetRawTransferTransaction"), - Short: "GetRawTransferTransaction RPC client", - Long: "GetRawTransferTransaction retrieves raw details of a transfer transaction.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetRawTransferTransaction"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewTransactionClient(cc) - v := &GetRawTransferTransactionRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetRawTransferTransaction(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") - cmd.PersistentFlags().StringVar(&req.Sender, cfg.FlagNamer("Sender"), "", "The sender's account address.") - cmd.PersistentFlags().StringVar(&req.Receiver, cfg.FlagNamer("Receiver"), "", "The receiver's account address.") - cmd.PersistentFlags().Int64Var(&req.Amount, cfg.FlagNamer("Amount"), 0, "The amount to be transferred, specified in NanoPAC. Must be greater than 0.") - cmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer("Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") - cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") - - return cmd -} - -func _TransactionGetRawBondTransactionCommand(cfg *client.Config) *cobra.Command { - req := &GetRawBondTransactionRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetRawBondTransaction"), - Short: "GetRawBondTransaction RPC client", - Long: "GetRawBondTransaction retrieves raw details of a bond transaction.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetRawBondTransaction"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewTransactionClient(cc) - v := &GetRawBondTransactionRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetRawBondTransaction(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") - cmd.PersistentFlags().StringVar(&req.Sender, cfg.FlagNamer("Sender"), "", "The sender's account address.") - cmd.PersistentFlags().StringVar(&req.Receiver, cfg.FlagNamer("Receiver"), "", "The receiver's validator address.") - cmd.PersistentFlags().Int64Var(&req.Stake, cfg.FlagNamer("Stake"), 0, "The stake amount in NanoPAC. Must be greater than 0.") - cmd.PersistentFlags().StringVar(&req.PublicKey, cfg.FlagNamer("PublicKey"), "", "The public key of the validator.") - cmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer("Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") - cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") - - return cmd -} - -func _TransactionGetRawUnbondTransactionCommand(cfg *client.Config) *cobra.Command { - req := &GetRawUnbondTransactionRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetRawUnbondTransaction"), - Short: "GetRawUnbondTransaction RPC client", - Long: "GetRawUnbondTransaction retrieves raw details of an unbond transaction.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetRawUnbondTransaction"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewTransactionClient(cc) - v := &GetRawUnbondTransactionRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetRawUnbondTransaction(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") - cmd.PersistentFlags().StringVar(&req.ValidatorAddress, cfg.FlagNamer("ValidatorAddress"), "", "The address of the validator to unbond from.") - cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") - - return cmd -} - -func _TransactionGetRawWithdrawTransactionCommand(cfg *client.Config) *cobra.Command { - req := &GetRawWithdrawTransactionRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetRawWithdrawTransaction"), - Short: "GetRawWithdrawTransaction RPC client", - Long: "GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetRawWithdrawTransaction"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewTransactionClient(cc) - v := &GetRawWithdrawTransactionRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetRawWithdrawTransaction(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") - cmd.PersistentFlags().StringVar(&req.ValidatorAddress, cfg.FlagNamer("ValidatorAddress"), "", "The address of the validator to withdraw from.") - cmd.PersistentFlags().StringVar(&req.AccountAddress, cfg.FlagNamer("AccountAddress"), "", "The address of the account to withdraw to.") - cmd.PersistentFlags().Int64Var(&req.Amount, cfg.FlagNamer("Amount"), 0, "The withdrawal amount in NanoPAC. Must be greater than 0.") - cmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer("Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") - cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") - - return cmd -} diff --git a/www/grpc/gen/go/transaction.pb.go b/www/grpc/gen/go/transaction.pb.go deleted file mode 100644 index 84a40dc99..000000000 --- a/www/grpc/gen/go/transaction.pb.go +++ /dev/null @@ -1,1939 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc (unknown) -// source: transaction.proto - -package pactus - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Enumeration for different types of transaction payloads. -type PayloadType int32 - -const ( - // Unknown payload type. - PayloadType_UNKNOWN PayloadType = 0 - // Transfer payload type. - PayloadType_TRANSFER_PAYLOAD PayloadType = 1 - // Bond payload type. - PayloadType_BOND_PAYLOAD PayloadType = 2 - // Sortition payload type. - PayloadType_SORTITION_PAYLOAD PayloadType = 3 - // Unbond payload type. - PayloadType_UNBOND_PAYLOAD PayloadType = 4 - // Withdraw payload type. - PayloadType_WITHDRAW_PAYLOAD PayloadType = 5 -) - -// Enum value maps for PayloadType. -var ( - PayloadType_name = map[int32]string{ - 0: "UNKNOWN", - 1: "TRANSFER_PAYLOAD", - 2: "BOND_PAYLOAD", - 3: "SORTITION_PAYLOAD", - 4: "UNBOND_PAYLOAD", - 5: "WITHDRAW_PAYLOAD", - } - PayloadType_value = map[string]int32{ - "UNKNOWN": 0, - "TRANSFER_PAYLOAD": 1, - "BOND_PAYLOAD": 2, - "SORTITION_PAYLOAD": 3, - "UNBOND_PAYLOAD": 4, - "WITHDRAW_PAYLOAD": 5, - } -) - -func (x PayloadType) Enum() *PayloadType { - p := new(PayloadType) - *p = x - return p -} - -func (x PayloadType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PayloadType) Descriptor() protoreflect.EnumDescriptor { - return file_transaction_proto_enumTypes[0].Descriptor() -} - -func (PayloadType) Type() protoreflect.EnumType { - return &file_transaction_proto_enumTypes[0] -} - -func (x PayloadType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PayloadType.Descriptor instead. -func (PayloadType) EnumDescriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{0} -} - -// Enumeration for verbosity levels when requesting transaction details. -type TransactionVerbosity int32 - -const ( - // Request transaction data only. - TransactionVerbosity_TRANSACTION_DATA TransactionVerbosity = 0 - // Request detailed transaction information. - TransactionVerbosity_TRANSACTION_INFO TransactionVerbosity = 1 -) - -// Enum value maps for TransactionVerbosity. -var ( - TransactionVerbosity_name = map[int32]string{ - 0: "TRANSACTION_DATA", - 1: "TRANSACTION_INFO", - } - TransactionVerbosity_value = map[string]int32{ - "TRANSACTION_DATA": 0, - "TRANSACTION_INFO": 1, - } -) - -func (x TransactionVerbosity) Enum() *TransactionVerbosity { - p := new(TransactionVerbosity) - *p = x - return p -} - -func (x TransactionVerbosity) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TransactionVerbosity) Descriptor() protoreflect.EnumDescriptor { - return file_transaction_proto_enumTypes[1].Descriptor() -} - -func (TransactionVerbosity) Type() protoreflect.EnumType { - return &file_transaction_proto_enumTypes[1] -} - -func (x TransactionVerbosity) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TransactionVerbosity.Descriptor instead. -func (TransactionVerbosity) EnumDescriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{1} -} - -// Request message for retrieving transaction details. -type GetTransactionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique ID of the transaction to retrieve. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The verbosity level for transaction details. - Verbosity TransactionVerbosity `protobuf:"varint,2,opt,name=verbosity,proto3,enum=pactus.TransactionVerbosity" json:"verbosity,omitempty"` -} - -func (x *GetTransactionRequest) Reset() { - *x = GetTransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTransactionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTransactionRequest) ProtoMessage() {} - -func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[0] - 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 GetTransactionRequest.ProtoReflect.Descriptor instead. -func (*GetTransactionRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{0} -} - -func (x *GetTransactionRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *GetTransactionRequest) GetVerbosity() TransactionVerbosity { - if x != nil { - return x.Verbosity - } - return TransactionVerbosity_TRANSACTION_DATA -} - -// Response message containing details of a transaction. -type GetTransactionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The height of the block containing the transaction. - BlockHeight uint32 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - // The UNIX timestamp of the block containing the transaction. - BlockTime uint32 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` - // Detailed information about the transaction. - Transaction *TransactionInfo `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` -} - -func (x *GetTransactionResponse) Reset() { - *x = GetTransactionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTransactionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTransactionResponse) ProtoMessage() {} - -func (x *GetTransactionResponse) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[1] - 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 GetTransactionResponse.ProtoReflect.Descriptor instead. -func (*GetTransactionResponse) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{1} -} - -func (x *GetTransactionResponse) GetBlockHeight() uint32 { - if x != nil { - return x.BlockHeight - } - return 0 -} - -func (x *GetTransactionResponse) GetBlockTime() uint32 { - if x != nil { - return x.BlockTime - } - return 0 -} - -func (x *GetTransactionResponse) GetTransaction() *TransactionInfo { - if x != nil { - return x.Transaction - } - return nil -} - -// Request message for calculating transaction fee. -type CalculateFeeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The amount involved in the transaction, specified in NanoPAC. - Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` - // The type of transaction payload. - PayloadType PayloadType `protobuf:"varint,2,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType" json:"payload_type,omitempty"` - // Indicates if the amount should be fixed and include the fee. - FixedAmount bool `protobuf:"varint,3,opt,name=fixed_amount,json=fixedAmount,proto3" json:"fixed_amount,omitempty"` -} - -func (x *CalculateFeeRequest) Reset() { - *x = CalculateFeeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CalculateFeeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CalculateFeeRequest) ProtoMessage() {} - -func (x *CalculateFeeRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[2] - 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 CalculateFeeRequest.ProtoReflect.Descriptor instead. -func (*CalculateFeeRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{2} -} - -func (x *CalculateFeeRequest) GetAmount() int64 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *CalculateFeeRequest) GetPayloadType() PayloadType { - if x != nil { - return x.PayloadType - } - return PayloadType_UNKNOWN -} - -func (x *CalculateFeeRequest) GetFixedAmount() bool { - if x != nil { - return x.FixedAmount - } - return false -} - -// Response message containing the calculated transaction fee. -type CalculateFeeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The calculated amount in NanoPAC. - Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` - // The calculated transaction fee in NanoPAC. - Fee int64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"` -} - -func (x *CalculateFeeResponse) Reset() { - *x = CalculateFeeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CalculateFeeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CalculateFeeResponse) ProtoMessage() {} - -func (x *CalculateFeeResponse) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[3] - 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 CalculateFeeResponse.ProtoReflect.Descriptor instead. -func (*CalculateFeeResponse) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{3} -} - -func (x *CalculateFeeResponse) GetAmount() int64 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *CalculateFeeResponse) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - -// Request message for broadcasting a signed transaction. -type BroadcastTransactionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The signed raw transaction data to be broadcasted. - SignedRawTransaction string `protobuf:"bytes,1,opt,name=signed_raw_transaction,json=signedRawTransaction,proto3" json:"signed_raw_transaction,omitempty"` -} - -func (x *BroadcastTransactionRequest) Reset() { - *x = BroadcastTransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BroadcastTransactionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BroadcastTransactionRequest) ProtoMessage() {} - -func (x *BroadcastTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[4] - 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 BroadcastTransactionRequest.ProtoReflect.Descriptor instead. -func (*BroadcastTransactionRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{4} -} - -func (x *BroadcastTransactionRequest) GetSignedRawTransaction() string { - if x != nil { - return x.SignedRawTransaction - } - return "" -} - -// Response message containing the ID of the broadcasted transaction. -type BroadcastTransactionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique ID of the broadcasted transaction. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *BroadcastTransactionResponse) Reset() { - *x = BroadcastTransactionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BroadcastTransactionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BroadcastTransactionResponse) ProtoMessage() {} - -func (x *BroadcastTransactionResponse) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[5] - 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 BroadcastTransactionResponse.ProtoReflect.Descriptor instead. -func (*BroadcastTransactionResponse) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{5} -} - -func (x *BroadcastTransactionResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// Request message for retrieving raw details of a transfer transaction. -type GetRawTransferTransactionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The lock time for the transaction. If not set, defaults to the last block - // height. - LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` - // The sender's account address. - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - // The receiver's account address. - Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` - // The amount to be transferred, specified in NanoPAC. Must be greater than 0. - Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` - // A memo string for the transaction. - Memo string `protobuf:"bytes,6,opt,name=memo,proto3" json:"memo,omitempty"` -} - -func (x *GetRawTransferTransactionRequest) Reset() { - *x = GetRawTransferTransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRawTransferTransactionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRawTransferTransactionRequest) ProtoMessage() {} - -func (x *GetRawTransferTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[6] - 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 GetRawTransferTransactionRequest.ProtoReflect.Descriptor instead. -func (*GetRawTransferTransactionRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{6} -} - -func (x *GetRawTransferTransactionRequest) GetLockTime() uint32 { - if x != nil { - return x.LockTime - } - return 0 -} - -func (x *GetRawTransferTransactionRequest) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *GetRawTransferTransactionRequest) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -func (x *GetRawTransferTransactionRequest) GetAmount() int64 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *GetRawTransferTransactionRequest) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - -func (x *GetRawTransferTransactionRequest) GetMemo() string { - if x != nil { - return x.Memo - } - return "" -} - -// Request message for retrieving raw details of a bond transaction. -type GetRawBondTransactionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The lock time for the transaction. If not set, defaults to the last block - // height. - LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` - // The sender's account address. - Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` - // The receiver's validator address. - Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` - // The stake amount in NanoPAC. Must be greater than 0. - Stake int64 `protobuf:"varint,4,opt,name=stake,proto3" json:"stake,omitempty"` - // The public key of the validator. - PublicKey string `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,6,opt,name=fee,proto3" json:"fee,omitempty"` - // A memo string for the transaction. - Memo string `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"` -} - -func (x *GetRawBondTransactionRequest) Reset() { - *x = GetRawBondTransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRawBondTransactionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRawBondTransactionRequest) ProtoMessage() {} - -func (x *GetRawBondTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[7] - 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 GetRawBondTransactionRequest.ProtoReflect.Descriptor instead. -func (*GetRawBondTransactionRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{7} -} - -func (x *GetRawBondTransactionRequest) GetLockTime() uint32 { - if x != nil { - return x.LockTime - } - return 0 -} - -func (x *GetRawBondTransactionRequest) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *GetRawBondTransactionRequest) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -func (x *GetRawBondTransactionRequest) GetStake() int64 { - if x != nil { - return x.Stake - } - return 0 -} - -func (x *GetRawBondTransactionRequest) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *GetRawBondTransactionRequest) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - -func (x *GetRawBondTransactionRequest) GetMemo() string { - if x != nil { - return x.Memo - } - return "" -} - -// Request message for retrieving raw details of an unbond transaction. -type GetRawUnbondTransactionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The lock time for the transaction. If not set, defaults to the last block - // height. - LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` - // The address of the validator to unbond from. - ValidatorAddress string `protobuf:"bytes,3,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // A memo string for the transaction. - Memo string `protobuf:"bytes,4,opt,name=memo,proto3" json:"memo,omitempty"` -} - -func (x *GetRawUnbondTransactionRequest) Reset() { - *x = GetRawUnbondTransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRawUnbondTransactionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRawUnbondTransactionRequest) ProtoMessage() {} - -func (x *GetRawUnbondTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[8] - 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 GetRawUnbondTransactionRequest.ProtoReflect.Descriptor instead. -func (*GetRawUnbondTransactionRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{8} -} - -func (x *GetRawUnbondTransactionRequest) GetLockTime() uint32 { - if x != nil { - return x.LockTime - } - return 0 -} - -func (x *GetRawUnbondTransactionRequest) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *GetRawUnbondTransactionRequest) GetMemo() string { - if x != nil { - return x.Memo - } - return "" -} - -// Request message for retrieving raw details of a withdraw transaction. -type GetRawWithdrawTransactionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The lock time for the transaction. If not set, defaults to the last block - // height. - LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` - // The address of the validator to withdraw from. - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // The address of the account to withdraw to. - AccountAddress string `protobuf:"bytes,3,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` - // The withdrawal amount in NanoPAC. Must be greater than 0. - Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` - // A memo string for the transaction. - Memo string `protobuf:"bytes,6,opt,name=memo,proto3" json:"memo,omitempty"` -} - -func (x *GetRawWithdrawTransactionRequest) Reset() { - *x = GetRawWithdrawTransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRawWithdrawTransactionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRawWithdrawTransactionRequest) ProtoMessage() {} - -func (x *GetRawWithdrawTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[9] - 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 GetRawWithdrawTransactionRequest.ProtoReflect.Descriptor instead. -func (*GetRawWithdrawTransactionRequest) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{9} -} - -func (x *GetRawWithdrawTransactionRequest) GetLockTime() uint32 { - if x != nil { - return x.LockTime - } - return 0 -} - -func (x *GetRawWithdrawTransactionRequest) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *GetRawWithdrawTransactionRequest) GetAccountAddress() string { - if x != nil { - return x.AccountAddress - } - return "" -} - -func (x *GetRawWithdrawTransactionRequest) GetAmount() int64 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *GetRawWithdrawTransactionRequest) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - -func (x *GetRawWithdrawTransactionRequest) GetMemo() string { - if x != nil { - return x.Memo - } - return "" -} - -// Response message containing raw transaction data. -type GetRawTransactionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The raw transaction data. - RawTransaction string `protobuf:"bytes,1,opt,name=raw_transaction,json=rawTransaction,proto3" json:"raw_transaction,omitempty"` -} - -func (x *GetRawTransactionResponse) Reset() { - *x = GetRawTransactionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRawTransactionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRawTransactionResponse) ProtoMessage() {} - -func (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[10] - 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 GetRawTransactionResponse.ProtoReflect.Descriptor instead. -func (*GetRawTransactionResponse) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{10} -} - -func (x *GetRawTransactionResponse) GetRawTransaction() string { - if x != nil { - return x.RawTransaction - } - return "" -} - -// Payload for a transfer transaction. -type PayloadTransfer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The sender's address. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // The receiver's address. - Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` - // The amount to be transferred in NanoPAC. - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *PayloadTransfer) Reset() { - *x = PayloadTransfer{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PayloadTransfer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PayloadTransfer) ProtoMessage() {} - -func (x *PayloadTransfer) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[11] - 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 PayloadTransfer.ProtoReflect.Descriptor instead. -func (*PayloadTransfer) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{11} -} - -func (x *PayloadTransfer) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *PayloadTransfer) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -func (x *PayloadTransfer) GetAmount() int64 { - if x != nil { - return x.Amount - } - return 0 -} - -// Payload for a bond transaction. -type PayloadBond struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The sender's address. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // The receiver's address. - Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` - // The stake amount in NanoPAC. - Stake int64 `protobuf:"varint,3,opt,name=stake,proto3" json:"stake,omitempty"` -} - -func (x *PayloadBond) Reset() { - *x = PayloadBond{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PayloadBond) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PayloadBond) ProtoMessage() {} - -func (x *PayloadBond) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[12] - 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 PayloadBond.ProtoReflect.Descriptor instead. -func (*PayloadBond) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{12} -} - -func (x *PayloadBond) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *PayloadBond) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -func (x *PayloadBond) GetStake() int64 { - if x != nil { - return x.Stake - } - return 0 -} - -// Payload for a sortition transaction. -type PayloadSortition struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The validator address associated with the sortition proof. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The proof for the sortition. - Proof string `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` -} - -func (x *PayloadSortition) Reset() { - *x = PayloadSortition{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PayloadSortition) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PayloadSortition) ProtoMessage() {} - -func (x *PayloadSortition) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[13] - 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 PayloadSortition.ProtoReflect.Descriptor instead. -func (*PayloadSortition) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{13} -} - -func (x *PayloadSortition) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *PayloadSortition) GetProof() string { - if x != nil { - return x.Proof - } - return "" -} - -// Payload for an unbond transaction. -type PayloadUnbond struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the validator to unbond from. - Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` -} - -func (x *PayloadUnbond) Reset() { - *x = PayloadUnbond{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PayloadUnbond) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PayloadUnbond) ProtoMessage() {} - -func (x *PayloadUnbond) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[14] - 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 PayloadUnbond.ProtoReflect.Descriptor instead. -func (*PayloadUnbond) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{14} -} - -func (x *PayloadUnbond) GetValidator() string { - if x != nil { - return x.Validator - } - return "" -} - -// Payload for a withdraw transaction. -type PayloadWithdraw struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address to withdraw from. - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - // The address to withdraw to. - To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` - // The withdrawal amount in NanoPAC. - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *PayloadWithdraw) Reset() { - *x = PayloadWithdraw{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PayloadWithdraw) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PayloadWithdraw) ProtoMessage() {} - -func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[15] - 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 PayloadWithdraw.ProtoReflect.Descriptor instead. -func (*PayloadWithdraw) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{15} -} - -func (x *PayloadWithdraw) GetFrom() string { - if x != nil { - return x.From - } - return "" -} - -func (x *PayloadWithdraw) GetTo() string { - if x != nil { - return x.To - } - return "" -} - -func (x *PayloadWithdraw) GetAmount() int64 { - if x != nil { - return x.Amount - } - return 0 -} - -// Information about a transaction. -type TransactionInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique ID of the transaction. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The raw transaction data. - Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - // The version of the transaction. - Version int32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - // The lock time for the transaction. - LockTime uint32 `protobuf:"varint,4,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` - // The value of the transaction in NanoPAC. - Value int64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` - // The fee for the transaction in NanoPAC. - Fee int64 `protobuf:"varint,6,opt,name=fee,proto3" json:"fee,omitempty"` - // The type of transaction payload. - PayloadType PayloadType `protobuf:"varint,7,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType" json:"payload_type,omitempty"` - // Types that are assignable to Payload: - // - // *TransactionInfo_Transfer - // *TransactionInfo_Bond - // *TransactionInfo_Sortition - // *TransactionInfo_Unbond - // *TransactionInfo_Withdraw - Payload isTransactionInfo_Payload `protobuf_oneof:"payload"` - // A memo string for the transaction. - Memo string `protobuf:"bytes,8,opt,name=memo,proto3" json:"memo,omitempty"` - // The public key associated with the transaction. - PublicKey string `protobuf:"bytes,9,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The signature for the transaction. - Signature string `protobuf:"bytes,10,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *TransactionInfo) Reset() { - *x = TransactionInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransactionInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransactionInfo) ProtoMessage() {} - -func (x *TransactionInfo) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[16] - 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 TransactionInfo.ProtoReflect.Descriptor instead. -func (*TransactionInfo) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{16} -} - -func (x *TransactionInfo) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *TransactionInfo) GetData() string { - if x != nil { - return x.Data - } - return "" -} - -func (x *TransactionInfo) GetVersion() int32 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *TransactionInfo) GetLockTime() uint32 { - if x != nil { - return x.LockTime - } - return 0 -} - -func (x *TransactionInfo) GetValue() int64 { - if x != nil { - return x.Value - } - return 0 -} - -func (x *TransactionInfo) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - -func (x *TransactionInfo) GetPayloadType() PayloadType { - if x != nil { - return x.PayloadType - } - return PayloadType_UNKNOWN -} - -func (m *TransactionInfo) GetPayload() isTransactionInfo_Payload { - if m != nil { - return m.Payload - } - return nil -} - -func (x *TransactionInfo) GetTransfer() *PayloadTransfer { - if x, ok := x.GetPayload().(*TransactionInfo_Transfer); ok { - return x.Transfer - } - return nil -} - -func (x *TransactionInfo) GetBond() *PayloadBond { - if x, ok := x.GetPayload().(*TransactionInfo_Bond); ok { - return x.Bond - } - return nil -} - -func (x *TransactionInfo) GetSortition() *PayloadSortition { - if x, ok := x.GetPayload().(*TransactionInfo_Sortition); ok { - return x.Sortition - } - return nil -} - -func (x *TransactionInfo) GetUnbond() *PayloadUnbond { - if x, ok := x.GetPayload().(*TransactionInfo_Unbond); ok { - return x.Unbond - } - return nil -} - -func (x *TransactionInfo) GetWithdraw() *PayloadWithdraw { - if x, ok := x.GetPayload().(*TransactionInfo_Withdraw); ok { - return x.Withdraw - } - return nil -} - -func (x *TransactionInfo) GetMemo() string { - if x != nil { - return x.Memo - } - return "" -} - -func (x *TransactionInfo) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *TransactionInfo) GetSignature() string { - if x != nil { - return x.Signature - } - return "" -} - -type isTransactionInfo_Payload interface { - isTransactionInfo_Payload() -} - -type TransactionInfo_Transfer struct { - // Transfer transaction payload. - Transfer *PayloadTransfer `protobuf:"bytes,30,opt,name=transfer,proto3,oneof"` -} - -type TransactionInfo_Bond struct { - // Bond transaction payload. - Bond *PayloadBond `protobuf:"bytes,31,opt,name=bond,proto3,oneof"` -} - -type TransactionInfo_Sortition struct { - // Sortition transaction payload. - Sortition *PayloadSortition `protobuf:"bytes,32,opt,name=sortition,proto3,oneof"` -} - -type TransactionInfo_Unbond struct { - // Unbond transaction payload. - Unbond *PayloadUnbond `protobuf:"bytes,33,opt,name=unbond,proto3,oneof"` -} - -type TransactionInfo_Withdraw struct { - // Withdraw transaction payload. - Withdraw *PayloadWithdraw `protobuf:"bytes,34,opt,name=withdraw,proto3,oneof"` -} - -func (*TransactionInfo_Transfer) isTransactionInfo_Payload() {} - -func (*TransactionInfo_Bond) isTransactionInfo_Payload() {} - -func (*TransactionInfo_Sortition) isTransactionInfo_Payload() {} - -func (*TransactionInfo_Unbond) isTransactionInfo_Payload() {} - -func (*TransactionInfo_Withdraw) isTransactionInfo_Payload() {} - -var File_transaction_proto protoreflect.FileDescriptor - -var file_transaction_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x22, 0x63, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x09, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x62, - 0x6f, 0x73, 0x69, 0x74, 0x79, 0x52, 0x09, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, - 0x22, 0x95, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, - 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x88, 0x01, 0x0a, 0x13, 0x43, 0x61, 0x6c, - 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x40, 0x0a, 0x14, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, - 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x53, 0x0a, 0x1b, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, - 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, 0x61, 0x77, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x1c, 0x42, 0x72, - 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x20, 0x47, - 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, - 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0xca, - 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x7e, 0x0a, 0x1e, 0x47, - 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, - 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0xd3, 0x01, 0x0a, 0x20, - 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, - 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, - 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, - 0x6f, 0x22, 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, - 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x57, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, - 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, - 0x42, 0x0a, 0x10, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, - 0x6f, 0x6f, 0x66, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x22, 0x4d, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0xac, 0x04, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, - 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, - 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, - 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, 0x0a, - 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x2a, 0x83, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, - 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, - 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, - 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x4f, 0x52, 0x54, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, - 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, - 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x5f, 0x50, 0x41, 0x59, - 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x2a, 0x42, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, 0x14, - 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, - 0x54, 0x41, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x32, 0xa8, 0x05, 0x0a, 0x0b, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x43, - 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, - 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, - 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, - 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, - 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x26, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, - 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, - 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x46, 0x0a, 0x12, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, - 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_transaction_proto_rawDescOnce sync.Once - file_transaction_proto_rawDescData = file_transaction_proto_rawDesc -) - -func file_transaction_proto_rawDescGZIP() []byte { - file_transaction_proto_rawDescOnce.Do(func() { - file_transaction_proto_rawDescData = protoimpl.X.CompressGZIP(file_transaction_proto_rawDescData) - }) - return file_transaction_proto_rawDescData -} - -var file_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_transaction_proto_goTypes = []any{ - (PayloadType)(0), // 0: pactus.PayloadType - (TransactionVerbosity)(0), // 1: pactus.TransactionVerbosity - (*GetTransactionRequest)(nil), // 2: pactus.GetTransactionRequest - (*GetTransactionResponse)(nil), // 3: pactus.GetTransactionResponse - (*CalculateFeeRequest)(nil), // 4: pactus.CalculateFeeRequest - (*CalculateFeeResponse)(nil), // 5: pactus.CalculateFeeResponse - (*BroadcastTransactionRequest)(nil), // 6: pactus.BroadcastTransactionRequest - (*BroadcastTransactionResponse)(nil), // 7: pactus.BroadcastTransactionResponse - (*GetRawTransferTransactionRequest)(nil), // 8: pactus.GetRawTransferTransactionRequest - (*GetRawBondTransactionRequest)(nil), // 9: pactus.GetRawBondTransactionRequest - (*GetRawUnbondTransactionRequest)(nil), // 10: pactus.GetRawUnbondTransactionRequest - (*GetRawWithdrawTransactionRequest)(nil), // 11: pactus.GetRawWithdrawTransactionRequest - (*GetRawTransactionResponse)(nil), // 12: pactus.GetRawTransactionResponse - (*PayloadTransfer)(nil), // 13: pactus.PayloadTransfer - (*PayloadBond)(nil), // 14: pactus.PayloadBond - (*PayloadSortition)(nil), // 15: pactus.PayloadSortition - (*PayloadUnbond)(nil), // 16: pactus.PayloadUnbond - (*PayloadWithdraw)(nil), // 17: pactus.PayloadWithdraw - (*TransactionInfo)(nil), // 18: pactus.TransactionInfo -} -var file_transaction_proto_depIdxs = []int32{ - 1, // 0: pactus.GetTransactionRequest.verbosity:type_name -> pactus.TransactionVerbosity - 18, // 1: pactus.GetTransactionResponse.transaction:type_name -> pactus.TransactionInfo - 0, // 2: pactus.CalculateFeeRequest.payload_type:type_name -> pactus.PayloadType - 0, // 3: pactus.TransactionInfo.payload_type:type_name -> pactus.PayloadType - 13, // 4: pactus.TransactionInfo.transfer:type_name -> pactus.PayloadTransfer - 14, // 5: pactus.TransactionInfo.bond:type_name -> pactus.PayloadBond - 15, // 6: pactus.TransactionInfo.sortition:type_name -> pactus.PayloadSortition - 16, // 7: pactus.TransactionInfo.unbond:type_name -> pactus.PayloadUnbond - 17, // 8: pactus.TransactionInfo.withdraw:type_name -> pactus.PayloadWithdraw - 2, // 9: pactus.Transaction.GetTransaction:input_type -> pactus.GetTransactionRequest - 4, // 10: pactus.Transaction.CalculateFee:input_type -> pactus.CalculateFeeRequest - 6, // 11: pactus.Transaction.BroadcastTransaction:input_type -> pactus.BroadcastTransactionRequest - 8, // 12: pactus.Transaction.GetRawTransferTransaction:input_type -> pactus.GetRawTransferTransactionRequest - 9, // 13: pactus.Transaction.GetRawBondTransaction:input_type -> pactus.GetRawBondTransactionRequest - 10, // 14: pactus.Transaction.GetRawUnbondTransaction:input_type -> pactus.GetRawUnbondTransactionRequest - 11, // 15: pactus.Transaction.GetRawWithdrawTransaction:input_type -> pactus.GetRawWithdrawTransactionRequest - 3, // 16: pactus.Transaction.GetTransaction:output_type -> pactus.GetTransactionResponse - 5, // 17: pactus.Transaction.CalculateFee:output_type -> pactus.CalculateFeeResponse - 7, // 18: pactus.Transaction.BroadcastTransaction:output_type -> pactus.BroadcastTransactionResponse - 12, // 19: pactus.Transaction.GetRawTransferTransaction:output_type -> pactus.GetRawTransactionResponse - 12, // 20: pactus.Transaction.GetRawBondTransaction:output_type -> pactus.GetRawTransactionResponse - 12, // 21: pactus.Transaction.GetRawUnbondTransaction:output_type -> pactus.GetRawTransactionResponse - 12, // 22: pactus.Transaction.GetRawWithdrawTransaction:output_type -> pactus.GetRawTransactionResponse - 16, // [16:23] is the sub-list for method output_type - 9, // [9:16] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_transaction_proto_init() } -func file_transaction_proto_init() { - if File_transaction_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_transaction_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetTransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetTransactionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*CalculateFeeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*CalculateFeeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*BroadcastTransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BroadcastTransactionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*GetRawTransferTransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*GetRawBondTransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*GetRawUnbondTransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*GetRawWithdrawTransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*GetRawTransactionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*PayloadTransfer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PayloadBond); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PayloadSortition); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*PayloadUnbond); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PayloadWithdraw); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*TransactionInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_transaction_proto_msgTypes[16].OneofWrappers = []any{ - (*TransactionInfo_Transfer)(nil), - (*TransactionInfo_Bond)(nil), - (*TransactionInfo_Sortition)(nil), - (*TransactionInfo_Unbond)(nil), - (*TransactionInfo_Withdraw)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_transaction_proto_rawDesc, - NumEnums: 2, - NumMessages: 17, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_transaction_proto_goTypes, - DependencyIndexes: file_transaction_proto_depIdxs, - EnumInfos: file_transaction_proto_enumTypes, - MessageInfos: file_transaction_proto_msgTypes, - }.Build() - File_transaction_proto = out.File - file_transaction_proto_rawDesc = nil - file_transaction_proto_goTypes = nil - file_transaction_proto_depIdxs = nil -} diff --git a/www/grpc/gen/go/transaction.pb.gw.go b/www/grpc/gen/go/transaction.pb.gw.go deleted file mode 100644 index 52f00400b..000000000 --- a/www/grpc/gen/go/transaction.pb.gw.go +++ /dev/null @@ -1,695 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: transaction.proto - -/* -Package pactus is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pactus - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -var ( - filter_Transaction_GetTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_GetTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_GetTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetTransaction(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Transaction_CalculateFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_CalculateFee_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CalculateFeeRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_CalculateFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CalculateFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_CalculateFee_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CalculateFeeRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_CalculateFee_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CalculateFee(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Transaction_BroadcastTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_BroadcastTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq BroadcastTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_BroadcastTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.BroadcastTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_BroadcastTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq BroadcastTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_BroadcastTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.BroadcastTransaction(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Transaction_GetRawTransferTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_GetRawTransferTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawTransferTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawTransferTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRawTransferTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_GetRawTransferTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawTransferTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawTransferTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRawTransferTransaction(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Transaction_GetRawBondTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_GetRawBondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawBondTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawBondTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRawBondTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_GetRawBondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawBondTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawBondTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRawBondTransaction(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Transaction_GetRawUnbondTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_GetRawUnbondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawUnbondTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawUnbondTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRawUnbondTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_GetRawUnbondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawUnbondTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawUnbondTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRawUnbondTransaction(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Transaction_GetRawWithdrawTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_GetRawWithdrawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawWithdrawTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawWithdrawTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRawWithdrawTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_GetRawWithdrawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawWithdrawTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawWithdrawTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRawWithdrawTransaction(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterTransactionHandlerServer registers the http handlers for service Transaction to "mux". -// UnaryRPC :call TransactionServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTransactionHandlerFromEndpoint instead. -func RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionServer) error { - - mux.Handle("GET", pattern_Transaction_GetTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_GetTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_CalculateFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/CalculateFee", runtime.WithHTTPPathPattern("/pactus/transaction/calculate_fee")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_CalculateFee_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_CalculateFee_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_Transaction_BroadcastTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/BroadcastTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/broadcast_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_BroadcastTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_BroadcastTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawTransferTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawTransferTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_transfer_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_GetRawTransferTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawTransferTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawBondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawBondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_bond_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_GetRawBondTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawBondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawUnbondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawUnbondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_unbond_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_GetRawUnbondTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawUnbondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawWithdrawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawWithdrawTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_withdraw_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_GetRawWithdrawTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawWithdrawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterTransactionHandlerFromEndpoint is same as RegisterTransactionHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterTransactionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterTransactionHandler(ctx, mux, conn) -} - -// RegisterTransactionHandler registers the http handlers for service Transaction to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterTransactionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterTransactionHandlerClient(ctx, mux, NewTransactionClient(conn)) -} - -// RegisterTransactionHandlerClient registers the http handlers for service Transaction -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TransactionClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TransactionClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "TransactionClient" to call the correct interceptors. -func RegisterTransactionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionClient) error { - - mux.Handle("GET", pattern_Transaction_GetTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_GetTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_CalculateFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/CalculateFee", runtime.WithHTTPPathPattern("/pactus/transaction/calculate_fee")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_CalculateFee_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_CalculateFee_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_Transaction_BroadcastTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/BroadcastTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/broadcast_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_BroadcastTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_BroadcastTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawTransferTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawTransferTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_transfer_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_GetRawTransferTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawTransferTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawBondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawBondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_bond_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_GetRawBondTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawBondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawUnbondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawUnbondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_unbond_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_GetRawUnbondTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawUnbondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawWithdrawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawWithdrawTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_withdraw_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_GetRawWithdrawTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawWithdrawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Transaction_GetTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_transaction"}, "")) - - pattern_Transaction_CalculateFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "calculate_fee"}, "")) - - pattern_Transaction_BroadcastTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "broadcast_transaction"}, "")) - - pattern_Transaction_GetRawTransferTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_transfer_transaction"}, "")) - - pattern_Transaction_GetRawBondTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_bond_transaction"}, "")) - - pattern_Transaction_GetRawUnbondTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_unbond_transaction"}, "")) - - pattern_Transaction_GetRawWithdrawTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_withdraw_transaction"}, "")) -) - -var ( - forward_Transaction_GetTransaction_0 = runtime.ForwardResponseMessage - - forward_Transaction_CalculateFee_0 = runtime.ForwardResponseMessage - - forward_Transaction_BroadcastTransaction_0 = runtime.ForwardResponseMessage - - forward_Transaction_GetRawTransferTransaction_0 = runtime.ForwardResponseMessage - - forward_Transaction_GetRawBondTransaction_0 = runtime.ForwardResponseMessage - - forward_Transaction_GetRawUnbondTransaction_0 = runtime.ForwardResponseMessage - - forward_Transaction_GetRawWithdrawTransaction_0 = runtime.ForwardResponseMessage -) diff --git a/www/grpc/gen/go/transaction_grpc.pb.go b/www/grpc/gen/go/transaction_grpc.pb.go deleted file mode 100644 index a561a93da..000000000 --- a/www/grpc/gen/go/transaction_grpc.pb.go +++ /dev/null @@ -1,360 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc (unknown) -// source: transaction.proto - -package pactus - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// 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.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 - -const ( - Transaction_GetTransaction_FullMethodName = "/pactus.Transaction/GetTransaction" - Transaction_CalculateFee_FullMethodName = "/pactus.Transaction/CalculateFee" - Transaction_BroadcastTransaction_FullMethodName = "/pactus.Transaction/BroadcastTransaction" - Transaction_GetRawTransferTransaction_FullMethodName = "/pactus.Transaction/GetRawTransferTransaction" - Transaction_GetRawBondTransaction_FullMethodName = "/pactus.Transaction/GetRawBondTransaction" - Transaction_GetRawUnbondTransaction_FullMethodName = "/pactus.Transaction/GetRawUnbondTransaction" - Transaction_GetRawWithdrawTransaction_FullMethodName = "/pactus.Transaction/GetRawWithdrawTransaction" -) - -// TransactionClient is the client API for Transaction 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. -// -// Transaction service defines various RPC methods for interacting with -// transactions. -type TransactionClient interface { - // GetTransaction retrieves transaction details based on the provided request - // parameters. - GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) - // CalculateFee calculates the transaction fee based on the specified amount - // and payload type. - CalculateFee(ctx context.Context, in *CalculateFeeRequest, opts ...grpc.CallOption) (*CalculateFeeResponse, error) - // BroadcastTransaction broadcasts a signed transaction to the network. - BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error) - // GetRawTransferTransaction retrieves raw details of a transfer transaction. - GetRawTransferTransaction(ctx context.Context, in *GetRawTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) - // GetRawBondTransaction retrieves raw details of a bond transaction. - GetRawBondTransaction(ctx context.Context, in *GetRawBondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) - // GetRawUnbondTransaction retrieves raw details of an unbond transaction. - GetRawUnbondTransaction(ctx context.Context, in *GetRawUnbondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) - // GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. - GetRawWithdrawTransaction(ctx context.Context, in *GetRawWithdrawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) -} - -type transactionClient struct { - cc grpc.ClientConnInterface -} - -func NewTransactionClient(cc grpc.ClientConnInterface) TransactionClient { - return &transactionClient{cc} -} - -func (c *transactionClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetTransactionResponse) - err := c.cc.Invoke(ctx, Transaction_GetTransaction_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) CalculateFee(ctx context.Context, in *CalculateFeeRequest, opts ...grpc.CallOption) (*CalculateFeeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CalculateFeeResponse) - err := c.cc.Invoke(ctx, Transaction_CalculateFee_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(BroadcastTransactionResponse) - err := c.cc.Invoke(ctx, Transaction_BroadcastTransaction_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) GetRawTransferTransaction(ctx context.Context, in *GetRawTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetRawTransactionResponse) - err := c.cc.Invoke(ctx, Transaction_GetRawTransferTransaction_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) GetRawBondTransaction(ctx context.Context, in *GetRawBondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetRawTransactionResponse) - err := c.cc.Invoke(ctx, Transaction_GetRawBondTransaction_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) GetRawUnbondTransaction(ctx context.Context, in *GetRawUnbondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetRawTransactionResponse) - err := c.cc.Invoke(ctx, Transaction_GetRawUnbondTransaction_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *transactionClient) GetRawWithdrawTransaction(ctx context.Context, in *GetRawWithdrawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetRawTransactionResponse) - err := c.cc.Invoke(ctx, Transaction_GetRawWithdrawTransaction_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TransactionServer is the server API for Transaction service. -// All implementations should embed UnimplementedTransactionServer -// for forward compatibility -// -// Transaction service defines various RPC methods for interacting with -// transactions. -type TransactionServer interface { - // GetTransaction retrieves transaction details based on the provided request - // parameters. - GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) - // CalculateFee calculates the transaction fee based on the specified amount - // and payload type. - CalculateFee(context.Context, *CalculateFeeRequest) (*CalculateFeeResponse, error) - // BroadcastTransaction broadcasts a signed transaction to the network. - BroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error) - // GetRawTransferTransaction retrieves raw details of a transfer transaction. - GetRawTransferTransaction(context.Context, *GetRawTransferTransactionRequest) (*GetRawTransactionResponse, error) - // GetRawBondTransaction retrieves raw details of a bond transaction. - GetRawBondTransaction(context.Context, *GetRawBondTransactionRequest) (*GetRawTransactionResponse, error) - // GetRawUnbondTransaction retrieves raw details of an unbond transaction. - GetRawUnbondTransaction(context.Context, *GetRawUnbondTransactionRequest) (*GetRawTransactionResponse, error) - // GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. - GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error) -} - -// UnimplementedTransactionServer should be embedded to have forward compatible implementations. -type UnimplementedTransactionServer struct { -} - -func (UnimplementedTransactionServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") -} -func (UnimplementedTransactionServer) CalculateFee(context.Context, *CalculateFeeRequest) (*CalculateFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CalculateFee not implemented") -} -func (UnimplementedTransactionServer) BroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method BroadcastTransaction not implemented") -} -func (UnimplementedTransactionServer) GetRawTransferTransaction(context.Context, *GetRawTransferTransactionRequest) (*GetRawTransactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRawTransferTransaction not implemented") -} -func (UnimplementedTransactionServer) GetRawBondTransaction(context.Context, *GetRawBondTransactionRequest) (*GetRawTransactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRawBondTransaction not implemented") -} -func (UnimplementedTransactionServer) GetRawUnbondTransaction(context.Context, *GetRawUnbondTransactionRequest) (*GetRawTransactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRawUnbondTransaction not implemented") -} -func (UnimplementedTransactionServer) GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRawWithdrawTransaction not implemented") -} - -// UnsafeTransactionServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TransactionServer will -// result in compilation errors. -type UnsafeTransactionServer interface { - mustEmbedUnimplementedTransactionServer() -} - -func RegisterTransactionServer(s grpc.ServiceRegistrar, srv TransactionServer) { - s.RegisterService(&Transaction_ServiceDesc, srv) -} - -func _Transaction_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTransactionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).GetTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Transaction_GetTransaction_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).GetTransaction(ctx, req.(*GetTransactionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_CalculateFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CalculateFeeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).CalculateFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Transaction_CalculateFee_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).CalculateFee(ctx, req.(*CalculateFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_BroadcastTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BroadcastTransactionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).BroadcastTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Transaction_BroadcastTransaction_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).BroadcastTransaction(ctx, req.(*BroadcastTransactionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_GetRawTransferTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRawTransferTransactionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).GetRawTransferTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Transaction_GetRawTransferTransaction_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).GetRawTransferTransaction(ctx, req.(*GetRawTransferTransactionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_GetRawBondTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRawBondTransactionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).GetRawBondTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Transaction_GetRawBondTransaction_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).GetRawBondTransaction(ctx, req.(*GetRawBondTransactionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_GetRawUnbondTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRawUnbondTransactionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).GetRawUnbondTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Transaction_GetRawUnbondTransaction_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).GetRawUnbondTransaction(ctx, req.(*GetRawUnbondTransactionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Transaction_GetRawWithdrawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRawWithdrawTransactionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TransactionServer).GetRawWithdrawTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Transaction_GetRawWithdrawTransaction_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TransactionServer).GetRawWithdrawTransaction(ctx, req.(*GetRawWithdrawTransactionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Transaction_ServiceDesc is the grpc.ServiceDesc for Transaction service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Transaction_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "pactus.Transaction", - HandlerType: (*TransactionServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetTransaction", - Handler: _Transaction_GetTransaction_Handler, - }, - { - MethodName: "CalculateFee", - Handler: _Transaction_CalculateFee_Handler, - }, - { - MethodName: "BroadcastTransaction", - Handler: _Transaction_BroadcastTransaction_Handler, - }, - { - MethodName: "GetRawTransferTransaction", - Handler: _Transaction_GetRawTransferTransaction_Handler, - }, - { - MethodName: "GetRawBondTransaction", - Handler: _Transaction_GetRawBondTransaction_Handler, - }, - { - MethodName: "GetRawUnbondTransaction", - Handler: _Transaction_GetRawUnbondTransaction_Handler, - }, - { - MethodName: "GetRawWithdrawTransaction", - Handler: _Transaction_GetRawWithdrawTransaction_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "transaction.proto", -} diff --git a/www/grpc/gen/go/transaction_jgw.pb.go b/www/grpc/gen/go/transaction_jgw.pb.go deleted file mode 100644 index d4eb72a48..000000000 --- a/www/grpc/gen/go/transaction_jgw.pb.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT. -// source: transaction.proto - -/* -Package pactus is a reverse proxy. - -It translates gRPC into JSON-RPC 2.0 -*/ -package pactus - -import ( - "context" - "encoding/json" - - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "google.golang.org/protobuf/encoding/protojson" -) - -type TransactionJsonRPC struct { - client TransactionClient -} - -type paramsAndHeadersTransaction struct { - Headers metadata.MD `json:"headers,omitempty"` - Params json.RawMessage `json:"params"` -} - -// RegisterTransactionJsonRPC register the grpc client Transaction for json-rpc. -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterTransactionJsonRPC(conn *grpc.ClientConn) *TransactionJsonRPC { - return &TransactionJsonRPC{ - client: NewTransactionClient(conn), - } -} - -func (s *TransactionJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) { - return map[string]func(ctx context.Context, params json.RawMessage) (any, error){ - - "pactus.transaction.get_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetTransactionRequest) - - var jrpcData paramsAndHeadersTransaction - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.transaction.calculate_fee": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(CalculateFeeRequest) - - var jrpcData paramsAndHeadersTransaction - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.CalculateFee(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.transaction.broadcast_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(BroadcastTransactionRequest) - - var jrpcData paramsAndHeadersTransaction - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.BroadcastTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.transaction.get_raw_transfer_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetRawTransferTransactionRequest) - - var jrpcData paramsAndHeadersTransaction - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetRawTransferTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.transaction.get_raw_bond_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetRawBondTransactionRequest) - - var jrpcData paramsAndHeadersTransaction - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetRawBondTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.transaction.get_raw_unbond_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetRawUnbondTransactionRequest) - - var jrpcData paramsAndHeadersTransaction - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetRawUnbondTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.transaction.get_raw_withdraw_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetRawWithdrawTransactionRequest) - - var jrpcData paramsAndHeadersTransaction - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetRawWithdrawTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - } -} diff --git a/www/grpc/gen/go/utils.cobra.pb.go b/www/grpc/gen/go/utils.cobra.pb.go deleted file mode 100644 index bfda94e23..000000000 --- a/www/grpc/gen/go/utils.cobra.pb.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by protoc-gen-cobra. DO NOT EDIT. - -package pactus - -import ( - client "github.com/NathanBaulch/protoc-gen-cobra/client" - flag "github.com/NathanBaulch/protoc-gen-cobra/flag" - iocodec "github.com/NathanBaulch/protoc-gen-cobra/iocodec" - cobra "github.com/spf13/cobra" - grpc "google.golang.org/grpc" - proto "google.golang.org/protobuf/proto" -) - -func UtilsClientCommand(options ...client.Option) *cobra.Command { - cfg := client.NewConfig(options...) - cmd := &cobra.Command{ - Use: cfg.CommandNamer("Utils"), - Short: "Utils service client", - Long: "Utils service defines RPC methods for utility functions such as message\n signing and verification.", - } - cfg.BindFlags(cmd.PersistentFlags()) - cmd.AddCommand( - _UtilsSignMessageWithPrivateKeyCommand(cfg), - _UtilsVerifyMessageCommand(cfg), - ) - return cmd -} - -func _UtilsSignMessageWithPrivateKeyCommand(cfg *client.Config) *cobra.Command { - req := &SignMessageWithPrivateKeyRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("SignMessageWithPrivateKey"), - Short: "SignMessageWithPrivateKey RPC client", - Long: "SignMessageWithPrivateKey sign message with provided private key.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Utils"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Utils", "SignMessageWithPrivateKey"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewUtilsClient(cc) - v := &SignMessageWithPrivateKeyRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.SignMessageWithPrivateKey(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.PrivateKey, cfg.FlagNamer("PrivateKey"), "", "The private key to sign the message.") - cmd.PersistentFlags().StringVar(&req.Message, cfg.FlagNamer("Message"), "", "The message to sign.") - - return cmd -} - -func _UtilsVerifyMessageCommand(cfg *client.Config) *cobra.Command { - req := &VerifyMessageRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("VerifyMessage"), - Short: "VerifyMessage RPC client", - Long: "VerifyMessage verify signature with public key and message", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Utils"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Utils", "VerifyMessage"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewUtilsClient(cc) - v := &VerifyMessageRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.VerifyMessage(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.Message, cfg.FlagNamer("Message"), "", "The signed message.") - cmd.PersistentFlags().StringVar(&req.Signature, cfg.FlagNamer("Signature"), "", "The signature of the message.") - cmd.PersistentFlags().StringVar(&req.PublicKey, cfg.FlagNamer("PublicKey"), "", "The public key of the signer.") - - return cmd -} diff --git a/www/grpc/gen/go/utils.pb.go b/www/grpc/gen/go/utils.pb.go deleted file mode 100644 index 4f38cd6b0..000000000 --- a/www/grpc/gen/go/utils.pb.go +++ /dev/null @@ -1,394 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc (unknown) -// source: utils.proto - -package pactus - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Request message for sign message with private key. -type SignMessageWithPrivateKeyRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The private key to sign the message. - PrivateKey string `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` - // The message to sign. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *SignMessageWithPrivateKeyRequest) Reset() { - *x = SignMessageWithPrivateKeyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_utils_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignMessageWithPrivateKeyRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignMessageWithPrivateKeyRequest) ProtoMessage() {} - -func (x *SignMessageWithPrivateKeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_utils_proto_msgTypes[0] - 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 SignMessageWithPrivateKeyRequest.ProtoReflect.Descriptor instead. -func (*SignMessageWithPrivateKeyRequest) Descriptor() ([]byte, []int) { - return file_utils_proto_rawDescGZIP(), []int{0} -} - -func (x *SignMessageWithPrivateKeyRequest) GetPrivateKey() string { - if x != nil { - return x.PrivateKey - } - return "" -} - -func (x *SignMessageWithPrivateKeyRequest) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -// Response message containing the generated signature. -type SignMessageWithPrivateKeyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The signature of the message. - Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SignMessageWithPrivateKeyResponse) Reset() { - *x = SignMessageWithPrivateKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_utils_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignMessageWithPrivateKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignMessageWithPrivateKeyResponse) ProtoMessage() {} - -func (x *SignMessageWithPrivateKeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_utils_proto_msgTypes[1] - 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 SignMessageWithPrivateKeyResponse.ProtoReflect.Descriptor instead. -func (*SignMessageWithPrivateKeyResponse) Descriptor() ([]byte, []int) { - return file_utils_proto_rawDescGZIP(), []int{1} -} - -func (x *SignMessageWithPrivateKeyResponse) GetSignature() string { - if x != nil { - return x.Signature - } - return "" -} - -// Request message for verifying a message signature. -type VerifyMessageRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The signed message. - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` - // The signature of the message. - Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` - // The public key of the signer. - PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` -} - -func (x *VerifyMessageRequest) Reset() { - *x = VerifyMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_utils_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyMessageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyMessageRequest) ProtoMessage() {} - -func (x *VerifyMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_utils_proto_msgTypes[2] - 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 VerifyMessageRequest.ProtoReflect.Descriptor instead. -func (*VerifyMessageRequest) Descriptor() ([]byte, []int) { - return file_utils_proto_rawDescGZIP(), []int{2} -} - -func (x *VerifyMessageRequest) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *VerifyMessageRequest) GetSignature() string { - if x != nil { - return x.Signature - } - return "" -} - -func (x *VerifyMessageRequest) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -// Response message containing the resualt of validation of signature and message. -type VerifyMessageResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Indicates if the signature is valid (true) or not (false). - IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` -} - -func (x *VerifyMessageResponse) Reset() { - *x = VerifyMessageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_utils_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyMessageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyMessageResponse) ProtoMessage() {} - -func (x *VerifyMessageResponse) ProtoReflect() protoreflect.Message { - mi := &file_utils_proto_msgTypes[3] - 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 VerifyMessageResponse.ProtoReflect.Descriptor instead. -func (*VerifyMessageResponse) Descriptor() ([]byte, []int) { - return file_utils_proto_rawDescGZIP(), []int{3} -} - -func (x *VerifyMessageResponse) GetIsValid() bool { - if x != nil { - return x.IsValid - } - return false -} - -var File_utils_proto protoreflect.FileDescriptor - -var file_utils_proto_rawDesc = []byte{ - 0x0a, 0x0b, 0x75, 0x74, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x22, 0x5d, 0x0a, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x22, 0x41, 0x0a, 0x21, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x6d, 0x0a, 0x14, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x32, 0x0a, 0x15, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x32, 0xc7, 0x01, 0x0a, 0x05, 0x55, - 0x74, 0x69, 0x6c, 0x73, 0x12, 0x70, 0x0a, 0x19, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x40, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x75, - 0x74, 0x69, 0x6c, 0x73, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_utils_proto_rawDescOnce sync.Once - file_utils_proto_rawDescData = file_utils_proto_rawDesc -) - -func file_utils_proto_rawDescGZIP() []byte { - file_utils_proto_rawDescOnce.Do(func() { - file_utils_proto_rawDescData = protoimpl.X.CompressGZIP(file_utils_proto_rawDescData) - }) - return file_utils_proto_rawDescData -} - -var file_utils_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_utils_proto_goTypes = []any{ - (*SignMessageWithPrivateKeyRequest)(nil), // 0: pactus.SignMessageWithPrivateKeyRequest - (*SignMessageWithPrivateKeyResponse)(nil), // 1: pactus.SignMessageWithPrivateKeyResponse - (*VerifyMessageRequest)(nil), // 2: pactus.VerifyMessageRequest - (*VerifyMessageResponse)(nil), // 3: pactus.VerifyMessageResponse -} -var file_utils_proto_depIdxs = []int32{ - 0, // 0: pactus.Utils.SignMessageWithPrivateKey:input_type -> pactus.SignMessageWithPrivateKeyRequest - 2, // 1: pactus.Utils.VerifyMessage:input_type -> pactus.VerifyMessageRequest - 1, // 2: pactus.Utils.SignMessageWithPrivateKey:output_type -> pactus.SignMessageWithPrivateKeyResponse - 3, // 3: pactus.Utils.VerifyMessage:output_type -> pactus.VerifyMessageResponse - 2, // [2:4] is the sub-list for method output_type - 0, // [0:2] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_utils_proto_init() } -func file_utils_proto_init() { - if File_utils_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_utils_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SignMessageWithPrivateKeyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_utils_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*SignMessageWithPrivateKeyResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_utils_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*VerifyMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_utils_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*VerifyMessageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_utils_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_utils_proto_goTypes, - DependencyIndexes: file_utils_proto_depIdxs, - MessageInfos: file_utils_proto_msgTypes, - }.Build() - File_utils_proto = out.File - file_utils_proto_rawDesc = nil - file_utils_proto_goTypes = nil - file_utils_proto_depIdxs = nil -} diff --git a/www/grpc/gen/go/utils.pb.gw.go b/www/grpc/gen/go/utils.pb.gw.go deleted file mode 100644 index b39071861..000000000 --- a/www/grpc/gen/go/utils.pb.gw.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: utils.proto - -/* -Package pactus is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pactus - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -var ( - filter_Utils_SignMessageWithPrivateKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Utils_SignMessageWithPrivateKey_0(ctx context.Context, marshaler runtime.Marshaler, client UtilsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SignMessageWithPrivateKeyRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Utils_SignMessageWithPrivateKey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.SignMessageWithPrivateKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Utils_SignMessageWithPrivateKey_0(ctx context.Context, marshaler runtime.Marshaler, server UtilsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SignMessageWithPrivateKeyRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Utils_SignMessageWithPrivateKey_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.SignMessageWithPrivateKey(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Utils_VerifyMessage_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Utils_VerifyMessage_0(ctx context.Context, marshaler runtime.Marshaler, client UtilsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq VerifyMessageRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Utils_VerifyMessage_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.VerifyMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Utils_VerifyMessage_0(ctx context.Context, marshaler runtime.Marshaler, server UtilsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq VerifyMessageRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Utils_VerifyMessage_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.VerifyMessage(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterUtilsHandlerServer registers the http handlers for service Utils to "mux". -// UnaryRPC :call UtilsServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUtilsHandlerFromEndpoint instead. -func RegisterUtilsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UtilsServer) error { - - mux.Handle("GET", pattern_Utils_SignMessageWithPrivateKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Utils/SignMessageWithPrivateKey", runtime.WithHTTPPathPattern("/pactus/Utils/sign_message_with_private_key")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Utils_SignMessageWithPrivateKey_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Utils_SignMessageWithPrivateKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Utils_VerifyMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Utils/VerifyMessage", runtime.WithHTTPPathPattern("/pactus/Utils/verify_message")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Utils_VerifyMessage_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Utils_VerifyMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterUtilsHandlerFromEndpoint is same as RegisterUtilsHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterUtilsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterUtilsHandler(ctx, mux, conn) -} - -// RegisterUtilsHandler registers the http handlers for service Utils to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterUtilsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterUtilsHandlerClient(ctx, mux, NewUtilsClient(conn)) -} - -// RegisterUtilsHandlerClient registers the http handlers for service Utils -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UtilsClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UtilsClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "UtilsClient" to call the correct interceptors. -func RegisterUtilsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UtilsClient) error { - - mux.Handle("GET", pattern_Utils_SignMessageWithPrivateKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Utils/SignMessageWithPrivateKey", runtime.WithHTTPPathPattern("/pactus/Utils/sign_message_with_private_key")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Utils_SignMessageWithPrivateKey_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Utils_SignMessageWithPrivateKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Utils_VerifyMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Utils/VerifyMessage", runtime.WithHTTPPathPattern("/pactus/Utils/verify_message")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Utils_VerifyMessage_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Utils_VerifyMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Utils_SignMessageWithPrivateKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "Utils", "sign_message_with_private_key"}, "")) - - pattern_Utils_VerifyMessage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "Utils", "verify_message"}, "")) -) - -var ( - forward_Utils_SignMessageWithPrivateKey_0 = runtime.ForwardResponseMessage - - forward_Utils_VerifyMessage_0 = runtime.ForwardResponseMessage -) diff --git a/www/grpc/gen/go/utils_grpc.pb.go b/www/grpc/gen/go/utils_grpc.pb.go deleted file mode 100644 index 623487c1a..000000000 --- a/www/grpc/gen/go/utils_grpc.pb.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc (unknown) -// source: utils.proto - -package pactus - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// 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.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 - -const ( - Utils_SignMessageWithPrivateKey_FullMethodName = "/pactus.Utils/SignMessageWithPrivateKey" - Utils_VerifyMessage_FullMethodName = "/pactus.Utils/VerifyMessage" -) - -// UtilsClient is the client API for Utils 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. -// -// Utils service defines RPC methods for utility functions such as message -// signing and verification. -type UtilsClient interface { - // SignMessageWithPrivateKey sign message with provided private key. - SignMessageWithPrivateKey(ctx context.Context, in *SignMessageWithPrivateKeyRequest, opts ...grpc.CallOption) (*SignMessageWithPrivateKeyResponse, error) - // VerifyMessage verify signature with public key and message - VerifyMessage(ctx context.Context, in *VerifyMessageRequest, opts ...grpc.CallOption) (*VerifyMessageResponse, error) -} - -type utilsClient struct { - cc grpc.ClientConnInterface -} - -func NewUtilsClient(cc grpc.ClientConnInterface) UtilsClient { - return &utilsClient{cc} -} - -func (c *utilsClient) SignMessageWithPrivateKey(ctx context.Context, in *SignMessageWithPrivateKeyRequest, opts ...grpc.CallOption) (*SignMessageWithPrivateKeyResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SignMessageWithPrivateKeyResponse) - err := c.cc.Invoke(ctx, Utils_SignMessageWithPrivateKey_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *utilsClient) VerifyMessage(ctx context.Context, in *VerifyMessageRequest, opts ...grpc.CallOption) (*VerifyMessageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(VerifyMessageResponse) - err := c.cc.Invoke(ctx, Utils_VerifyMessage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// UtilsServer is the server API for Utils service. -// All implementations should embed UnimplementedUtilsServer -// for forward compatibility -// -// Utils service defines RPC methods for utility functions such as message -// signing and verification. -type UtilsServer interface { - // SignMessageWithPrivateKey sign message with provided private key. - SignMessageWithPrivateKey(context.Context, *SignMessageWithPrivateKeyRequest) (*SignMessageWithPrivateKeyResponse, error) - // VerifyMessage verify signature with public key and message - VerifyMessage(context.Context, *VerifyMessageRequest) (*VerifyMessageResponse, error) -} - -// UnimplementedUtilsServer should be embedded to have forward compatible implementations. -type UnimplementedUtilsServer struct { -} - -func (UnimplementedUtilsServer) SignMessageWithPrivateKey(context.Context, *SignMessageWithPrivateKeyRequest) (*SignMessageWithPrivateKeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignMessageWithPrivateKey not implemented") -} -func (UnimplementedUtilsServer) VerifyMessage(context.Context, *VerifyMessageRequest) (*VerifyMessageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VerifyMessage not implemented") -} - -// UnsafeUtilsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to UtilsServer will -// result in compilation errors. -type UnsafeUtilsServer interface { - mustEmbedUnimplementedUtilsServer() -} - -func RegisterUtilsServer(s grpc.ServiceRegistrar, srv UtilsServer) { - s.RegisterService(&Utils_ServiceDesc, srv) -} - -func _Utils_SignMessageWithPrivateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignMessageWithPrivateKeyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UtilsServer).SignMessageWithPrivateKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Utils_SignMessageWithPrivateKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UtilsServer).SignMessageWithPrivateKey(ctx, req.(*SignMessageWithPrivateKeyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Utils_VerifyMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VerifyMessageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UtilsServer).VerifyMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Utils_VerifyMessage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UtilsServer).VerifyMessage(ctx, req.(*VerifyMessageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Utils_ServiceDesc is the grpc.ServiceDesc for Utils service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Utils_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "pactus.Utils", - HandlerType: (*UtilsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SignMessageWithPrivateKey", - Handler: _Utils_SignMessageWithPrivateKey_Handler, - }, - { - MethodName: "VerifyMessage", - Handler: _Utils_VerifyMessage_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "utils.proto", -} diff --git a/www/grpc/gen/go/utils_jgw.pb.go b/www/grpc/gen/go/utils_jgw.pb.go deleted file mode 100644 index 5ac60b199..000000000 --- a/www/grpc/gen/go/utils_jgw.pb.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT. -// source: utils.proto - -/* -Package pactus is a reverse proxy. - -It translates gRPC into JSON-RPC 2.0 -*/ -package pactus - -import ( - "context" - "encoding/json" - - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "google.golang.org/protobuf/encoding/protojson" -) - -type UtilsJsonRPC struct { - client UtilsClient -} - -type paramsAndHeadersUtils struct { - Headers metadata.MD `json:"headers,omitempty"` - Params json.RawMessage `json:"params"` -} - -// RegisterUtilsJsonRPC register the grpc client Utils for json-rpc. -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterUtilsJsonRPC(conn *grpc.ClientConn) *UtilsJsonRPC { - return &UtilsJsonRPC{ - client: NewUtilsClient(conn), - } -} - -func (s *UtilsJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) { - return map[string]func(ctx context.Context, params json.RawMessage) (any, error){ - - "pactus.utils.sign_message_with_private_key": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(SignMessageWithPrivateKeyRequest) - - var jrpcData paramsAndHeadersUtils - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.SignMessageWithPrivateKey(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.utils.verify_message": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(VerifyMessageRequest) - - var jrpcData paramsAndHeadersUtils - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.VerifyMessage(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - } -} diff --git a/www/grpc/gen/go/wallet.cobra.pb.go b/www/grpc/gen/go/wallet.cobra.pb.go deleted file mode 100644 index 82df0534d..000000000 --- a/www/grpc/gen/go/wallet.cobra.pb.go +++ /dev/null @@ -1,467 +0,0 @@ -// Code generated by protoc-gen-cobra. DO NOT EDIT. - -package pactus - -import ( - client "github.com/NathanBaulch/protoc-gen-cobra/client" - flag "github.com/NathanBaulch/protoc-gen-cobra/flag" - iocodec "github.com/NathanBaulch/protoc-gen-cobra/iocodec" - cobra "github.com/spf13/cobra" - grpc "google.golang.org/grpc" - proto "google.golang.org/protobuf/proto" -) - -func WalletClientCommand(options ...client.Option) *cobra.Command { - cfg := client.NewConfig(options...) - cmd := &cobra.Command{ - Use: cfg.CommandNamer("Wallet"), - Short: "Wallet service client", - Long: "Define the Wallet service with various RPC methods for wallet management.", - } - cfg.BindFlags(cmd.PersistentFlags()) - cmd.AddCommand( - _WalletCreateWalletCommand(cfg), - _WalletRestoreWalletCommand(cfg), - _WalletLoadWalletCommand(cfg), - _WalletUnloadWalletCommand(cfg), - _WalletGetTotalBalanceCommand(cfg), - _WalletSignRawTransactionCommand(cfg), - _WalletGetValidatorAddressCommand(cfg), - _WalletGetNewAddressCommand(cfg), - _WalletGetAddressHistoryCommand(cfg), - _WalletSignMessageCommand(cfg), - ) - return cmd -} - -func _WalletCreateWalletCommand(cfg *client.Config) *cobra.Command { - req := &CreateWalletRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("CreateWallet"), - Short: "CreateWallet RPC client", - Long: "CreateWallet creates a new wallet with the specified parameters.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "CreateWallet"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewWalletClient(cc) - v := &CreateWalletRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.CreateWallet(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the new wallet.") - cmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer("Password"), "", "The password for securing the wallet.") - - return cmd -} - -func _WalletRestoreWalletCommand(cfg *client.Config) *cobra.Command { - req := &RestoreWalletRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("RestoreWallet"), - Short: "RestoreWallet RPC client", - Long: "RestoreWallet restores an existing wallet with the given mnemonic.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "RestoreWallet"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewWalletClient(cc) - v := &RestoreWalletRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.RestoreWallet(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet to restore.") - cmd.PersistentFlags().StringVar(&req.Mnemonic, cfg.FlagNamer("Mnemonic"), "", "The mnemonic for wallet recovery.") - cmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer("Password"), "", "The password for securing the wallet.") - - return cmd -} - -func _WalletLoadWalletCommand(cfg *client.Config) *cobra.Command { - req := &LoadWalletRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("LoadWallet"), - Short: "LoadWallet RPC client", - Long: "LoadWallet loads an existing wallet with the given name.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "LoadWallet"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewWalletClient(cc) - v := &LoadWalletRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.LoadWallet(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet to load.") - - return cmd -} - -func _WalletUnloadWalletCommand(cfg *client.Config) *cobra.Command { - req := &UnloadWalletRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("UnloadWallet"), - Short: "UnloadWallet RPC client", - Long: "UnloadWallet unloads a currently loaded wallet with the specified name.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "UnloadWallet"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewWalletClient(cc) - v := &UnloadWalletRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.UnloadWallet(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet to unload.") - - return cmd -} - -func _WalletGetTotalBalanceCommand(cfg *client.Config) *cobra.Command { - req := &GetTotalBalanceRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetTotalBalance"), - Short: "GetTotalBalance RPC client", - Long: "GetTotalBalance returns the total available balance of the wallet.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "GetTotalBalance"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewWalletClient(cc) - v := &GetTotalBalanceRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetTotalBalance(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet to get the total balance.") - - return cmd -} - -func _WalletSignRawTransactionCommand(cfg *client.Config) *cobra.Command { - req := &SignRawTransactionRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("SignRawTransaction"), - Short: "SignRawTransaction RPC client", - Long: "SignRawTransaction signs a raw transaction for a specified wallet.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "SignRawTransaction"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewWalletClient(cc) - v := &SignRawTransactionRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.SignRawTransaction(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet used for signing.") - cmd.PersistentFlags().StringVar(&req.RawTransaction, cfg.FlagNamer("RawTransaction"), "", "The raw transaction data to be signed.") - cmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer("Password"), "", "The password for unlocking the wallet for signing.") - - return cmd -} - -func _WalletGetValidatorAddressCommand(cfg *client.Config) *cobra.Command { - req := &GetValidatorAddressRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetValidatorAddress"), - Short: "GetValidatorAddress RPC client", - Long: "GetValidatorAddress retrieves the validator address associated with a\n public key.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "GetValidatorAddress"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewWalletClient(cc) - v := &GetValidatorAddressRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetValidatorAddress(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.PublicKey, cfg.FlagNamer("PublicKey"), "", "The public key for which the validator address is requested.") - - return cmd -} - -func _WalletGetNewAddressCommand(cfg *client.Config) *cobra.Command { - req := &GetNewAddressRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetNewAddress"), - Short: "GetNewAddress RPC client", - Long: "GetNewAddress generates a new address for the specified wallet.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "GetNewAddress"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewWalletClient(cc) - v := &GetNewAddressRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetNewAddress(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet to generate a new address.") - flag.EnumVar(cmd.PersistentFlags(), &req.AddressType, cfg.FlagNamer("AddressType"), "The type of address to generate.") - cmd.PersistentFlags().StringVar(&req.Label, cfg.FlagNamer("Label"), "", "A label for the new address.") - cmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer("Password"), "", "Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.") - - return cmd -} - -func _WalletGetAddressHistoryCommand(cfg *client.Config) *cobra.Command { - req := &GetAddressHistoryRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("GetAddressHistory"), - Short: "GetAddressHistory RPC client", - Long: "GetAddressHistory retrieves the transaction history of an address.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "GetAddressHistory"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewWalletClient(cc) - v := &GetAddressHistoryRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.GetAddressHistory(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet.") - cmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer("Address"), "", "The address to retrieve the transaction history for.") - - return cmd -} - -func _WalletSignMessageCommand(cfg *client.Config) *cobra.Command { - req := &SignMessageRequest{} - - cmd := &cobra.Command{ - Use: cfg.CommandNamer("SignMessage"), - Short: "SignMessage RPC client", - Long: "SignMessage signs an arbitrary message.", - RunE: func(cmd *cobra.Command, args []string) error { - if cfg.UseEnvVars { - if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { - return err - } - if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "SignMessage"); err != nil { - return err - } - } - return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { - cli := NewWalletClient(cc) - v := &SignMessageRequest{} - - if err := in(v); err != nil { - return err - } - proto.Merge(v, req) - - res, err := cli.SignMessage(cmd.Context(), v) - - if err != nil { - return err - } - - return out(res) - - }) - }, - } - - cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet.") - cmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer("Password"), "", "The password for unlocking the wallet for signing.") - cmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer("Address"), "", "The account address associated with the private key.") - cmd.PersistentFlags().StringVar(&req.Message, cfg.FlagNamer("Message"), "", "The arbitrary message to be signed.") - - return cmd -} diff --git a/www/grpc/gen/go/wallet.pb.go b/www/grpc/gen/go/wallet.pb.go deleted file mode 100644 index b57a7a9c6..000000000 --- a/www/grpc/gen/go/wallet.pb.go +++ /dev/null @@ -1,1919 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc (unknown) -// source: wallet.proto - -// Define the package and Go package path for the generated code. - -package pactus - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Enum for the address type. -type AddressType int32 - -const ( - // Treasury address type. - // Should not be used to generate new addresses. - AddressType_ADDRESS_TYPE_TREASURY AddressType = 0 - // Validator address type. - AddressType_ADDRESS_TYPE_VALIDATOR AddressType = 1 - // Account address type with BLS signature scheme. - AddressType_ADDRESS_TYPE_BLS_ACCOUNT AddressType = 2 - // Account address type with Ed25519 signature scheme. - // Note: Generating a new Ed25519 address requires the wallet password. - AddressType_ADDRESS_TYPE_ED25519_ACCOUNT AddressType = 3 -) - -// Enum value maps for AddressType. -var ( - AddressType_name = map[int32]string{ - 0: "ADDRESS_TYPE_TREASURY", - 1: "ADDRESS_TYPE_VALIDATOR", - 2: "ADDRESS_TYPE_BLS_ACCOUNT", - 3: "ADDRESS_TYPE_ED25519_ACCOUNT", - } - AddressType_value = map[string]int32{ - "ADDRESS_TYPE_TREASURY": 0, - "ADDRESS_TYPE_VALIDATOR": 1, - "ADDRESS_TYPE_BLS_ACCOUNT": 2, - "ADDRESS_TYPE_ED25519_ACCOUNT": 3, - } -) - -func (x AddressType) Enum() *AddressType { - p := new(AddressType) - *p = x - return p -} - -func (x AddressType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AddressType) Descriptor() protoreflect.EnumDescriptor { - return file_wallet_proto_enumTypes[0].Descriptor() -} - -func (AddressType) Type() protoreflect.EnumType { - return &file_wallet_proto_enumTypes[0] -} - -func (x AddressType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AddressType.Descriptor instead. -func (AddressType) EnumDescriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{0} -} - -// Message containing address information. -type AddressInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address string. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // The public key associated with the address. - PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // A label associated with the address. - Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` - // The Hierarchical Deterministic path of the address within the wallet. - Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *AddressInfo) Reset() { - *x = AddressInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddressInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddressInfo) ProtoMessage() {} - -func (x *AddressInfo) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[0] - 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 AddressInfo.ProtoReflect.Descriptor instead. -func (*AddressInfo) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{0} -} - -func (x *AddressInfo) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *AddressInfo) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *AddressInfo) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *AddressInfo) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -// Message containing transaction history information for an address. -type HistoryInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The transaction ID hash. - TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` - // The timestamp of the transaction. - Time uint32 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` - // The payload type of the transaction. - PayloadType string `protobuf:"bytes,3,opt,name=payload_type,json=payloadType,proto3" json:"payload_type,omitempty"` - // A description of the transaction. - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - // The amount involved in the transaction. - Amount int64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *HistoryInfo) Reset() { - *x = HistoryInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HistoryInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HistoryInfo) ProtoMessage() {} - -func (x *HistoryInfo) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[1] - 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 HistoryInfo.ProtoReflect.Descriptor instead. -func (*HistoryInfo) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{1} -} - -func (x *HistoryInfo) GetTransactionId() string { - if x != nil { - return x.TransactionId - } - return "" -} - -func (x *HistoryInfo) GetTime() uint32 { - if x != nil { - return x.Time - } - return 0 -} - -func (x *HistoryInfo) GetPayloadType() string { - if x != nil { - return x.PayloadType - } - return "" -} - -func (x *HistoryInfo) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *HistoryInfo) GetAmount() int64 { - if x != nil { - return x.Amount - } - return 0 -} - -// Request message to get an address transaction history. -type GetAddressHistoryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the wallet. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` - // The address to retrieve the transaction history for. - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *GetAddressHistoryRequest) Reset() { - *x = GetAddressHistoryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAddressHistoryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAddressHistoryRequest) ProtoMessage() {} - -func (x *GetAddressHistoryRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[2] - 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 GetAddressHistoryRequest.ProtoReflect.Descriptor instead. -func (*GetAddressHistoryRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{2} -} - -func (x *GetAddressHistoryRequest) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -func (x *GetAddressHistoryRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// Response message containing the address transaction history. -type GetAddressHistoryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Array of history information for the address. - HistoryInfo []*HistoryInfo `protobuf:"bytes,1,rep,name=history_info,json=historyInfo,proto3" json:"history_info,omitempty"` -} - -func (x *GetAddressHistoryResponse) Reset() { - *x = GetAddressHistoryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAddressHistoryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAddressHistoryResponse) ProtoMessage() {} - -func (x *GetAddressHistoryResponse) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[3] - 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 GetAddressHistoryResponse.ProtoReflect.Descriptor instead. -func (*GetAddressHistoryResponse) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{3} -} - -func (x *GetAddressHistoryResponse) GetHistoryInfo() []*HistoryInfo { - if x != nil { - return x.HistoryInfo - } - return nil -} - -// Request message for generating a new address. -type GetNewAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the wallet to generate a new address. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` - // The type of address to generate. - AddressType AddressType `protobuf:"varint,2,opt,name=address_type,json=addressType,proto3,enum=pactus.AddressType" json:"address_type,omitempty"` - // A label for the new address. - Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` - // Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` -} - -func (x *GetNewAddressRequest) Reset() { - *x = GetNewAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNewAddressRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNewAddressRequest) ProtoMessage() {} - -func (x *GetNewAddressRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[4] - 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 GetNewAddressRequest.ProtoReflect.Descriptor instead. -func (*GetNewAddressRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{4} -} - -func (x *GetNewAddressRequest) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -func (x *GetNewAddressRequest) GetAddressType() AddressType { - if x != nil { - return x.AddressType - } - return AddressType_ADDRESS_TYPE_TREASURY -} - -func (x *GetNewAddressRequest) GetLabel() string { - if x != nil { - return x.Label - } - return "" -} - -func (x *GetNewAddressRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -// Response message containing the newly generated address. -type GetNewAddressResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the wallet from which the address is generated. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` - // Information about the newly generated address. - AddressInfo *AddressInfo `protobuf:"bytes,2,opt,name=address_info,json=addressInfo,proto3" json:"address_info,omitempty"` -} - -func (x *GetNewAddressResponse) Reset() { - *x = GetNewAddressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNewAddressResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNewAddressResponse) ProtoMessage() {} - -func (x *GetNewAddressResponse) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[5] - 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 GetNewAddressResponse.ProtoReflect.Descriptor instead. -func (*GetNewAddressResponse) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{5} -} - -func (x *GetNewAddressResponse) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -func (x *GetNewAddressResponse) GetAddressInfo() *AddressInfo { - if x != nil { - return x.AddressInfo - } - return nil -} - -// Request message for restoring an existing wallet. -type RestoreWalletRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the wallet to restore. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` - // The mnemonic for wallet recovery. - Mnemonic string `protobuf:"bytes,2,opt,name=mnemonic,proto3" json:"mnemonic,omitempty"` - // The password for securing the wallet. - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` -} - -func (x *RestoreWalletRequest) Reset() { - *x = RestoreWalletRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RestoreWalletRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RestoreWalletRequest) ProtoMessage() {} - -func (x *RestoreWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[6] - 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 RestoreWalletRequest.ProtoReflect.Descriptor instead. -func (*RestoreWalletRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{6} -} - -func (x *RestoreWalletRequest) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -func (x *RestoreWalletRequest) GetMnemonic() string { - if x != nil { - return x.Mnemonic - } - return "" -} - -func (x *RestoreWalletRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -// Response message containing the name of the restored wallet. -type RestoreWalletResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the restored wallet. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` -} - -func (x *RestoreWalletResponse) Reset() { - *x = RestoreWalletResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RestoreWalletResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RestoreWalletResponse) ProtoMessage() {} - -func (x *RestoreWalletResponse) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[7] - 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 RestoreWalletResponse.ProtoReflect.Descriptor instead. -func (*RestoreWalletResponse) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{7} -} - -func (x *RestoreWalletResponse) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -// Request message for creating a new wallet. -type CreateWalletRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the new wallet. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` - // The password for securing the wallet. - Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` -} - -func (x *CreateWalletRequest) Reset() { - *x = CreateWalletRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateWalletRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWalletRequest) ProtoMessage() {} - -func (x *CreateWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[8] - 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 CreateWalletRequest.ProtoReflect.Descriptor instead. -func (*CreateWalletRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{8} -} - -func (x *CreateWalletRequest) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -func (x *CreateWalletRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -// Response message containing the mnemonic for wallet recovery. -type CreateWalletResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The mnemonic for wallet recovery. - Mnemonic string `protobuf:"bytes,2,opt,name=mnemonic,proto3" json:"mnemonic,omitempty"` -} - -func (x *CreateWalletResponse) Reset() { - *x = CreateWalletResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateWalletResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateWalletResponse) ProtoMessage() {} - -func (x *CreateWalletResponse) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[9] - 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 CreateWalletResponse.ProtoReflect.Descriptor instead. -func (*CreateWalletResponse) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{9} -} - -func (x *CreateWalletResponse) GetMnemonic() string { - if x != nil { - return x.Mnemonic - } - return "" -} - -// Request message for loading an existing wallet. -type LoadWalletRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the wallet to load. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` -} - -func (x *LoadWalletRequest) Reset() { - *x = LoadWalletRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadWalletRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadWalletRequest) ProtoMessage() {} - -func (x *LoadWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[10] - 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 LoadWalletRequest.ProtoReflect.Descriptor instead. -func (*LoadWalletRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{10} -} - -func (x *LoadWalletRequest) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -// Response message containing the name of the loaded wallet. -type LoadWalletResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the loaded wallet. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` -} - -func (x *LoadWalletResponse) Reset() { - *x = LoadWalletResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LoadWalletResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LoadWalletResponse) ProtoMessage() {} - -func (x *LoadWalletResponse) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[11] - 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 LoadWalletResponse.ProtoReflect.Descriptor instead. -func (*LoadWalletResponse) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{11} -} - -func (x *LoadWalletResponse) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -// Request message for unloading a currently loaded wallet. -type UnloadWalletRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the wallet to unload. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` -} - -func (x *UnloadWalletRequest) Reset() { - *x = UnloadWalletRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnloadWalletRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnloadWalletRequest) ProtoMessage() {} - -func (x *UnloadWalletRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[12] - 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 UnloadWalletRequest.ProtoReflect.Descriptor instead. -func (*UnloadWalletRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{12} -} - -func (x *UnloadWalletRequest) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -// Response message containing the name of the unloaded wallet. -type UnloadWalletResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the unloaded wallet. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` -} - -func (x *UnloadWalletResponse) Reset() { - *x = UnloadWalletResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnloadWalletResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnloadWalletResponse) ProtoMessage() {} - -func (x *UnloadWalletResponse) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[13] - 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 UnloadWalletResponse.ProtoReflect.Descriptor instead. -func (*UnloadWalletResponse) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{13} -} - -func (x *UnloadWalletResponse) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -// Request message for obtaining the validator address associated with a public -// key. -type GetValidatorAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The public key for which the validator address is requested. - PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` -} - -func (x *GetValidatorAddressRequest) Reset() { - *x = GetValidatorAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorAddressRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorAddressRequest) ProtoMessage() {} - -func (x *GetValidatorAddressRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[14] - 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 GetValidatorAddressRequest.ProtoReflect.Descriptor instead. -func (*GetValidatorAddressRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{14} -} - -func (x *GetValidatorAddressRequest) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -// Response message containing the validator address corresponding to a public -// key. -type GetValidatorAddressResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The validator address associated with the public key. - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *GetValidatorAddressResponse) Reset() { - *x = GetValidatorAddressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetValidatorAddressResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetValidatorAddressResponse) ProtoMessage() {} - -func (x *GetValidatorAddressResponse) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[15] - 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 GetValidatorAddressResponse.ProtoReflect.Descriptor instead. -func (*GetValidatorAddressResponse) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{15} -} - -func (x *GetValidatorAddressResponse) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -// Request message for signing a raw transaction. -type SignRawTransactionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the wallet used for signing. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` - // The raw transaction data to be signed. - RawTransaction string `protobuf:"bytes,2,opt,name=raw_transaction,json=rawTransaction,proto3" json:"raw_transaction,omitempty"` - // The password for unlocking the wallet for signing. - Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` -} - -func (x *SignRawTransactionRequest) Reset() { - *x = SignRawTransactionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignRawTransactionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignRawTransactionRequest) ProtoMessage() {} - -func (x *SignRawTransactionRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[16] - 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 SignRawTransactionRequest.ProtoReflect.Descriptor instead. -func (*SignRawTransactionRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{16} -} - -func (x *SignRawTransactionRequest) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -func (x *SignRawTransactionRequest) GetRawTransaction() string { - if x != nil { - return x.RawTransaction - } - return "" -} - -func (x *SignRawTransactionRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -// Response message containing the transaction ID and signed raw transaction. -type SignRawTransactionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The ID of the signed transaction. - TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` - // The signed raw transaction data. - SignedRawTransaction string `protobuf:"bytes,2,opt,name=signed_raw_transaction,json=signedRawTransaction,proto3" json:"signed_raw_transaction,omitempty"` -} - -func (x *SignRawTransactionResponse) Reset() { - *x = SignRawTransactionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignRawTransactionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignRawTransactionResponse) ProtoMessage() {} - -func (x *SignRawTransactionResponse) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[17] - 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 SignRawTransactionResponse.ProtoReflect.Descriptor instead. -func (*SignRawTransactionResponse) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{17} -} - -func (x *SignRawTransactionResponse) GetTransactionId() string { - if x != nil { - return x.TransactionId - } - return "" -} - -func (x *SignRawTransactionResponse) GetSignedRawTransaction() string { - if x != nil { - return x.SignedRawTransaction - } - return "" -} - -// Request message for obtaining the available balance of a wallet. -type GetTotalBalanceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the wallet to get the total balance. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` -} - -func (x *GetTotalBalanceRequest) Reset() { - *x = GetTotalBalanceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTotalBalanceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTotalBalanceRequest) ProtoMessage() {} - -func (x *GetTotalBalanceRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_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 GetTotalBalanceRequest.ProtoReflect.Descriptor instead. -func (*GetTotalBalanceRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{18} -} - -func (x *GetTotalBalanceRequest) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -// Response message containing the available balance of the wallet. -type GetTotalBalanceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the wallet. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` - // The total balance of the wallet in NanoPAC. - TotalBalance int64 `protobuf:"varint,2,opt,name=total_balance,json=totalBalance,proto3" json:"total_balance,omitempty"` -} - -func (x *GetTotalBalanceResponse) Reset() { - *x = GetTotalBalanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTotalBalanceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTotalBalanceResponse) ProtoMessage() {} - -func (x *GetTotalBalanceResponse) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[19] - 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 GetTotalBalanceResponse.ProtoReflect.Descriptor instead. -func (*GetTotalBalanceResponse) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{19} -} - -func (x *GetTotalBalanceResponse) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -func (x *GetTotalBalanceResponse) GetTotalBalance() int64 { - if x != nil { - return x.TotalBalance - } - return 0 -} - -// Request message to sign an arbitrary message. -type SignMessageRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The name of the wallet. - WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` - // The password for unlocking the wallet for signing. - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - // The account address associated with the private key. - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - // The arbitrary message to be signed. - Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *SignMessageRequest) Reset() { - *x = SignMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignMessageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignMessageRequest) ProtoMessage() {} - -func (x *SignMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[20] - 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 SignMessageRequest.ProtoReflect.Descriptor instead. -func (*SignMessageRequest) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{20} -} - -func (x *SignMessageRequest) GetWalletName() string { - if x != nil { - return x.WalletName - } - return "" -} - -func (x *SignMessageRequest) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *SignMessageRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *SignMessageRequest) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -// Response message containing the available balance of the wallet. -type SignMessageResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Signature of the message. - Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *SignMessageResponse) Reset() { - *x = SignMessageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_wallet_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignMessageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignMessageResponse) ProtoMessage() {} - -func (x *SignMessageResponse) ProtoReflect() protoreflect.Message { - mi := &file_wallet_proto_msgTypes[21] - 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 SignMessageResponse.ProtoReflect.Descriptor instead. -func (*SignMessageResponse) Descriptor() ([]byte, []int) { - return file_wallet_proto_rawDescGZIP(), []int{21} -} - -func (x *SignMessageResponse) GetSignature() string { - if x != nil { - return x.Signature - } - return "" -} - -var File_wallet_proto protoreflect.FileDescriptor - -var file_wallet_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x1a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x70, 0x0a, 0x0b, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xa5, 0x01, 0x0a, 0x0b, - 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x53, 0x0a, 0x19, 0x47, 0x65, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x68, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x0b, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0xa1, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x22, 0x70, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, - 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x6f, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x38, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x22, 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x22, 0x32, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x22, 0x34, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x35, - 0x0a, 0x12, 0x4c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x36, 0x0a, 0x13, 0x55, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x37, 0x0a, - 0x14, 0x55, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x22, 0x37, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x81, 0x01, 0x0a, - 0x19, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, - 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x22, 0x79, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, - 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, - 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, 0x61, 0x77, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x39, 0x0a, 0x16, 0x47, - 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5f, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, - 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, - 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0x33, 0x0a, 0x13, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x2a, 0x84, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x45, 0x41, 0x53, 0x55, 0x52, 0x59, 0x10, 0x00, 0x12, - 0x1a, 0x0a, 0x16, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x41, - 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4c, 0x53, 0x5f, - 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x44, 0x44, - 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, 0x31, - 0x39, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x03, 0x32, 0xb2, 0x06, 0x0a, 0x06, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x74, - 0x6f, 0x72, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x43, 0x0a, 0x0a, 0x4c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x19, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x55, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x55, 0x6e, - 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x61, - 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x52, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, - 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, - 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x77, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, - 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x77, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x12, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x69, 0x67, - 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x41, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_wallet_proto_rawDescOnce sync.Once - file_wallet_proto_rawDescData = file_wallet_proto_rawDesc -) - -func file_wallet_proto_rawDescGZIP() []byte { - file_wallet_proto_rawDescOnce.Do(func() { - file_wallet_proto_rawDescData = protoimpl.X.CompressGZIP(file_wallet_proto_rawDescData) - }) - return file_wallet_proto_rawDescData -} - -var file_wallet_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 22) -var file_wallet_proto_goTypes = []any{ - (AddressType)(0), // 0: pactus.AddressType - (*AddressInfo)(nil), // 1: pactus.AddressInfo - (*HistoryInfo)(nil), // 2: pactus.HistoryInfo - (*GetAddressHistoryRequest)(nil), // 3: pactus.GetAddressHistoryRequest - (*GetAddressHistoryResponse)(nil), // 4: pactus.GetAddressHistoryResponse - (*GetNewAddressRequest)(nil), // 5: pactus.GetNewAddressRequest - (*GetNewAddressResponse)(nil), // 6: pactus.GetNewAddressResponse - (*RestoreWalletRequest)(nil), // 7: pactus.RestoreWalletRequest - (*RestoreWalletResponse)(nil), // 8: pactus.RestoreWalletResponse - (*CreateWalletRequest)(nil), // 9: pactus.CreateWalletRequest - (*CreateWalletResponse)(nil), // 10: pactus.CreateWalletResponse - (*LoadWalletRequest)(nil), // 11: pactus.LoadWalletRequest - (*LoadWalletResponse)(nil), // 12: pactus.LoadWalletResponse - (*UnloadWalletRequest)(nil), // 13: pactus.UnloadWalletRequest - (*UnloadWalletResponse)(nil), // 14: pactus.UnloadWalletResponse - (*GetValidatorAddressRequest)(nil), // 15: pactus.GetValidatorAddressRequest - (*GetValidatorAddressResponse)(nil), // 16: pactus.GetValidatorAddressResponse - (*SignRawTransactionRequest)(nil), // 17: pactus.SignRawTransactionRequest - (*SignRawTransactionResponse)(nil), // 18: pactus.SignRawTransactionResponse - (*GetTotalBalanceRequest)(nil), // 19: pactus.GetTotalBalanceRequest - (*GetTotalBalanceResponse)(nil), // 20: pactus.GetTotalBalanceResponse - (*SignMessageRequest)(nil), // 21: pactus.SignMessageRequest - (*SignMessageResponse)(nil), // 22: pactus.SignMessageResponse -} -var file_wallet_proto_depIdxs = []int32{ - 2, // 0: pactus.GetAddressHistoryResponse.history_info:type_name -> pactus.HistoryInfo - 0, // 1: pactus.GetNewAddressRequest.address_type:type_name -> pactus.AddressType - 1, // 2: pactus.GetNewAddressResponse.address_info:type_name -> pactus.AddressInfo - 9, // 3: pactus.Wallet.CreateWallet:input_type -> pactus.CreateWalletRequest - 7, // 4: pactus.Wallet.RestoreWallet:input_type -> pactus.RestoreWalletRequest - 11, // 5: pactus.Wallet.LoadWallet:input_type -> pactus.LoadWalletRequest - 13, // 6: pactus.Wallet.UnloadWallet:input_type -> pactus.UnloadWalletRequest - 19, // 7: pactus.Wallet.GetTotalBalance:input_type -> pactus.GetTotalBalanceRequest - 17, // 8: pactus.Wallet.SignRawTransaction:input_type -> pactus.SignRawTransactionRequest - 15, // 9: pactus.Wallet.GetValidatorAddress:input_type -> pactus.GetValidatorAddressRequest - 5, // 10: pactus.Wallet.GetNewAddress:input_type -> pactus.GetNewAddressRequest - 3, // 11: pactus.Wallet.GetAddressHistory:input_type -> pactus.GetAddressHistoryRequest - 21, // 12: pactus.Wallet.SignMessage:input_type -> pactus.SignMessageRequest - 10, // 13: pactus.Wallet.CreateWallet:output_type -> pactus.CreateWalletResponse - 8, // 14: pactus.Wallet.RestoreWallet:output_type -> pactus.RestoreWalletResponse - 12, // 15: pactus.Wallet.LoadWallet:output_type -> pactus.LoadWalletResponse - 14, // 16: pactus.Wallet.UnloadWallet:output_type -> pactus.UnloadWalletResponse - 20, // 17: pactus.Wallet.GetTotalBalance:output_type -> pactus.GetTotalBalanceResponse - 18, // 18: pactus.Wallet.SignRawTransaction:output_type -> pactus.SignRawTransactionResponse - 16, // 19: pactus.Wallet.GetValidatorAddress:output_type -> pactus.GetValidatorAddressResponse - 6, // 20: pactus.Wallet.GetNewAddress:output_type -> pactus.GetNewAddressResponse - 4, // 21: pactus.Wallet.GetAddressHistory:output_type -> pactus.GetAddressHistoryResponse - 22, // 22: pactus.Wallet.SignMessage:output_type -> pactus.SignMessageResponse - 13, // [13:23] is the sub-list for method output_type - 3, // [3:13] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_wallet_proto_init() } -func file_wallet_proto_init() { - if File_wallet_proto != nil { - return - } - file_transaction_proto_init() - if !protoimpl.UnsafeEnabled { - file_wallet_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AddressInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*HistoryInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*GetAddressHistoryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetAddressHistoryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetNewAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*GetNewAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*RestoreWalletRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*RestoreWalletResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*CreateWalletRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*CreateWalletResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*LoadWalletRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*LoadWalletResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*UnloadWalletRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UnloadWalletResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetValidatorAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*GetValidatorAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*SignRawTransactionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[17].Exporter = func(v any, i int) any { - switch v := v.(*SignRawTransactionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[18].Exporter = func(v any, i int) any { - switch v := v.(*GetTotalBalanceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[19].Exporter = func(v any, i int) any { - switch v := v.(*GetTotalBalanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[20].Exporter = func(v any, i int) any { - switch v := v.(*SignMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wallet_proto_msgTypes[21].Exporter = func(v any, i int) any { - switch v := v.(*SignMessageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wallet_proto_rawDesc, - NumEnums: 1, - NumMessages: 22, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_wallet_proto_goTypes, - DependencyIndexes: file_wallet_proto_depIdxs, - EnumInfos: file_wallet_proto_enumTypes, - MessageInfos: file_wallet_proto_msgTypes, - }.Build() - File_wallet_proto = out.File - file_wallet_proto_rawDesc = nil - file_wallet_proto_goTypes = nil - file_wallet_proto_depIdxs = nil -} diff --git a/www/grpc/gen/go/wallet.pb.gw.go b/www/grpc/gen/go/wallet.pb.gw.go deleted file mode 100644 index 67c180ab2..000000000 --- a/www/grpc/gen/go/wallet.pb.gw.go +++ /dev/null @@ -1,869 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: wallet.proto - -/* -Package pactus is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package pactus - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -var ( - filter_Wallet_CreateWallet_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Wallet_CreateWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWalletRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_CreateWallet_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Wallet_CreateWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateWalletRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_CreateWallet_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateWallet(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Wallet_RestoreWallet_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Wallet_RestoreWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RestoreWalletRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_RestoreWallet_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.RestoreWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Wallet_RestoreWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RestoreWalletRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_RestoreWallet_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.RestoreWallet(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Wallet_LoadWallet_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Wallet_LoadWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LoadWalletRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_LoadWallet_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.LoadWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Wallet_LoadWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq LoadWalletRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_LoadWallet_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.LoadWallet(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Wallet_UnloadWallet_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Wallet_UnloadWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnloadWalletRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_UnloadWallet_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UnloadWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Wallet_UnloadWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UnloadWalletRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_UnloadWallet_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UnloadWallet(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Wallet_GetTotalBalance_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Wallet_GetTotalBalance_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTotalBalanceRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetTotalBalance_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetTotalBalance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Wallet_GetTotalBalance_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetTotalBalanceRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetTotalBalance_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetTotalBalance(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Wallet_SignRawTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Wallet_SignRawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SignRawTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_SignRawTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.SignRawTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Wallet_SignRawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SignRawTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_SignRawTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.SignRawTransaction(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Wallet_GetValidatorAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Wallet_GetValidatorAddress_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetValidatorAddressRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetValidatorAddress_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetValidatorAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Wallet_GetValidatorAddress_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetValidatorAddressRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetValidatorAddress_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetValidatorAddress(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Wallet_GetNewAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Wallet_GetNewAddress_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNewAddressRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetNewAddress_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetNewAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Wallet_GetNewAddress_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNewAddressRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetNewAddress_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetNewAddress(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Wallet_SignMessage_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Wallet_SignMessage_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SignMessageRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_SignMessage_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.SignMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Wallet_SignMessage_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SignMessageRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_SignMessage_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.SignMessage(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterWalletHandlerServer registers the http handlers for service Wallet to "mux". -// UnaryRPC :call WalletServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWalletHandlerFromEndpoint instead. -func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServer) error { - - mux.Handle("GET", pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/CreateWallet", runtime.WithHTTPPathPattern("/pactus/wallet/create_wallet")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Wallet_CreateWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_CreateWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_RestoreWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/RestoreWallet", runtime.WithHTTPPathPattern("/pactus/wallet/restore_wallet")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Wallet_RestoreWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_RestoreWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_LoadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/LoadWallet", runtime.WithHTTPPathPattern("/pactus/wallet/load_wallet")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Wallet_LoadWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_LoadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_UnloadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/UnloadWallet", runtime.WithHTTPPathPattern("/pactus/wallet/unload_wallet")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Wallet_UnloadWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_UnloadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_GetTotalBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/GetTotalBalance", runtime.WithHTTPPathPattern("/pactus/wallet/get_total_balance")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Wallet_GetTotalBalance_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_GetTotalBalance_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_SignRawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/SignRawTransaction", runtime.WithHTTPPathPattern("/pactus/wallet/sign_raw_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Wallet_SignRawTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_SignRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_GetValidatorAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/GetValidatorAddress", runtime.WithHTTPPathPattern("/pactus/wallet/get_validator_address")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Wallet_GetValidatorAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_GetValidatorAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_GetNewAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/GetNewAddress", runtime.WithHTTPPathPattern("/pactus/wallet/get_new_address")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Wallet_GetNewAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_GetNewAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_SignMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/SignMessage", runtime.WithHTTPPathPattern("/pactus/wallet/sign_message")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Wallet_SignMessage_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_SignMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterWalletHandlerFromEndpoint is same as RegisterWalletHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterWalletHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterWalletHandler(ctx, mux, conn) -} - -// RegisterWalletHandler registers the http handlers for service Wallet to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterWalletHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterWalletHandlerClient(ctx, mux, NewWalletClient(conn)) -} - -// RegisterWalletHandlerClient registers the http handlers for service Wallet -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WalletClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WalletClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "WalletClient" to call the correct interceptors. -func RegisterWalletHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WalletClient) error { - - mux.Handle("GET", pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/CreateWallet", runtime.WithHTTPPathPattern("/pactus/wallet/create_wallet")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Wallet_CreateWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_CreateWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_RestoreWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/RestoreWallet", runtime.WithHTTPPathPattern("/pactus/wallet/restore_wallet")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Wallet_RestoreWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_RestoreWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_LoadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/LoadWallet", runtime.WithHTTPPathPattern("/pactus/wallet/load_wallet")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Wallet_LoadWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_LoadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_UnloadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/UnloadWallet", runtime.WithHTTPPathPattern("/pactus/wallet/unload_wallet")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Wallet_UnloadWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_UnloadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_GetTotalBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/GetTotalBalance", runtime.WithHTTPPathPattern("/pactus/wallet/get_total_balance")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Wallet_GetTotalBalance_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_GetTotalBalance_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_SignRawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/SignRawTransaction", runtime.WithHTTPPathPattern("/pactus/wallet/sign_raw_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Wallet_SignRawTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_SignRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_GetValidatorAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/GetValidatorAddress", runtime.WithHTTPPathPattern("/pactus/wallet/get_validator_address")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Wallet_GetValidatorAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_GetValidatorAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_GetNewAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/GetNewAddress", runtime.WithHTTPPathPattern("/pactus/wallet/get_new_address")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Wallet_GetNewAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_GetNewAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Wallet_SignMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/SignMessage", runtime.WithHTTPPathPattern("/pactus/wallet/sign_message")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Wallet_SignMessage_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Wallet_SignMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Wallet_CreateWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "create_wallet"}, "")) - - pattern_Wallet_RestoreWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "restore_wallet"}, "")) - - pattern_Wallet_LoadWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "load_wallet"}, "")) - - pattern_Wallet_UnloadWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "unload_wallet"}, "")) - - pattern_Wallet_GetTotalBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "get_total_balance"}, "")) - - pattern_Wallet_SignRawTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "sign_raw_transaction"}, "")) - - pattern_Wallet_GetValidatorAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "get_validator_address"}, "")) - - pattern_Wallet_GetNewAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "get_new_address"}, "")) - - pattern_Wallet_SignMessage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "sign_message"}, "")) -) - -var ( - forward_Wallet_CreateWallet_0 = runtime.ForwardResponseMessage - - forward_Wallet_RestoreWallet_0 = runtime.ForwardResponseMessage - - forward_Wallet_LoadWallet_0 = runtime.ForwardResponseMessage - - forward_Wallet_UnloadWallet_0 = runtime.ForwardResponseMessage - - forward_Wallet_GetTotalBalance_0 = runtime.ForwardResponseMessage - - forward_Wallet_SignRawTransaction_0 = runtime.ForwardResponseMessage - - forward_Wallet_GetValidatorAddress_0 = runtime.ForwardResponseMessage - - forward_Wallet_GetNewAddress_0 = runtime.ForwardResponseMessage - - forward_Wallet_SignMessage_0 = runtime.ForwardResponseMessage -) diff --git a/www/grpc/gen/go/wallet_grpc.pb.go b/www/grpc/gen/go/wallet_grpc.pb.go deleted file mode 100644 index 31ecb5b83..000000000 --- a/www/grpc/gen/go/wallet_grpc.pb.go +++ /dev/null @@ -1,478 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc (unknown) -// source: wallet.proto - -// Define the package and Go package path for the generated code. - -package pactus - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// 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.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 - -const ( - Wallet_CreateWallet_FullMethodName = "/pactus.Wallet/CreateWallet" - Wallet_RestoreWallet_FullMethodName = "/pactus.Wallet/RestoreWallet" - Wallet_LoadWallet_FullMethodName = "/pactus.Wallet/LoadWallet" - Wallet_UnloadWallet_FullMethodName = "/pactus.Wallet/UnloadWallet" - Wallet_GetTotalBalance_FullMethodName = "/pactus.Wallet/GetTotalBalance" - Wallet_SignRawTransaction_FullMethodName = "/pactus.Wallet/SignRawTransaction" - Wallet_GetValidatorAddress_FullMethodName = "/pactus.Wallet/GetValidatorAddress" - Wallet_GetNewAddress_FullMethodName = "/pactus.Wallet/GetNewAddress" - Wallet_GetAddressHistory_FullMethodName = "/pactus.Wallet/GetAddressHistory" - Wallet_SignMessage_FullMethodName = "/pactus.Wallet/SignMessage" -) - -// WalletClient is the client API for Wallet 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. -// -// Define the Wallet service with various RPC methods for wallet management. -type WalletClient interface { - // CreateWallet creates a new wallet with the specified parameters. - CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error) - // RestoreWallet restores an existing wallet with the given mnemonic. - RestoreWallet(ctx context.Context, in *RestoreWalletRequest, opts ...grpc.CallOption) (*RestoreWalletResponse, error) - // LoadWallet loads an existing wallet with the given name. - LoadWallet(ctx context.Context, in *LoadWalletRequest, opts ...grpc.CallOption) (*LoadWalletResponse, error) - // UnloadWallet unloads a currently loaded wallet with the specified name. - UnloadWallet(ctx context.Context, in *UnloadWalletRequest, opts ...grpc.CallOption) (*UnloadWalletResponse, error) - // GetTotalBalance returns the total available balance of the wallet. - GetTotalBalance(ctx context.Context, in *GetTotalBalanceRequest, opts ...grpc.CallOption) (*GetTotalBalanceResponse, error) - // SignRawTransaction signs a raw transaction for a specified wallet. - SignRawTransaction(ctx context.Context, in *SignRawTransactionRequest, opts ...grpc.CallOption) (*SignRawTransactionResponse, error) - // GetValidatorAddress retrieves the validator address associated with a - // public key. - GetValidatorAddress(ctx context.Context, in *GetValidatorAddressRequest, opts ...grpc.CallOption) (*GetValidatorAddressResponse, error) - // GetNewAddress generates a new address for the specified wallet. - GetNewAddress(ctx context.Context, in *GetNewAddressRequest, opts ...grpc.CallOption) (*GetNewAddressResponse, error) - // GetAddressHistory retrieves the transaction history of an address. - GetAddressHistory(ctx context.Context, in *GetAddressHistoryRequest, opts ...grpc.CallOption) (*GetAddressHistoryResponse, error) - // SignMessage signs an arbitrary message. - SignMessage(ctx context.Context, in *SignMessageRequest, opts ...grpc.CallOption) (*SignMessageResponse, error) -} - -type walletClient struct { - cc grpc.ClientConnInterface -} - -func NewWalletClient(cc grpc.ClientConnInterface) WalletClient { - return &walletClient{cc} -} - -func (c *walletClient) CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(CreateWalletResponse) - err := c.cc.Invoke(ctx, Wallet_CreateWallet_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) RestoreWallet(ctx context.Context, in *RestoreWalletRequest, opts ...grpc.CallOption) (*RestoreWalletResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(RestoreWalletResponse) - err := c.cc.Invoke(ctx, Wallet_RestoreWallet_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) LoadWallet(ctx context.Context, in *LoadWalletRequest, opts ...grpc.CallOption) (*LoadWalletResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(LoadWalletResponse) - err := c.cc.Invoke(ctx, Wallet_LoadWallet_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) UnloadWallet(ctx context.Context, in *UnloadWalletRequest, opts ...grpc.CallOption) (*UnloadWalletResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(UnloadWalletResponse) - err := c.cc.Invoke(ctx, Wallet_UnloadWallet_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetTotalBalance(ctx context.Context, in *GetTotalBalanceRequest, opts ...grpc.CallOption) (*GetTotalBalanceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetTotalBalanceResponse) - err := c.cc.Invoke(ctx, Wallet_GetTotalBalance_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) SignRawTransaction(ctx context.Context, in *SignRawTransactionRequest, opts ...grpc.CallOption) (*SignRawTransactionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SignRawTransactionResponse) - err := c.cc.Invoke(ctx, Wallet_SignRawTransaction_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetValidatorAddress(ctx context.Context, in *GetValidatorAddressRequest, opts ...grpc.CallOption) (*GetValidatorAddressResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetValidatorAddressResponse) - err := c.cc.Invoke(ctx, Wallet_GetValidatorAddress_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetNewAddress(ctx context.Context, in *GetNewAddressRequest, opts ...grpc.CallOption) (*GetNewAddressResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetNewAddressResponse) - err := c.cc.Invoke(ctx, Wallet_GetNewAddress_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) GetAddressHistory(ctx context.Context, in *GetAddressHistoryRequest, opts ...grpc.CallOption) (*GetAddressHistoryResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetAddressHistoryResponse) - err := c.cc.Invoke(ctx, Wallet_GetAddressHistory_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *walletClient) SignMessage(ctx context.Context, in *SignMessageRequest, opts ...grpc.CallOption) (*SignMessageResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(SignMessageResponse) - err := c.cc.Invoke(ctx, Wallet_SignMessage_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// WalletServer is the server API for Wallet service. -// All implementations should embed UnimplementedWalletServer -// for forward compatibility -// -// Define the Wallet service with various RPC methods for wallet management. -type WalletServer interface { - // CreateWallet creates a new wallet with the specified parameters. - CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error) - // RestoreWallet restores an existing wallet with the given mnemonic. - RestoreWallet(context.Context, *RestoreWalletRequest) (*RestoreWalletResponse, error) - // LoadWallet loads an existing wallet with the given name. - LoadWallet(context.Context, *LoadWalletRequest) (*LoadWalletResponse, error) - // UnloadWallet unloads a currently loaded wallet with the specified name. - UnloadWallet(context.Context, *UnloadWalletRequest) (*UnloadWalletResponse, error) - // GetTotalBalance returns the total available balance of the wallet. - GetTotalBalance(context.Context, *GetTotalBalanceRequest) (*GetTotalBalanceResponse, error) - // SignRawTransaction signs a raw transaction for a specified wallet. - SignRawTransaction(context.Context, *SignRawTransactionRequest) (*SignRawTransactionResponse, error) - // GetValidatorAddress retrieves the validator address associated with a - // public key. - GetValidatorAddress(context.Context, *GetValidatorAddressRequest) (*GetValidatorAddressResponse, error) - // GetNewAddress generates a new address for the specified wallet. - GetNewAddress(context.Context, *GetNewAddressRequest) (*GetNewAddressResponse, error) - // GetAddressHistory retrieves the transaction history of an address. - GetAddressHistory(context.Context, *GetAddressHistoryRequest) (*GetAddressHistoryResponse, error) - // SignMessage signs an arbitrary message. - SignMessage(context.Context, *SignMessageRequest) (*SignMessageResponse, error) -} - -// UnimplementedWalletServer should be embedded to have forward compatible implementations. -type UnimplementedWalletServer struct { -} - -func (UnimplementedWalletServer) CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateWallet not implemented") -} -func (UnimplementedWalletServer) RestoreWallet(context.Context, *RestoreWalletRequest) (*RestoreWalletResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RestoreWallet not implemented") -} -func (UnimplementedWalletServer) LoadWallet(context.Context, *LoadWalletRequest) (*LoadWalletResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LoadWallet not implemented") -} -func (UnimplementedWalletServer) UnloadWallet(context.Context, *UnloadWalletRequest) (*UnloadWalletResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UnloadWallet not implemented") -} -func (UnimplementedWalletServer) GetTotalBalance(context.Context, *GetTotalBalanceRequest) (*GetTotalBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTotalBalance not implemented") -} -func (UnimplementedWalletServer) SignRawTransaction(context.Context, *SignRawTransactionRequest) (*SignRawTransactionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignRawTransaction not implemented") -} -func (UnimplementedWalletServer) GetValidatorAddress(context.Context, *GetValidatorAddressRequest) (*GetValidatorAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorAddress not implemented") -} -func (UnimplementedWalletServer) GetNewAddress(context.Context, *GetNewAddressRequest) (*GetNewAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNewAddress not implemented") -} -func (UnimplementedWalletServer) GetAddressHistory(context.Context, *GetAddressHistoryRequest) (*GetAddressHistoryResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAddressHistory not implemented") -} -func (UnimplementedWalletServer) SignMessage(context.Context, *SignMessageRequest) (*SignMessageResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SignMessage not implemented") -} - -// UnsafeWalletServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to WalletServer will -// result in compilation errors. -type UnsafeWalletServer interface { - mustEmbedUnimplementedWalletServer() -} - -func RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer) { - s.RegisterService(&Wallet_ServiceDesc, srv) -} - -func _Wallet_CreateWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateWalletRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).CreateWallet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Wallet_CreateWallet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).CreateWallet(ctx, req.(*CreateWalletRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_RestoreWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RestoreWalletRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).RestoreWallet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Wallet_RestoreWallet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).RestoreWallet(ctx, req.(*RestoreWalletRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_LoadWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LoadWalletRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).LoadWallet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Wallet_LoadWallet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).LoadWallet(ctx, req.(*LoadWalletRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_UnloadWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UnloadWalletRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).UnloadWallet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Wallet_UnloadWallet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).UnloadWallet(ctx, req.(*UnloadWalletRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetTotalBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetTotalBalanceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetTotalBalance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Wallet_GetTotalBalance_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetTotalBalance(ctx, req.(*GetTotalBalanceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_SignRawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignRawTransactionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).SignRawTransaction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Wallet_SignRawTransaction_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).SignRawTransaction(ctx, req.(*SignRawTransactionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetValidatorAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetValidatorAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Wallet_GetValidatorAddress_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetValidatorAddress(ctx, req.(*GetValidatorAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetNewAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNewAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetNewAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Wallet_GetNewAddress_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetNewAddress(ctx, req.(*GetNewAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_GetAddressHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAddressHistoryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).GetAddressHistory(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Wallet_GetAddressHistory_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).GetAddressHistory(ctx, req.(*GetAddressHistoryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Wallet_SignMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SignMessageRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(WalletServer).SignMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Wallet_SignMessage_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(WalletServer).SignMessage(ctx, req.(*SignMessageRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Wallet_ServiceDesc is the grpc.ServiceDesc for Wallet service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Wallet_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "pactus.Wallet", - HandlerType: (*WalletServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateWallet", - Handler: _Wallet_CreateWallet_Handler, - }, - { - MethodName: "RestoreWallet", - Handler: _Wallet_RestoreWallet_Handler, - }, - { - MethodName: "LoadWallet", - Handler: _Wallet_LoadWallet_Handler, - }, - { - MethodName: "UnloadWallet", - Handler: _Wallet_UnloadWallet_Handler, - }, - { - MethodName: "GetTotalBalance", - Handler: _Wallet_GetTotalBalance_Handler, - }, - { - MethodName: "SignRawTransaction", - Handler: _Wallet_SignRawTransaction_Handler, - }, - { - MethodName: "GetValidatorAddress", - Handler: _Wallet_GetValidatorAddress_Handler, - }, - { - MethodName: "GetNewAddress", - Handler: _Wallet_GetNewAddress_Handler, - }, - { - MethodName: "GetAddressHistory", - Handler: _Wallet_GetAddressHistory_Handler, - }, - { - MethodName: "SignMessage", - Handler: _Wallet_SignMessage_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "wallet.proto", -} diff --git a/www/grpc/gen/go/wallet_jgw.pb.go b/www/grpc/gen/go/wallet_jgw.pb.go deleted file mode 100644 index df3dcca9e..000000000 --- a/www/grpc/gen/go/wallet_jgw.pb.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT. -// source: wallet.proto - -/* -Package pactus is a reverse proxy. - -It translates gRPC into JSON-RPC 2.0 -*/ -package pactus - -import ( - "context" - "encoding/json" - - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "google.golang.org/protobuf/encoding/protojson" -) - -type WalletJsonRPC struct { - client WalletClient -} - -type paramsAndHeadersWallet struct { - Headers metadata.MD `json:"headers,omitempty"` - Params json.RawMessage `json:"params"` -} - -// RegisterWalletJsonRPC register the grpc client Wallet for json-rpc. -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterWalletJsonRPC(conn *grpc.ClientConn) *WalletJsonRPC { - return &WalletJsonRPC{ - client: NewWalletClient(conn), - } -} - -func (s *WalletJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) { - return map[string]func(ctx context.Context, params json.RawMessage) (any, error){ - - "pactus.wallet.create_wallet": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(CreateWalletRequest) - - var jrpcData paramsAndHeadersWallet - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.CreateWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.wallet.restore_wallet": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(RestoreWalletRequest) - - var jrpcData paramsAndHeadersWallet - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.RestoreWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.wallet.load_wallet": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(LoadWalletRequest) - - var jrpcData paramsAndHeadersWallet - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.LoadWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.wallet.unload_wallet": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(UnloadWalletRequest) - - var jrpcData paramsAndHeadersWallet - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.UnloadWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.wallet.get_total_balance": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetTotalBalanceRequest) - - var jrpcData paramsAndHeadersWallet - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetTotalBalance(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.wallet.sign_raw_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(SignRawTransactionRequest) - - var jrpcData paramsAndHeadersWallet - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.SignRawTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.wallet.get_validator_address": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetValidatorAddressRequest) - - var jrpcData paramsAndHeadersWallet - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetValidatorAddress(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.wallet.get_new_address": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetNewAddressRequest) - - var jrpcData paramsAndHeadersWallet - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetNewAddress(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.wallet.get_address_history": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(GetAddressHistoryRequest) - - var jrpcData paramsAndHeadersWallet - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.GetAddressHistory(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - - "pactus.wallet.sign_message": func(ctx context.Context, data json.RawMessage) (any, error) { - req := new(SignMessageRequest) - - var jrpcData paramsAndHeadersWallet - - if err := json.Unmarshal(data, &jrpcData); err != nil { - return nil, err - } - - err := protojson.Unmarshal(jrpcData.Params, req) - if err != nil { - return nil, err - } - - return s.client.SignMessage(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) - }, - } -} diff --git a/www/grpc/gen/java/pactus/blockchain/BlockchainGrpc.java b/www/grpc/gen/java/pactus/blockchain/BlockchainGrpc.java deleted file mode 100644 index 79a944eee..000000000 --- a/www/grpc/gen/java/pactus/blockchain/BlockchainGrpc.java +++ /dev/null @@ -1,1183 +0,0 @@ -package pactus.blockchain; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Blockchain service defines RPC methods for interacting with the blockchain.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.50.2)", - comments = "Source: blockchain.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class BlockchainGrpc { - - private BlockchainGrpc() {} - - public static final String SERVICE_NAME = "pactus.Blockchain"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getGetBlockMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBlock", - requestType = pactus.blockchain.BlockchainOuterClass.GetBlockRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetBlockResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetBlockMethod() { - io.grpc.MethodDescriptor getGetBlockMethod; - if ((getGetBlockMethod = BlockchainGrpc.getGetBlockMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetBlockMethod = BlockchainGrpc.getGetBlockMethod) == null) { - BlockchainGrpc.getGetBlockMethod = getGetBlockMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlock")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetBlockRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetBlockResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetBlock")) - .build(); - } - } - } - return getGetBlockMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetBlockHashMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBlockHash", - requestType = pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetBlockHashMethod() { - io.grpc.MethodDescriptor getGetBlockHashMethod; - if ((getGetBlockHashMethod = BlockchainGrpc.getGetBlockHashMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetBlockHashMethod = BlockchainGrpc.getGetBlockHashMethod) == null) { - BlockchainGrpc.getGetBlockHashMethod = getGetBlockHashMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockHash")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetBlockHash")) - .build(); - } - } - } - return getGetBlockHashMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetBlockHeightMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBlockHeight", - requestType = pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetBlockHeightMethod() { - io.grpc.MethodDescriptor getGetBlockHeightMethod; - if ((getGetBlockHeightMethod = BlockchainGrpc.getGetBlockHeightMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetBlockHeightMethod = BlockchainGrpc.getGetBlockHeightMethod) == null) { - BlockchainGrpc.getGetBlockHeightMethod = getGetBlockHeightMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockHeight")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetBlockHeight")) - .build(); - } - } - } - return getGetBlockHeightMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetBlockchainInfoMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetBlockchainInfo", - requestType = pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetBlockchainInfoMethod() { - io.grpc.MethodDescriptor getGetBlockchainInfoMethod; - if ((getGetBlockchainInfoMethod = BlockchainGrpc.getGetBlockchainInfoMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetBlockchainInfoMethod = BlockchainGrpc.getGetBlockchainInfoMethod) == null) { - BlockchainGrpc.getGetBlockchainInfoMethod = getGetBlockchainInfoMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockchainInfo")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetBlockchainInfo")) - .build(); - } - } - } - return getGetBlockchainInfoMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetConsensusInfoMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetConsensusInfo", - requestType = pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetConsensusInfoMethod() { - io.grpc.MethodDescriptor getGetConsensusInfoMethod; - if ((getGetConsensusInfoMethod = BlockchainGrpc.getGetConsensusInfoMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetConsensusInfoMethod = BlockchainGrpc.getGetConsensusInfoMethod) == null) { - BlockchainGrpc.getGetConsensusInfoMethod = getGetConsensusInfoMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConsensusInfo")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetConsensusInfo")) - .build(); - } - } - } - return getGetConsensusInfoMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAccountMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAccount", - requestType = pactus.blockchain.BlockchainOuterClass.GetAccountRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetAccountResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetAccountMethod() { - io.grpc.MethodDescriptor getGetAccountMethod; - if ((getGetAccountMethod = BlockchainGrpc.getGetAccountMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetAccountMethod = BlockchainGrpc.getGetAccountMethod) == null) { - BlockchainGrpc.getGetAccountMethod = getGetAccountMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAccount")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetAccountRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetAccountResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetAccount")) - .build(); - } - } - } - return getGetAccountMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetValidatorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetValidator", - requestType = pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetValidatorMethod() { - io.grpc.MethodDescriptor getGetValidatorMethod; - if ((getGetValidatorMethod = BlockchainGrpc.getGetValidatorMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetValidatorMethod = BlockchainGrpc.getGetValidatorMethod) == null) { - BlockchainGrpc.getGetValidatorMethod = getGetValidatorMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetValidator")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetValidator")) - .build(); - } - } - } - return getGetValidatorMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetValidatorByNumberMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetValidatorByNumber", - requestType = pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetValidatorByNumberMethod() { - io.grpc.MethodDescriptor getGetValidatorByNumberMethod; - if ((getGetValidatorByNumberMethod = BlockchainGrpc.getGetValidatorByNumberMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetValidatorByNumberMethod = BlockchainGrpc.getGetValidatorByNumberMethod) == null) { - BlockchainGrpc.getGetValidatorByNumberMethod = getGetValidatorByNumberMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetValidatorByNumber")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetValidatorByNumber")) - .build(); - } - } - } - return getGetValidatorByNumberMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetValidatorAddressesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetValidatorAddresses", - requestType = pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetValidatorAddressesMethod() { - io.grpc.MethodDescriptor getGetValidatorAddressesMethod; - if ((getGetValidatorAddressesMethod = BlockchainGrpc.getGetValidatorAddressesMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetValidatorAddressesMethod = BlockchainGrpc.getGetValidatorAddressesMethod) == null) { - BlockchainGrpc.getGetValidatorAddressesMethod = getGetValidatorAddressesMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetValidatorAddresses")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetValidatorAddresses")) - .build(); - } - } - } - return getGetValidatorAddressesMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetPublicKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPublicKey", - requestType = pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetPublicKeyMethod() { - io.grpc.MethodDescriptor getGetPublicKeyMethod; - if ((getGetPublicKeyMethod = BlockchainGrpc.getGetPublicKeyMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetPublicKeyMethod = BlockchainGrpc.getGetPublicKeyMethod) == null) { - BlockchainGrpc.getGetPublicKeyMethod = getGetPublicKeyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPublicKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetPublicKey")) - .build(); - } - } - } - return getGetPublicKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetTxPoolContentMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTxPoolContent", - requestType = pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.class, - responseType = pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetTxPoolContentMethod() { - io.grpc.MethodDescriptor getGetTxPoolContentMethod; - if ((getGetTxPoolContentMethod = BlockchainGrpc.getGetTxPoolContentMethod) == null) { - synchronized (BlockchainGrpc.class) { - if ((getGetTxPoolContentMethod = BlockchainGrpc.getGetTxPoolContentMethod) == null) { - BlockchainGrpc.getGetTxPoolContentMethod = getGetTxPoolContentMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTxPoolContent")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.getDefaultInstance())) - .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetTxPoolContent")) - .build(); - } - } - } - return getGetTxPoolContentMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static BlockchainStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BlockchainStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BlockchainStub(channel, callOptions); - } - }; - return BlockchainStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static BlockchainBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BlockchainBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BlockchainBlockingStub(channel, callOptions); - } - }; - return BlockchainBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static BlockchainFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BlockchainFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BlockchainFutureStub(channel, callOptions); - } - }; - return BlockchainFutureStub.newStub(factory, channel); - } - - /** - *
-   * Blockchain service defines RPC methods for interacting with the blockchain.
-   * 
- */ - public static abstract class BlockchainImplBase implements io.grpc.BindableService { - - /** - *
-     * GetBlock retrieves information about a block based on the provided request
-     * parameters.
-     * 
- */ - public void getBlock(pactus.blockchain.BlockchainOuterClass.GetBlockRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockMethod(), responseObserver); - } - - /** - *
-     * GetBlockHash retrieves the hash of a block at the specified height.
-     * 
- */ - public void getBlockHash(pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockHashMethod(), responseObserver); - } - - /** - *
-     * GetBlockHeight retrieves the height of a block with the specified hash.
-     * 
- */ - public void getBlockHeight(pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockHeightMethod(), responseObserver); - } - - /** - *
-     * GetBlockchainInfo retrieves general information about the blockchain.
-     * 
- */ - public void getBlockchainInfo(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockchainInfoMethod(), responseObserver); - } - - /** - *
-     * GetConsensusInfo retrieves information about the consensus instances.
-     * 
- */ - public void getConsensusInfo(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConsensusInfoMethod(), responseObserver); - } - - /** - *
-     * GetAccount retrieves information about an account based on the provided
-     * address.
-     * 
- */ - public void getAccount(pactus.blockchain.BlockchainOuterClass.GetAccountRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAccountMethod(), responseObserver); - } - - /** - *
-     * GetValidator retrieves information about a validator based on the provided
-     * address.
-     * 
- */ - public void getValidator(pactus.blockchain.BlockchainOuterClass.GetValidatorRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorMethod(), responseObserver); - } - - /** - *
-     * GetValidatorByNumber retrieves information about a validator based on the
-     * provided number.
-     * 
- */ - public void getValidatorByNumber(pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorByNumberMethod(), responseObserver); - } - - /** - *
-     * GetValidatorAddresses retrieves a list of all validator addresses.
-     * 
- */ - public void getValidatorAddresses(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorAddressesMethod(), responseObserver); - } - - /** - *
-     * GetPublicKey retrieves the public key of an account based on the provided
-     * address.
-     * 
- */ - public void getPublicKey(pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPublicKeyMethod(), responseObserver); - } - - /** - *
-     * GetTxPoolContent retrieves current transactions in the transaction pool.
-     * 
- */ - public void getTxPoolContent(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTxPoolContentMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetBlockMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetBlockRequest, - pactus.blockchain.BlockchainOuterClass.GetBlockResponse>( - this, METHODID_GET_BLOCK))) - .addMethod( - getGetBlockHashMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest, - pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse>( - this, METHODID_GET_BLOCK_HASH))) - .addMethod( - getGetBlockHeightMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest, - pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse>( - this, METHODID_GET_BLOCK_HEIGHT))) - .addMethod( - getGetBlockchainInfoMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest, - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse>( - this, METHODID_GET_BLOCKCHAIN_INFO))) - .addMethod( - getGetConsensusInfoMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest, - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse>( - this, METHODID_GET_CONSENSUS_INFO))) - .addMethod( - getGetAccountMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetAccountRequest, - pactus.blockchain.BlockchainOuterClass.GetAccountResponse>( - this, METHODID_GET_ACCOUNT))) - .addMethod( - getGetValidatorMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetValidatorRequest, - pactus.blockchain.BlockchainOuterClass.GetValidatorResponse>( - this, METHODID_GET_VALIDATOR))) - .addMethod( - getGetValidatorByNumberMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest, - pactus.blockchain.BlockchainOuterClass.GetValidatorResponse>( - this, METHODID_GET_VALIDATOR_BY_NUMBER))) - .addMethod( - getGetValidatorAddressesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest, - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse>( - this, METHODID_GET_VALIDATOR_ADDRESSES))) - .addMethod( - getGetPublicKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest, - pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse>( - this, METHODID_GET_PUBLIC_KEY))) - .addMethod( - getGetTxPoolContentMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest, - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse>( - this, METHODID_GET_TX_POOL_CONTENT))) - .build(); - } - } - - /** - *
-   * Blockchain service defines RPC methods for interacting with the blockchain.
-   * 
- */ - public static final class BlockchainStub extends io.grpc.stub.AbstractAsyncStub { - private BlockchainStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BlockchainStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BlockchainStub(channel, callOptions); - } - - /** - *
-     * GetBlock retrieves information about a block based on the provided request
-     * parameters.
-     * 
- */ - public void getBlock(pactus.blockchain.BlockchainOuterClass.GetBlockRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBlockMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetBlockHash retrieves the hash of a block at the specified height.
-     * 
- */ - public void getBlockHash(pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBlockHashMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetBlockHeight retrieves the height of a block with the specified hash.
-     * 
- */ - public void getBlockHeight(pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBlockHeightMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetBlockchainInfo retrieves general information about the blockchain.
-     * 
- */ - public void getBlockchainInfo(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetBlockchainInfoMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetConsensusInfo retrieves information about the consensus instances.
-     * 
- */ - public void getConsensusInfo(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetConsensusInfoMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetAccount retrieves information about an account based on the provided
-     * address.
-     * 
- */ - public void getAccount(pactus.blockchain.BlockchainOuterClass.GetAccountRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAccountMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetValidator retrieves information about a validator based on the provided
-     * address.
-     * 
- */ - public void getValidator(pactus.blockchain.BlockchainOuterClass.GetValidatorRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetValidatorMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetValidatorByNumber retrieves information about a validator based on the
-     * provided number.
-     * 
- */ - public void getValidatorByNumber(pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetValidatorByNumberMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetValidatorAddresses retrieves a list of all validator addresses.
-     * 
- */ - public void getValidatorAddresses(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetValidatorAddressesMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetPublicKey retrieves the public key of an account based on the provided
-     * address.
-     * 
- */ - public void getPublicKey(pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPublicKeyMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetTxPoolContent retrieves current transactions in the transaction pool.
-     * 
- */ - public void getTxPoolContent(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetTxPoolContentMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Blockchain service defines RPC methods for interacting with the blockchain.
-   * 
- */ - public static final class BlockchainBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private BlockchainBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BlockchainBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BlockchainBlockingStub(channel, callOptions); - } - - /** - *
-     * GetBlock retrieves information about a block based on the provided request
-     * parameters.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetBlockResponse getBlock(pactus.blockchain.BlockchainOuterClass.GetBlockRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBlockMethod(), getCallOptions(), request); - } - - /** - *
-     * GetBlockHash retrieves the hash of a block at the specified height.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse getBlockHash(pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBlockHashMethod(), getCallOptions(), request); - } - - /** - *
-     * GetBlockHeight retrieves the height of a block with the specified hash.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse getBlockHeight(pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBlockHeightMethod(), getCallOptions(), request); - } - - /** - *
-     * GetBlockchainInfo retrieves general information about the blockchain.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse getBlockchainInfo(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetBlockchainInfoMethod(), getCallOptions(), request); - } - - /** - *
-     * GetConsensusInfo retrieves information about the consensus instances.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse getConsensusInfo(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetConsensusInfoMethod(), getCallOptions(), request); - } - - /** - *
-     * GetAccount retrieves information about an account based on the provided
-     * address.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetAccountResponse getAccount(pactus.blockchain.BlockchainOuterClass.GetAccountRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAccountMethod(), getCallOptions(), request); - } - - /** - *
-     * GetValidator retrieves information about a validator based on the provided
-     * address.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse getValidator(pactus.blockchain.BlockchainOuterClass.GetValidatorRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetValidatorMethod(), getCallOptions(), request); - } - - /** - *
-     * GetValidatorByNumber retrieves information about a validator based on the
-     * provided number.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse getValidatorByNumber(pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetValidatorByNumberMethod(), getCallOptions(), request); - } - - /** - *
-     * GetValidatorAddresses retrieves a list of all validator addresses.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse getValidatorAddresses(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetValidatorAddressesMethod(), getCallOptions(), request); - } - - /** - *
-     * GetPublicKey retrieves the public key of an account based on the provided
-     * address.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse getPublicKey(pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPublicKeyMethod(), getCallOptions(), request); - } - - /** - *
-     * GetTxPoolContent retrieves current transactions in the transaction pool.
-     * 
- */ - public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse getTxPoolContent(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetTxPoolContentMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Blockchain service defines RPC methods for interacting with the blockchain.
-   * 
- */ - public static final class BlockchainFutureStub extends io.grpc.stub.AbstractFutureStub { - private BlockchainFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BlockchainFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BlockchainFutureStub(channel, callOptions); - } - - /** - *
-     * GetBlock retrieves information about a block based on the provided request
-     * parameters.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getBlock( - pactus.blockchain.BlockchainOuterClass.GetBlockRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBlockMethod(), getCallOptions()), request); - } - - /** - *
-     * GetBlockHash retrieves the hash of a block at the specified height.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getBlockHash( - pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBlockHashMethod(), getCallOptions()), request); - } - - /** - *
-     * GetBlockHeight retrieves the height of a block with the specified hash.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getBlockHeight( - pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBlockHeightMethod(), getCallOptions()), request); - } - - /** - *
-     * GetBlockchainInfo retrieves general information about the blockchain.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getBlockchainInfo( - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetBlockchainInfoMethod(), getCallOptions()), request); - } - - /** - *
-     * GetConsensusInfo retrieves information about the consensus instances.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getConsensusInfo( - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetConsensusInfoMethod(), getCallOptions()), request); - } - - /** - *
-     * GetAccount retrieves information about an account based on the provided
-     * address.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getAccount( - pactus.blockchain.BlockchainOuterClass.GetAccountRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAccountMethod(), getCallOptions()), request); - } - - /** - *
-     * GetValidator retrieves information about a validator based on the provided
-     * address.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getValidator( - pactus.blockchain.BlockchainOuterClass.GetValidatorRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetValidatorMethod(), getCallOptions()), request); - } - - /** - *
-     * GetValidatorByNumber retrieves information about a validator based on the
-     * provided number.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getValidatorByNumber( - pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetValidatorByNumberMethod(), getCallOptions()), request); - } - - /** - *
-     * GetValidatorAddresses retrieves a list of all validator addresses.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getValidatorAddresses( - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetValidatorAddressesMethod(), getCallOptions()), request); - } - - /** - *
-     * GetPublicKey retrieves the public key of an account based on the provided
-     * address.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getPublicKey( - pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPublicKeyMethod(), getCallOptions()), request); - } - - /** - *
-     * GetTxPoolContent retrieves current transactions in the transaction pool.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getTxPoolContent( - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetTxPoolContentMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_BLOCK = 0; - private static final int METHODID_GET_BLOCK_HASH = 1; - private static final int METHODID_GET_BLOCK_HEIGHT = 2; - private static final int METHODID_GET_BLOCKCHAIN_INFO = 3; - private static final int METHODID_GET_CONSENSUS_INFO = 4; - private static final int METHODID_GET_ACCOUNT = 5; - private static final int METHODID_GET_VALIDATOR = 6; - private static final int METHODID_GET_VALIDATOR_BY_NUMBER = 7; - private static final int METHODID_GET_VALIDATOR_ADDRESSES = 8; - private static final int METHODID_GET_PUBLIC_KEY = 9; - private static final int METHODID_GET_TX_POOL_CONTENT = 10; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final BlockchainImplBase serviceImpl; - private final int methodId; - - MethodHandlers(BlockchainImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_GET_BLOCK: - serviceImpl.getBlock((pactus.blockchain.BlockchainOuterClass.GetBlockRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_BLOCK_HASH: - serviceImpl.getBlockHash((pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_BLOCK_HEIGHT: - serviceImpl.getBlockHeight((pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_BLOCKCHAIN_INFO: - serviceImpl.getBlockchainInfo((pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CONSENSUS_INFO: - serviceImpl.getConsensusInfo((pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ACCOUNT: - serviceImpl.getAccount((pactus.blockchain.BlockchainOuterClass.GetAccountRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_VALIDATOR: - serviceImpl.getValidator((pactus.blockchain.BlockchainOuterClass.GetValidatorRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_VALIDATOR_BY_NUMBER: - serviceImpl.getValidatorByNumber((pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_VALIDATOR_ADDRESSES: - serviceImpl.getValidatorAddresses((pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_PUBLIC_KEY: - serviceImpl.getPublicKey((pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_TX_POOL_CONTENT: - serviceImpl.getTxPoolContent((pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class BlockchainBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - BlockchainBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return pactus.blockchain.BlockchainOuterClass.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Blockchain"); - } - } - - private static final class BlockchainFileDescriptorSupplier - extends BlockchainBaseDescriptorSupplier { - BlockchainFileDescriptorSupplier() {} - } - - private static final class BlockchainMethodDescriptorSupplier - extends BlockchainBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - BlockchainMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (BlockchainGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new BlockchainFileDescriptorSupplier()) - .addMethod(getGetBlockMethod()) - .addMethod(getGetBlockHashMethod()) - .addMethod(getGetBlockHeightMethod()) - .addMethod(getGetBlockchainInfoMethod()) - .addMethod(getGetConsensusInfoMethod()) - .addMethod(getGetAccountMethod()) - .addMethod(getGetValidatorMethod()) - .addMethod(getGetValidatorByNumberMethod()) - .addMethod(getGetValidatorAddressesMethod()) - .addMethod(getGetPublicKeyMethod()) - .addMethod(getGetTxPoolContentMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java b/www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java deleted file mode 100644 index 696ee802c..000000000 --- a/www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java +++ /dev/null @@ -1,25014 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: blockchain.proto - -package pactus.blockchain; - -public final class BlockchainOuterClass { - private BlockchainOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - *
-   * Enumeration for verbosity levels when requesting block information.
-   * 
- * - * Protobuf enum {@code pactus.BlockVerbosity} - */ - public enum BlockVerbosity - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Request only block data.
-     * 
- * - * BLOCK_DATA = 0; - */ - BLOCK_DATA(0), - /** - *
-     * Request block information and transaction IDs.
-     * 
- * - * BLOCK_INFO = 1; - */ - BLOCK_INFO(1), - /** - *
-     * Request block information and detailed transaction data.
-     * 
- * - * BLOCK_TRANSACTIONS = 2; - */ - BLOCK_TRANSACTIONS(2), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Request only block data.
-     * 
- * - * BLOCK_DATA = 0; - */ - public static final int BLOCK_DATA_VALUE = 0; - /** - *
-     * Request block information and transaction IDs.
-     * 
- * - * BLOCK_INFO = 1; - */ - public static final int BLOCK_INFO_VALUE = 1; - /** - *
-     * Request block information and detailed transaction data.
-     * 
- * - * BLOCK_TRANSACTIONS = 2; - */ - public static final int BLOCK_TRANSACTIONS_VALUE = 2; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BlockVerbosity valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static BlockVerbosity forNumber(int value) { - switch (value) { - case 0: return BLOCK_DATA; - case 1: return BLOCK_INFO; - case 2: return BLOCK_TRANSACTIONS; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BlockVerbosity> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public BlockVerbosity findValueByNumber(int number) { - return BlockVerbosity.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.getDescriptor().getEnumTypes().get(0); - } - - private static final BlockVerbosity[] VALUES = values(); - - public static BlockVerbosity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BlockVerbosity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:pactus.BlockVerbosity) - } - - /** - *
-   * Enumeration for types of votes.
-   * 
- * - * Protobuf enum {@code pactus.VoteType} - */ - public enum VoteType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown vote type.
-     * 
- * - * VOTE_UNKNOWN = 0; - */ - VOTE_UNKNOWN(0), - /** - *
-     * Prepare vote type.
-     * 
- * - * VOTE_PREPARE = 1; - */ - VOTE_PREPARE(1), - /** - *
-     * Precommit vote type.
-     * 
- * - * VOTE_PRECOMMIT = 2; - */ - VOTE_PRECOMMIT(2), - /** - *
-     * Change proposer vote type.
-     * 
- * - * VOTE_CHANGE_PROPOSER = 3; - */ - VOTE_CHANGE_PROPOSER(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown vote type.
-     * 
- * - * VOTE_UNKNOWN = 0; - */ - public static final int VOTE_UNKNOWN_VALUE = 0; - /** - *
-     * Prepare vote type.
-     * 
- * - * VOTE_PREPARE = 1; - */ - public static final int VOTE_PREPARE_VALUE = 1; - /** - *
-     * Precommit vote type.
-     * 
- * - * VOTE_PRECOMMIT = 2; - */ - public static final int VOTE_PRECOMMIT_VALUE = 2; - /** - *
-     * Change proposer vote type.
-     * 
- * - * VOTE_CHANGE_PROPOSER = 3; - */ - public static final int VOTE_CHANGE_PROPOSER_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static VoteType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static VoteType forNumber(int value) { - switch (value) { - case 0: return VOTE_UNKNOWN; - case 1: return VOTE_PREPARE; - case 2: return VOTE_PRECOMMIT; - case 3: return VOTE_CHANGE_PROPOSER; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - VoteType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public VoteType findValueByNumber(int number) { - return VoteType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.getDescriptor().getEnumTypes().get(1); - } - - private static final VoteType[] VALUES = values(); - - public static VoteType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private VoteType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:pactus.VoteType) - } - - public interface GetAccountRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetAccountRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The address of the account to retrieve information for.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The address of the account to retrieve information for.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - } - /** - *
-   * Message to request account information based on an address.
-   * 
- * - * Protobuf type {@code pactus.GetAccountRequest} - */ - public static final class GetAccountRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetAccountRequest) - GetAccountRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetAccountRequest.newBuilder() to construct. - private GetAccountRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetAccountRequest() { - address_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetAccountRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetAccountRequest.class, pactus.blockchain.BlockchainOuterClass.GetAccountRequest.Builder.class); - } - - public static final int ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object address_; - /** - *
-     * The address of the account to retrieve information for.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The address of the account to retrieve information for.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetAccountRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetAccountRequest other = (pactus.blockchain.BlockchainOuterClass.GetAccountRequest) obj; - - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetAccountRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message to request account information based on an address.
-     * 
- * - * Protobuf type {@code pactus.GetAccountRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetAccountRequest) - pactus.blockchain.BlockchainOuterClass.GetAccountRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetAccountRequest.class, pactus.blockchain.BlockchainOuterClass.GetAccountRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetAccountRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - address_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetAccountRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetAccountRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetAccountRequest build() { - pactus.blockchain.BlockchainOuterClass.GetAccountRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetAccountRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetAccountRequest result = new pactus.blockchain.BlockchainOuterClass.GetAccountRequest(this); - result.address_ = address_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetAccountRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetAccountRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetAccountRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetAccountRequest.getDefaultInstance()) return this; - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * The address of the account to retrieve information for.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the account to retrieve information for.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the account to retrieve information for.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the account to retrieve information for.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The address of the account to retrieve information for.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetAccountRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetAccountRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetAccountRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetAccountRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAccountRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetAccountRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetAccountResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetAccountResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Detailed information about the account.
-     * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - * @return Whether the account field is set. - */ - boolean hasAccount(); - /** - *
-     * Detailed information about the account.
-     * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - * @return The account. - */ - pactus.blockchain.BlockchainOuterClass.AccountInfo getAccount(); - /** - *
-     * Detailed information about the account.
-     * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - */ - pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder getAccountOrBuilder(); - } - /** - *
-   * Message containing the response with account information.
-   * 
- * - * Protobuf type {@code pactus.GetAccountResponse} - */ - public static final class GetAccountResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetAccountResponse) - GetAccountResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetAccountResponse.newBuilder() to construct. - private GetAccountResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetAccountResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetAccountResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetAccountResponse.class, pactus.blockchain.BlockchainOuterClass.GetAccountResponse.Builder.class); - } - - public static final int ACCOUNT_FIELD_NUMBER = 1; - private pactus.blockchain.BlockchainOuterClass.AccountInfo account_; - /** - *
-     * Detailed information about the account.
-     * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - * @return Whether the account field is set. - */ - @java.lang.Override - public boolean hasAccount() { - return account_ != null; - } - /** - *
-     * Detailed information about the account.
-     * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - * @return The account. - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.AccountInfo getAccount() { - return account_ == null ? pactus.blockchain.BlockchainOuterClass.AccountInfo.getDefaultInstance() : account_; - } - /** - *
-     * Detailed information about the account.
-     * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder getAccountOrBuilder() { - return getAccount(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (account_ != null) { - output.writeMessage(1, getAccount()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (account_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAccount()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetAccountResponse)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetAccountResponse other = (pactus.blockchain.BlockchainOuterClass.GetAccountResponse) obj; - - if (hasAccount() != other.hasAccount()) return false; - if (hasAccount()) { - if (!getAccount() - .equals(other.getAccount())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAccount()) { - hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; - hash = (53 * hash) + getAccount().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetAccountResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing the response with account information.
-     * 
- * - * Protobuf type {@code pactus.GetAccountResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetAccountResponse) - pactus.blockchain.BlockchainOuterClass.GetAccountResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetAccountResponse.class, pactus.blockchain.BlockchainOuterClass.GetAccountResponse.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetAccountResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (accountBuilder_ == null) { - account_ = null; - } else { - account_ = null; - accountBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetAccountResponse getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetAccountResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetAccountResponse build() { - pactus.blockchain.BlockchainOuterClass.GetAccountResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetAccountResponse buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetAccountResponse result = new pactus.blockchain.BlockchainOuterClass.GetAccountResponse(this); - if (accountBuilder_ == null) { - result.account_ = account_; - } else { - result.account_ = accountBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetAccountResponse) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetAccountResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetAccountResponse other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetAccountResponse.getDefaultInstance()) return this; - if (other.hasAccount()) { - mergeAccount(other.getAccount()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getAccountFieldBuilder().getBuilder(), - extensionRegistry); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private pactus.blockchain.BlockchainOuterClass.AccountInfo account_; - private com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.AccountInfo, pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder, pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder> accountBuilder_; - /** - *
-       * Detailed information about the account.
-       * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - * @return Whether the account field is set. - */ - public boolean hasAccount() { - return accountBuilder_ != null || account_ != null; - } - /** - *
-       * Detailed information about the account.
-       * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - * @return The account. - */ - public pactus.blockchain.BlockchainOuterClass.AccountInfo getAccount() { - if (accountBuilder_ == null) { - return account_ == null ? pactus.blockchain.BlockchainOuterClass.AccountInfo.getDefaultInstance() : account_; - } else { - return accountBuilder_.getMessage(); - } - } - /** - *
-       * Detailed information about the account.
-       * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - */ - public Builder setAccount(pactus.blockchain.BlockchainOuterClass.AccountInfo value) { - if (accountBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - account_ = value; - onChanged(); - } else { - accountBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Detailed information about the account.
-       * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - */ - public Builder setAccount( - pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder builderForValue) { - if (accountBuilder_ == null) { - account_ = builderForValue.build(); - onChanged(); - } else { - accountBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Detailed information about the account.
-       * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - */ - public Builder mergeAccount(pactus.blockchain.BlockchainOuterClass.AccountInfo value) { - if (accountBuilder_ == null) { - if (account_ != null) { - account_ = - pactus.blockchain.BlockchainOuterClass.AccountInfo.newBuilder(account_).mergeFrom(value).buildPartial(); - } else { - account_ = value; - } - onChanged(); - } else { - accountBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Detailed information about the account.
-       * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - */ - public Builder clearAccount() { - if (accountBuilder_ == null) { - account_ = null; - onChanged(); - } else { - account_ = null; - accountBuilder_ = null; - } - - return this; - } - /** - *
-       * Detailed information about the account.
-       * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - */ - public pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder getAccountBuilder() { - - onChanged(); - return getAccountFieldBuilder().getBuilder(); - } - /** - *
-       * Detailed information about the account.
-       * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - */ - public pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder getAccountOrBuilder() { - if (accountBuilder_ != null) { - return accountBuilder_.getMessageOrBuilder(); - } else { - return account_ == null ? - pactus.blockchain.BlockchainOuterClass.AccountInfo.getDefaultInstance() : account_; - } - } - /** - *
-       * Detailed information about the account.
-       * 
- * - * .pactus.AccountInfo account = 1 [json_name = "account"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.AccountInfo, pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder, pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder> - getAccountFieldBuilder() { - if (accountBuilder_ == null) { - accountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.AccountInfo, pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder, pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder>( - getAccount(), - getParentForChildren(), - isClean()); - account_ = null; - } - return accountBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetAccountResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetAccountResponse) - private static final pactus.blockchain.BlockchainOuterClass.GetAccountResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetAccountResponse(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAccountResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetAccountResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetValidatorAddressesRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressesRequest) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Message to request validator addresses.
-   * 
- * - * Protobuf type {@code pactus.GetValidatorAddressesRequest} - */ - public static final class GetValidatorAddressesRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressesRequest) - GetValidatorAddressesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetValidatorAddressesRequest.newBuilder() to construct. - private GetValidatorAddressesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetValidatorAddressesRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetValidatorAddressesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest other = (pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message to request validator addresses.
-     * 
- * - * Protobuf type {@code pactus.GetValidatorAddressesRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressesRequest) - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest build() { - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest result = new pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressesRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressesRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetValidatorAddressesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetValidatorAddressesResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * List of validator addresses.
-     * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @return A list containing the addresses. - */ - java.util.List - getAddressesList(); - /** - *
-     * List of validator addresses.
-     * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @return The count of addresses. - */ - int getAddressesCount(); - /** - *
-     * List of validator addresses.
-     * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @param index The index of the element to return. - * @return The addresses at the given index. - */ - java.lang.String getAddresses(int index); - /** - *
-     * List of validator addresses.
-     * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @param index The index of the value to return. - * @return The bytes of the addresses at the given index. - */ - com.google.protobuf.ByteString - getAddressesBytes(int index); - } - /** - *
-   * Message containing the response with a list of validator addresses.
-   * 
- * - * Protobuf type {@code pactus.GetValidatorAddressesResponse} - */ - public static final class GetValidatorAddressesResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressesResponse) - GetValidatorAddressesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetValidatorAddressesResponse.newBuilder() to construct. - private GetValidatorAddressesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetValidatorAddressesResponse() { - addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetValidatorAddressesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.class, pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.Builder.class); - } - - public static final int ADDRESSES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList addresses_; - /** - *
-     * List of validator addresses.
-     * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @return A list containing the addresses. - */ - public com.google.protobuf.ProtocolStringList - getAddressesList() { - return addresses_; - } - /** - *
-     * List of validator addresses.
-     * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @return The count of addresses. - */ - public int getAddressesCount() { - return addresses_.size(); - } - /** - *
-     * List of validator addresses.
-     * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @param index The index of the element to return. - * @return The addresses at the given index. - */ - public java.lang.String getAddresses(int index) { - return addresses_.get(index); - } - /** - *
-     * List of validator addresses.
-     * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @param index The index of the value to return. - * @return The bytes of the addresses at the given index. - */ - public com.google.protobuf.ByteString - getAddressesBytes(int index) { - return addresses_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < addresses_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, addresses_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < addresses_.size(); i++) { - dataSize += computeStringSizeNoTag(addresses_.getRaw(i)); - } - size += dataSize; - size += 1 * getAddressesList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse other = (pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse) obj; - - if (!getAddressesList() - .equals(other.getAddressesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAddressesCount() > 0) { - hash = (37 * hash) + ADDRESSES_FIELD_NUMBER; - hash = (53 * hash) + getAddressesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing the response with a list of validator addresses.
-     * 
- * - * Protobuf type {@code pactus.GetValidatorAddressesResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressesResponse) - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.class, pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse build() { - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse result = new pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - addresses_ = addresses_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.addresses_ = addresses_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.getDefaultInstance()) return this; - if (!other.addresses_.isEmpty()) { - if (addresses_.isEmpty()) { - addresses_ = other.addresses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAddressesIsMutable(); - addresses_.addAll(other.addresses_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureAddressesIsMutable(); - addresses_.add(s); - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.LazyStringList addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureAddressesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - addresses_ = new com.google.protobuf.LazyStringArrayList(addresses_); - bitField0_ |= 0x00000001; - } - } - /** - *
-       * List of validator addresses.
-       * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @return A list containing the addresses. - */ - public com.google.protobuf.ProtocolStringList - getAddressesList() { - return addresses_.getUnmodifiableView(); - } - /** - *
-       * List of validator addresses.
-       * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @return The count of addresses. - */ - public int getAddressesCount() { - return addresses_.size(); - } - /** - *
-       * List of validator addresses.
-       * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @param index The index of the element to return. - * @return The addresses at the given index. - */ - public java.lang.String getAddresses(int index) { - return addresses_.get(index); - } - /** - *
-       * List of validator addresses.
-       * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @param index The index of the value to return. - * @return The bytes of the addresses at the given index. - */ - public com.google.protobuf.ByteString - getAddressesBytes(int index) { - return addresses_.getByteString(index); - } - /** - *
-       * List of validator addresses.
-       * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @param index The index to set the value at. - * @param value The addresses to set. - * @return This builder for chaining. - */ - public Builder setAddresses( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAddressesIsMutable(); - addresses_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * List of validator addresses.
-       * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @param value The addresses to add. - * @return This builder for chaining. - */ - public Builder addAddresses( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAddressesIsMutable(); - addresses_.add(value); - onChanged(); - return this; - } - /** - *
-       * List of validator addresses.
-       * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @param values The addresses to add. - * @return This builder for chaining. - */ - public Builder addAllAddresses( - java.lang.Iterable values) { - ensureAddressesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, addresses_); - onChanged(); - return this; - } - /** - *
-       * List of validator addresses.
-       * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @return This builder for chaining. - */ - public Builder clearAddresses() { - addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * List of validator addresses.
-       * 
- * - * repeated string addresses = 1 [json_name = "addresses"]; - * @param value The bytes of the addresses to add. - * @return This builder for chaining. - */ - public Builder addAddressesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAddressesIsMutable(); - addresses_.add(value); - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressesResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressesResponse) - private static final pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetValidatorAddressesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetValidatorRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetValidatorRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The address of the validator to retrieve information for.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The address of the validator to retrieve information for.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - } - /** - *
-   * Message to request validator information based on an address.
-   * 
- * - * Protobuf type {@code pactus.GetValidatorRequest} - */ - public static final class GetValidatorRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetValidatorRequest) - GetValidatorRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetValidatorRequest.newBuilder() to construct. - private GetValidatorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetValidatorRequest() { - address_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetValidatorRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.Builder.class); - } - - public static final int ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object address_; - /** - *
-     * The address of the validator to retrieve information for.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The address of the validator to retrieve information for.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetValidatorRequest other = (pactus.blockchain.BlockchainOuterClass.GetValidatorRequest) obj; - - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetValidatorRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message to request validator information based on an address.
-     * 
- * - * Protobuf type {@code pactus.GetValidatorRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetValidatorRequest) - pactus.blockchain.BlockchainOuterClass.GetValidatorRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - address_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorRequest build() { - pactus.blockchain.BlockchainOuterClass.GetValidatorRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetValidatorRequest result = new pactus.blockchain.BlockchainOuterClass.GetValidatorRequest(this); - result.address_ = address_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetValidatorRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetValidatorRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.getDefaultInstance()) return this; - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * The address of the validator to retrieve information for.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the validator to retrieve information for.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the validator to retrieve information for.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the validator to retrieve information for.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The address of the validator to retrieve information for.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetValidatorRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetValidatorRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetValidatorRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetValidatorRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetValidatorRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetValidatorByNumberRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetValidatorByNumberRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The unique number of the validator to retrieve information for.
-     * 
- * - * int32 number = 1 [json_name = "number"]; - * @return The number. - */ - int getNumber(); - } - /** - *
-   * Message to request validator information based on a validator number.
-   * 
- * - * Protobuf type {@code pactus.GetValidatorByNumberRequest} - */ - public static final class GetValidatorByNumberRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetValidatorByNumberRequest) - GetValidatorByNumberRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetValidatorByNumberRequest.newBuilder() to construct. - private GetValidatorByNumberRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetValidatorByNumberRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetValidatorByNumberRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.Builder.class); - } - - public static final int NUMBER_FIELD_NUMBER = 1; - private int number_; - /** - *
-     * The unique number of the validator to retrieve information for.
-     * 
- * - * int32 number = 1 [json_name = "number"]; - * @return The number. - */ - @java.lang.Override - public int getNumber() { - return number_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (number_ != 0) { - output.writeInt32(1, number_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (number_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, number_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest other = (pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest) obj; - - if (getNumber() - != other.getNumber()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getNumber(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message to request validator information based on a validator number.
-     * 
- * - * Protobuf type {@code pactus.GetValidatorByNumberRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetValidatorByNumberRequest) - pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - number_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest build() { - pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest result = new pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest(this); - result.number_ = number_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.getDefaultInstance()) return this; - if (other.getNumber() != 0) { - setNumber(other.getNumber()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - number_ = input.readInt32(); - - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int number_ ; - /** - *
-       * The unique number of the validator to retrieve information for.
-       * 
- * - * int32 number = 1 [json_name = "number"]; - * @return The number. - */ - @java.lang.Override - public int getNumber() { - return number_; - } - /** - *
-       * The unique number of the validator to retrieve information for.
-       * 
- * - * int32 number = 1 [json_name = "number"]; - * @param value The number to set. - * @return This builder for chaining. - */ - public Builder setNumber(int value) { - - number_ = value; - onChanged(); - return this; - } - /** - *
-       * The unique number of the validator to retrieve information for.
-       * 
- * - * int32 number = 1 [json_name = "number"]; - * @return This builder for chaining. - */ - public Builder clearNumber() { - - number_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetValidatorByNumberRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetValidatorByNumberRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetValidatorByNumberRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetValidatorResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetValidatorResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Detailed information about the validator.
-     * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - * @return Whether the validator field is set. - */ - boolean hasValidator(); - /** - *
-     * Detailed information about the validator.
-     * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - * @return The validator. - */ - pactus.blockchain.BlockchainOuterClass.ValidatorInfo getValidator(); - /** - *
-     * Detailed information about the validator.
-     * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - */ - pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorOrBuilder(); - } - /** - *
-   * Message containing the response with validator information.
-   * 
- * - * Protobuf type {@code pactus.GetValidatorResponse} - */ - public static final class GetValidatorResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetValidatorResponse) - GetValidatorResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetValidatorResponse.newBuilder() to construct. - private GetValidatorResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetValidatorResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetValidatorResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.class, pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.Builder.class); - } - - public static final int VALIDATOR_FIELD_NUMBER = 1; - private pactus.blockchain.BlockchainOuterClass.ValidatorInfo validator_; - /** - *
-     * Detailed information about the validator.
-     * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - * @return Whether the validator field is set. - */ - @java.lang.Override - public boolean hasValidator() { - return validator_ != null; - } - /** - *
-     * Detailed information about the validator.
-     * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - * @return The validator. - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getValidator() { - return validator_ == null ? pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance() : validator_; - } - /** - *
-     * Detailed information about the validator.
-     * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorOrBuilder() { - return getValidator(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (validator_ != null) { - output.writeMessage(1, getValidator()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (validator_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getValidator()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorResponse)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetValidatorResponse other = (pactus.blockchain.BlockchainOuterClass.GetValidatorResponse) obj; - - if (hasValidator() != other.hasValidator()) return false; - if (hasValidator()) { - if (!getValidator() - .equals(other.getValidator())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasValidator()) { - hash = (37 * hash) + VALIDATOR_FIELD_NUMBER; - hash = (53 * hash) + getValidator().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetValidatorResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing the response with validator information.
-     * 
- * - * Protobuf type {@code pactus.GetValidatorResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetValidatorResponse) - pactus.blockchain.BlockchainOuterClass.GetValidatorResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.class, pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (validatorBuilder_ == null) { - validator_ = null; - } else { - validator_ = null; - validatorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse build() { - pactus.blockchain.BlockchainOuterClass.GetValidatorResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetValidatorResponse result = new pactus.blockchain.BlockchainOuterClass.GetValidatorResponse(this); - if (validatorBuilder_ == null) { - result.validator_ = validator_; - } else { - result.validator_ = validatorBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorResponse) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetValidatorResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetValidatorResponse other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance()) return this; - if (other.hasValidator()) { - mergeValidator(other.getValidator()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getValidatorFieldBuilder().getBuilder(), - extensionRegistry); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private pactus.blockchain.BlockchainOuterClass.ValidatorInfo validator_; - private com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder> validatorBuilder_; - /** - *
-       * Detailed information about the validator.
-       * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - * @return Whether the validator field is set. - */ - public boolean hasValidator() { - return validatorBuilder_ != null || validator_ != null; - } - /** - *
-       * Detailed information about the validator.
-       * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - * @return The validator. - */ - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getValidator() { - if (validatorBuilder_ == null) { - return validator_ == null ? pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance() : validator_; - } else { - return validatorBuilder_.getMessage(); - } - } - /** - *
-       * Detailed information about the validator.
-       * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - */ - public Builder setValidator(pactus.blockchain.BlockchainOuterClass.ValidatorInfo value) { - if (validatorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - validator_ = value; - onChanged(); - } else { - validatorBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Detailed information about the validator.
-       * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - */ - public Builder setValidator( - pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) { - if (validatorBuilder_ == null) { - validator_ = builderForValue.build(); - onChanged(); - } else { - validatorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Detailed information about the validator.
-       * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - */ - public Builder mergeValidator(pactus.blockchain.BlockchainOuterClass.ValidatorInfo value) { - if (validatorBuilder_ == null) { - if (validator_ != null) { - validator_ = - pactus.blockchain.BlockchainOuterClass.ValidatorInfo.newBuilder(validator_).mergeFrom(value).buildPartial(); - } else { - validator_ = value; - } - onChanged(); - } else { - validatorBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Detailed information about the validator.
-       * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - */ - public Builder clearValidator() { - if (validatorBuilder_ == null) { - validator_ = null; - onChanged(); - } else { - validator_ = null; - validatorBuilder_ = null; - } - - return this; - } - /** - *
-       * Detailed information about the validator.
-       * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - */ - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder getValidatorBuilder() { - - onChanged(); - return getValidatorFieldBuilder().getBuilder(); - } - /** - *
-       * Detailed information about the validator.
-       * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - */ - public pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorOrBuilder() { - if (validatorBuilder_ != null) { - return validatorBuilder_.getMessageOrBuilder(); - } else { - return validator_ == null ? - pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance() : validator_; - } - } - /** - *
-       * Detailed information about the validator.
-       * 
- * - * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder> - getValidatorFieldBuilder() { - if (validatorBuilder_ == null) { - validatorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder>( - getValidator(), - getParentForChildren(), - isClean()); - validator_ = null; - } - return validatorBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetValidatorResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetValidatorResponse) - private static final pactus.blockchain.BlockchainOuterClass.GetValidatorResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetValidatorResponse(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetValidatorResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetPublicKeyRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetPublicKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The address for which to retrieve the public key.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The address for which to retrieve the public key.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - } - /** - *
-   * Message to request public key based on an address.
-   * 
- * - * Protobuf type {@code pactus.GetPublicKeyRequest} - */ - public static final class GetPublicKeyRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetPublicKeyRequest) - GetPublicKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetPublicKeyRequest.newBuilder() to construct. - private GetPublicKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetPublicKeyRequest() { - address_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetPublicKeyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.class, pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.Builder.class); - } - - public static final int ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object address_; - /** - *
-     * The address for which to retrieve the public key.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The address for which to retrieve the public key.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest other = (pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest) obj; - - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message to request public key based on an address.
-     * 
- * - * Protobuf type {@code pactus.GetPublicKeyRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetPublicKeyRequest) - pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.class, pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - address_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest build() { - pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest result = new pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest(this); - result.address_ = address_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.getDefaultInstance()) return this; - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * The address for which to retrieve the public key.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address for which to retrieve the public key.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address for which to retrieve the public key.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The address for which to retrieve the public key.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The address for which to retrieve the public key.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetPublicKeyRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetPublicKeyRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetPublicKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetPublicKeyResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetPublicKeyResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The public key associated with the provided address.
-     * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The publicKey. - */ - java.lang.String getPublicKey(); - /** - *
-     * The public key associated with the provided address.
-     * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - com.google.protobuf.ByteString - getPublicKeyBytes(); - } - /** - *
-   * Message containing the response with the public key.
-   * 
- * - * Protobuf type {@code pactus.GetPublicKeyResponse} - */ - public static final class GetPublicKeyResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetPublicKeyResponse) - GetPublicKeyResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetPublicKeyResponse.newBuilder() to construct. - private GetPublicKeyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetPublicKeyResponse() { - publicKey_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetPublicKeyResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.class, pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.Builder.class); - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object publicKey_; - /** - *
-     * The public key associated with the provided address.
-     * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The publicKey. - */ - @java.lang.Override - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } - } - /** - *
-     * The public key associated with the provided address.
-     * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse other = (pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse) obj; - - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing the response with the public key.
-     * 
- * - * Protobuf type {@code pactus.GetPublicKeyResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetPublicKeyResponse) - pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.class, pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - publicKey_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse build() { - pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse result = new pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse(this); - result.publicKey_ = publicKey_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.getDefaultInstance()) return this; - if (!other.getPublicKey().isEmpty()) { - publicKey_ = other.publicKey_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - publicKey_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object publicKey_ = ""; - /** - *
-       * The public key associated with the provided address.
-       * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The publicKey. - */ - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The public key associated with the provided address.
-       * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The public key associated with the provided address.
-       * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @param value The publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - publicKey_ = value; - onChanged(); - return this; - } - /** - *
-       * The public key associated with the provided address.
-       * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - - publicKey_ = getDefaultInstance().getPublicKey(); - onChanged(); - return this; - } - /** - *
-       * The public key associated with the provided address.
-       * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @param value The bytes for publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - publicKey_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetPublicKeyResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetPublicKeyResponse) - private static final pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetPublicKeyResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetBlockRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetBlockRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The height of the block to retrieve.
-     * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - int getHeight(); - - /** - *
-     * The verbosity level for block information.
-     * 
- * - * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The enum numeric value on the wire for verbosity. - */ - int getVerbosityValue(); - /** - *
-     * The verbosity level for block information.
-     * 
- * - * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The verbosity. - */ - pactus.blockchain.BlockchainOuterClass.BlockVerbosity getVerbosity(); - } - /** - *
-   * Message to request block information based on height and verbosity level.
-   * 
- * - * Protobuf type {@code pactus.GetBlockRequest} - */ - public static final class GetBlockRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetBlockRequest) - GetBlockRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBlockRequest.newBuilder() to construct. - private GetBlockRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBlockRequest() { - verbosity_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBlockRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockRequest.Builder.class); - } - - public static final int HEIGHT_FIELD_NUMBER = 1; - private int height_; - /** - *
-     * The height of the block to retrieve.
-     * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - public static final int VERBOSITY_FIELD_NUMBER = 2; - private int verbosity_; - /** - *
-     * The verbosity level for block information.
-     * 
- * - * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The enum numeric value on the wire for verbosity. - */ - @java.lang.Override public int getVerbosityValue() { - return verbosity_; - } - /** - *
-     * The verbosity level for block information.
-     * 
- * - * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The verbosity. - */ - @java.lang.Override public pactus.blockchain.BlockchainOuterClass.BlockVerbosity getVerbosity() { - @SuppressWarnings("deprecation") - pactus.blockchain.BlockchainOuterClass.BlockVerbosity result = pactus.blockchain.BlockchainOuterClass.BlockVerbosity.valueOf(verbosity_); - return result == null ? pactus.blockchain.BlockchainOuterClass.BlockVerbosity.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (height_ != 0) { - output.writeUInt32(1, height_); - } - if (verbosity_ != pactus.blockchain.BlockchainOuterClass.BlockVerbosity.BLOCK_DATA.getNumber()) { - output.writeEnum(2, verbosity_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, height_); - } - if (verbosity_ != pactus.blockchain.BlockchainOuterClass.BlockVerbosity.BLOCK_DATA.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, verbosity_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetBlockRequest other = (pactus.blockchain.BlockchainOuterClass.GetBlockRequest) obj; - - if (getHeight() - != other.getHeight()) return false; - if (verbosity_ != other.verbosity_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - hash = (37 * hash) + VERBOSITY_FIELD_NUMBER; - hash = (53 * hash) + verbosity_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message to request block information based on height and verbosity level.
-     * 
- * - * Protobuf type {@code pactus.GetBlockRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetBlockRequest) - pactus.blockchain.BlockchainOuterClass.GetBlockRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - height_ = 0; - - verbosity_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetBlockRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockRequest build() { - pactus.blockchain.BlockchainOuterClass.GetBlockRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetBlockRequest result = new pactus.blockchain.BlockchainOuterClass.GetBlockRequest(this); - result.height_ = height_; - result.verbosity_ = verbosity_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetBlockRequest.getDefaultInstance()) return this; - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (other.verbosity_ != 0) { - setVerbosityValue(other.getVerbosityValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - height_ = input.readUInt32(); - - break; - } // case 8 - case 16: { - verbosity_ = input.readEnum(); - - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int height_ ; - /** - *
-       * The height of the block to retrieve.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-       * The height of the block to retrieve.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-       * The height of the block to retrieve.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private int verbosity_ = 0; - /** - *
-       * The verbosity level for block information.
-       * 
- * - * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The enum numeric value on the wire for verbosity. - */ - @java.lang.Override public int getVerbosityValue() { - return verbosity_; - } - /** - *
-       * The verbosity level for block information.
-       * 
- * - * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; - * @param value The enum numeric value on the wire for verbosity to set. - * @return This builder for chaining. - */ - public Builder setVerbosityValue(int value) { - - verbosity_ = value; - onChanged(); - return this; - } - /** - *
-       * The verbosity level for block information.
-       * 
- * - * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The verbosity. - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.BlockVerbosity getVerbosity() { - @SuppressWarnings("deprecation") - pactus.blockchain.BlockchainOuterClass.BlockVerbosity result = pactus.blockchain.BlockchainOuterClass.BlockVerbosity.valueOf(verbosity_); - return result == null ? pactus.blockchain.BlockchainOuterClass.BlockVerbosity.UNRECOGNIZED : result; - } - /** - *
-       * The verbosity level for block information.
-       * 
- * - * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; - * @param value The verbosity to set. - * @return This builder for chaining. - */ - public Builder setVerbosity(pactus.blockchain.BlockchainOuterClass.BlockVerbosity value) { - if (value == null) { - throw new NullPointerException(); - } - - verbosity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The verbosity level for block information.
-       * 
- * - * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return This builder for chaining. - */ - public Builder clearVerbosity() { - - verbosity_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetBlockRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetBlockRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetBlockRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBlockRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetBlockResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetBlockResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The height of the block.
-     * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - int getHeight(); - - /** - *
-     * The hash of the block.
-     * 
- * - * string hash = 2 [json_name = "hash"]; - * @return The hash. - */ - java.lang.String getHash(); - /** - *
-     * The hash of the block.
-     * 
- * - * string hash = 2 [json_name = "hash"]; - * @return The bytes for hash. - */ - com.google.protobuf.ByteString - getHashBytes(); - - /** - *
-     * Block data, available only if verbosity level is set to BLOCK_DATA.
-     * 
- * - * string data = 3 [json_name = "data"]; - * @return The data. - */ - java.lang.String getData(); - /** - *
-     * Block data, available only if verbosity level is set to BLOCK_DATA.
-     * 
- * - * string data = 3 [json_name = "data"]; - * @return The bytes for data. - */ - com.google.protobuf.ByteString - getDataBytes(); - - /** - *
-     * The timestamp of the block.
-     * 
- * - * uint32 block_time = 4 [json_name = "blockTime"]; - * @return The blockTime. - */ - int getBlockTime(); - - /** - *
-     * Header information of the block.
-     * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - * @return Whether the header field is set. - */ - boolean hasHeader(); - /** - *
-     * Header information of the block.
-     * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - * @return The header. - */ - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getHeader(); - /** - *
-     * Header information of the block.
-     * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - */ - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder getHeaderOrBuilder(); - - /** - *
-     * Certificate information of the previous block.
-     * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - * @return Whether the prevCert field is set. - */ - boolean hasPrevCert(); - /** - *
-     * Certificate information of the previous block.
-     * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - * @return The prevCert. - */ - pactus.blockchain.BlockchainOuterClass.CertificateInfo getPrevCert(); - /** - *
-     * Certificate information of the previous block.
-     * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - */ - pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder getPrevCertOrBuilder(); - - /** - *
-     * List of transactions in the block, available when verbosity level is set to
-     * BLOCK_TRANSACTIONS.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - java.util.List - getTxsList(); - /** - *
-     * List of transactions in the block, available when verbosity level is set to
-     * BLOCK_TRANSACTIONS.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index); - /** - *
-     * List of transactions in the block, available when verbosity level is set to
-     * BLOCK_TRANSACTIONS.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - int getTxsCount(); - /** - *
-     * List of transactions in the block, available when verbosity level is set to
-     * BLOCK_TRANSACTIONS.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - java.util.List - getTxsOrBuilderList(); - /** - *
-     * List of transactions in the block, available when verbosity level is set to
-     * BLOCK_TRANSACTIONS.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( - int index); - } - /** - *
-   * Message containing the response with block information.
-   * 
- * - * Protobuf type {@code pactus.GetBlockResponse} - */ - public static final class GetBlockResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetBlockResponse) - GetBlockResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBlockResponse.newBuilder() to construct. - private GetBlockResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBlockResponse() { - hash_ = ""; - data_ = ""; - txs_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBlockResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockResponse.Builder.class); - } - - public static final int HEIGHT_FIELD_NUMBER = 1; - private int height_; - /** - *
-     * The height of the block.
-     * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - public static final int HASH_FIELD_NUMBER = 2; - private volatile java.lang.Object hash_; - /** - *
-     * The hash of the block.
-     * 
- * - * string hash = 2 [json_name = "hash"]; - * @return The hash. - */ - @java.lang.Override - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } - } - /** - *
-     * The hash of the block.
-     * 
- * - * string hash = 2 [json_name = "hash"]; - * @return The bytes for hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_FIELD_NUMBER = 3; - private volatile java.lang.Object data_; - /** - *
-     * Block data, available only if verbosity level is set to BLOCK_DATA.
-     * 
- * - * string data = 3 [json_name = "data"]; - * @return The data. - */ - @java.lang.Override - public java.lang.String getData() { - java.lang.Object ref = data_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - data_ = s; - return s; - } - } - /** - *
-     * Block data, available only if verbosity level is set to BLOCK_DATA.
-     * 
- * - * string data = 3 [json_name = "data"]; - * @return The bytes for data. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDataBytes() { - java.lang.Object ref = data_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - data_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BLOCK_TIME_FIELD_NUMBER = 4; - private int blockTime_; - /** - *
-     * The timestamp of the block.
-     * 
- * - * uint32 block_time = 4 [json_name = "blockTime"]; - * @return The blockTime. - */ - @java.lang.Override - public int getBlockTime() { - return blockTime_; - } - - public static final int HEADER_FIELD_NUMBER = 5; - private pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo header_; - /** - *
-     * Header information of the block.
-     * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - * @return Whether the header field is set. - */ - @java.lang.Override - public boolean hasHeader() { - return header_ != null; - } - /** - *
-     * Header information of the block.
-     * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - * @return The header. - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getHeader() { - return header_ == null ? pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance() : header_; - } - /** - *
-     * Header information of the block.
-     * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder getHeaderOrBuilder() { - return getHeader(); - } - - public static final int PREV_CERT_FIELD_NUMBER = 6; - private pactus.blockchain.BlockchainOuterClass.CertificateInfo prevCert_; - /** - *
-     * Certificate information of the previous block.
-     * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - * @return Whether the prevCert field is set. - */ - @java.lang.Override - public boolean hasPrevCert() { - return prevCert_ != null; - } - /** - *
-     * Certificate information of the previous block.
-     * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - * @return The prevCert. - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.CertificateInfo getPrevCert() { - return prevCert_ == null ? pactus.blockchain.BlockchainOuterClass.CertificateInfo.getDefaultInstance() : prevCert_; - } - /** - *
-     * Certificate information of the previous block.
-     * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder getPrevCertOrBuilder() { - return getPrevCert(); - } - - public static final int TXS_FIELD_NUMBER = 7; - private java.util.List txs_; - /** - *
-     * List of transactions in the block, available when verbosity level is set to
-     * BLOCK_TRANSACTIONS.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - @java.lang.Override - public java.util.List getTxsList() { - return txs_; - } - /** - *
-     * List of transactions in the block, available when verbosity level is set to
-     * BLOCK_TRANSACTIONS.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - @java.lang.Override - public java.util.List - getTxsOrBuilderList() { - return txs_; - } - /** - *
-     * List of transactions in the block, available when verbosity level is set to
-     * BLOCK_TRANSACTIONS.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - @java.lang.Override - public int getTxsCount() { - return txs_.size(); - } - /** - *
-     * List of transactions in the block, available when verbosity level is set to
-     * BLOCK_TRANSACTIONS.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index) { - return txs_.get(index); - } - /** - *
-     * List of transactions in the block, available when verbosity level is set to
-     * BLOCK_TRANSACTIONS.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( - int index) { - return txs_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (height_ != 0) { - output.writeUInt32(1, height_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hash_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, data_); - } - if (blockTime_ != 0) { - output.writeUInt32(4, blockTime_); - } - if (header_ != null) { - output.writeMessage(5, getHeader()); - } - if (prevCert_ != null) { - output.writeMessage(6, getPrevCert()); - } - for (int i = 0; i < txs_.size(); i++) { - output.writeMessage(7, txs_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, height_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, hash_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, data_); - } - if (blockTime_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, blockTime_); - } - if (header_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, getHeader()); - } - if (prevCert_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getPrevCert()); - } - for (int i = 0; i < txs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, txs_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockResponse)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetBlockResponse other = (pactus.blockchain.BlockchainOuterClass.GetBlockResponse) obj; - - if (getHeight() - != other.getHeight()) return false; - if (!getHash() - .equals(other.getHash())) return false; - if (!getData() - .equals(other.getData())) return false; - if (getBlockTime() - != other.getBlockTime()) return false; - if (hasHeader() != other.hasHeader()) return false; - if (hasHeader()) { - if (!getHeader() - .equals(other.getHeader())) return false; - } - if (hasPrevCert() != other.hasPrevCert()) return false; - if (hasPrevCert()) { - if (!getPrevCert() - .equals(other.getPrevCert())) return false; - } - if (!getTxsList() - .equals(other.getTxsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - hash = (37 * hash) + HASH_FIELD_NUMBER; - hash = (53 * hash) + getHash().hashCode(); - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - hash = (37 * hash) + BLOCK_TIME_FIELD_NUMBER; - hash = (53 * hash) + getBlockTime(); - if (hasHeader()) { - hash = (37 * hash) + HEADER_FIELD_NUMBER; - hash = (53 * hash) + getHeader().hashCode(); - } - if (hasPrevCert()) { - hash = (37 * hash) + PREV_CERT_FIELD_NUMBER; - hash = (53 * hash) + getPrevCert().hashCode(); - } - if (getTxsCount() > 0) { - hash = (37 * hash) + TXS_FIELD_NUMBER; - hash = (53 * hash) + getTxsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing the response with block information.
-     * 
- * - * Protobuf type {@code pactus.GetBlockResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetBlockResponse) - pactus.blockchain.BlockchainOuterClass.GetBlockResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockResponse.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - height_ = 0; - - hash_ = ""; - - data_ = ""; - - blockTime_ = 0; - - if (headerBuilder_ == null) { - header_ = null; - } else { - header_ = null; - headerBuilder_ = null; - } - if (prevCertBuilder_ == null) { - prevCert_ = null; - } else { - prevCert_ = null; - prevCertBuilder_ = null; - } - if (txsBuilder_ == null) { - txs_ = java.util.Collections.emptyList(); - } else { - txs_ = null; - txsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockResponse getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetBlockResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockResponse build() { - pactus.blockchain.BlockchainOuterClass.GetBlockResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockResponse buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetBlockResponse result = new pactus.blockchain.BlockchainOuterClass.GetBlockResponse(this); - int from_bitField0_ = bitField0_; - result.height_ = height_; - result.hash_ = hash_; - result.data_ = data_; - result.blockTime_ = blockTime_; - if (headerBuilder_ == null) { - result.header_ = header_; - } else { - result.header_ = headerBuilder_.build(); - } - if (prevCertBuilder_ == null) { - result.prevCert_ = prevCert_; - } else { - result.prevCert_ = prevCertBuilder_.build(); - } - if (txsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - txs_ = java.util.Collections.unmodifiableList(txs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.txs_ = txs_; - } else { - result.txs_ = txsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockResponse) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockResponse other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetBlockResponse.getDefaultInstance()) return this; - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (!other.getHash().isEmpty()) { - hash_ = other.hash_; - onChanged(); - } - if (!other.getData().isEmpty()) { - data_ = other.data_; - onChanged(); - } - if (other.getBlockTime() != 0) { - setBlockTime(other.getBlockTime()); - } - if (other.hasHeader()) { - mergeHeader(other.getHeader()); - } - if (other.hasPrevCert()) { - mergePrevCert(other.getPrevCert()); - } - if (txsBuilder_ == null) { - if (!other.txs_.isEmpty()) { - if (txs_.isEmpty()) { - txs_ = other.txs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTxsIsMutable(); - txs_.addAll(other.txs_); - } - onChanged(); - } - } else { - if (!other.txs_.isEmpty()) { - if (txsBuilder_.isEmpty()) { - txsBuilder_.dispose(); - txsBuilder_ = null; - txs_ = other.txs_; - bitField0_ = (bitField0_ & ~0x00000001); - txsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTxsFieldBuilder() : null; - } else { - txsBuilder_.addAllMessages(other.txs_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - height_ = input.readUInt32(); - - break; - } // case 8 - case 18: { - hash_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - data_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 32: { - blockTime_ = input.readUInt32(); - - break; - } // case 32 - case 42: { - input.readMessage( - getHeaderFieldBuilder().getBuilder(), - extensionRegistry); - - break; - } // case 42 - case 50: { - input.readMessage( - getPrevCertFieldBuilder().getBuilder(), - extensionRegistry); - - break; - } // case 50 - case 58: { - pactus.transaction.TransactionOuterClass.TransactionInfo m = - input.readMessage( - pactus.transaction.TransactionOuterClass.TransactionInfo.parser(), - extensionRegistry); - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - txs_.add(m); - } else { - txsBuilder_.addMessage(m); - } - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int height_ ; - /** - *
-       * The height of the block.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-       * The height of the block.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-       * The height of the block.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private java.lang.Object hash_ = ""; - /** - *
-       * The hash of the block.
-       * 
- * - * string hash = 2 [json_name = "hash"]; - * @return The hash. - */ - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The hash of the block.
-       * 
- * - * string hash = 2 [json_name = "hash"]; - * @return The bytes for hash. - */ - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The hash of the block.
-       * 
- * - * string hash = 2 [json_name = "hash"]; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - hash_ = value; - onChanged(); - return this; - } - /** - *
-       * The hash of the block.
-       * 
- * - * string hash = 2 [json_name = "hash"]; - * @return This builder for chaining. - */ - public Builder clearHash() { - - hash_ = getDefaultInstance().getHash(); - onChanged(); - return this; - } - /** - *
-       * The hash of the block.
-       * 
- * - * string hash = 2 [json_name = "hash"]; - * @param value The bytes for hash to set. - * @return This builder for chaining. - */ - public Builder setHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - hash_ = value; - onChanged(); - return this; - } - - private java.lang.Object data_ = ""; - /** - *
-       * Block data, available only if verbosity level is set to BLOCK_DATA.
-       * 
- * - * string data = 3 [json_name = "data"]; - * @return The data. - */ - public java.lang.String getData() { - java.lang.Object ref = data_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - data_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Block data, available only if verbosity level is set to BLOCK_DATA.
-       * 
- * - * string data = 3 [json_name = "data"]; - * @return The bytes for data. - */ - public com.google.protobuf.ByteString - getDataBytes() { - java.lang.Object ref = data_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - data_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Block data, available only if verbosity level is set to BLOCK_DATA.
-       * 
- * - * string data = 3 [json_name = "data"]; - * @param value The data to set. - * @return This builder for chaining. - */ - public Builder setData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - data_ = value; - onChanged(); - return this; - } - /** - *
-       * Block data, available only if verbosity level is set to BLOCK_DATA.
-       * 
- * - * string data = 3 [json_name = "data"]; - * @return This builder for chaining. - */ - public Builder clearData() { - - data_ = getDefaultInstance().getData(); - onChanged(); - return this; - } - /** - *
-       * Block data, available only if verbosity level is set to BLOCK_DATA.
-       * 
- * - * string data = 3 [json_name = "data"]; - * @param value The bytes for data to set. - * @return This builder for chaining. - */ - public Builder setDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - data_ = value; - onChanged(); - return this; - } - - private int blockTime_ ; - /** - *
-       * The timestamp of the block.
-       * 
- * - * uint32 block_time = 4 [json_name = "blockTime"]; - * @return The blockTime. - */ - @java.lang.Override - public int getBlockTime() { - return blockTime_; - } - /** - *
-       * The timestamp of the block.
-       * 
- * - * uint32 block_time = 4 [json_name = "blockTime"]; - * @param value The blockTime to set. - * @return This builder for chaining. - */ - public Builder setBlockTime(int value) { - - blockTime_ = value; - onChanged(); - return this; - } - /** - *
-       * The timestamp of the block.
-       * 
- * - * uint32 block_time = 4 [json_name = "blockTime"]; - * @return This builder for chaining. - */ - public Builder clearBlockTime() { - - blockTime_ = 0; - onChanged(); - return this; - } - - private pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo header_; - private com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder> headerBuilder_; - /** - *
-       * Header information of the block.
-       * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - * @return Whether the header field is set. - */ - public boolean hasHeader() { - return headerBuilder_ != null || header_ != null; - } - /** - *
-       * Header information of the block.
-       * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - * @return The header. - */ - public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getHeader() { - if (headerBuilder_ == null) { - return header_ == null ? pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance() : header_; - } else { - return headerBuilder_.getMessage(); - } - } - /** - *
-       * Header information of the block.
-       * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - */ - public Builder setHeader(pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo value) { - if (headerBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - header_ = value; - onChanged(); - } else { - headerBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Header information of the block.
-       * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - */ - public Builder setHeader( - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder builderForValue) { - if (headerBuilder_ == null) { - header_ = builderForValue.build(); - onChanged(); - } else { - headerBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Header information of the block.
-       * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - */ - public Builder mergeHeader(pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo value) { - if (headerBuilder_ == null) { - if (header_ != null) { - header_ = - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.newBuilder(header_).mergeFrom(value).buildPartial(); - } else { - header_ = value; - } - onChanged(); - } else { - headerBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Header information of the block.
-       * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - */ - public Builder clearHeader() { - if (headerBuilder_ == null) { - header_ = null; - onChanged(); - } else { - header_ = null; - headerBuilder_ = null; - } - - return this; - } - /** - *
-       * Header information of the block.
-       * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - */ - public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder getHeaderBuilder() { - - onChanged(); - return getHeaderFieldBuilder().getBuilder(); - } - /** - *
-       * Header information of the block.
-       * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - */ - public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder getHeaderOrBuilder() { - if (headerBuilder_ != null) { - return headerBuilder_.getMessageOrBuilder(); - } else { - return header_ == null ? - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance() : header_; - } - } - /** - *
-       * Header information of the block.
-       * 
- * - * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder> - getHeaderFieldBuilder() { - if (headerBuilder_ == null) { - headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder>( - getHeader(), - getParentForChildren(), - isClean()); - header_ = null; - } - return headerBuilder_; - } - - private pactus.blockchain.BlockchainOuterClass.CertificateInfo prevCert_; - private com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.CertificateInfo, pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder, pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder> prevCertBuilder_; - /** - *
-       * Certificate information of the previous block.
-       * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - * @return Whether the prevCert field is set. - */ - public boolean hasPrevCert() { - return prevCertBuilder_ != null || prevCert_ != null; - } - /** - *
-       * Certificate information of the previous block.
-       * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - * @return The prevCert. - */ - public pactus.blockchain.BlockchainOuterClass.CertificateInfo getPrevCert() { - if (prevCertBuilder_ == null) { - return prevCert_ == null ? pactus.blockchain.BlockchainOuterClass.CertificateInfo.getDefaultInstance() : prevCert_; - } else { - return prevCertBuilder_.getMessage(); - } - } - /** - *
-       * Certificate information of the previous block.
-       * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - */ - public Builder setPrevCert(pactus.blockchain.BlockchainOuterClass.CertificateInfo value) { - if (prevCertBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - prevCert_ = value; - onChanged(); - } else { - prevCertBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Certificate information of the previous block.
-       * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - */ - public Builder setPrevCert( - pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder builderForValue) { - if (prevCertBuilder_ == null) { - prevCert_ = builderForValue.build(); - onChanged(); - } else { - prevCertBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Certificate information of the previous block.
-       * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - */ - public Builder mergePrevCert(pactus.blockchain.BlockchainOuterClass.CertificateInfo value) { - if (prevCertBuilder_ == null) { - if (prevCert_ != null) { - prevCert_ = - pactus.blockchain.BlockchainOuterClass.CertificateInfo.newBuilder(prevCert_).mergeFrom(value).buildPartial(); - } else { - prevCert_ = value; - } - onChanged(); - } else { - prevCertBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Certificate information of the previous block.
-       * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - */ - public Builder clearPrevCert() { - if (prevCertBuilder_ == null) { - prevCert_ = null; - onChanged(); - } else { - prevCert_ = null; - prevCertBuilder_ = null; - } - - return this; - } - /** - *
-       * Certificate information of the previous block.
-       * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - */ - public pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder getPrevCertBuilder() { - - onChanged(); - return getPrevCertFieldBuilder().getBuilder(); - } - /** - *
-       * Certificate information of the previous block.
-       * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - */ - public pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder getPrevCertOrBuilder() { - if (prevCertBuilder_ != null) { - return prevCertBuilder_.getMessageOrBuilder(); - } else { - return prevCert_ == null ? - pactus.blockchain.BlockchainOuterClass.CertificateInfo.getDefaultInstance() : prevCert_; - } - } - /** - *
-       * Certificate information of the previous block.
-       * 
- * - * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.CertificateInfo, pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder, pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder> - getPrevCertFieldBuilder() { - if (prevCertBuilder_ == null) { - prevCertBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.CertificateInfo, pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder, pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder>( - getPrevCert(), - getParentForChildren(), - isClean()); - prevCert_ = null; - } - return prevCertBuilder_; - } - - private java.util.List txs_ = - java.util.Collections.emptyList(); - private void ensureTxsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - txs_ = new java.util.ArrayList(txs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> txsBuilder_; - - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public java.util.List getTxsList() { - if (txsBuilder_ == null) { - return java.util.Collections.unmodifiableList(txs_); - } else { - return txsBuilder_.getMessageList(); - } - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public int getTxsCount() { - if (txsBuilder_ == null) { - return txs_.size(); - } else { - return txsBuilder_.getCount(); - } - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index) { - if (txsBuilder_ == null) { - return txs_.get(index); - } else { - return txsBuilder_.getMessage(index); - } - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public Builder setTxs( - int index, pactus.transaction.TransactionOuterClass.TransactionInfo value) { - if (txsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTxsIsMutable(); - txs_.set(index, value); - onChanged(); - } else { - txsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public Builder setTxs( - int index, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - txs_.set(index, builderForValue.build()); - onChanged(); - } else { - txsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public Builder addTxs(pactus.transaction.TransactionOuterClass.TransactionInfo value) { - if (txsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTxsIsMutable(); - txs_.add(value); - onChanged(); - } else { - txsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public Builder addTxs( - int index, pactus.transaction.TransactionOuterClass.TransactionInfo value) { - if (txsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTxsIsMutable(); - txs_.add(index, value); - onChanged(); - } else { - txsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public Builder addTxs( - pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - txs_.add(builderForValue.build()); - onChanged(); - } else { - txsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public Builder addTxs( - int index, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - txs_.add(index, builderForValue.build()); - onChanged(); - } else { - txsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public Builder addAllTxs( - java.lang.Iterable values) { - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, txs_); - onChanged(); - } else { - txsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public Builder clearTxs() { - if (txsBuilder_ == null) { - txs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - txsBuilder_.clear(); - } - return this; - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public Builder removeTxs(int index) { - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - txs_.remove(index); - onChanged(); - } else { - txsBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder getTxsBuilder( - int index) { - return getTxsFieldBuilder().getBuilder(index); - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( - int index) { - if (txsBuilder_ == null) { - return txs_.get(index); } else { - return txsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public java.util.List - getTxsOrBuilderList() { - if (txsBuilder_ != null) { - return txsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(txs_); - } - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder() { - return getTxsFieldBuilder().addBuilder( - pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance()); - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder( - int index) { - return getTxsFieldBuilder().addBuilder( - index, pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance()); - } - /** - *
-       * List of transactions in the block, available when verbosity level is set to
-       * BLOCK_TRANSACTIONS.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; - */ - public java.util.List - getTxsBuilderList() { - return getTxsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> - getTxsFieldBuilder() { - if (txsBuilder_ == null) { - txsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder>( - txs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - txs_ = null; - } - return txsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetBlockResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetBlockResponse) - private static final pactus.blockchain.BlockchainOuterClass.GetBlockResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockResponse(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBlockResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetBlockHashRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetBlockHashRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The height of the block to retrieve the hash for.
-     * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - int getHeight(); - } - /** - *
-   * Message to request block hash based on height.
-   * 
- * - * Protobuf type {@code pactus.GetBlockHashRequest} - */ - public static final class GetBlockHashRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetBlockHashRequest) - GetBlockHashRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBlockHashRequest.newBuilder() to construct. - private GetBlockHashRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBlockHashRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBlockHashRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.Builder.class); - } - - public static final int HEIGHT_FIELD_NUMBER = 1; - private int height_; - /** - *
-     * The height of the block to retrieve the hash for.
-     * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (height_ != 0) { - output.writeUInt32(1, height_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, height_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest other = (pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest) obj; - - if (getHeight() - != other.getHeight()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message to request block hash based on height.
-     * 
- * - * Protobuf type {@code pactus.GetBlockHashRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetBlockHashRequest) - pactus.blockchain.BlockchainOuterClass.GetBlockHashRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - height_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest build() { - pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest result = new pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest(this); - result.height_ = height_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.getDefaultInstance()) return this; - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - height_ = input.readUInt32(); - - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int height_ ; - /** - *
-       * The height of the block to retrieve the hash for.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-       * The height of the block to retrieve the hash for.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-       * The height of the block to retrieve the hash for.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetBlockHashRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetBlockHashRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBlockHashRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetBlockHashResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetBlockHashResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The hash of the block.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - java.lang.String getHash(); - /** - *
-     * The hash of the block.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - com.google.protobuf.ByteString - getHashBytes(); - } - /** - *
-   * Message containing the response with the block hash.
-   * 
- * - * Protobuf type {@code pactus.GetBlockHashResponse} - */ - public static final class GetBlockHashResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetBlockHashResponse) - GetBlockHashResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBlockHashResponse.newBuilder() to construct. - private GetBlockHashResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBlockHashResponse() { - hash_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBlockHashResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.Builder.class); - } - - public static final int HASH_FIELD_NUMBER = 1; - private volatile java.lang.Object hash_; - /** - *
-     * The hash of the block.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - @java.lang.Override - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } - } - /** - *
-     * The hash of the block.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hash_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hash_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse other = (pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse) obj; - - if (!getHash() - .equals(other.getHash())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HASH_FIELD_NUMBER; - hash = (53 * hash) + getHash().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing the response with the block hash.
-     * 
- * - * Protobuf type {@code pactus.GetBlockHashResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetBlockHashResponse) - pactus.blockchain.BlockchainOuterClass.GetBlockHashResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - hash_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse build() { - pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse result = new pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse(this); - result.hash_ = hash_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.getDefaultInstance()) return this; - if (!other.getHash().isEmpty()) { - hash_ = other.hash_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - hash_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object hash_ = ""; - /** - *
-       * The hash of the block.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The hash of the block.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The hash of the block.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - hash_ = value; - onChanged(); - return this; - } - /** - *
-       * The hash of the block.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return This builder for chaining. - */ - public Builder clearHash() { - - hash_ = getDefaultInstance().getHash(); - onChanged(); - return this; - } - /** - *
-       * The hash of the block.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @param value The bytes for hash to set. - * @return This builder for chaining. - */ - public Builder setHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - hash_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetBlockHashResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetBlockHashResponse) - private static final pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBlockHashResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetBlockHeightRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetBlockHeightRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The hash of the block to retrieve the height for.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - java.lang.String getHash(); - /** - *
-     * The hash of the block to retrieve the height for.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - com.google.protobuf.ByteString - getHashBytes(); - } - /** - *
-   * Message to request block height based on hash.
-   * 
- * - * Protobuf type {@code pactus.GetBlockHeightRequest} - */ - public static final class GetBlockHeightRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetBlockHeightRequest) - GetBlockHeightRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBlockHeightRequest.newBuilder() to construct. - private GetBlockHeightRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBlockHeightRequest() { - hash_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBlockHeightRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.Builder.class); - } - - public static final int HASH_FIELD_NUMBER = 1; - private volatile java.lang.Object hash_; - /** - *
-     * The hash of the block to retrieve the height for.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - @java.lang.Override - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } - } - /** - *
-     * The hash of the block to retrieve the height for.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hash_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hash_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest other = (pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest) obj; - - if (!getHash() - .equals(other.getHash())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HASH_FIELD_NUMBER; - hash = (53 * hash) + getHash().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message to request block height based on hash.
-     * 
- * - * Protobuf type {@code pactus.GetBlockHeightRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetBlockHeightRequest) - pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - hash_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest build() { - pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest result = new pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest(this); - result.hash_ = hash_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.getDefaultInstance()) return this; - if (!other.getHash().isEmpty()) { - hash_ = other.hash_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - hash_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object hash_ = ""; - /** - *
-       * The hash of the block to retrieve the height for.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The hash of the block to retrieve the height for.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The hash of the block to retrieve the height for.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - hash_ = value; - onChanged(); - return this; - } - /** - *
-       * The hash of the block to retrieve the height for.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return This builder for chaining. - */ - public Builder clearHash() { - - hash_ = getDefaultInstance().getHash(); - onChanged(); - return this; - } - /** - *
-       * The hash of the block to retrieve the height for.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @param value The bytes for hash to set. - * @return This builder for chaining. - */ - public Builder setHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - hash_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetBlockHeightRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetBlockHeightRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBlockHeightRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetBlockHeightResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetBlockHeightResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The height of the block.
-     * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - int getHeight(); - } - /** - *
-   * Message containing the response with the block height.
-   * 
- * - * Protobuf type {@code pactus.GetBlockHeightResponse} - */ - public static final class GetBlockHeightResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetBlockHeightResponse) - GetBlockHeightResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBlockHeightResponse.newBuilder() to construct. - private GetBlockHeightResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBlockHeightResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBlockHeightResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.Builder.class); - } - - public static final int HEIGHT_FIELD_NUMBER = 1; - private int height_; - /** - *
-     * The height of the block.
-     * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (height_ != 0) { - output.writeUInt32(1, height_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, height_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse other = (pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse) obj; - - if (getHeight() - != other.getHeight()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing the response with the block height.
-     * 
- * - * Protobuf type {@code pactus.GetBlockHeightResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetBlockHeightResponse) - pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - height_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse build() { - pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse result = new pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse(this); - result.height_ = height_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.getDefaultInstance()) return this; - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - height_ = input.readUInt32(); - - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int height_ ; - /** - *
-       * The height of the block.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-       * The height of the block.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-       * The height of the block.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetBlockHeightResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetBlockHeightResponse) - private static final pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBlockHeightResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetBlockchainInfoRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetBlockchainInfoRequest) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Message to request general information about the blockchain.
-   * 
- * - * Protobuf type {@code pactus.GetBlockchainInfoRequest} - */ - public static final class GetBlockchainInfoRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetBlockchainInfoRequest) - GetBlockchainInfoRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBlockchainInfoRequest.newBuilder() to construct. - private GetBlockchainInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBlockchainInfoRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBlockchainInfoRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest other = (pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message to request general information about the blockchain.
-     * 
- * - * Protobuf type {@code pactus.GetBlockchainInfoRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetBlockchainInfoRequest) - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest build() { - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest result = new pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetBlockchainInfoRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetBlockchainInfoRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBlockchainInfoRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetBlockchainInfoResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetBlockchainInfoResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The height of the last block in the blockchain.
-     * 
- * - * uint32 last_block_height = 1 [json_name = "lastBlockHeight"]; - * @return The lastBlockHeight. - */ - int getLastBlockHeight(); - - /** - *
-     * The hash of the last block in the blockchain.
-     * 
- * - * string last_block_hash = 2 [json_name = "lastBlockHash"]; - * @return The lastBlockHash. - */ - java.lang.String getLastBlockHash(); - /** - *
-     * The hash of the last block in the blockchain.
-     * 
- * - * string last_block_hash = 2 [json_name = "lastBlockHash"]; - * @return The bytes for lastBlockHash. - */ - com.google.protobuf.ByteString - getLastBlockHashBytes(); - - /** - *
-     * The total number of accounts in the blockchain.
-     * 
- * - * int32 total_accounts = 3 [json_name = "totalAccounts"]; - * @return The totalAccounts. - */ - int getTotalAccounts(); - - /** - *
-     * The total number of validators in the blockchain.
-     * 
- * - * int32 total_validators = 4 [json_name = "totalValidators"]; - * @return The totalValidators. - */ - int getTotalValidators(); - - /** - *
-     * The total power of the blockchain.
-     * 
- * - * int64 total_power = 5 [json_name = "totalPower"]; - * @return The totalPower. - */ - long getTotalPower(); - - /** - *
-     * The power of the committee.
-     * 
- * - * int64 committee_power = 6 [json_name = "committeePower"]; - * @return The committeePower. - */ - long getCommitteePower(); - - /** - *
-     * List of committee validators.
-     * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - java.util.List - getCommitteeValidatorsList(); - /** - *
-     * List of committee validators.
-     * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - pactus.blockchain.BlockchainOuterClass.ValidatorInfo getCommitteeValidators(int index); - /** - *
-     * List of committee validators.
-     * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - int getCommitteeValidatorsCount(); - /** - *
-     * List of committee validators.
-     * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - java.util.List - getCommitteeValidatorsOrBuilderList(); - /** - *
-     * List of committee validators.
-     * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getCommitteeValidatorsOrBuilder( - int index); - - /** - *
-     * If the blocks are subject to pruning.
-     * 
- * - * bool is_pruned = 8 [json_name = "isPruned"]; - * @return The isPruned. - */ - boolean getIsPruned(); - - /** - *
-     * Lowest-height block stored (only present if pruning is enabled)
-     * 
- * - * uint32 pruning_height = 9 [json_name = "pruningHeight"]; - * @return The pruningHeight. - */ - int getPruningHeight(); - - /** - *
-     * Timestamp of the last block in Unix format
-     * 
- * - * int64 last_block_time = 10 [json_name = "lastBlockTime"]; - * @return The lastBlockTime. - */ - long getLastBlockTime(); - } - /** - *
-   * Message containing the response with general blockchain information.
-   * 
- * - * Protobuf type {@code pactus.GetBlockchainInfoResponse} - */ - public static final class GetBlockchainInfoResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetBlockchainInfoResponse) - GetBlockchainInfoResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetBlockchainInfoResponse.newBuilder() to construct. - private GetBlockchainInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetBlockchainInfoResponse() { - lastBlockHash_ = ""; - committeeValidators_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetBlockchainInfoResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.Builder.class); - } - - public static final int LAST_BLOCK_HEIGHT_FIELD_NUMBER = 1; - private int lastBlockHeight_; - /** - *
-     * The height of the last block in the blockchain.
-     * 
- * - * uint32 last_block_height = 1 [json_name = "lastBlockHeight"]; - * @return The lastBlockHeight. - */ - @java.lang.Override - public int getLastBlockHeight() { - return lastBlockHeight_; - } - - public static final int LAST_BLOCK_HASH_FIELD_NUMBER = 2; - private volatile java.lang.Object lastBlockHash_; - /** - *
-     * The hash of the last block in the blockchain.
-     * 
- * - * string last_block_hash = 2 [json_name = "lastBlockHash"]; - * @return The lastBlockHash. - */ - @java.lang.Override - public java.lang.String getLastBlockHash() { - java.lang.Object ref = lastBlockHash_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - lastBlockHash_ = s; - return s; - } - } - /** - *
-     * The hash of the last block in the blockchain.
-     * 
- * - * string last_block_hash = 2 [json_name = "lastBlockHash"]; - * @return The bytes for lastBlockHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLastBlockHashBytes() { - java.lang.Object ref = lastBlockHash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lastBlockHash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOTAL_ACCOUNTS_FIELD_NUMBER = 3; - private int totalAccounts_; - /** - *
-     * The total number of accounts in the blockchain.
-     * 
- * - * int32 total_accounts = 3 [json_name = "totalAccounts"]; - * @return The totalAccounts. - */ - @java.lang.Override - public int getTotalAccounts() { - return totalAccounts_; - } - - public static final int TOTAL_VALIDATORS_FIELD_NUMBER = 4; - private int totalValidators_; - /** - *
-     * The total number of validators in the blockchain.
-     * 
- * - * int32 total_validators = 4 [json_name = "totalValidators"]; - * @return The totalValidators. - */ - @java.lang.Override - public int getTotalValidators() { - return totalValidators_; - } - - public static final int TOTAL_POWER_FIELD_NUMBER = 5; - private long totalPower_; - /** - *
-     * The total power of the blockchain.
-     * 
- * - * int64 total_power = 5 [json_name = "totalPower"]; - * @return The totalPower. - */ - @java.lang.Override - public long getTotalPower() { - return totalPower_; - } - - public static final int COMMITTEE_POWER_FIELD_NUMBER = 6; - private long committeePower_; - /** - *
-     * The power of the committee.
-     * 
- * - * int64 committee_power = 6 [json_name = "committeePower"]; - * @return The committeePower. - */ - @java.lang.Override - public long getCommitteePower() { - return committeePower_; - } - - public static final int COMMITTEE_VALIDATORS_FIELD_NUMBER = 7; - private java.util.List committeeValidators_; - /** - *
-     * List of committee validators.
-     * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - @java.lang.Override - public java.util.List getCommitteeValidatorsList() { - return committeeValidators_; - } - /** - *
-     * List of committee validators.
-     * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - @java.lang.Override - public java.util.List - getCommitteeValidatorsOrBuilderList() { - return committeeValidators_; - } - /** - *
-     * List of committee validators.
-     * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - @java.lang.Override - public int getCommitteeValidatorsCount() { - return committeeValidators_.size(); - } - /** - *
-     * List of committee validators.
-     * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getCommitteeValidators(int index) { - return committeeValidators_.get(index); - } - /** - *
-     * List of committee validators.
-     * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getCommitteeValidatorsOrBuilder( - int index) { - return committeeValidators_.get(index); - } - - public static final int IS_PRUNED_FIELD_NUMBER = 8; - private boolean isPruned_; - /** - *
-     * If the blocks are subject to pruning.
-     * 
- * - * bool is_pruned = 8 [json_name = "isPruned"]; - * @return The isPruned. - */ - @java.lang.Override - public boolean getIsPruned() { - return isPruned_; - } - - public static final int PRUNING_HEIGHT_FIELD_NUMBER = 9; - private int pruningHeight_; - /** - *
-     * Lowest-height block stored (only present if pruning is enabled)
-     * 
- * - * uint32 pruning_height = 9 [json_name = "pruningHeight"]; - * @return The pruningHeight. - */ - @java.lang.Override - public int getPruningHeight() { - return pruningHeight_; - } - - public static final int LAST_BLOCK_TIME_FIELD_NUMBER = 10; - private long lastBlockTime_; - /** - *
-     * Timestamp of the last block in Unix format
-     * 
- * - * int64 last_block_time = 10 [json_name = "lastBlockTime"]; - * @return The lastBlockTime. - */ - @java.lang.Override - public long getLastBlockTime() { - return lastBlockTime_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (lastBlockHeight_ != 0) { - output.writeUInt32(1, lastBlockHeight_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastBlockHash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, lastBlockHash_); - } - if (totalAccounts_ != 0) { - output.writeInt32(3, totalAccounts_); - } - if (totalValidators_ != 0) { - output.writeInt32(4, totalValidators_); - } - if (totalPower_ != 0L) { - output.writeInt64(5, totalPower_); - } - if (committeePower_ != 0L) { - output.writeInt64(6, committeePower_); - } - for (int i = 0; i < committeeValidators_.size(); i++) { - output.writeMessage(7, committeeValidators_.get(i)); - } - if (isPruned_ != false) { - output.writeBool(8, isPruned_); - } - if (pruningHeight_ != 0) { - output.writeUInt32(9, pruningHeight_); - } - if (lastBlockTime_ != 0L) { - output.writeInt64(10, lastBlockTime_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (lastBlockHeight_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, lastBlockHeight_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastBlockHash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, lastBlockHash_); - } - if (totalAccounts_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, totalAccounts_); - } - if (totalValidators_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, totalValidators_); - } - if (totalPower_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, totalPower_); - } - if (committeePower_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(6, committeePower_); - } - for (int i = 0; i < committeeValidators_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, committeeValidators_.get(i)); - } - if (isPruned_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, isPruned_); - } - if (pruningHeight_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(9, pruningHeight_); - } - if (lastBlockTime_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(10, lastBlockTime_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse other = (pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse) obj; - - if (getLastBlockHeight() - != other.getLastBlockHeight()) return false; - if (!getLastBlockHash() - .equals(other.getLastBlockHash())) return false; - if (getTotalAccounts() - != other.getTotalAccounts()) return false; - if (getTotalValidators() - != other.getTotalValidators()) return false; - if (getTotalPower() - != other.getTotalPower()) return false; - if (getCommitteePower() - != other.getCommitteePower()) return false; - if (!getCommitteeValidatorsList() - .equals(other.getCommitteeValidatorsList())) return false; - if (getIsPruned() - != other.getIsPruned()) return false; - if (getPruningHeight() - != other.getPruningHeight()) return false; - if (getLastBlockTime() - != other.getLastBlockTime()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LAST_BLOCK_HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getLastBlockHeight(); - hash = (37 * hash) + LAST_BLOCK_HASH_FIELD_NUMBER; - hash = (53 * hash) + getLastBlockHash().hashCode(); - hash = (37 * hash) + TOTAL_ACCOUNTS_FIELD_NUMBER; - hash = (53 * hash) + getTotalAccounts(); - hash = (37 * hash) + TOTAL_VALIDATORS_FIELD_NUMBER; - hash = (53 * hash) + getTotalValidators(); - hash = (37 * hash) + TOTAL_POWER_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTotalPower()); - hash = (37 * hash) + COMMITTEE_POWER_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCommitteePower()); - if (getCommitteeValidatorsCount() > 0) { - hash = (37 * hash) + COMMITTEE_VALIDATORS_FIELD_NUMBER; - hash = (53 * hash) + getCommitteeValidatorsList().hashCode(); - } - hash = (37 * hash) + IS_PRUNED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsPruned()); - hash = (37 * hash) + PRUNING_HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getPruningHeight(); - hash = (37 * hash) + LAST_BLOCK_TIME_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLastBlockTime()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing the response with general blockchain information.
-     * 
- * - * Protobuf type {@code pactus.GetBlockchainInfoResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetBlockchainInfoResponse) - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - lastBlockHeight_ = 0; - - lastBlockHash_ = ""; - - totalAccounts_ = 0; - - totalValidators_ = 0; - - totalPower_ = 0L; - - committeePower_ = 0L; - - if (committeeValidatorsBuilder_ == null) { - committeeValidators_ = java.util.Collections.emptyList(); - } else { - committeeValidators_ = null; - committeeValidatorsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - isPruned_ = false; - - pruningHeight_ = 0; - - lastBlockTime_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse build() { - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse result = new pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse(this); - int from_bitField0_ = bitField0_; - result.lastBlockHeight_ = lastBlockHeight_; - result.lastBlockHash_ = lastBlockHash_; - result.totalAccounts_ = totalAccounts_; - result.totalValidators_ = totalValidators_; - result.totalPower_ = totalPower_; - result.committeePower_ = committeePower_; - if (committeeValidatorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - committeeValidators_ = java.util.Collections.unmodifiableList(committeeValidators_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.committeeValidators_ = committeeValidators_; - } else { - result.committeeValidators_ = committeeValidatorsBuilder_.build(); - } - result.isPruned_ = isPruned_; - result.pruningHeight_ = pruningHeight_; - result.lastBlockTime_ = lastBlockTime_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.getDefaultInstance()) return this; - if (other.getLastBlockHeight() != 0) { - setLastBlockHeight(other.getLastBlockHeight()); - } - if (!other.getLastBlockHash().isEmpty()) { - lastBlockHash_ = other.lastBlockHash_; - onChanged(); - } - if (other.getTotalAccounts() != 0) { - setTotalAccounts(other.getTotalAccounts()); - } - if (other.getTotalValidators() != 0) { - setTotalValidators(other.getTotalValidators()); - } - if (other.getTotalPower() != 0L) { - setTotalPower(other.getTotalPower()); - } - if (other.getCommitteePower() != 0L) { - setCommitteePower(other.getCommitteePower()); - } - if (committeeValidatorsBuilder_ == null) { - if (!other.committeeValidators_.isEmpty()) { - if (committeeValidators_.isEmpty()) { - committeeValidators_ = other.committeeValidators_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCommitteeValidatorsIsMutable(); - committeeValidators_.addAll(other.committeeValidators_); - } - onChanged(); - } - } else { - if (!other.committeeValidators_.isEmpty()) { - if (committeeValidatorsBuilder_.isEmpty()) { - committeeValidatorsBuilder_.dispose(); - committeeValidatorsBuilder_ = null; - committeeValidators_ = other.committeeValidators_; - bitField0_ = (bitField0_ & ~0x00000001); - committeeValidatorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getCommitteeValidatorsFieldBuilder() : null; - } else { - committeeValidatorsBuilder_.addAllMessages(other.committeeValidators_); - } - } - } - if (other.getIsPruned() != false) { - setIsPruned(other.getIsPruned()); - } - if (other.getPruningHeight() != 0) { - setPruningHeight(other.getPruningHeight()); - } - if (other.getLastBlockTime() != 0L) { - setLastBlockTime(other.getLastBlockTime()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - lastBlockHeight_ = input.readUInt32(); - - break; - } // case 8 - case 18: { - lastBlockHash_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: { - totalAccounts_ = input.readInt32(); - - break; - } // case 24 - case 32: { - totalValidators_ = input.readInt32(); - - break; - } // case 32 - case 40: { - totalPower_ = input.readInt64(); - - break; - } // case 40 - case 48: { - committeePower_ = input.readInt64(); - - break; - } // case 48 - case 58: { - pactus.blockchain.BlockchainOuterClass.ValidatorInfo m = - input.readMessage( - pactus.blockchain.BlockchainOuterClass.ValidatorInfo.parser(), - extensionRegistry); - if (committeeValidatorsBuilder_ == null) { - ensureCommitteeValidatorsIsMutable(); - committeeValidators_.add(m); - } else { - committeeValidatorsBuilder_.addMessage(m); - } - break; - } // case 58 - case 64: { - isPruned_ = input.readBool(); - - break; - } // case 64 - case 72: { - pruningHeight_ = input.readUInt32(); - - break; - } // case 72 - case 80: { - lastBlockTime_ = input.readInt64(); - - break; - } // case 80 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int lastBlockHeight_ ; - /** - *
-       * The height of the last block in the blockchain.
-       * 
- * - * uint32 last_block_height = 1 [json_name = "lastBlockHeight"]; - * @return The lastBlockHeight. - */ - @java.lang.Override - public int getLastBlockHeight() { - return lastBlockHeight_; - } - /** - *
-       * The height of the last block in the blockchain.
-       * 
- * - * uint32 last_block_height = 1 [json_name = "lastBlockHeight"]; - * @param value The lastBlockHeight to set. - * @return This builder for chaining. - */ - public Builder setLastBlockHeight(int value) { - - lastBlockHeight_ = value; - onChanged(); - return this; - } - /** - *
-       * The height of the last block in the blockchain.
-       * 
- * - * uint32 last_block_height = 1 [json_name = "lastBlockHeight"]; - * @return This builder for chaining. - */ - public Builder clearLastBlockHeight() { - - lastBlockHeight_ = 0; - onChanged(); - return this; - } - - private java.lang.Object lastBlockHash_ = ""; - /** - *
-       * The hash of the last block in the blockchain.
-       * 
- * - * string last_block_hash = 2 [json_name = "lastBlockHash"]; - * @return The lastBlockHash. - */ - public java.lang.String getLastBlockHash() { - java.lang.Object ref = lastBlockHash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - lastBlockHash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The hash of the last block in the blockchain.
-       * 
- * - * string last_block_hash = 2 [json_name = "lastBlockHash"]; - * @return The bytes for lastBlockHash. - */ - public com.google.protobuf.ByteString - getLastBlockHashBytes() { - java.lang.Object ref = lastBlockHash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lastBlockHash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The hash of the last block in the blockchain.
-       * 
- * - * string last_block_hash = 2 [json_name = "lastBlockHash"]; - * @param value The lastBlockHash to set. - * @return This builder for chaining. - */ - public Builder setLastBlockHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - lastBlockHash_ = value; - onChanged(); - return this; - } - /** - *
-       * The hash of the last block in the blockchain.
-       * 
- * - * string last_block_hash = 2 [json_name = "lastBlockHash"]; - * @return This builder for chaining. - */ - public Builder clearLastBlockHash() { - - lastBlockHash_ = getDefaultInstance().getLastBlockHash(); - onChanged(); - return this; - } - /** - *
-       * The hash of the last block in the blockchain.
-       * 
- * - * string last_block_hash = 2 [json_name = "lastBlockHash"]; - * @param value The bytes for lastBlockHash to set. - * @return This builder for chaining. - */ - public Builder setLastBlockHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - lastBlockHash_ = value; - onChanged(); - return this; - } - - private int totalAccounts_ ; - /** - *
-       * The total number of accounts in the blockchain.
-       * 
- * - * int32 total_accounts = 3 [json_name = "totalAccounts"]; - * @return The totalAccounts. - */ - @java.lang.Override - public int getTotalAccounts() { - return totalAccounts_; - } - /** - *
-       * The total number of accounts in the blockchain.
-       * 
- * - * int32 total_accounts = 3 [json_name = "totalAccounts"]; - * @param value The totalAccounts to set. - * @return This builder for chaining. - */ - public Builder setTotalAccounts(int value) { - - totalAccounts_ = value; - onChanged(); - return this; - } - /** - *
-       * The total number of accounts in the blockchain.
-       * 
- * - * int32 total_accounts = 3 [json_name = "totalAccounts"]; - * @return This builder for chaining. - */ - public Builder clearTotalAccounts() { - - totalAccounts_ = 0; - onChanged(); - return this; - } - - private int totalValidators_ ; - /** - *
-       * The total number of validators in the blockchain.
-       * 
- * - * int32 total_validators = 4 [json_name = "totalValidators"]; - * @return The totalValidators. - */ - @java.lang.Override - public int getTotalValidators() { - return totalValidators_; - } - /** - *
-       * The total number of validators in the blockchain.
-       * 
- * - * int32 total_validators = 4 [json_name = "totalValidators"]; - * @param value The totalValidators to set. - * @return This builder for chaining. - */ - public Builder setTotalValidators(int value) { - - totalValidators_ = value; - onChanged(); - return this; - } - /** - *
-       * The total number of validators in the blockchain.
-       * 
- * - * int32 total_validators = 4 [json_name = "totalValidators"]; - * @return This builder for chaining. - */ - public Builder clearTotalValidators() { - - totalValidators_ = 0; - onChanged(); - return this; - } - - private long totalPower_ ; - /** - *
-       * The total power of the blockchain.
-       * 
- * - * int64 total_power = 5 [json_name = "totalPower"]; - * @return The totalPower. - */ - @java.lang.Override - public long getTotalPower() { - return totalPower_; - } - /** - *
-       * The total power of the blockchain.
-       * 
- * - * int64 total_power = 5 [json_name = "totalPower"]; - * @param value The totalPower to set. - * @return This builder for chaining. - */ - public Builder setTotalPower(long value) { - - totalPower_ = value; - onChanged(); - return this; - } - /** - *
-       * The total power of the blockchain.
-       * 
- * - * int64 total_power = 5 [json_name = "totalPower"]; - * @return This builder for chaining. - */ - public Builder clearTotalPower() { - - totalPower_ = 0L; - onChanged(); - return this; - } - - private long committeePower_ ; - /** - *
-       * The power of the committee.
-       * 
- * - * int64 committee_power = 6 [json_name = "committeePower"]; - * @return The committeePower. - */ - @java.lang.Override - public long getCommitteePower() { - return committeePower_; - } - /** - *
-       * The power of the committee.
-       * 
- * - * int64 committee_power = 6 [json_name = "committeePower"]; - * @param value The committeePower to set. - * @return This builder for chaining. - */ - public Builder setCommitteePower(long value) { - - committeePower_ = value; - onChanged(); - return this; - } - /** - *
-       * The power of the committee.
-       * 
- * - * int64 committee_power = 6 [json_name = "committeePower"]; - * @return This builder for chaining. - */ - public Builder clearCommitteePower() { - - committeePower_ = 0L; - onChanged(); - return this; - } - - private java.util.List committeeValidators_ = - java.util.Collections.emptyList(); - private void ensureCommitteeValidatorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - committeeValidators_ = new java.util.ArrayList(committeeValidators_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder> committeeValidatorsBuilder_; - - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public java.util.List getCommitteeValidatorsList() { - if (committeeValidatorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(committeeValidators_); - } else { - return committeeValidatorsBuilder_.getMessageList(); - } - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public int getCommitteeValidatorsCount() { - if (committeeValidatorsBuilder_ == null) { - return committeeValidators_.size(); - } else { - return committeeValidatorsBuilder_.getCount(); - } - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getCommitteeValidators(int index) { - if (committeeValidatorsBuilder_ == null) { - return committeeValidators_.get(index); - } else { - return committeeValidatorsBuilder_.getMessage(index); - } - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public Builder setCommitteeValidators( - int index, pactus.blockchain.BlockchainOuterClass.ValidatorInfo value) { - if (committeeValidatorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommitteeValidatorsIsMutable(); - committeeValidators_.set(index, value); - onChanged(); - } else { - committeeValidatorsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public Builder setCommitteeValidators( - int index, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) { - if (committeeValidatorsBuilder_ == null) { - ensureCommitteeValidatorsIsMutable(); - committeeValidators_.set(index, builderForValue.build()); - onChanged(); - } else { - committeeValidatorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public Builder addCommitteeValidators(pactus.blockchain.BlockchainOuterClass.ValidatorInfo value) { - if (committeeValidatorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommitteeValidatorsIsMutable(); - committeeValidators_.add(value); - onChanged(); - } else { - committeeValidatorsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public Builder addCommitteeValidators( - int index, pactus.blockchain.BlockchainOuterClass.ValidatorInfo value) { - if (committeeValidatorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommitteeValidatorsIsMutable(); - committeeValidators_.add(index, value); - onChanged(); - } else { - committeeValidatorsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public Builder addCommitteeValidators( - pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) { - if (committeeValidatorsBuilder_ == null) { - ensureCommitteeValidatorsIsMutable(); - committeeValidators_.add(builderForValue.build()); - onChanged(); - } else { - committeeValidatorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public Builder addCommitteeValidators( - int index, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) { - if (committeeValidatorsBuilder_ == null) { - ensureCommitteeValidatorsIsMutable(); - committeeValidators_.add(index, builderForValue.build()); - onChanged(); - } else { - committeeValidatorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public Builder addAllCommitteeValidators( - java.lang.Iterable values) { - if (committeeValidatorsBuilder_ == null) { - ensureCommitteeValidatorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, committeeValidators_); - onChanged(); - } else { - committeeValidatorsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public Builder clearCommitteeValidators() { - if (committeeValidatorsBuilder_ == null) { - committeeValidators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - committeeValidatorsBuilder_.clear(); - } - return this; - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public Builder removeCommitteeValidators(int index) { - if (committeeValidatorsBuilder_ == null) { - ensureCommitteeValidatorsIsMutable(); - committeeValidators_.remove(index); - onChanged(); - } else { - committeeValidatorsBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder getCommitteeValidatorsBuilder( - int index) { - return getCommitteeValidatorsFieldBuilder().getBuilder(index); - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getCommitteeValidatorsOrBuilder( - int index) { - if (committeeValidatorsBuilder_ == null) { - return committeeValidators_.get(index); } else { - return committeeValidatorsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public java.util.List - getCommitteeValidatorsOrBuilderList() { - if (committeeValidatorsBuilder_ != null) { - return committeeValidatorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(committeeValidators_); - } - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder addCommitteeValidatorsBuilder() { - return getCommitteeValidatorsFieldBuilder().addBuilder( - pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance()); - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder addCommitteeValidatorsBuilder( - int index) { - return getCommitteeValidatorsFieldBuilder().addBuilder( - index, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance()); - } - /** - *
-       * List of committee validators.
-       * 
- * - * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; - */ - public java.util.List - getCommitteeValidatorsBuilderList() { - return getCommitteeValidatorsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder> - getCommitteeValidatorsFieldBuilder() { - if (committeeValidatorsBuilder_ == null) { - committeeValidatorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder>( - committeeValidators_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - committeeValidators_ = null; - } - return committeeValidatorsBuilder_; - } - - private boolean isPruned_ ; - /** - *
-       * If the blocks are subject to pruning.
-       * 
- * - * bool is_pruned = 8 [json_name = "isPruned"]; - * @return The isPruned. - */ - @java.lang.Override - public boolean getIsPruned() { - return isPruned_; - } - /** - *
-       * If the blocks are subject to pruning.
-       * 
- * - * bool is_pruned = 8 [json_name = "isPruned"]; - * @param value The isPruned to set. - * @return This builder for chaining. - */ - public Builder setIsPruned(boolean value) { - - isPruned_ = value; - onChanged(); - return this; - } - /** - *
-       * If the blocks are subject to pruning.
-       * 
- * - * bool is_pruned = 8 [json_name = "isPruned"]; - * @return This builder for chaining. - */ - public Builder clearIsPruned() { - - isPruned_ = false; - onChanged(); - return this; - } - - private int pruningHeight_ ; - /** - *
-       * Lowest-height block stored (only present if pruning is enabled)
-       * 
- * - * uint32 pruning_height = 9 [json_name = "pruningHeight"]; - * @return The pruningHeight. - */ - @java.lang.Override - public int getPruningHeight() { - return pruningHeight_; - } - /** - *
-       * Lowest-height block stored (only present if pruning is enabled)
-       * 
- * - * uint32 pruning_height = 9 [json_name = "pruningHeight"]; - * @param value The pruningHeight to set. - * @return This builder for chaining. - */ - public Builder setPruningHeight(int value) { - - pruningHeight_ = value; - onChanged(); - return this; - } - /** - *
-       * Lowest-height block stored (only present if pruning is enabled)
-       * 
- * - * uint32 pruning_height = 9 [json_name = "pruningHeight"]; - * @return This builder for chaining. - */ - public Builder clearPruningHeight() { - - pruningHeight_ = 0; - onChanged(); - return this; - } - - private long lastBlockTime_ ; - /** - *
-       * Timestamp of the last block in Unix format
-       * 
- * - * int64 last_block_time = 10 [json_name = "lastBlockTime"]; - * @return The lastBlockTime. - */ - @java.lang.Override - public long getLastBlockTime() { - return lastBlockTime_; - } - /** - *
-       * Timestamp of the last block in Unix format
-       * 
- * - * int64 last_block_time = 10 [json_name = "lastBlockTime"]; - * @param value The lastBlockTime to set. - * @return This builder for chaining. - */ - public Builder setLastBlockTime(long value) { - - lastBlockTime_ = value; - onChanged(); - return this; - } - /** - *
-       * Timestamp of the last block in Unix format
-       * 
- * - * int64 last_block_time = 10 [json_name = "lastBlockTime"]; - * @return This builder for chaining. - */ - public Builder clearLastBlockTime() { - - lastBlockTime_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetBlockchainInfoResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetBlockchainInfoResponse) - private static final pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetBlockchainInfoResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetConsensusInfoRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetConsensusInfoRequest) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Message to request consensus information.
-   * 
- * - * Protobuf type {@code pactus.GetConsensusInfoRequest} - */ - public static final class GetConsensusInfoRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetConsensusInfoRequest) - GetConsensusInfoRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetConsensusInfoRequest.newBuilder() to construct. - private GetConsensusInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetConsensusInfoRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetConsensusInfoRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.class, pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest other = (pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message to request consensus information.
-     * 
- * - * Protobuf type {@code pactus.GetConsensusInfoRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetConsensusInfoRequest) - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.class, pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest build() { - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest result = new pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetConsensusInfoRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetConsensusInfoRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetConsensusInfoRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetConsensusInfoResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetConsensusInfoResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The proposal of the consensus info.
-     * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - * @return Whether the proposal field is set. - */ - boolean hasProposal(); - /** - *
-     * The proposal of the consensus info.
-     * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - * @return The proposal. - */ - pactus.blockchain.BlockchainOuterClass.Proposal getProposal(); - /** - *
-     * The proposal of the consensus info.
-     * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - */ - pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder(); - - /** - *
-     * List of consensus instances.
-     * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - java.util.List - getInstancesList(); - /** - *
-     * List of consensus instances.
-     * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index); - /** - *
-     * List of consensus instances.
-     * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - int getInstancesCount(); - /** - *
-     * List of consensus instances.
-     * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - java.util.List - getInstancesOrBuilderList(); - /** - *
-     * List of consensus instances.
-     * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder( - int index); - } - /** - *
-   * Message containing the response with consensus information.
-   * 
- * - * Protobuf type {@code pactus.GetConsensusInfoResponse} - */ - public static final class GetConsensusInfoResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetConsensusInfoResponse) - GetConsensusInfoResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetConsensusInfoResponse.newBuilder() to construct. - private GetConsensusInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetConsensusInfoResponse() { - instances_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetConsensusInfoResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.class, pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.Builder.class); - } - - public static final int PROPOSAL_FIELD_NUMBER = 1; - private pactus.blockchain.BlockchainOuterClass.Proposal proposal_; - /** - *
-     * The proposal of the consensus info.
-     * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - * @return Whether the proposal field is set. - */ - @java.lang.Override - public boolean hasProposal() { - return proposal_ != null; - } - /** - *
-     * The proposal of the consensus info.
-     * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - * @return The proposal. - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.Proposal getProposal() { - return proposal_ == null ? pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; - } - /** - *
-     * The proposal of the consensus info.
-     * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder() { - return getProposal(); - } - - public static final int INSTANCES_FIELD_NUMBER = 2; - private java.util.List instances_; - /** - *
-     * List of consensus instances.
-     * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - @java.lang.Override - public java.util.List getInstancesList() { - return instances_; - } - /** - *
-     * List of consensus instances.
-     * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - @java.lang.Override - public java.util.List - getInstancesOrBuilderList() { - return instances_; - } - /** - *
-     * List of consensus instances.
-     * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - @java.lang.Override - public int getInstancesCount() { - return instances_.size(); - } - /** - *
-     * List of consensus instances.
-     * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index) { - return instances_.get(index); - } - /** - *
-     * List of consensus instances.
-     * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder( - int index) { - return instances_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (proposal_ != null) { - output.writeMessage(1, getProposal()); - } - for (int i = 0; i < instances_.size(); i++) { - output.writeMessage(2, instances_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (proposal_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getProposal()); - } - for (int i = 0; i < instances_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, instances_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse other = (pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse) obj; - - if (hasProposal() != other.hasProposal()) return false; - if (hasProposal()) { - if (!getProposal() - .equals(other.getProposal())) return false; - } - if (!getInstancesList() - .equals(other.getInstancesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasProposal()) { - hash = (37 * hash) + PROPOSAL_FIELD_NUMBER; - hash = (53 * hash) + getProposal().hashCode(); - } - if (getInstancesCount() > 0) { - hash = (37 * hash) + INSTANCES_FIELD_NUMBER; - hash = (53 * hash) + getInstancesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing the response with consensus information.
-     * 
- * - * Protobuf type {@code pactus.GetConsensusInfoResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetConsensusInfoResponse) - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.class, pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (proposalBuilder_ == null) { - proposal_ = null; - } else { - proposal_ = null; - proposalBuilder_ = null; - } - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - } else { - instances_ = null; - instancesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse build() { - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse result = new pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse(this); - int from_bitField0_ = bitField0_; - if (proposalBuilder_ == null) { - result.proposal_ = proposal_; - } else { - result.proposal_ = proposalBuilder_.build(); - } - if (instancesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.instances_ = instances_; - } else { - result.instances_ = instancesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.getDefaultInstance()) return this; - if (other.hasProposal()) { - mergeProposal(other.getProposal()); - } - if (instancesBuilder_ == null) { - if (!other.instances_.isEmpty()) { - if (instances_.isEmpty()) { - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInstancesIsMutable(); - instances_.addAll(other.instances_); - } - onChanged(); - } - } else { - if (!other.instances_.isEmpty()) { - if (instancesBuilder_.isEmpty()) { - instancesBuilder_.dispose(); - instancesBuilder_ = null; - instances_ = other.instances_; - bitField0_ = (bitField0_ & ~0x00000001); - instancesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getInstancesFieldBuilder() : null; - } else { - instancesBuilder_.addAllMessages(other.instances_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getProposalFieldBuilder().getBuilder(), - extensionRegistry); - - break; - } // case 10 - case 18: { - pactus.blockchain.BlockchainOuterClass.ConsensusInfo m = - input.readMessage( - pactus.blockchain.BlockchainOuterClass.ConsensusInfo.parser(), - extensionRegistry); - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(m); - } else { - instancesBuilder_.addMessage(m); - } - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private pactus.blockchain.BlockchainOuterClass.Proposal proposal_; - private com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder> proposalBuilder_; - /** - *
-       * The proposal of the consensus info.
-       * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - * @return Whether the proposal field is set. - */ - public boolean hasProposal() { - return proposalBuilder_ != null || proposal_ != null; - } - /** - *
-       * The proposal of the consensus info.
-       * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - * @return The proposal. - */ - public pactus.blockchain.BlockchainOuterClass.Proposal getProposal() { - if (proposalBuilder_ == null) { - return proposal_ == null ? pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; - } else { - return proposalBuilder_.getMessage(); - } - } - /** - *
-       * The proposal of the consensus info.
-       * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - */ - public Builder setProposal(pactus.blockchain.BlockchainOuterClass.Proposal value) { - if (proposalBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - proposal_ = value; - onChanged(); - } else { - proposalBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * The proposal of the consensus info.
-       * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - */ - public Builder setProposal( - pactus.blockchain.BlockchainOuterClass.Proposal.Builder builderForValue) { - if (proposalBuilder_ == null) { - proposal_ = builderForValue.build(); - onChanged(); - } else { - proposalBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * The proposal of the consensus info.
-       * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - */ - public Builder mergeProposal(pactus.blockchain.BlockchainOuterClass.Proposal value) { - if (proposalBuilder_ == null) { - if (proposal_ != null) { - proposal_ = - pactus.blockchain.BlockchainOuterClass.Proposal.newBuilder(proposal_).mergeFrom(value).buildPartial(); - } else { - proposal_ = value; - } - onChanged(); - } else { - proposalBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * The proposal of the consensus info.
-       * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - */ - public Builder clearProposal() { - if (proposalBuilder_ == null) { - proposal_ = null; - onChanged(); - } else { - proposal_ = null; - proposalBuilder_ = null; - } - - return this; - } - /** - *
-       * The proposal of the consensus info.
-       * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - */ - public pactus.blockchain.BlockchainOuterClass.Proposal.Builder getProposalBuilder() { - - onChanged(); - return getProposalFieldBuilder().getBuilder(); - } - /** - *
-       * The proposal of the consensus info.
-       * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - */ - public pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder() { - if (proposalBuilder_ != null) { - return proposalBuilder_.getMessageOrBuilder(); - } else { - return proposal_ == null ? - pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; - } - } - /** - *
-       * The proposal of the consensus info.
-       * 
- * - * .pactus.Proposal proposal = 1 [json_name = "proposal"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder> - getProposalFieldBuilder() { - if (proposalBuilder_ == null) { - proposalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder>( - getProposal(), - getParentForChildren(), - isClean()); - proposal_ = null; - } - return proposalBuilder_; - } - - private java.util.List instances_ = - java.util.Collections.emptyList(); - private void ensureInstancesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - instances_ = new java.util.ArrayList(instances_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.ConsensusInfo, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder, pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder> instancesBuilder_; - - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public java.util.List getInstancesList() { - if (instancesBuilder_ == null) { - return java.util.Collections.unmodifiableList(instances_); - } else { - return instancesBuilder_.getMessageList(); - } - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public int getInstancesCount() { - if (instancesBuilder_ == null) { - return instances_.size(); - } else { - return instancesBuilder_.getCount(); - } - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); - } else { - return instancesBuilder_.getMessage(index); - } - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public Builder setInstances( - int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.set(index, value); - onChanged(); - } else { - instancesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public Builder setInstances( - int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.set(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public Builder addInstances(pactus.blockchain.BlockchainOuterClass.ConsensusInfo value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(value); - onChanged(); - } else { - instancesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public Builder addInstances( - int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo value) { - if (instancesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInstancesIsMutable(); - instances_.add(index, value); - onChanged(); - } else { - instancesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public Builder addInstances( - pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public Builder addInstances( - int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.add(index, builderForValue.build()); - onChanged(); - } else { - instancesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public Builder addAllInstances( - java.lang.Iterable values) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, instances_); - onChanged(); - } else { - instancesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public Builder clearInstances() { - if (instancesBuilder_ == null) { - instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - instancesBuilder_.clear(); - } - return this; - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public Builder removeInstances(int index) { - if (instancesBuilder_ == null) { - ensureInstancesIsMutable(); - instances_.remove(index); - onChanged(); - } else { - instancesBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder getInstancesBuilder( - int index) { - return getInstancesFieldBuilder().getBuilder(index); - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder( - int index) { - if (instancesBuilder_ == null) { - return instances_.get(index); } else { - return instancesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public java.util.List - getInstancesOrBuilderList() { - if (instancesBuilder_ != null) { - return instancesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(instances_); - } - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder addInstancesBuilder() { - return getInstancesFieldBuilder().addBuilder( - pactus.blockchain.BlockchainOuterClass.ConsensusInfo.getDefaultInstance()); - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder addInstancesBuilder( - int index) { - return getInstancesFieldBuilder().addBuilder( - index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.getDefaultInstance()); - } - /** - *
-       * List of consensus instances.
-       * 
- * - * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; - */ - public java.util.List - getInstancesBuilderList() { - return getInstancesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.ConsensusInfo, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder, pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder> - getInstancesFieldBuilder() { - if (instancesBuilder_ == null) { - instancesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.ConsensusInfo, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder, pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder>( - instances_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - instances_ = null; - } - return instancesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetConsensusInfoResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetConsensusInfoResponse) - private static final pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetConsensusInfoResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetTxPoolContentRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetTxPoolContentRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The type of transactions to retrieve from the transaction pool. 0 means all
-     * types.
-     * 
- * - * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; - * @return The enum numeric value on the wire for payloadType. - */ - int getPayloadTypeValue(); - /** - *
-     * The type of transactions to retrieve from the transaction pool. 0 means all
-     * types.
-     * 
- * - * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; - * @return The payloadType. - */ - pactus.transaction.TransactionOuterClass.PayloadType getPayloadType(); - } - /** - *
-   * Request message to retrieve transactions in the transaction pool.
-   * 
- * - * Protobuf type {@code pactus.GetTxPoolContentRequest} - */ - public static final class GetTxPoolContentRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetTxPoolContentRequest) - GetTxPoolContentRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetTxPoolContentRequest.newBuilder() to construct. - private GetTxPoolContentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetTxPoolContentRequest() { - payloadType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetTxPoolContentRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.class, pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.Builder.class); - } - - public static final int PAYLOAD_TYPE_FIELD_NUMBER = 1; - private int payloadType_; - /** - *
-     * The type of transactions to retrieve from the transaction pool. 0 means all
-     * types.
-     * 
- * - * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; - * @return The enum numeric value on the wire for payloadType. - */ - @java.lang.Override public int getPayloadTypeValue() { - return payloadType_; - } - /** - *
-     * The type of transactions to retrieve from the transaction pool. 0 means all
-     * types.
-     * 
- * - * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; - * @return The payloadType. - */ - @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { - @SuppressWarnings("deprecation") - pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); - return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { - output.writeEnum(1, payloadType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, payloadType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest other = (pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest) obj; - - if (payloadType_ != other.payloadType_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; - hash = (53 * hash) + payloadType_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message to retrieve transactions in the transaction pool.
-     * 
- * - * Protobuf type {@code pactus.GetTxPoolContentRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetTxPoolContentRequest) - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.class, pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - payloadType_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest build() { - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest result = new pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest(this); - result.payloadType_ = payloadType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.getDefaultInstance()) return this; - if (other.payloadType_ != 0) { - setPayloadTypeValue(other.getPayloadTypeValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - payloadType_ = input.readEnum(); - - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int payloadType_ = 0; - /** - *
-       * The type of transactions to retrieve from the transaction pool. 0 means all
-       * types.
-       * 
- * - * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; - * @return The enum numeric value on the wire for payloadType. - */ - @java.lang.Override public int getPayloadTypeValue() { - return payloadType_; - } - /** - *
-       * The type of transactions to retrieve from the transaction pool. 0 means all
-       * types.
-       * 
- * - * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; - * @param value The enum numeric value on the wire for payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadTypeValue(int value) { - - payloadType_ = value; - onChanged(); - return this; - } - /** - *
-       * The type of transactions to retrieve from the transaction pool. 0 means all
-       * types.
-       * 
- * - * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; - * @return The payloadType. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { - @SuppressWarnings("deprecation") - pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); - return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; - } - /** - *
-       * The type of transactions to retrieve from the transaction pool. 0 means all
-       * types.
-       * 
- * - * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; - * @param value The payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadType(pactus.transaction.TransactionOuterClass.PayloadType value) { - if (value == null) { - throw new NullPointerException(); - } - - payloadType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The type of transactions to retrieve from the transaction pool. 0 means all
-       * types.
-       * 
- * - * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; - * @return This builder for chaining. - */ - public Builder clearPayloadType() { - - payloadType_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetTxPoolContentRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetTxPoolContentRequest) - private static final pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetTxPoolContentRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetTxPoolContentResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetTxPoolContentResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * List of transactions currently in the pool.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - java.util.List - getTxsList(); - /** - *
-     * List of transactions currently in the pool.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index); - /** - *
-     * List of transactions currently in the pool.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - int getTxsCount(); - /** - *
-     * List of transactions currently in the pool.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - java.util.List - getTxsOrBuilderList(); - /** - *
-     * List of transactions currently in the pool.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( - int index); - } - /** - *
-   * Response message containing transactions in the transaction pool.
-   * 
- * - * Protobuf type {@code pactus.GetTxPoolContentResponse} - */ - public static final class GetTxPoolContentResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetTxPoolContentResponse) - GetTxPoolContentResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetTxPoolContentResponse.newBuilder() to construct. - private GetTxPoolContentResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetTxPoolContentResponse() { - txs_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetTxPoolContentResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.class, pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.Builder.class); - } - - public static final int TXS_FIELD_NUMBER = 1; - private java.util.List txs_; - /** - *
-     * List of transactions currently in the pool.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - @java.lang.Override - public java.util.List getTxsList() { - return txs_; - } - /** - *
-     * List of transactions currently in the pool.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - @java.lang.Override - public java.util.List - getTxsOrBuilderList() { - return txs_; - } - /** - *
-     * List of transactions currently in the pool.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - @java.lang.Override - public int getTxsCount() { - return txs_.size(); - } - /** - *
-     * List of transactions currently in the pool.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index) { - return txs_.get(index); - } - /** - *
-     * List of transactions currently in the pool.
-     * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( - int index) { - return txs_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < txs_.size(); i++) { - output.writeMessage(1, txs_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < txs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, txs_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse other = (pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse) obj; - - if (!getTxsList() - .equals(other.getTxsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getTxsCount() > 0) { - hash = (37 * hash) + TXS_FIELD_NUMBER; - hash = (53 * hash) + getTxsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing transactions in the transaction pool.
-     * 
- * - * Protobuf type {@code pactus.GetTxPoolContentResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetTxPoolContentResponse) - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.class, pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (txsBuilder_ == null) { - txs_ = java.util.Collections.emptyList(); - } else { - txs_ = null; - txsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse build() { - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse buildPartial() { - pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse result = new pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse(this); - int from_bitField0_ = bitField0_; - if (txsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - txs_ = java.util.Collections.unmodifiableList(txs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.txs_ = txs_; - } else { - result.txs_ = txsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse other) { - if (other == pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.getDefaultInstance()) return this; - if (txsBuilder_ == null) { - if (!other.txs_.isEmpty()) { - if (txs_.isEmpty()) { - txs_ = other.txs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTxsIsMutable(); - txs_.addAll(other.txs_); - } - onChanged(); - } - } else { - if (!other.txs_.isEmpty()) { - if (txsBuilder_.isEmpty()) { - txsBuilder_.dispose(); - txsBuilder_ = null; - txs_ = other.txs_; - bitField0_ = (bitField0_ & ~0x00000001); - txsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTxsFieldBuilder() : null; - } else { - txsBuilder_.addAllMessages(other.txs_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - pactus.transaction.TransactionOuterClass.TransactionInfo m = - input.readMessage( - pactus.transaction.TransactionOuterClass.TransactionInfo.parser(), - extensionRegistry); - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - txs_.add(m); - } else { - txsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List txs_ = - java.util.Collections.emptyList(); - private void ensureTxsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - txs_ = new java.util.ArrayList(txs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> txsBuilder_; - - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public java.util.List getTxsList() { - if (txsBuilder_ == null) { - return java.util.Collections.unmodifiableList(txs_); - } else { - return txsBuilder_.getMessageList(); - } - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public int getTxsCount() { - if (txsBuilder_ == null) { - return txs_.size(); - } else { - return txsBuilder_.getCount(); - } - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index) { - if (txsBuilder_ == null) { - return txs_.get(index); - } else { - return txsBuilder_.getMessage(index); - } - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public Builder setTxs( - int index, pactus.transaction.TransactionOuterClass.TransactionInfo value) { - if (txsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTxsIsMutable(); - txs_.set(index, value); - onChanged(); - } else { - txsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public Builder setTxs( - int index, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - txs_.set(index, builderForValue.build()); - onChanged(); - } else { - txsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public Builder addTxs(pactus.transaction.TransactionOuterClass.TransactionInfo value) { - if (txsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTxsIsMutable(); - txs_.add(value); - onChanged(); - } else { - txsBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public Builder addTxs( - int index, pactus.transaction.TransactionOuterClass.TransactionInfo value) { - if (txsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTxsIsMutable(); - txs_.add(index, value); - onChanged(); - } else { - txsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public Builder addTxs( - pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - txs_.add(builderForValue.build()); - onChanged(); - } else { - txsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public Builder addTxs( - int index, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - txs_.add(index, builderForValue.build()); - onChanged(); - } else { - txsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public Builder addAllTxs( - java.lang.Iterable values) { - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, txs_); - onChanged(); - } else { - txsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public Builder clearTxs() { - if (txsBuilder_ == null) { - txs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - txsBuilder_.clear(); - } - return this; - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public Builder removeTxs(int index) { - if (txsBuilder_ == null) { - ensureTxsIsMutable(); - txs_.remove(index); - onChanged(); - } else { - txsBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder getTxsBuilder( - int index) { - return getTxsFieldBuilder().getBuilder(index); - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( - int index) { - if (txsBuilder_ == null) { - return txs_.get(index); } else { - return txsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public java.util.List - getTxsOrBuilderList() { - if (txsBuilder_ != null) { - return txsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(txs_); - } - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder() { - return getTxsFieldBuilder().addBuilder( - pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance()); - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder( - int index) { - return getTxsFieldBuilder().addBuilder( - index, pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance()); - } - /** - *
-       * List of transactions currently in the pool.
-       * 
- * - * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; - */ - public java.util.List - getTxsBuilderList() { - return getTxsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> - getTxsFieldBuilder() { - if (txsBuilder_ == null) { - txsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder>( - txs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - txs_ = null; - } - return txsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetTxPoolContentResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetTxPoolContentResponse) - private static final pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse(); - } - - public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetTxPoolContentResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ValidatorInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.ValidatorInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The hash of the validator.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - java.lang.String getHash(); - /** - *
-     * The hash of the validator.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - com.google.protobuf.ByteString - getHashBytes(); - - /** - *
-     * The serialized data of the validator.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The data. - */ - java.lang.String getData(); - /** - *
-     * The serialized data of the validator.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The bytes for data. - */ - com.google.protobuf.ByteString - getDataBytes(); - - /** - *
-     * The public key of the validator.
-     * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The publicKey. - */ - java.lang.String getPublicKey(); - /** - *
-     * The public key of the validator.
-     * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - com.google.protobuf.ByteString - getPublicKeyBytes(); - - /** - *
-     * The unique number assigned to the validator.
-     * 
- * - * int32 number = 4 [json_name = "number"]; - * @return The number. - */ - int getNumber(); - - /** - *
-     * The stake of the validator in NanoPAC.
-     * 
- * - * int64 stake = 5 [json_name = "stake"]; - * @return The stake. - */ - long getStake(); - - /** - *
-     * The height at which the validator last bonded.
-     * 
- * - * uint32 last_bonding_height = 6 [json_name = "lastBondingHeight"]; - * @return The lastBondingHeight. - */ - int getLastBondingHeight(); - - /** - *
-     * The height at which the validator last participated in sortition.
-     * 
- * - * uint32 last_sortition_height = 7 [json_name = "lastSortitionHeight"]; - * @return The lastSortitionHeight. - */ - int getLastSortitionHeight(); - - /** - *
-     * The height at which the validator will unbond.
-     * 
- * - * uint32 unbonding_height = 8 [json_name = "unbondingHeight"]; - * @return The unbondingHeight. - */ - int getUnbondingHeight(); - - /** - *
-     * The address of the validator.
-     * 
- * - * string address = 9 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The address of the validator.
-     * 
- * - * string address = 9 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - - /** - *
-     * The availability score of the validator.
-     * 
- * - * double availability_score = 10 [json_name = "availabilityScore"]; - * @return The availabilityScore. - */ - double getAvailabilityScore(); - } - /** - *
-   * Message containing information about a validator.
-   * 
- * - * Protobuf type {@code pactus.ValidatorInfo} - */ - public static final class ValidatorInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.ValidatorInfo) - ValidatorInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use ValidatorInfo.newBuilder() to construct. - private ValidatorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ValidatorInfo() { - hash_ = ""; - data_ = ""; - publicKey_ = ""; - address_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ValidatorInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.ValidatorInfo.class, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder.class); - } - - public static final int HASH_FIELD_NUMBER = 1; - private volatile java.lang.Object hash_; - /** - *
-     * The hash of the validator.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - @java.lang.Override - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } - } - /** - *
-     * The hash of the validator.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_FIELD_NUMBER = 2; - private volatile java.lang.Object data_; - /** - *
-     * The serialized data of the validator.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The data. - */ - @java.lang.Override - public java.lang.String getData() { - java.lang.Object ref = data_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - data_ = s; - return s; - } - } - /** - *
-     * The serialized data of the validator.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The bytes for data. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDataBytes() { - java.lang.Object ref = data_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - data_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 3; - private volatile java.lang.Object publicKey_; - /** - *
-     * The public key of the validator.
-     * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The publicKey. - */ - @java.lang.Override - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } - } - /** - *
-     * The public key of the validator.
-     * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NUMBER_FIELD_NUMBER = 4; - private int number_; - /** - *
-     * The unique number assigned to the validator.
-     * 
- * - * int32 number = 4 [json_name = "number"]; - * @return The number. - */ - @java.lang.Override - public int getNumber() { - return number_; - } - - public static final int STAKE_FIELD_NUMBER = 5; - private long stake_; - /** - *
-     * The stake of the validator in NanoPAC.
-     * 
- * - * int64 stake = 5 [json_name = "stake"]; - * @return The stake. - */ - @java.lang.Override - public long getStake() { - return stake_; - } - - public static final int LAST_BONDING_HEIGHT_FIELD_NUMBER = 6; - private int lastBondingHeight_; - /** - *
-     * The height at which the validator last bonded.
-     * 
- * - * uint32 last_bonding_height = 6 [json_name = "lastBondingHeight"]; - * @return The lastBondingHeight. - */ - @java.lang.Override - public int getLastBondingHeight() { - return lastBondingHeight_; - } - - public static final int LAST_SORTITION_HEIGHT_FIELD_NUMBER = 7; - private int lastSortitionHeight_; - /** - *
-     * The height at which the validator last participated in sortition.
-     * 
- * - * uint32 last_sortition_height = 7 [json_name = "lastSortitionHeight"]; - * @return The lastSortitionHeight. - */ - @java.lang.Override - public int getLastSortitionHeight() { - return lastSortitionHeight_; - } - - public static final int UNBONDING_HEIGHT_FIELD_NUMBER = 8; - private int unbondingHeight_; - /** - *
-     * The height at which the validator will unbond.
-     * 
- * - * uint32 unbonding_height = 8 [json_name = "unbondingHeight"]; - * @return The unbondingHeight. - */ - @java.lang.Override - public int getUnbondingHeight() { - return unbondingHeight_; - } - - public static final int ADDRESS_FIELD_NUMBER = 9; - private volatile java.lang.Object address_; - /** - *
-     * The address of the validator.
-     * 
- * - * string address = 9 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The address of the validator.
-     * 
- * - * string address = 9 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AVAILABILITY_SCORE_FIELD_NUMBER = 10; - private double availabilityScore_; - /** - *
-     * The availability score of the validator.
-     * 
- * - * double availability_score = 10 [json_name = "availabilityScore"]; - * @return The availabilityScore. - */ - @java.lang.Override - public double getAvailabilityScore() { - return availabilityScore_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hash_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publicKey_); - } - if (number_ != 0) { - output.writeInt32(4, number_); - } - if (stake_ != 0L) { - output.writeInt64(5, stake_); - } - if (lastBondingHeight_ != 0) { - output.writeUInt32(6, lastBondingHeight_); - } - if (lastSortitionHeight_ != 0) { - output.writeUInt32(7, lastSortitionHeight_); - } - if (unbondingHeight_ != 0) { - output.writeUInt32(8, unbondingHeight_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, address_); - } - if (java.lang.Double.doubleToRawLongBits(availabilityScore_) != 0) { - output.writeDouble(10, availabilityScore_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hash_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publicKey_); - } - if (number_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, number_); - } - if (stake_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, stake_); - } - if (lastBondingHeight_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, lastBondingHeight_); - } - if (lastSortitionHeight_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, lastSortitionHeight_); - } - if (unbondingHeight_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(8, unbondingHeight_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, address_); - } - if (java.lang.Double.doubleToRawLongBits(availabilityScore_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(10, availabilityScore_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.ValidatorInfo)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.ValidatorInfo other = (pactus.blockchain.BlockchainOuterClass.ValidatorInfo) obj; - - if (!getHash() - .equals(other.getHash())) return false; - if (!getData() - .equals(other.getData())) return false; - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - if (getNumber() - != other.getNumber()) return false; - if (getStake() - != other.getStake()) return false; - if (getLastBondingHeight() - != other.getLastBondingHeight()) return false; - if (getLastSortitionHeight() - != other.getLastSortitionHeight()) return false; - if (getUnbondingHeight() - != other.getUnbondingHeight()) return false; - if (!getAddress() - .equals(other.getAddress())) return false; - if (java.lang.Double.doubleToLongBits(getAvailabilityScore()) - != java.lang.Double.doubleToLongBits( - other.getAvailabilityScore())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HASH_FIELD_NUMBER; - hash = (53 * hash) + getHash().hashCode(); - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - hash = (37 * hash) + NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getNumber(); - hash = (37 * hash) + STAKE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getStake()); - hash = (37 * hash) + LAST_BONDING_HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getLastBondingHeight(); - hash = (37 * hash) + LAST_SORTITION_HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getLastSortitionHeight(); - hash = (37 * hash) + UNBONDING_HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getUnbondingHeight(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (37 * hash) + AVAILABILITY_SCORE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getAvailabilityScore())); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.ValidatorInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing information about a validator.
-     * 
- * - * Protobuf type {@code pactus.ValidatorInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.ValidatorInfo) - pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.ValidatorInfo.class, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.ValidatorInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - hash_ = ""; - - data_ = ""; - - publicKey_ = ""; - - number_ = 0; - - stake_ = 0L; - - lastBondingHeight_ = 0; - - lastSortitionHeight_ = 0; - - unbondingHeight_ = 0; - - address_ = ""; - - availabilityScore_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo build() { - pactus.blockchain.BlockchainOuterClass.ValidatorInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo buildPartial() { - pactus.blockchain.BlockchainOuterClass.ValidatorInfo result = new pactus.blockchain.BlockchainOuterClass.ValidatorInfo(this); - result.hash_ = hash_; - result.data_ = data_; - result.publicKey_ = publicKey_; - result.number_ = number_; - result.stake_ = stake_; - result.lastBondingHeight_ = lastBondingHeight_; - result.lastSortitionHeight_ = lastSortitionHeight_; - result.unbondingHeight_ = unbondingHeight_; - result.address_ = address_; - result.availabilityScore_ = availabilityScore_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.ValidatorInfo) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.ValidatorInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.ValidatorInfo other) { - if (other == pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance()) return this; - if (!other.getHash().isEmpty()) { - hash_ = other.hash_; - onChanged(); - } - if (!other.getData().isEmpty()) { - data_ = other.data_; - onChanged(); - } - if (!other.getPublicKey().isEmpty()) { - publicKey_ = other.publicKey_; - onChanged(); - } - if (other.getNumber() != 0) { - setNumber(other.getNumber()); - } - if (other.getStake() != 0L) { - setStake(other.getStake()); - } - if (other.getLastBondingHeight() != 0) { - setLastBondingHeight(other.getLastBondingHeight()); - } - if (other.getLastSortitionHeight() != 0) { - setLastSortitionHeight(other.getLastSortitionHeight()); - } - if (other.getUnbondingHeight() != 0) { - setUnbondingHeight(other.getUnbondingHeight()); - } - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - if (other.getAvailabilityScore() != 0D) { - setAvailabilityScore(other.getAvailabilityScore()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - hash_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - data_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - publicKey_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 32: { - number_ = input.readInt32(); - - break; - } // case 32 - case 40: { - stake_ = input.readInt64(); - - break; - } // case 40 - case 48: { - lastBondingHeight_ = input.readUInt32(); - - break; - } // case 48 - case 56: { - lastSortitionHeight_ = input.readUInt32(); - - break; - } // case 56 - case 64: { - unbondingHeight_ = input.readUInt32(); - - break; - } // case 64 - case 74: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 74 - case 81: { - availabilityScore_ = input.readDouble(); - - break; - } // case 81 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object hash_ = ""; - /** - *
-       * The hash of the validator.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The hash of the validator.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The hash of the validator.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - hash_ = value; - onChanged(); - return this; - } - /** - *
-       * The hash of the validator.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return This builder for chaining. - */ - public Builder clearHash() { - - hash_ = getDefaultInstance().getHash(); - onChanged(); - return this; - } - /** - *
-       * The hash of the validator.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @param value The bytes for hash to set. - * @return This builder for chaining. - */ - public Builder setHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - hash_ = value; - onChanged(); - return this; - } - - private java.lang.Object data_ = ""; - /** - *
-       * The serialized data of the validator.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @return The data. - */ - public java.lang.String getData() { - java.lang.Object ref = data_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - data_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The serialized data of the validator.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @return The bytes for data. - */ - public com.google.protobuf.ByteString - getDataBytes() { - java.lang.Object ref = data_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - data_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The serialized data of the validator.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @param value The data to set. - * @return This builder for chaining. - */ - public Builder setData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - data_ = value; - onChanged(); - return this; - } - /** - *
-       * The serialized data of the validator.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @return This builder for chaining. - */ - public Builder clearData() { - - data_ = getDefaultInstance().getData(); - onChanged(); - return this; - } - /** - *
-       * The serialized data of the validator.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @param value The bytes for data to set. - * @return This builder for chaining. - */ - public Builder setDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - data_ = value; - onChanged(); - return this; - } - - private java.lang.Object publicKey_ = ""; - /** - *
-       * The public key of the validator.
-       * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The publicKey. - */ - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The public key of the validator.
-       * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The public key of the validator.
-       * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @param value The publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - publicKey_ = value; - onChanged(); - return this; - } - /** - *
-       * The public key of the validator.
-       * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - - publicKey_ = getDefaultInstance().getPublicKey(); - onChanged(); - return this; - } - /** - *
-       * The public key of the validator.
-       * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @param value The bytes for publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - publicKey_ = value; - onChanged(); - return this; - } - - private int number_ ; - /** - *
-       * The unique number assigned to the validator.
-       * 
- * - * int32 number = 4 [json_name = "number"]; - * @return The number. - */ - @java.lang.Override - public int getNumber() { - return number_; - } - /** - *
-       * The unique number assigned to the validator.
-       * 
- * - * int32 number = 4 [json_name = "number"]; - * @param value The number to set. - * @return This builder for chaining. - */ - public Builder setNumber(int value) { - - number_ = value; - onChanged(); - return this; - } - /** - *
-       * The unique number assigned to the validator.
-       * 
- * - * int32 number = 4 [json_name = "number"]; - * @return This builder for chaining. - */ - public Builder clearNumber() { - - number_ = 0; - onChanged(); - return this; - } - - private long stake_ ; - /** - *
-       * The stake of the validator in NanoPAC.
-       * 
- * - * int64 stake = 5 [json_name = "stake"]; - * @return The stake. - */ - @java.lang.Override - public long getStake() { - return stake_; - } - /** - *
-       * The stake of the validator in NanoPAC.
-       * 
- * - * int64 stake = 5 [json_name = "stake"]; - * @param value The stake to set. - * @return This builder for chaining. - */ - public Builder setStake(long value) { - - stake_ = value; - onChanged(); - return this; - } - /** - *
-       * The stake of the validator in NanoPAC.
-       * 
- * - * int64 stake = 5 [json_name = "stake"]; - * @return This builder for chaining. - */ - public Builder clearStake() { - - stake_ = 0L; - onChanged(); - return this; - } - - private int lastBondingHeight_ ; - /** - *
-       * The height at which the validator last bonded.
-       * 
- * - * uint32 last_bonding_height = 6 [json_name = "lastBondingHeight"]; - * @return The lastBondingHeight. - */ - @java.lang.Override - public int getLastBondingHeight() { - return lastBondingHeight_; - } - /** - *
-       * The height at which the validator last bonded.
-       * 
- * - * uint32 last_bonding_height = 6 [json_name = "lastBondingHeight"]; - * @param value The lastBondingHeight to set. - * @return This builder for chaining. - */ - public Builder setLastBondingHeight(int value) { - - lastBondingHeight_ = value; - onChanged(); - return this; - } - /** - *
-       * The height at which the validator last bonded.
-       * 
- * - * uint32 last_bonding_height = 6 [json_name = "lastBondingHeight"]; - * @return This builder for chaining. - */ - public Builder clearLastBondingHeight() { - - lastBondingHeight_ = 0; - onChanged(); - return this; - } - - private int lastSortitionHeight_ ; - /** - *
-       * The height at which the validator last participated in sortition.
-       * 
- * - * uint32 last_sortition_height = 7 [json_name = "lastSortitionHeight"]; - * @return The lastSortitionHeight. - */ - @java.lang.Override - public int getLastSortitionHeight() { - return lastSortitionHeight_; - } - /** - *
-       * The height at which the validator last participated in sortition.
-       * 
- * - * uint32 last_sortition_height = 7 [json_name = "lastSortitionHeight"]; - * @param value The lastSortitionHeight to set. - * @return This builder for chaining. - */ - public Builder setLastSortitionHeight(int value) { - - lastSortitionHeight_ = value; - onChanged(); - return this; - } - /** - *
-       * The height at which the validator last participated in sortition.
-       * 
- * - * uint32 last_sortition_height = 7 [json_name = "lastSortitionHeight"]; - * @return This builder for chaining. - */ - public Builder clearLastSortitionHeight() { - - lastSortitionHeight_ = 0; - onChanged(); - return this; - } - - private int unbondingHeight_ ; - /** - *
-       * The height at which the validator will unbond.
-       * 
- * - * uint32 unbonding_height = 8 [json_name = "unbondingHeight"]; - * @return The unbondingHeight. - */ - @java.lang.Override - public int getUnbondingHeight() { - return unbondingHeight_; - } - /** - *
-       * The height at which the validator will unbond.
-       * 
- * - * uint32 unbonding_height = 8 [json_name = "unbondingHeight"]; - * @param value The unbondingHeight to set. - * @return This builder for chaining. - */ - public Builder setUnbondingHeight(int value) { - - unbondingHeight_ = value; - onChanged(); - return this; - } - /** - *
-       * The height at which the validator will unbond.
-       * 
- * - * uint32 unbonding_height = 8 [json_name = "unbondingHeight"]; - * @return This builder for chaining. - */ - public Builder clearUnbondingHeight() { - - unbondingHeight_ = 0; - onChanged(); - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * The address of the validator.
-       * 
- * - * string address = 9 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the validator.
-       * 
- * - * string address = 9 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the validator.
-       * 
- * - * string address = 9 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the validator.
-       * 
- * - * string address = 9 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The address of the validator.
-       * 
- * - * string address = 9 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - - private double availabilityScore_ ; - /** - *
-       * The availability score of the validator.
-       * 
- * - * double availability_score = 10 [json_name = "availabilityScore"]; - * @return The availabilityScore. - */ - @java.lang.Override - public double getAvailabilityScore() { - return availabilityScore_; - } - /** - *
-       * The availability score of the validator.
-       * 
- * - * double availability_score = 10 [json_name = "availabilityScore"]; - * @param value The availabilityScore to set. - * @return This builder for chaining. - */ - public Builder setAvailabilityScore(double value) { - - availabilityScore_ = value; - onChanged(); - return this; - } - /** - *
-       * The availability score of the validator.
-       * 
- * - * double availability_score = 10 [json_name = "availabilityScore"]; - * @return This builder for chaining. - */ - public Builder clearAvailabilityScore() { - - availabilityScore_ = 0D; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.ValidatorInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.ValidatorInfo) - private static final pactus.blockchain.BlockchainOuterClass.ValidatorInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.ValidatorInfo(); - } - - public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ValidatorInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface AccountInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.AccountInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The hash of the account.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - java.lang.String getHash(); - /** - *
-     * The hash of the account.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - com.google.protobuf.ByteString - getHashBytes(); - - /** - *
-     * The serialized data of the account.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The data. - */ - java.lang.String getData(); - /** - *
-     * The serialized data of the account.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The bytes for data. - */ - com.google.protobuf.ByteString - getDataBytes(); - - /** - *
-     * The unique number assigned to the account.
-     * 
- * - * int32 number = 3 [json_name = "number"]; - * @return The number. - */ - int getNumber(); - - /** - *
-     * The balance of the account in NanoPAC.
-     * 
- * - * int64 balance = 4 [json_name = "balance"]; - * @return The balance. - */ - long getBalance(); - - /** - *
-     * The address of the account.
-     * 
- * - * string address = 5 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The address of the account.
-     * 
- * - * string address = 5 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - } - /** - *
-   * Message containing information about an account.
-   * 
- * - * Protobuf type {@code pactus.AccountInfo} - */ - public static final class AccountInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.AccountInfo) - AccountInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use AccountInfo.newBuilder() to construct. - private AccountInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AccountInfo() { - hash_ = ""; - data_ = ""; - address_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AccountInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_AccountInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_AccountInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.AccountInfo.class, pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder.class); - } - - public static final int HASH_FIELD_NUMBER = 1; - private volatile java.lang.Object hash_; - /** - *
-     * The hash of the account.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - @java.lang.Override - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } - } - /** - *
-     * The hash of the account.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_FIELD_NUMBER = 2; - private volatile java.lang.Object data_; - /** - *
-     * The serialized data of the account.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The data. - */ - @java.lang.Override - public java.lang.String getData() { - java.lang.Object ref = data_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - data_ = s; - return s; - } - } - /** - *
-     * The serialized data of the account.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The bytes for data. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDataBytes() { - java.lang.Object ref = data_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - data_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NUMBER_FIELD_NUMBER = 3; - private int number_; - /** - *
-     * The unique number assigned to the account.
-     * 
- * - * int32 number = 3 [json_name = "number"]; - * @return The number. - */ - @java.lang.Override - public int getNumber() { - return number_; - } - - public static final int BALANCE_FIELD_NUMBER = 4; - private long balance_; - /** - *
-     * The balance of the account in NanoPAC.
-     * 
- * - * int64 balance = 4 [json_name = "balance"]; - * @return The balance. - */ - @java.lang.Override - public long getBalance() { - return balance_; - } - - public static final int ADDRESS_FIELD_NUMBER = 5; - private volatile java.lang.Object address_; - /** - *
-     * The address of the account.
-     * 
- * - * string address = 5 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The address of the account.
-     * 
- * - * string address = 5 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hash_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); - } - if (number_ != 0) { - output.writeInt32(3, number_); - } - if (balance_ != 0L) { - output.writeInt64(4, balance_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, address_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hash_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); - } - if (number_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, number_); - } - if (balance_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, balance_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, address_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.AccountInfo)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.AccountInfo other = (pactus.blockchain.BlockchainOuterClass.AccountInfo) obj; - - if (!getHash() - .equals(other.getHash())) return false; - if (!getData() - .equals(other.getData())) return false; - if (getNumber() - != other.getNumber()) return false; - if (getBalance() - != other.getBalance()) return false; - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HASH_FIELD_NUMBER; - hash = (53 * hash) + getHash().hashCode(); - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - hash = (37 * hash) + NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getNumber(); - hash = (37 * hash) + BALANCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getBalance()); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.AccountInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing information about an account.
-     * 
- * - * Protobuf type {@code pactus.AccountInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.AccountInfo) - pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_AccountInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_AccountInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.AccountInfo.class, pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.AccountInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - hash_ = ""; - - data_ = ""; - - number_ = 0; - - balance_ = 0L; - - address_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_AccountInfo_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.AccountInfo getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.AccountInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.AccountInfo build() { - pactus.blockchain.BlockchainOuterClass.AccountInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.AccountInfo buildPartial() { - pactus.blockchain.BlockchainOuterClass.AccountInfo result = new pactus.blockchain.BlockchainOuterClass.AccountInfo(this); - result.hash_ = hash_; - result.data_ = data_; - result.number_ = number_; - result.balance_ = balance_; - result.address_ = address_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.AccountInfo) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.AccountInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.AccountInfo other) { - if (other == pactus.blockchain.BlockchainOuterClass.AccountInfo.getDefaultInstance()) return this; - if (!other.getHash().isEmpty()) { - hash_ = other.hash_; - onChanged(); - } - if (!other.getData().isEmpty()) { - data_ = other.data_; - onChanged(); - } - if (other.getNumber() != 0) { - setNumber(other.getNumber()); - } - if (other.getBalance() != 0L) { - setBalance(other.getBalance()); - } - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - hash_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - data_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: { - number_ = input.readInt32(); - - break; - } // case 24 - case 32: { - balance_ = input.readInt64(); - - break; - } // case 32 - case 42: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object hash_ = ""; - /** - *
-       * The hash of the account.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The hash of the account.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The hash of the account.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - hash_ = value; - onChanged(); - return this; - } - /** - *
-       * The hash of the account.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return This builder for chaining. - */ - public Builder clearHash() { - - hash_ = getDefaultInstance().getHash(); - onChanged(); - return this; - } - /** - *
-       * The hash of the account.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @param value The bytes for hash to set. - * @return This builder for chaining. - */ - public Builder setHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - hash_ = value; - onChanged(); - return this; - } - - private java.lang.Object data_ = ""; - /** - *
-       * The serialized data of the account.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @return The data. - */ - public java.lang.String getData() { - java.lang.Object ref = data_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - data_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The serialized data of the account.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @return The bytes for data. - */ - public com.google.protobuf.ByteString - getDataBytes() { - java.lang.Object ref = data_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - data_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The serialized data of the account.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @param value The data to set. - * @return This builder for chaining. - */ - public Builder setData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - data_ = value; - onChanged(); - return this; - } - /** - *
-       * The serialized data of the account.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @return This builder for chaining. - */ - public Builder clearData() { - - data_ = getDefaultInstance().getData(); - onChanged(); - return this; - } - /** - *
-       * The serialized data of the account.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @param value The bytes for data to set. - * @return This builder for chaining. - */ - public Builder setDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - data_ = value; - onChanged(); - return this; - } - - private int number_ ; - /** - *
-       * The unique number assigned to the account.
-       * 
- * - * int32 number = 3 [json_name = "number"]; - * @return The number. - */ - @java.lang.Override - public int getNumber() { - return number_; - } - /** - *
-       * The unique number assigned to the account.
-       * 
- * - * int32 number = 3 [json_name = "number"]; - * @param value The number to set. - * @return This builder for chaining. - */ - public Builder setNumber(int value) { - - number_ = value; - onChanged(); - return this; - } - /** - *
-       * The unique number assigned to the account.
-       * 
- * - * int32 number = 3 [json_name = "number"]; - * @return This builder for chaining. - */ - public Builder clearNumber() { - - number_ = 0; - onChanged(); - return this; - } - - private long balance_ ; - /** - *
-       * The balance of the account in NanoPAC.
-       * 
- * - * int64 balance = 4 [json_name = "balance"]; - * @return The balance. - */ - @java.lang.Override - public long getBalance() { - return balance_; - } - /** - *
-       * The balance of the account in NanoPAC.
-       * 
- * - * int64 balance = 4 [json_name = "balance"]; - * @param value The balance to set. - * @return This builder for chaining. - */ - public Builder setBalance(long value) { - - balance_ = value; - onChanged(); - return this; - } - /** - *
-       * The balance of the account in NanoPAC.
-       * 
- * - * int64 balance = 4 [json_name = "balance"]; - * @return This builder for chaining. - */ - public Builder clearBalance() { - - balance_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * The address of the account.
-       * 
- * - * string address = 5 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the account.
-       * 
- * - * string address = 5 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the account.
-       * 
- * - * string address = 5 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the account.
-       * 
- * - * string address = 5 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The address of the account.
-       * 
- * - * string address = 5 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.AccountInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.AccountInfo) - private static final pactus.blockchain.BlockchainOuterClass.AccountInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.AccountInfo(); - } - - public static pactus.blockchain.BlockchainOuterClass.AccountInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AccountInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.AccountInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface BlockHeaderInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.BlockHeaderInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The version of the block.
-     * 
- * - * int32 version = 1 [json_name = "version"]; - * @return The version. - */ - int getVersion(); - - /** - *
-     * The hash of the previous block.
-     * 
- * - * string prev_block_hash = 2 [json_name = "prevBlockHash"]; - * @return The prevBlockHash. - */ - java.lang.String getPrevBlockHash(); - /** - *
-     * The hash of the previous block.
-     * 
- * - * string prev_block_hash = 2 [json_name = "prevBlockHash"]; - * @return The bytes for prevBlockHash. - */ - com.google.protobuf.ByteString - getPrevBlockHashBytes(); - - /** - *
-     * The state root hash of the blockchain.
-     * 
- * - * string state_root = 3 [json_name = "stateRoot"]; - * @return The stateRoot. - */ - java.lang.String getStateRoot(); - /** - *
-     * The state root hash of the blockchain.
-     * 
- * - * string state_root = 3 [json_name = "stateRoot"]; - * @return The bytes for stateRoot. - */ - com.google.protobuf.ByteString - getStateRootBytes(); - - /** - *
-     * The sortition seed of the block.
-     * 
- * - * string sortition_seed = 4 [json_name = "sortitionSeed"]; - * @return The sortitionSeed. - */ - java.lang.String getSortitionSeed(); - /** - *
-     * The sortition seed of the block.
-     * 
- * - * string sortition_seed = 4 [json_name = "sortitionSeed"]; - * @return The bytes for sortitionSeed. - */ - com.google.protobuf.ByteString - getSortitionSeedBytes(); - - /** - *
-     * The address of the proposer of the block.
-     * 
- * - * string proposer_address = 5 [json_name = "proposerAddress"]; - * @return The proposerAddress. - */ - java.lang.String getProposerAddress(); - /** - *
-     * The address of the proposer of the block.
-     * 
- * - * string proposer_address = 5 [json_name = "proposerAddress"]; - * @return The bytes for proposerAddress. - */ - com.google.protobuf.ByteString - getProposerAddressBytes(); - } - /** - *
-   * Message containing information about the header of a block.
-   * 
- * - * Protobuf type {@code pactus.BlockHeaderInfo} - */ - public static final class BlockHeaderInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.BlockHeaderInfo) - BlockHeaderInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use BlockHeaderInfo.newBuilder() to construct. - private BlockHeaderInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BlockHeaderInfo() { - prevBlockHash_ = ""; - stateRoot_ = ""; - sortitionSeed_ = ""; - proposerAddress_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BlockHeaderInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.class, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder.class); - } - - public static final int VERSION_FIELD_NUMBER = 1; - private int version_; - /** - *
-     * The version of the block.
-     * 
- * - * int32 version = 1 [json_name = "version"]; - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - - public static final int PREV_BLOCK_HASH_FIELD_NUMBER = 2; - private volatile java.lang.Object prevBlockHash_; - /** - *
-     * The hash of the previous block.
-     * 
- * - * string prev_block_hash = 2 [json_name = "prevBlockHash"]; - * @return The prevBlockHash. - */ - @java.lang.Override - public java.lang.String getPrevBlockHash() { - java.lang.Object ref = prevBlockHash_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - prevBlockHash_ = s; - return s; - } - } - /** - *
-     * The hash of the previous block.
-     * 
- * - * string prev_block_hash = 2 [json_name = "prevBlockHash"]; - * @return The bytes for prevBlockHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPrevBlockHashBytes() { - java.lang.Object ref = prevBlockHash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - prevBlockHash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_ROOT_FIELD_NUMBER = 3; - private volatile java.lang.Object stateRoot_; - /** - *
-     * The state root hash of the blockchain.
-     * 
- * - * string state_root = 3 [json_name = "stateRoot"]; - * @return The stateRoot. - */ - @java.lang.Override - public java.lang.String getStateRoot() { - java.lang.Object ref = stateRoot_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateRoot_ = s; - return s; - } - } - /** - *
-     * The state root hash of the blockchain.
-     * 
- * - * string state_root = 3 [json_name = "stateRoot"]; - * @return The bytes for stateRoot. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getStateRootBytes() { - java.lang.Object ref = stateRoot_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stateRoot_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SORTITION_SEED_FIELD_NUMBER = 4; - private volatile java.lang.Object sortitionSeed_; - /** - *
-     * The sortition seed of the block.
-     * 
- * - * string sortition_seed = 4 [json_name = "sortitionSeed"]; - * @return The sortitionSeed. - */ - @java.lang.Override - public java.lang.String getSortitionSeed() { - java.lang.Object ref = sortitionSeed_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sortitionSeed_ = s; - return s; - } - } - /** - *
-     * The sortition seed of the block.
-     * 
- * - * string sortition_seed = 4 [json_name = "sortitionSeed"]; - * @return The bytes for sortitionSeed. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSortitionSeedBytes() { - java.lang.Object ref = sortitionSeed_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sortitionSeed_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROPOSER_ADDRESS_FIELD_NUMBER = 5; - private volatile java.lang.Object proposerAddress_; - /** - *
-     * The address of the proposer of the block.
-     * 
- * - * string proposer_address = 5 [json_name = "proposerAddress"]; - * @return The proposerAddress. - */ - @java.lang.Override - public java.lang.String getProposerAddress() { - java.lang.Object ref = proposerAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - proposerAddress_ = s; - return s; - } - } - /** - *
-     * The address of the proposer of the block.
-     * 
- * - * string proposer_address = 5 [json_name = "proposerAddress"]; - * @return The bytes for proposerAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProposerAddressBytes() { - java.lang.Object ref = proposerAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - proposerAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (version_ != 0) { - output.writeInt32(1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(prevBlockHash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, prevBlockHash_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateRoot_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, stateRoot_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sortitionSeed_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sortitionSeed_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proposerAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, proposerAddress_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, version_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(prevBlockHash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, prevBlockHash_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateRoot_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, stateRoot_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sortitionSeed_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sortitionSeed_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proposerAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, proposerAddress_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo other = (pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo) obj; - - if (getVersion() - != other.getVersion()) return false; - if (!getPrevBlockHash() - .equals(other.getPrevBlockHash())) return false; - if (!getStateRoot() - .equals(other.getStateRoot())) return false; - if (!getSortitionSeed() - .equals(other.getSortitionSeed())) return false; - if (!getProposerAddress() - .equals(other.getProposerAddress())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); - hash = (37 * hash) + PREV_BLOCK_HASH_FIELD_NUMBER; - hash = (53 * hash) + getPrevBlockHash().hashCode(); - hash = (37 * hash) + STATE_ROOT_FIELD_NUMBER; - hash = (53 * hash) + getStateRoot().hashCode(); - hash = (37 * hash) + SORTITION_SEED_FIELD_NUMBER; - hash = (53 * hash) + getSortitionSeed().hashCode(); - hash = (37 * hash) + PROPOSER_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getProposerAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing information about the header of a block.
-     * 
- * - * Protobuf type {@code pactus.BlockHeaderInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.BlockHeaderInfo) - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.class, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - version_ = 0; - - prevBlockHash_ = ""; - - stateRoot_ = ""; - - sortitionSeed_ = ""; - - proposerAddress_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo build() { - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo buildPartial() { - pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo result = new pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo(this); - result.version_ = version_; - result.prevBlockHash_ = prevBlockHash_; - result.stateRoot_ = stateRoot_; - result.sortitionSeed_ = sortitionSeed_; - result.proposerAddress_ = proposerAddress_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo other) { - if (other == pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance()) return this; - if (other.getVersion() != 0) { - setVersion(other.getVersion()); - } - if (!other.getPrevBlockHash().isEmpty()) { - prevBlockHash_ = other.prevBlockHash_; - onChanged(); - } - if (!other.getStateRoot().isEmpty()) { - stateRoot_ = other.stateRoot_; - onChanged(); - } - if (!other.getSortitionSeed().isEmpty()) { - sortitionSeed_ = other.sortitionSeed_; - onChanged(); - } - if (!other.getProposerAddress().isEmpty()) { - proposerAddress_ = other.proposerAddress_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - version_ = input.readInt32(); - - break; - } // case 8 - case 18: { - prevBlockHash_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - stateRoot_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: { - sortitionSeed_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: { - proposerAddress_ = input.readStringRequireUtf8(); - - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int version_ ; - /** - *
-       * The version of the block.
-       * 
- * - * int32 version = 1 [json_name = "version"]; - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - /** - *
-       * The version of the block.
-       * 
- * - * int32 version = 1 [json_name = "version"]; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(int value) { - - version_ = value; - onChanged(); - return this; - } - /** - *
-       * The version of the block.
-       * 
- * - * int32 version = 1 [json_name = "version"]; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = 0; - onChanged(); - return this; - } - - private java.lang.Object prevBlockHash_ = ""; - /** - *
-       * The hash of the previous block.
-       * 
- * - * string prev_block_hash = 2 [json_name = "prevBlockHash"]; - * @return The prevBlockHash. - */ - public java.lang.String getPrevBlockHash() { - java.lang.Object ref = prevBlockHash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - prevBlockHash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The hash of the previous block.
-       * 
- * - * string prev_block_hash = 2 [json_name = "prevBlockHash"]; - * @return The bytes for prevBlockHash. - */ - public com.google.protobuf.ByteString - getPrevBlockHashBytes() { - java.lang.Object ref = prevBlockHash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - prevBlockHash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The hash of the previous block.
-       * 
- * - * string prev_block_hash = 2 [json_name = "prevBlockHash"]; - * @param value The prevBlockHash to set. - * @return This builder for chaining. - */ - public Builder setPrevBlockHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - prevBlockHash_ = value; - onChanged(); - return this; - } - /** - *
-       * The hash of the previous block.
-       * 
- * - * string prev_block_hash = 2 [json_name = "prevBlockHash"]; - * @return This builder for chaining. - */ - public Builder clearPrevBlockHash() { - - prevBlockHash_ = getDefaultInstance().getPrevBlockHash(); - onChanged(); - return this; - } - /** - *
-       * The hash of the previous block.
-       * 
- * - * string prev_block_hash = 2 [json_name = "prevBlockHash"]; - * @param value The bytes for prevBlockHash to set. - * @return This builder for chaining. - */ - public Builder setPrevBlockHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - prevBlockHash_ = value; - onChanged(); - return this; - } - - private java.lang.Object stateRoot_ = ""; - /** - *
-       * The state root hash of the blockchain.
-       * 
- * - * string state_root = 3 [json_name = "stateRoot"]; - * @return The stateRoot. - */ - public java.lang.String getStateRoot() { - java.lang.Object ref = stateRoot_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stateRoot_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The state root hash of the blockchain.
-       * 
- * - * string state_root = 3 [json_name = "stateRoot"]; - * @return The bytes for stateRoot. - */ - public com.google.protobuf.ByteString - getStateRootBytes() { - java.lang.Object ref = stateRoot_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - stateRoot_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The state root hash of the blockchain.
-       * 
- * - * string state_root = 3 [json_name = "stateRoot"]; - * @param value The stateRoot to set. - * @return This builder for chaining. - */ - public Builder setStateRoot( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - stateRoot_ = value; - onChanged(); - return this; - } - /** - *
-       * The state root hash of the blockchain.
-       * 
- * - * string state_root = 3 [json_name = "stateRoot"]; - * @return This builder for chaining. - */ - public Builder clearStateRoot() { - - stateRoot_ = getDefaultInstance().getStateRoot(); - onChanged(); - return this; - } - /** - *
-       * The state root hash of the blockchain.
-       * 
- * - * string state_root = 3 [json_name = "stateRoot"]; - * @param value The bytes for stateRoot to set. - * @return This builder for chaining. - */ - public Builder setStateRootBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - stateRoot_ = value; - onChanged(); - return this; - } - - private java.lang.Object sortitionSeed_ = ""; - /** - *
-       * The sortition seed of the block.
-       * 
- * - * string sortition_seed = 4 [json_name = "sortitionSeed"]; - * @return The sortitionSeed. - */ - public java.lang.String getSortitionSeed() { - java.lang.Object ref = sortitionSeed_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sortitionSeed_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The sortition seed of the block.
-       * 
- * - * string sortition_seed = 4 [json_name = "sortitionSeed"]; - * @return The bytes for sortitionSeed. - */ - public com.google.protobuf.ByteString - getSortitionSeedBytes() { - java.lang.Object ref = sortitionSeed_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sortitionSeed_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The sortition seed of the block.
-       * 
- * - * string sortition_seed = 4 [json_name = "sortitionSeed"]; - * @param value The sortitionSeed to set. - * @return This builder for chaining. - */ - public Builder setSortitionSeed( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sortitionSeed_ = value; - onChanged(); - return this; - } - /** - *
-       * The sortition seed of the block.
-       * 
- * - * string sortition_seed = 4 [json_name = "sortitionSeed"]; - * @return This builder for chaining. - */ - public Builder clearSortitionSeed() { - - sortitionSeed_ = getDefaultInstance().getSortitionSeed(); - onChanged(); - return this; - } - /** - *
-       * The sortition seed of the block.
-       * 
- * - * string sortition_seed = 4 [json_name = "sortitionSeed"]; - * @param value The bytes for sortitionSeed to set. - * @return This builder for chaining. - */ - public Builder setSortitionSeedBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sortitionSeed_ = value; - onChanged(); - return this; - } - - private java.lang.Object proposerAddress_ = ""; - /** - *
-       * The address of the proposer of the block.
-       * 
- * - * string proposer_address = 5 [json_name = "proposerAddress"]; - * @return The proposerAddress. - */ - public java.lang.String getProposerAddress() { - java.lang.Object ref = proposerAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - proposerAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the proposer of the block.
-       * 
- * - * string proposer_address = 5 [json_name = "proposerAddress"]; - * @return The bytes for proposerAddress. - */ - public com.google.protobuf.ByteString - getProposerAddressBytes() { - java.lang.Object ref = proposerAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - proposerAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the proposer of the block.
-       * 
- * - * string proposer_address = 5 [json_name = "proposerAddress"]; - * @param value The proposerAddress to set. - * @return This builder for chaining. - */ - public Builder setProposerAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - proposerAddress_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the proposer of the block.
-       * 
- * - * string proposer_address = 5 [json_name = "proposerAddress"]; - * @return This builder for chaining. - */ - public Builder clearProposerAddress() { - - proposerAddress_ = getDefaultInstance().getProposerAddress(); - onChanged(); - return this; - } - /** - *
-       * The address of the proposer of the block.
-       * 
- * - * string proposer_address = 5 [json_name = "proposerAddress"]; - * @param value The bytes for proposerAddress to set. - * @return This builder for chaining. - */ - public Builder setProposerAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - proposerAddress_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.BlockHeaderInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.BlockHeaderInfo) - private static final pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo(); - } - - public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BlockHeaderInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface CertificateInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.CertificateInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The hash of the certificate.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - java.lang.String getHash(); - /** - *
-     * The hash of the certificate.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - com.google.protobuf.ByteString - getHashBytes(); - - /** - *
-     * The round of the certificate.
-     * 
- * - * int32 round = 2 [json_name = "round"]; - * @return The round. - */ - int getRound(); - - /** - *
-     * List of committers in the certificate.
-     * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @return A list containing the committers. - */ - java.util.List getCommittersList(); - /** - *
-     * List of committers in the certificate.
-     * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @return The count of committers. - */ - int getCommittersCount(); - /** - *
-     * List of committers in the certificate.
-     * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @param index The index of the element to return. - * @return The committers at the given index. - */ - int getCommitters(int index); - - /** - *
-     * List of absentees in the certificate.
-     * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @return A list containing the absentees. - */ - java.util.List getAbsenteesList(); - /** - *
-     * List of absentees in the certificate.
-     * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @return The count of absentees. - */ - int getAbsenteesCount(); - /** - *
-     * List of absentees in the certificate.
-     * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @param index The index of the element to return. - * @return The absentees at the given index. - */ - int getAbsentees(int index); - - /** - *
-     * The signature of the certificate.
-     * 
- * - * string signature = 5 [json_name = "signature"]; - * @return The signature. - */ - java.lang.String getSignature(); - /** - *
-     * The signature of the certificate.
-     * 
- * - * string signature = 5 [json_name = "signature"]; - * @return The bytes for signature. - */ - com.google.protobuf.ByteString - getSignatureBytes(); - } - /** - *
-   * Message containing information about a certificate.
-   * 
- * - * Protobuf type {@code pactus.CertificateInfo} - */ - public static final class CertificateInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.CertificateInfo) - CertificateInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use CertificateInfo.newBuilder() to construct. - private CertificateInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CertificateInfo() { - hash_ = ""; - committers_ = emptyIntList(); - absentees_ = emptyIntList(); - signature_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CertificateInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_CertificateInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_CertificateInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.CertificateInfo.class, pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder.class); - } - - public static final int HASH_FIELD_NUMBER = 1; - private volatile java.lang.Object hash_; - /** - *
-     * The hash of the certificate.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - @java.lang.Override - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } - } - /** - *
-     * The hash of the certificate.
-     * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ROUND_FIELD_NUMBER = 2; - private int round_; - /** - *
-     * The round of the certificate.
-     * 
- * - * int32 round = 2 [json_name = "round"]; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return round_; - } - - public static final int COMMITTERS_FIELD_NUMBER = 3; - private com.google.protobuf.Internal.IntList committers_; - /** - *
-     * List of committers in the certificate.
-     * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @return A list containing the committers. - */ - @java.lang.Override - public java.util.List - getCommittersList() { - return committers_; - } - /** - *
-     * List of committers in the certificate.
-     * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @return The count of committers. - */ - public int getCommittersCount() { - return committers_.size(); - } - /** - *
-     * List of committers in the certificate.
-     * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @param index The index of the element to return. - * @return The committers at the given index. - */ - public int getCommitters(int index) { - return committers_.getInt(index); - } - private int committersMemoizedSerializedSize = -1; - - public static final int ABSENTEES_FIELD_NUMBER = 4; - private com.google.protobuf.Internal.IntList absentees_; - /** - *
-     * List of absentees in the certificate.
-     * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @return A list containing the absentees. - */ - @java.lang.Override - public java.util.List - getAbsenteesList() { - return absentees_; - } - /** - *
-     * List of absentees in the certificate.
-     * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @return The count of absentees. - */ - public int getAbsenteesCount() { - return absentees_.size(); - } - /** - *
-     * List of absentees in the certificate.
-     * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @param index The index of the element to return. - * @return The absentees at the given index. - */ - public int getAbsentees(int index) { - return absentees_.getInt(index); - } - private int absenteesMemoizedSerializedSize = -1; - - public static final int SIGNATURE_FIELD_NUMBER = 5; - private volatile java.lang.Object signature_; - /** - *
-     * The signature of the certificate.
-     * 
- * - * string signature = 5 [json_name = "signature"]; - * @return The signature. - */ - @java.lang.Override - public java.lang.String getSignature() { - java.lang.Object ref = signature_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signature_ = s; - return s; - } - } - /** - *
-     * The signature of the certificate.
-     * 
- * - * string signature = 5 [json_name = "signature"]; - * @return The bytes for signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSignatureBytes() { - java.lang.Object ref = signature_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signature_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hash_); - } - if (round_ != 0) { - output.writeInt32(2, round_); - } - if (getCommittersList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(committersMemoizedSerializedSize); - } - for (int i = 0; i < committers_.size(); i++) { - output.writeInt32NoTag(committers_.getInt(i)); - } - if (getAbsenteesList().size() > 0) { - output.writeUInt32NoTag(34); - output.writeUInt32NoTag(absenteesMemoizedSerializedSize); - } - for (int i = 0; i < absentees_.size(); i++) { - output.writeInt32NoTag(absentees_.getInt(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, signature_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hash_); - } - if (round_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, round_); - } - { - int dataSize = 0; - for (int i = 0; i < committers_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(committers_.getInt(i)); - } - size += dataSize; - if (!getCommittersList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - committersMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < absentees_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(absentees_.getInt(i)); - } - size += dataSize; - if (!getAbsenteesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - absenteesMemoizedSerializedSize = dataSize; - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, signature_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.CertificateInfo)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.CertificateInfo other = (pactus.blockchain.BlockchainOuterClass.CertificateInfo) obj; - - if (!getHash() - .equals(other.getHash())) return false; - if (getRound() - != other.getRound()) return false; - if (!getCommittersList() - .equals(other.getCommittersList())) return false; - if (!getAbsenteesList() - .equals(other.getAbsenteesList())) return false; - if (!getSignature() - .equals(other.getSignature())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HASH_FIELD_NUMBER; - hash = (53 * hash) + getHash().hashCode(); - hash = (37 * hash) + ROUND_FIELD_NUMBER; - hash = (53 * hash) + getRound(); - if (getCommittersCount() > 0) { - hash = (37 * hash) + COMMITTERS_FIELD_NUMBER; - hash = (53 * hash) + getCommittersList().hashCode(); - } - if (getAbsenteesCount() > 0) { - hash = (37 * hash) + ABSENTEES_FIELD_NUMBER; - hash = (53 * hash) + getAbsenteesList().hashCode(); - } - hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getSignature().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.CertificateInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing information about a certificate.
-     * 
- * - * Protobuf type {@code pactus.CertificateInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.CertificateInfo) - pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_CertificateInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_CertificateInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.CertificateInfo.class, pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.CertificateInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - hash_ = ""; - - round_ = 0; - - committers_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - absentees_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - signature_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_CertificateInfo_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.CertificateInfo getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.CertificateInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.CertificateInfo build() { - pactus.blockchain.BlockchainOuterClass.CertificateInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.CertificateInfo buildPartial() { - pactus.blockchain.BlockchainOuterClass.CertificateInfo result = new pactus.blockchain.BlockchainOuterClass.CertificateInfo(this); - int from_bitField0_ = bitField0_; - result.hash_ = hash_; - result.round_ = round_; - if (((bitField0_ & 0x00000001) != 0)) { - committers_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.committers_ = committers_; - if (((bitField0_ & 0x00000002) != 0)) { - absentees_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.absentees_ = absentees_; - result.signature_ = signature_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.CertificateInfo) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.CertificateInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.CertificateInfo other) { - if (other == pactus.blockchain.BlockchainOuterClass.CertificateInfo.getDefaultInstance()) return this; - if (!other.getHash().isEmpty()) { - hash_ = other.hash_; - onChanged(); - } - if (other.getRound() != 0) { - setRound(other.getRound()); - } - if (!other.committers_.isEmpty()) { - if (committers_.isEmpty()) { - committers_ = other.committers_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCommittersIsMutable(); - committers_.addAll(other.committers_); - } - onChanged(); - } - if (!other.absentees_.isEmpty()) { - if (absentees_.isEmpty()) { - absentees_ = other.absentees_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAbsenteesIsMutable(); - absentees_.addAll(other.absentees_); - } - onChanged(); - } - if (!other.getSignature().isEmpty()) { - signature_ = other.signature_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - hash_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: { - round_ = input.readInt32(); - - break; - } // case 16 - case 24: { - int v = input.readInt32(); - ensureCommittersIsMutable(); - committers_.addInt(v); - break; - } // case 24 - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureCommittersIsMutable(); - while (input.getBytesUntilLimit() > 0) { - committers_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 26 - case 32: { - int v = input.readInt32(); - ensureAbsenteesIsMutable(); - absentees_.addInt(v); - break; - } // case 32 - case 34: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureAbsenteesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - absentees_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 34 - case 42: { - signature_ = input.readStringRequireUtf8(); - - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object hash_ = ""; - /** - *
-       * The hash of the certificate.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The hash. - */ - public java.lang.String getHash() { - java.lang.Object ref = hash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - hash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The hash of the certificate.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return The bytes for hash. - */ - public com.google.protobuf.ByteString - getHashBytes() { - java.lang.Object ref = hash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - hash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The hash of the certificate.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - hash_ = value; - onChanged(); - return this; - } - /** - *
-       * The hash of the certificate.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @return This builder for chaining. - */ - public Builder clearHash() { - - hash_ = getDefaultInstance().getHash(); - onChanged(); - return this; - } - /** - *
-       * The hash of the certificate.
-       * 
- * - * string hash = 1 [json_name = "hash"]; - * @param value The bytes for hash to set. - * @return This builder for chaining. - */ - public Builder setHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - hash_ = value; - onChanged(); - return this; - } - - private int round_ ; - /** - *
-       * The round of the certificate.
-       * 
- * - * int32 round = 2 [json_name = "round"]; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return round_; - } - /** - *
-       * The round of the certificate.
-       * 
- * - * int32 round = 2 [json_name = "round"]; - * @param value The round to set. - * @return This builder for chaining. - */ - public Builder setRound(int value) { - - round_ = value; - onChanged(); - return this; - } - /** - *
-       * The round of the certificate.
-       * 
- * - * int32 round = 2 [json_name = "round"]; - * @return This builder for chaining. - */ - public Builder clearRound() { - - round_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList committers_ = emptyIntList(); - private void ensureCommittersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - committers_ = mutableCopy(committers_); - bitField0_ |= 0x00000001; - } - } - /** - *
-       * List of committers in the certificate.
-       * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @return A list containing the committers. - */ - public java.util.List - getCommittersList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(committers_) : committers_; - } - /** - *
-       * List of committers in the certificate.
-       * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @return The count of committers. - */ - public int getCommittersCount() { - return committers_.size(); - } - /** - *
-       * List of committers in the certificate.
-       * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @param index The index of the element to return. - * @return The committers at the given index. - */ - public int getCommitters(int index) { - return committers_.getInt(index); - } - /** - *
-       * List of committers in the certificate.
-       * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @param index The index to set the value at. - * @param value The committers to set. - * @return This builder for chaining. - */ - public Builder setCommitters( - int index, int value) { - ensureCommittersIsMutable(); - committers_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * List of committers in the certificate.
-       * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @param value The committers to add. - * @return This builder for chaining. - */ - public Builder addCommitters(int value) { - ensureCommittersIsMutable(); - committers_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * List of committers in the certificate.
-       * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @param values The committers to add. - * @return This builder for chaining. - */ - public Builder addAllCommitters( - java.lang.Iterable values) { - ensureCommittersIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, committers_); - onChanged(); - return this; - } - /** - *
-       * List of committers in the certificate.
-       * 
- * - * repeated int32 committers = 3 [json_name = "committers"]; - * @return This builder for chaining. - */ - public Builder clearCommitters() { - committers_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - private com.google.protobuf.Internal.IntList absentees_ = emptyIntList(); - private void ensureAbsenteesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - absentees_ = mutableCopy(absentees_); - bitField0_ |= 0x00000002; - } - } - /** - *
-       * List of absentees in the certificate.
-       * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @return A list containing the absentees. - */ - public java.util.List - getAbsenteesList() { - return ((bitField0_ & 0x00000002) != 0) ? - java.util.Collections.unmodifiableList(absentees_) : absentees_; - } - /** - *
-       * List of absentees in the certificate.
-       * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @return The count of absentees. - */ - public int getAbsenteesCount() { - return absentees_.size(); - } - /** - *
-       * List of absentees in the certificate.
-       * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @param index The index of the element to return. - * @return The absentees at the given index. - */ - public int getAbsentees(int index) { - return absentees_.getInt(index); - } - /** - *
-       * List of absentees in the certificate.
-       * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @param index The index to set the value at. - * @param value The absentees to set. - * @return This builder for chaining. - */ - public Builder setAbsentees( - int index, int value) { - ensureAbsenteesIsMutable(); - absentees_.setInt(index, value); - onChanged(); - return this; - } - /** - *
-       * List of absentees in the certificate.
-       * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @param value The absentees to add. - * @return This builder for chaining. - */ - public Builder addAbsentees(int value) { - ensureAbsenteesIsMutable(); - absentees_.addInt(value); - onChanged(); - return this; - } - /** - *
-       * List of absentees in the certificate.
-       * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @param values The absentees to add. - * @return This builder for chaining. - */ - public Builder addAllAbsentees( - java.lang.Iterable values) { - ensureAbsenteesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, absentees_); - onChanged(); - return this; - } - /** - *
-       * List of absentees in the certificate.
-       * 
- * - * repeated int32 absentees = 4 [json_name = "absentees"]; - * @return This builder for chaining. - */ - public Builder clearAbsentees() { - absentees_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - private java.lang.Object signature_ = ""; - /** - *
-       * The signature of the certificate.
-       * 
- * - * string signature = 5 [json_name = "signature"]; - * @return The signature. - */ - public java.lang.String getSignature() { - java.lang.Object ref = signature_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signature_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The signature of the certificate.
-       * 
- * - * string signature = 5 [json_name = "signature"]; - * @return The bytes for signature. - */ - public com.google.protobuf.ByteString - getSignatureBytes() { - java.lang.Object ref = signature_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signature_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The signature of the certificate.
-       * 
- * - * string signature = 5 [json_name = "signature"]; - * @param value The signature to set. - * @return This builder for chaining. - */ - public Builder setSignature( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - signature_ = value; - onChanged(); - return this; - } - /** - *
-       * The signature of the certificate.
-       * 
- * - * string signature = 5 [json_name = "signature"]; - * @return This builder for chaining. - */ - public Builder clearSignature() { - - signature_ = getDefaultInstance().getSignature(); - onChanged(); - return this; - } - /** - *
-       * The signature of the certificate.
-       * 
- * - * string signature = 5 [json_name = "signature"]; - * @param value The bytes for signature to set. - * @return This builder for chaining. - */ - public Builder setSignatureBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - signature_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.CertificateInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.CertificateInfo) - private static final pactus.blockchain.BlockchainOuterClass.CertificateInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.CertificateInfo(); - } - - public static pactus.blockchain.BlockchainOuterClass.CertificateInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CertificateInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.CertificateInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface VoteInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.VoteInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The type of the vote.
-     * 
- * - * .pactus.VoteType type = 1 [json_name = "type"]; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - *
-     * The type of the vote.
-     * 
- * - * .pactus.VoteType type = 1 [json_name = "type"]; - * @return The type. - */ - pactus.blockchain.BlockchainOuterClass.VoteType getType(); - - /** - *
-     * The address of the voter.
-     * 
- * - * string voter = 2 [json_name = "voter"]; - * @return The voter. - */ - java.lang.String getVoter(); - /** - *
-     * The address of the voter.
-     * 
- * - * string voter = 2 [json_name = "voter"]; - * @return The bytes for voter. - */ - com.google.protobuf.ByteString - getVoterBytes(); - - /** - *
-     * The hash of the block being voted on.
-     * 
- * - * string block_hash = 3 [json_name = "blockHash"]; - * @return The blockHash. - */ - java.lang.String getBlockHash(); - /** - *
-     * The hash of the block being voted on.
-     * 
- * - * string block_hash = 3 [json_name = "blockHash"]; - * @return The bytes for blockHash. - */ - com.google.protobuf.ByteString - getBlockHashBytes(); - - /** - *
-     * The consensus round of the vote.
-     * 
- * - * int32 round = 4 [json_name = "round"]; - * @return The round. - */ - int getRound(); - - /** - *
-     * The change-proposer round of the vote.
-     * 
- * - * int32 cp_round = 5 [json_name = "cpRound"]; - * @return The cpRound. - */ - int getCpRound(); - - /** - *
-     * The change-proposer value of the vote.
-     * 
- * - * int32 cp_value = 6 [json_name = "cpValue"]; - * @return The cpValue. - */ - int getCpValue(); - } - /** - *
-   * Message containing information about a vote.
-   * 
- * - * Protobuf type {@code pactus.VoteInfo} - */ - public static final class VoteInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.VoteInfo) - VoteInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use VoteInfo.newBuilder() to construct. - private VoteInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private VoteInfo() { - type_ = 0; - voter_ = ""; - blockHash_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VoteInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_VoteInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_VoteInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.VoteInfo.class, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - *
-     * The type of the vote.
-     * 
- * - * .pactus.VoteType type = 1 [json_name = "type"]; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-     * The type of the vote.
-     * 
- * - * .pactus.VoteType type = 1 [json_name = "type"]; - * @return The type. - */ - @java.lang.Override public pactus.blockchain.BlockchainOuterClass.VoteType getType() { - @SuppressWarnings("deprecation") - pactus.blockchain.BlockchainOuterClass.VoteType result = pactus.blockchain.BlockchainOuterClass.VoteType.valueOf(type_); - return result == null ? pactus.blockchain.BlockchainOuterClass.VoteType.UNRECOGNIZED : result; - } - - public static final int VOTER_FIELD_NUMBER = 2; - private volatile java.lang.Object voter_; - /** - *
-     * The address of the voter.
-     * 
- * - * string voter = 2 [json_name = "voter"]; - * @return The voter. - */ - @java.lang.Override - public java.lang.String getVoter() { - java.lang.Object ref = voter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - voter_ = s; - return s; - } - } - /** - *
-     * The address of the voter.
-     * 
- * - * string voter = 2 [json_name = "voter"]; - * @return The bytes for voter. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getVoterBytes() { - java.lang.Object ref = voter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - voter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int BLOCK_HASH_FIELD_NUMBER = 3; - private volatile java.lang.Object blockHash_; - /** - *
-     * The hash of the block being voted on.
-     * 
- * - * string block_hash = 3 [json_name = "blockHash"]; - * @return The blockHash. - */ - @java.lang.Override - public java.lang.String getBlockHash() { - java.lang.Object ref = blockHash_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - blockHash_ = s; - return s; - } - } - /** - *
-     * The hash of the block being voted on.
-     * 
- * - * string block_hash = 3 [json_name = "blockHash"]; - * @return The bytes for blockHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBlockHashBytes() { - java.lang.Object ref = blockHash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - blockHash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ROUND_FIELD_NUMBER = 4; - private int round_; - /** - *
-     * The consensus round of the vote.
-     * 
- * - * int32 round = 4 [json_name = "round"]; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return round_; - } - - public static final int CP_ROUND_FIELD_NUMBER = 5; - private int cpRound_; - /** - *
-     * The change-proposer round of the vote.
-     * 
- * - * int32 cp_round = 5 [json_name = "cpRound"]; - * @return The cpRound. - */ - @java.lang.Override - public int getCpRound() { - return cpRound_; - } - - public static final int CP_VALUE_FIELD_NUMBER = 6; - private int cpValue_; - /** - *
-     * The change-proposer value of the vote.
-     * 
- * - * int32 cp_value = 6 [json_name = "cpValue"]; - * @return The cpValue. - */ - @java.lang.Override - public int getCpValue() { - return cpValue_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (type_ != pactus.blockchain.BlockchainOuterClass.VoteType.VOTE_UNKNOWN.getNumber()) { - output.writeEnum(1, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(voter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, voter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockHash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, blockHash_); - } - if (round_ != 0) { - output.writeInt32(4, round_); - } - if (cpRound_ != 0) { - output.writeInt32(5, cpRound_); - } - if (cpValue_ != 0) { - output.writeInt32(6, cpValue_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (type_ != pactus.blockchain.BlockchainOuterClass.VoteType.VOTE_UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(voter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, voter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockHash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, blockHash_); - } - if (round_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, round_); - } - if (cpRound_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, cpRound_); - } - if (cpValue_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(6, cpValue_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.VoteInfo)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.VoteInfo other = (pactus.blockchain.BlockchainOuterClass.VoteInfo) obj; - - if (type_ != other.type_) return false; - if (!getVoter() - .equals(other.getVoter())) return false; - if (!getBlockHash() - .equals(other.getBlockHash())) return false; - if (getRound() - != other.getRound()) return false; - if (getCpRound() - != other.getCpRound()) return false; - if (getCpValue() - != other.getCpValue()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + VOTER_FIELD_NUMBER; - hash = (53 * hash) + getVoter().hashCode(); - hash = (37 * hash) + BLOCK_HASH_FIELD_NUMBER; - hash = (53 * hash) + getBlockHash().hashCode(); - hash = (37 * hash) + ROUND_FIELD_NUMBER; - hash = (53 * hash) + getRound(); - hash = (37 * hash) + CP_ROUND_FIELD_NUMBER; - hash = (53 * hash) + getCpRound(); - hash = (37 * hash) + CP_VALUE_FIELD_NUMBER; - hash = (53 * hash) + getCpValue(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.VoteInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing information about a vote.
-     * 
- * - * Protobuf type {@code pactus.VoteInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.VoteInfo) - pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_VoteInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_VoteInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.VoteInfo.class, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.VoteInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = 0; - - voter_ = ""; - - blockHash_ = ""; - - round_ = 0; - - cpRound_ = 0; - - cpValue_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_VoteInfo_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.VoteInfo getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.VoteInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.VoteInfo build() { - pactus.blockchain.BlockchainOuterClass.VoteInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.VoteInfo buildPartial() { - pactus.blockchain.BlockchainOuterClass.VoteInfo result = new pactus.blockchain.BlockchainOuterClass.VoteInfo(this); - result.type_ = type_; - result.voter_ = voter_; - result.blockHash_ = blockHash_; - result.round_ = round_; - result.cpRound_ = cpRound_; - result.cpValue_ = cpValue_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.VoteInfo) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.VoteInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.VoteInfo other) { - if (other == pactus.blockchain.BlockchainOuterClass.VoteInfo.getDefaultInstance()) return this; - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (!other.getVoter().isEmpty()) { - voter_ = other.voter_; - onChanged(); - } - if (!other.getBlockHash().isEmpty()) { - blockHash_ = other.blockHash_; - onChanged(); - } - if (other.getRound() != 0) { - setRound(other.getRound()); - } - if (other.getCpRound() != 0) { - setCpRound(other.getCpRound()); - } - if (other.getCpValue() != 0) { - setCpValue(other.getCpValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - type_ = input.readEnum(); - - break; - } // case 8 - case 18: { - voter_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - blockHash_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 32: { - round_ = input.readInt32(); - - break; - } // case 32 - case 40: { - cpRound_ = input.readInt32(); - - break; - } // case 40 - case 48: { - cpValue_ = input.readInt32(); - - break; - } // case 48 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int type_ = 0; - /** - *
-       * The type of the vote.
-       * 
- * - * .pactus.VoteType type = 1 [json_name = "type"]; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override public int getTypeValue() { - return type_; - } - /** - *
-       * The type of the vote.
-       * 
- * - * .pactus.VoteType type = 1 [json_name = "type"]; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - - type_ = value; - onChanged(); - return this; - } - /** - *
-       * The type of the vote.
-       * 
- * - * .pactus.VoteType type = 1 [json_name = "type"]; - * @return The type. - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.VoteType getType() { - @SuppressWarnings("deprecation") - pactus.blockchain.BlockchainOuterClass.VoteType result = pactus.blockchain.BlockchainOuterClass.VoteType.valueOf(type_); - return result == null ? pactus.blockchain.BlockchainOuterClass.VoteType.UNRECOGNIZED : result; - } - /** - *
-       * The type of the vote.
-       * 
- * - * .pactus.VoteType type = 1 [json_name = "type"]; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setType(pactus.blockchain.BlockchainOuterClass.VoteType value) { - if (value == null) { - throw new NullPointerException(); - } - - type_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The type of the vote.
-       * 
- * - * .pactus.VoteType type = 1 [json_name = "type"]; - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = 0; - onChanged(); - return this; - } - - private java.lang.Object voter_ = ""; - /** - *
-       * The address of the voter.
-       * 
- * - * string voter = 2 [json_name = "voter"]; - * @return The voter. - */ - public java.lang.String getVoter() { - java.lang.Object ref = voter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - voter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the voter.
-       * 
- * - * string voter = 2 [json_name = "voter"]; - * @return The bytes for voter. - */ - public com.google.protobuf.ByteString - getVoterBytes() { - java.lang.Object ref = voter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - voter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the voter.
-       * 
- * - * string voter = 2 [json_name = "voter"]; - * @param value The voter to set. - * @return This builder for chaining. - */ - public Builder setVoter( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - voter_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the voter.
-       * 
- * - * string voter = 2 [json_name = "voter"]; - * @return This builder for chaining. - */ - public Builder clearVoter() { - - voter_ = getDefaultInstance().getVoter(); - onChanged(); - return this; - } - /** - *
-       * The address of the voter.
-       * 
- * - * string voter = 2 [json_name = "voter"]; - * @param value The bytes for voter to set. - * @return This builder for chaining. - */ - public Builder setVoterBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - voter_ = value; - onChanged(); - return this; - } - - private java.lang.Object blockHash_ = ""; - /** - *
-       * The hash of the block being voted on.
-       * 
- * - * string block_hash = 3 [json_name = "blockHash"]; - * @return The blockHash. - */ - public java.lang.String getBlockHash() { - java.lang.Object ref = blockHash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - blockHash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The hash of the block being voted on.
-       * 
- * - * string block_hash = 3 [json_name = "blockHash"]; - * @return The bytes for blockHash. - */ - public com.google.protobuf.ByteString - getBlockHashBytes() { - java.lang.Object ref = blockHash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - blockHash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The hash of the block being voted on.
-       * 
- * - * string block_hash = 3 [json_name = "blockHash"]; - * @param value The blockHash to set. - * @return This builder for chaining. - */ - public Builder setBlockHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - blockHash_ = value; - onChanged(); - return this; - } - /** - *
-       * The hash of the block being voted on.
-       * 
- * - * string block_hash = 3 [json_name = "blockHash"]; - * @return This builder for chaining. - */ - public Builder clearBlockHash() { - - blockHash_ = getDefaultInstance().getBlockHash(); - onChanged(); - return this; - } - /** - *
-       * The hash of the block being voted on.
-       * 
- * - * string block_hash = 3 [json_name = "blockHash"]; - * @param value The bytes for blockHash to set. - * @return This builder for chaining. - */ - public Builder setBlockHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - blockHash_ = value; - onChanged(); - return this; - } - - private int round_ ; - /** - *
-       * The consensus round of the vote.
-       * 
- * - * int32 round = 4 [json_name = "round"]; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return round_; - } - /** - *
-       * The consensus round of the vote.
-       * 
- * - * int32 round = 4 [json_name = "round"]; - * @param value The round to set. - * @return This builder for chaining. - */ - public Builder setRound(int value) { - - round_ = value; - onChanged(); - return this; - } - /** - *
-       * The consensus round of the vote.
-       * 
- * - * int32 round = 4 [json_name = "round"]; - * @return This builder for chaining. - */ - public Builder clearRound() { - - round_ = 0; - onChanged(); - return this; - } - - private int cpRound_ ; - /** - *
-       * The change-proposer round of the vote.
-       * 
- * - * int32 cp_round = 5 [json_name = "cpRound"]; - * @return The cpRound. - */ - @java.lang.Override - public int getCpRound() { - return cpRound_; - } - /** - *
-       * The change-proposer round of the vote.
-       * 
- * - * int32 cp_round = 5 [json_name = "cpRound"]; - * @param value The cpRound to set. - * @return This builder for chaining. - */ - public Builder setCpRound(int value) { - - cpRound_ = value; - onChanged(); - return this; - } - /** - *
-       * The change-proposer round of the vote.
-       * 
- * - * int32 cp_round = 5 [json_name = "cpRound"]; - * @return This builder for chaining. - */ - public Builder clearCpRound() { - - cpRound_ = 0; - onChanged(); - return this; - } - - private int cpValue_ ; - /** - *
-       * The change-proposer value of the vote.
-       * 
- * - * int32 cp_value = 6 [json_name = "cpValue"]; - * @return The cpValue. - */ - @java.lang.Override - public int getCpValue() { - return cpValue_; - } - /** - *
-       * The change-proposer value of the vote.
-       * 
- * - * int32 cp_value = 6 [json_name = "cpValue"]; - * @param value The cpValue to set. - * @return This builder for chaining. - */ - public Builder setCpValue(int value) { - - cpValue_ = value; - onChanged(); - return this; - } - /** - *
-       * The change-proposer value of the vote.
-       * 
- * - * int32 cp_value = 6 [json_name = "cpValue"]; - * @return This builder for chaining. - */ - public Builder clearCpValue() { - - cpValue_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.VoteInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.VoteInfo) - private static final pactus.blockchain.BlockchainOuterClass.VoteInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.VoteInfo(); - } - - public static pactus.blockchain.BlockchainOuterClass.VoteInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VoteInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.VoteInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ConsensusInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.ConsensusInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The address of the consensus instance.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The address of the consensus instance.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - - /** - *
-     * Indicates whether the consensus instance is active and part of the
-     * committee.
-     * 
- * - * bool active = 2 [json_name = "active"]; - * @return The active. - */ - boolean getActive(); - - /** - *
-     * The height of the consensus instance.
-     * 
- * - * uint32 height = 3 [json_name = "height"]; - * @return The height. - */ - int getHeight(); - - /** - *
-     * The round of the consensus instance.
-     * 
- * - * int32 round = 4 [json_name = "round"]; - * @return The round. - */ - int getRound(); - - /** - *
-     * List of votes in the consensus instance.
-     * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - java.util.List - getVotesList(); - /** - *
-     * List of votes in the consensus instance.
-     * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - pactus.blockchain.BlockchainOuterClass.VoteInfo getVotes(int index); - /** - *
-     * List of votes in the consensus instance.
-     * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - int getVotesCount(); - /** - *
-     * List of votes in the consensus instance.
-     * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - java.util.List - getVotesOrBuilderList(); - /** - *
-     * List of votes in the consensus instance.
-     * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder getVotesOrBuilder( - int index); - } - /** - *
-   * Message containing information about a consensus instance.
-   * 
- * - * Protobuf type {@code pactus.ConsensusInfo} - */ - public static final class ConsensusInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.ConsensusInfo) - ConsensusInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConsensusInfo.newBuilder() to construct. - private ConsensusInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConsensusInfo() { - address_ = ""; - votes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConsensusInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.ConsensusInfo.class, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder.class); - } - - public static final int ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object address_; - /** - *
-     * The address of the consensus instance.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The address of the consensus instance.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACTIVE_FIELD_NUMBER = 2; - private boolean active_; - /** - *
-     * Indicates whether the consensus instance is active and part of the
-     * committee.
-     * 
- * - * bool active = 2 [json_name = "active"]; - * @return The active. - */ - @java.lang.Override - public boolean getActive() { - return active_; - } - - public static final int HEIGHT_FIELD_NUMBER = 3; - private int height_; - /** - *
-     * The height of the consensus instance.
-     * 
- * - * uint32 height = 3 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - public static final int ROUND_FIELD_NUMBER = 4; - private int round_; - /** - *
-     * The round of the consensus instance.
-     * 
- * - * int32 round = 4 [json_name = "round"]; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return round_; - } - - public static final int VOTES_FIELD_NUMBER = 5; - private java.util.List votes_; - /** - *
-     * List of votes in the consensus instance.
-     * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - @java.lang.Override - public java.util.List getVotesList() { - return votes_; - } - /** - *
-     * List of votes in the consensus instance.
-     * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - @java.lang.Override - public java.util.List - getVotesOrBuilderList() { - return votes_; - } - /** - *
-     * List of votes in the consensus instance.
-     * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - @java.lang.Override - public int getVotesCount() { - return votes_.size(); - } - /** - *
-     * List of votes in the consensus instance.
-     * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.VoteInfo getVotes(int index) { - return votes_.get(index); - } - /** - *
-     * List of votes in the consensus instance.
-     * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder getVotesOrBuilder( - int index) { - return votes_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); - } - if (active_ != false) { - output.writeBool(2, active_); - } - if (height_ != 0) { - output.writeUInt32(3, height_); - } - if (round_ != 0) { - output.writeInt32(4, round_); - } - for (int i = 0; i < votes_.size(); i++) { - output.writeMessage(5, votes_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); - } - if (active_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, active_); - } - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, height_); - } - if (round_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, round_); - } - for (int i = 0; i < votes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, votes_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.ConsensusInfo)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.ConsensusInfo other = (pactus.blockchain.BlockchainOuterClass.ConsensusInfo) obj; - - if (!getAddress() - .equals(other.getAddress())) return false; - if (getActive() - != other.getActive()) return false; - if (getHeight() - != other.getHeight()) return false; - if (getRound() - != other.getRound()) return false; - if (!getVotesList() - .equals(other.getVotesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (37 * hash) + ACTIVE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getActive()); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - hash = (37 * hash) + ROUND_FIELD_NUMBER; - hash = (53 * hash) + getRound(); - if (getVotesCount() > 0) { - hash = (37 * hash) + VOTES_FIELD_NUMBER; - hash = (53 * hash) + getVotesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.ConsensusInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing information about a consensus instance.
-     * 
- * - * Protobuf type {@code pactus.ConsensusInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.ConsensusInfo) - pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.ConsensusInfo.class, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.ConsensusInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - address_ = ""; - - active_ = false; - - height_ = 0; - - round_ = 0; - - if (votesBuilder_ == null) { - votes_ = java.util.Collections.emptyList(); - } else { - votes_ = null; - votesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.ConsensusInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ConsensusInfo build() { - pactus.blockchain.BlockchainOuterClass.ConsensusInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ConsensusInfo buildPartial() { - pactus.blockchain.BlockchainOuterClass.ConsensusInfo result = new pactus.blockchain.BlockchainOuterClass.ConsensusInfo(this); - int from_bitField0_ = bitField0_; - result.address_ = address_; - result.active_ = active_; - result.height_ = height_; - result.round_ = round_; - if (votesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - votes_ = java.util.Collections.unmodifiableList(votes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.votes_ = votes_; - } else { - result.votes_ = votesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.ConsensusInfo) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.ConsensusInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.ConsensusInfo other) { - if (other == pactus.blockchain.BlockchainOuterClass.ConsensusInfo.getDefaultInstance()) return this; - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - if (other.getActive() != false) { - setActive(other.getActive()); - } - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (other.getRound() != 0) { - setRound(other.getRound()); - } - if (votesBuilder_ == null) { - if (!other.votes_.isEmpty()) { - if (votes_.isEmpty()) { - votes_ = other.votes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureVotesIsMutable(); - votes_.addAll(other.votes_); - } - onChanged(); - } - } else { - if (!other.votes_.isEmpty()) { - if (votesBuilder_.isEmpty()) { - votesBuilder_.dispose(); - votesBuilder_ = null; - votes_ = other.votes_; - bitField0_ = (bitField0_ & ~0x00000001); - votesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getVotesFieldBuilder() : null; - } else { - votesBuilder_.addAllMessages(other.votes_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: { - active_ = input.readBool(); - - break; - } // case 16 - case 24: { - height_ = input.readUInt32(); - - break; - } // case 24 - case 32: { - round_ = input.readInt32(); - - break; - } // case 32 - case 42: { - pactus.blockchain.BlockchainOuterClass.VoteInfo m = - input.readMessage( - pactus.blockchain.BlockchainOuterClass.VoteInfo.parser(), - extensionRegistry); - if (votesBuilder_ == null) { - ensureVotesIsMutable(); - votes_.add(m); - } else { - votesBuilder_.addMessage(m); - } - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object address_ = ""; - /** - *
-       * The address of the consensus instance.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the consensus instance.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the consensus instance.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the consensus instance.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The address of the consensus instance.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - - private boolean active_ ; - /** - *
-       * Indicates whether the consensus instance is active and part of the
-       * committee.
-       * 
- * - * bool active = 2 [json_name = "active"]; - * @return The active. - */ - @java.lang.Override - public boolean getActive() { - return active_; - } - /** - *
-       * Indicates whether the consensus instance is active and part of the
-       * committee.
-       * 
- * - * bool active = 2 [json_name = "active"]; - * @param value The active to set. - * @return This builder for chaining. - */ - public Builder setActive(boolean value) { - - active_ = value; - onChanged(); - return this; - } - /** - *
-       * Indicates whether the consensus instance is active and part of the
-       * committee.
-       * 
- * - * bool active = 2 [json_name = "active"]; - * @return This builder for chaining. - */ - public Builder clearActive() { - - active_ = false; - onChanged(); - return this; - } - - private int height_ ; - /** - *
-       * The height of the consensus instance.
-       * 
- * - * uint32 height = 3 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-       * The height of the consensus instance.
-       * 
- * - * uint32 height = 3 [json_name = "height"]; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-       * The height of the consensus instance.
-       * 
- * - * uint32 height = 3 [json_name = "height"]; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private int round_ ; - /** - *
-       * The round of the consensus instance.
-       * 
- * - * int32 round = 4 [json_name = "round"]; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return round_; - } - /** - *
-       * The round of the consensus instance.
-       * 
- * - * int32 round = 4 [json_name = "round"]; - * @param value The round to set. - * @return This builder for chaining. - */ - public Builder setRound(int value) { - - round_ = value; - onChanged(); - return this; - } - /** - *
-       * The round of the consensus instance.
-       * 
- * - * int32 round = 4 [json_name = "round"]; - * @return This builder for chaining. - */ - public Builder clearRound() { - - round_ = 0; - onChanged(); - return this; - } - - private java.util.List votes_ = - java.util.Collections.emptyList(); - private void ensureVotesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - votes_ = new java.util.ArrayList(votes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.VoteInfo, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder, pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder> votesBuilder_; - - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public java.util.List getVotesList() { - if (votesBuilder_ == null) { - return java.util.Collections.unmodifiableList(votes_); - } else { - return votesBuilder_.getMessageList(); - } - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public int getVotesCount() { - if (votesBuilder_ == null) { - return votes_.size(); - } else { - return votesBuilder_.getCount(); - } - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public pactus.blockchain.BlockchainOuterClass.VoteInfo getVotes(int index) { - if (votesBuilder_ == null) { - return votes_.get(index); - } else { - return votesBuilder_.getMessage(index); - } - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public Builder setVotes( - int index, pactus.blockchain.BlockchainOuterClass.VoteInfo value) { - if (votesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVotesIsMutable(); - votes_.set(index, value); - onChanged(); - } else { - votesBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public Builder setVotes( - int index, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder builderForValue) { - if (votesBuilder_ == null) { - ensureVotesIsMutable(); - votes_.set(index, builderForValue.build()); - onChanged(); - } else { - votesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public Builder addVotes(pactus.blockchain.BlockchainOuterClass.VoteInfo value) { - if (votesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVotesIsMutable(); - votes_.add(value); - onChanged(); - } else { - votesBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public Builder addVotes( - int index, pactus.blockchain.BlockchainOuterClass.VoteInfo value) { - if (votesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureVotesIsMutable(); - votes_.add(index, value); - onChanged(); - } else { - votesBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public Builder addVotes( - pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder builderForValue) { - if (votesBuilder_ == null) { - ensureVotesIsMutable(); - votes_.add(builderForValue.build()); - onChanged(); - } else { - votesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public Builder addVotes( - int index, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder builderForValue) { - if (votesBuilder_ == null) { - ensureVotesIsMutable(); - votes_.add(index, builderForValue.build()); - onChanged(); - } else { - votesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public Builder addAllVotes( - java.lang.Iterable values) { - if (votesBuilder_ == null) { - ensureVotesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, votes_); - onChanged(); - } else { - votesBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public Builder clearVotes() { - if (votesBuilder_ == null) { - votes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - votesBuilder_.clear(); - } - return this; - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public Builder removeVotes(int index) { - if (votesBuilder_ == null) { - ensureVotesIsMutable(); - votes_.remove(index); - onChanged(); - } else { - votesBuilder_.remove(index); - } - return this; - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder getVotesBuilder( - int index) { - return getVotesFieldBuilder().getBuilder(index); - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder getVotesOrBuilder( - int index) { - if (votesBuilder_ == null) { - return votes_.get(index); } else { - return votesBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public java.util.List - getVotesOrBuilderList() { - if (votesBuilder_ != null) { - return votesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(votes_); - } - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder addVotesBuilder() { - return getVotesFieldBuilder().addBuilder( - pactus.blockchain.BlockchainOuterClass.VoteInfo.getDefaultInstance()); - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder addVotesBuilder( - int index) { - return getVotesFieldBuilder().addBuilder( - index, pactus.blockchain.BlockchainOuterClass.VoteInfo.getDefaultInstance()); - } - /** - *
-       * List of votes in the consensus instance.
-       * 
- * - * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; - */ - public java.util.List - getVotesBuilderList() { - return getVotesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.VoteInfo, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder, pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder> - getVotesFieldBuilder() { - if (votesBuilder_ == null) { - votesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - pactus.blockchain.BlockchainOuterClass.VoteInfo, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder, pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder>( - votes_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - votes_ = null; - } - return votesBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.ConsensusInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.ConsensusInfo) - private static final pactus.blockchain.BlockchainOuterClass.ConsensusInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.ConsensusInfo(); - } - - public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConsensusInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ProposalOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.Proposal) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The height of the proposal.
-     * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - int getHeight(); - - /** - *
-     * The round of the proposal.
-     * 
- * - * int32 round = 2 [json_name = "round"]; - * @return The round. - */ - int getRound(); - - /** - *
-     * The block data of the proposal.
-     * 
- * - * string block_data = 3 [json_name = "blockData"]; - * @return The blockData. - */ - java.lang.String getBlockData(); - /** - *
-     * The block data of the proposal.
-     * 
- * - * string block_data = 3 [json_name = "blockData"]; - * @return The bytes for blockData. - */ - com.google.protobuf.ByteString - getBlockDataBytes(); - - /** - *
-     * The signature data of the proposal.
-     * 
- * - * string signature_data = 4 [json_name = "signatureData"]; - * @return The signatureData. - */ - java.lang.String getSignatureData(); - /** - *
-     * The signature data of the proposal.
-     * 
- * - * string signature_data = 4 [json_name = "signatureData"]; - * @return The bytes for signatureData. - */ - com.google.protobuf.ByteString - getSignatureDataBytes(); - } - /** - *
-   * Message containing information about a proposal.
-   * 
- * - * Protobuf type {@code pactus.Proposal} - */ - public static final class Proposal extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.Proposal) - ProposalOrBuilder { - private static final long serialVersionUID = 0L; - // Use Proposal.newBuilder() to construct. - private Proposal(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private Proposal() { - blockData_ = ""; - signatureData_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new Proposal(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.Proposal.class, pactus.blockchain.BlockchainOuterClass.Proposal.Builder.class); - } - - public static final int HEIGHT_FIELD_NUMBER = 1; - private int height_; - /** - *
-     * The height of the proposal.
-     * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - public static final int ROUND_FIELD_NUMBER = 2; - private int round_; - /** - *
-     * The round of the proposal.
-     * 
- * - * int32 round = 2 [json_name = "round"]; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return round_; - } - - public static final int BLOCK_DATA_FIELD_NUMBER = 3; - private volatile java.lang.Object blockData_; - /** - *
-     * The block data of the proposal.
-     * 
- * - * string block_data = 3 [json_name = "blockData"]; - * @return The blockData. - */ - @java.lang.Override - public java.lang.String getBlockData() { - java.lang.Object ref = blockData_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - blockData_ = s; - return s; - } - } - /** - *
-     * The block data of the proposal.
-     * 
- * - * string block_data = 3 [json_name = "blockData"]; - * @return The bytes for blockData. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getBlockDataBytes() { - java.lang.Object ref = blockData_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - blockData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIGNATURE_DATA_FIELD_NUMBER = 4; - private volatile java.lang.Object signatureData_; - /** - *
-     * The signature data of the proposal.
-     * 
- * - * string signature_data = 4 [json_name = "signatureData"]; - * @return The signatureData. - */ - @java.lang.Override - public java.lang.String getSignatureData() { - java.lang.Object ref = signatureData_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signatureData_ = s; - return s; - } - } - /** - *
-     * The signature data of the proposal.
-     * 
- * - * string signature_data = 4 [json_name = "signatureData"]; - * @return The bytes for signatureData. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSignatureDataBytes() { - java.lang.Object ref = signatureData_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signatureData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (height_ != 0) { - output.writeUInt32(1, height_); - } - if (round_ != 0) { - output.writeInt32(2, round_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockData_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, blockData_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signatureData_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, signatureData_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, height_); - } - if (round_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, round_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockData_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, blockData_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signatureData_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, signatureData_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.Proposal)) { - return super.equals(obj); - } - pactus.blockchain.BlockchainOuterClass.Proposal other = (pactus.blockchain.BlockchainOuterClass.Proposal) obj; - - if (getHeight() - != other.getHeight()) return false; - if (getRound() - != other.getRound()) return false; - if (!getBlockData() - .equals(other.getBlockData())) return false; - if (!getSignatureData() - .equals(other.getSignatureData())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - hash = (37 * hash) + ROUND_FIELD_NUMBER; - hash = (53 * hash) + getRound(); - hash = (37 * hash) + BLOCK_DATA_FIELD_NUMBER; - hash = (53 * hash) + getBlockData().hashCode(); - hash = (37 * hash) + SIGNATURE_DATA_FIELD_NUMBER; - hash = (53 * hash) + getSignatureData().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.Proposal prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing information about a proposal.
-     * 
- * - * Protobuf type {@code pactus.Proposal} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.Proposal) - pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.blockchain.BlockchainOuterClass.Proposal.class, pactus.blockchain.BlockchainOuterClass.Proposal.Builder.class); - } - - // Construct using pactus.blockchain.BlockchainOuterClass.Proposal.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - height_ = 0; - - round_ = 0; - - blockData_ = ""; - - signatureData_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_descriptor; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.Proposal getDefaultInstanceForType() { - return pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance(); - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.Proposal build() { - pactus.blockchain.BlockchainOuterClass.Proposal result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.Proposal buildPartial() { - pactus.blockchain.BlockchainOuterClass.Proposal result = new pactus.blockchain.BlockchainOuterClass.Proposal(this); - result.height_ = height_; - result.round_ = round_; - result.blockData_ = blockData_; - result.signatureData_ = signatureData_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.blockchain.BlockchainOuterClass.Proposal) { - return mergeFrom((pactus.blockchain.BlockchainOuterClass.Proposal)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.Proposal other) { - if (other == pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance()) return this; - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (other.getRound() != 0) { - setRound(other.getRound()); - } - if (!other.getBlockData().isEmpty()) { - blockData_ = other.blockData_; - onChanged(); - } - if (!other.getSignatureData().isEmpty()) { - signatureData_ = other.signatureData_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - height_ = input.readUInt32(); - - break; - } // case 8 - case 16: { - round_ = input.readInt32(); - - break; - } // case 16 - case 26: { - blockData_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: { - signatureData_ = input.readStringRequireUtf8(); - - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int height_ ; - /** - *
-       * The height of the proposal.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-       * The height of the proposal.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-       * The height of the proposal.
-       * 
- * - * uint32 height = 1 [json_name = "height"]; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private int round_ ; - /** - *
-       * The round of the proposal.
-       * 
- * - * int32 round = 2 [json_name = "round"]; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return round_; - } - /** - *
-       * The round of the proposal.
-       * 
- * - * int32 round = 2 [json_name = "round"]; - * @param value The round to set. - * @return This builder for chaining. - */ - public Builder setRound(int value) { - - round_ = value; - onChanged(); - return this; - } - /** - *
-       * The round of the proposal.
-       * 
- * - * int32 round = 2 [json_name = "round"]; - * @return This builder for chaining. - */ - public Builder clearRound() { - - round_ = 0; - onChanged(); - return this; - } - - private java.lang.Object blockData_ = ""; - /** - *
-       * The block data of the proposal.
-       * 
- * - * string block_data = 3 [json_name = "blockData"]; - * @return The blockData. - */ - public java.lang.String getBlockData() { - java.lang.Object ref = blockData_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - blockData_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The block data of the proposal.
-       * 
- * - * string block_data = 3 [json_name = "blockData"]; - * @return The bytes for blockData. - */ - public com.google.protobuf.ByteString - getBlockDataBytes() { - java.lang.Object ref = blockData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - blockData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The block data of the proposal.
-       * 
- * - * string block_data = 3 [json_name = "blockData"]; - * @param value The blockData to set. - * @return This builder for chaining. - */ - public Builder setBlockData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - blockData_ = value; - onChanged(); - return this; - } - /** - *
-       * The block data of the proposal.
-       * 
- * - * string block_data = 3 [json_name = "blockData"]; - * @return This builder for chaining. - */ - public Builder clearBlockData() { - - blockData_ = getDefaultInstance().getBlockData(); - onChanged(); - return this; - } - /** - *
-       * The block data of the proposal.
-       * 
- * - * string block_data = 3 [json_name = "blockData"]; - * @param value The bytes for blockData to set. - * @return This builder for chaining. - */ - public Builder setBlockDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - blockData_ = value; - onChanged(); - return this; - } - - private java.lang.Object signatureData_ = ""; - /** - *
-       * The signature data of the proposal.
-       * 
- * - * string signature_data = 4 [json_name = "signatureData"]; - * @return The signatureData. - */ - public java.lang.String getSignatureData() { - java.lang.Object ref = signatureData_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signatureData_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The signature data of the proposal.
-       * 
- * - * string signature_data = 4 [json_name = "signatureData"]; - * @return The bytes for signatureData. - */ - public com.google.protobuf.ByteString - getSignatureDataBytes() { - java.lang.Object ref = signatureData_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signatureData_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The signature data of the proposal.
-       * 
- * - * string signature_data = 4 [json_name = "signatureData"]; - * @param value The signatureData to set. - * @return This builder for chaining. - */ - public Builder setSignatureData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - signatureData_ = value; - onChanged(); - return this; - } - /** - *
-       * The signature data of the proposal.
-       * 
- * - * string signature_data = 4 [json_name = "signatureData"]; - * @return This builder for chaining. - */ - public Builder clearSignatureData() { - - signatureData_ = getDefaultInstance().getSignatureData(); - onChanged(); - return this; - } - /** - *
-       * The signature data of the proposal.
-       * 
- * - * string signature_data = 4 [json_name = "signatureData"]; - * @param value The bytes for signatureData to set. - * @return This builder for chaining. - */ - public Builder setSignatureDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - signatureData_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.Proposal) - } - - // @@protoc_insertion_point(class_scope:pactus.Proposal) - private static final pactus.blockchain.BlockchainOuterClass.Proposal DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.Proposal(); - } - - public static pactus.blockchain.BlockchainOuterClass.Proposal getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Proposal parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.blockchain.BlockchainOuterClass.Proposal getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetAccountRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetAccountRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetAccountResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetAccountResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorAddressesRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorAddressesResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorByNumberRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetPublicKeyRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetPublicKeyResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockHashRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockHashRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockHashResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockHashResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockHeightRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockHeightResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockchainInfoRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetBlockchainInfoResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetConsensusInfoRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetConsensusInfoResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetTxPoolContentRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetTxPoolContentResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_ValidatorInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_ValidatorInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_AccountInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_AccountInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_BlockHeaderInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_BlockHeaderInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_CertificateInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_CertificateInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_VoteInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_VoteInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_ConsensusInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_ConsensusInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_Proposal_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_Proposal_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\020blockchain.proto\022\006pactus\032\021transaction." + - "proto\"-\n\021GetAccountRequest\022\030\n\007address\030\001 " + - "\001(\tR\007address\"C\n\022GetAccountResponse\022-\n\007ac" + - "count\030\001 \001(\0132\023.pactus.AccountInfoR\007accoun" + - "t\"\036\n\034GetValidatorAddressesRequest\"=\n\035Get" + - "ValidatorAddressesResponse\022\034\n\taddresses\030" + - "\001 \003(\tR\taddresses\"/\n\023GetValidatorRequest\022" + - "\030\n\007address\030\001 \001(\tR\007address\"5\n\033GetValidato" + - "rByNumberRequest\022\026\n\006number\030\001 \001(\005R\006number" + - "\"K\n\024GetValidatorResponse\0223\n\tvalidator\030\001 " + - "\001(\0132\025.pactus.ValidatorInfoR\tvalidator\"/\n" + - "\023GetPublicKeyRequest\022\030\n\007address\030\001 \001(\tR\007a" + - "ddress\"5\n\024GetPublicKeyResponse\022\035\n\npublic" + - "_key\030\001 \001(\tR\tpublicKey\"_\n\017GetBlockRequest" + - "\022\026\n\006height\030\001 \001(\rR\006height\0224\n\tverbosity\030\002 " + - "\001(\0162\026.pactus.BlockVerbosityR\tverbosity\"\203" + - "\002\n\020GetBlockResponse\022\026\n\006height\030\001 \001(\rR\006hei" + - "ght\022\022\n\004hash\030\002 \001(\tR\004hash\022\022\n\004data\030\003 \001(\tR\004d" + - "ata\022\035\n\nblock_time\030\004 \001(\rR\tblockTime\022/\n\006he" + - "ader\030\005 \001(\0132\027.pactus.BlockHeaderInfoR\006hea" + - "der\0224\n\tprev_cert\030\006 \001(\0132\027.pactus.Certific" + - "ateInfoR\010prevCert\022)\n\003txs\030\007 \003(\0132\027.pactus." + - "TransactionInfoR\003txs\"-\n\023GetBlockHashRequ" + - "est\022\026\n\006height\030\001 \001(\rR\006height\"*\n\024GetBlockH" + - "ashResponse\022\022\n\004hash\030\001 \001(\tR\004hash\"+\n\025GetBl" + - "ockHeightRequest\022\022\n\004hash\030\001 \001(\tR\004hash\"0\n\026" + - "GetBlockHeightResponse\022\026\n\006height\030\001 \001(\rR\006" + - "height\"\032\n\030GetBlockchainInfoRequest\"\301\003\n\031G" + - "etBlockchainInfoResponse\022*\n\021last_block_h" + - "eight\030\001 \001(\rR\017lastBlockHeight\022&\n\017last_blo" + - "ck_hash\030\002 \001(\tR\rlastBlockHash\022%\n\016total_ac" + - "counts\030\003 \001(\005R\rtotalAccounts\022)\n\020total_val" + - "idators\030\004 \001(\005R\017totalValidators\022\037\n\013total_" + - "power\030\005 \001(\003R\ntotalPower\022\'\n\017committee_pow" + - "er\030\006 \001(\003R\016committeePower\022H\n\024committee_va" + - "lidators\030\007 \003(\0132\025.pactus.ValidatorInfoR\023c" + - "ommitteeValidators\022\033\n\tis_pruned\030\010 \001(\010R\010i" + - "sPruned\022%\n\016pruning_height\030\t \001(\rR\rpruning" + - "Height\022&\n\017last_block_time\030\n \001(\003R\rlastBlo" + - "ckTime\"\031\n\027GetConsensusInfoRequest\"}\n\030Get" + - "ConsensusInfoResponse\022,\n\010proposal\030\001 \001(\0132" + - "\020.pactus.ProposalR\010proposal\0223\n\tinstances" + - "\030\002 \003(\0132\025.pactus.ConsensusInfoR\tinstances" + - "\"Q\n\027GetTxPoolContentRequest\0226\n\014payload_t" + - "ype\030\001 \001(\0162\023.pactus.PayloadTypeR\013payloadT" + - "ype\"E\n\030GetTxPoolContentResponse\022)\n\003txs\030\001" + - " \003(\0132\027.pactus.TransactionInfoR\003txs\"\334\002\n\rV" + - "alidatorInfo\022\022\n\004hash\030\001 \001(\tR\004hash\022\022\n\004data" + - "\030\002 \001(\tR\004data\022\035\n\npublic_key\030\003 \001(\tR\tpublic" + - "Key\022\026\n\006number\030\004 \001(\005R\006number\022\024\n\005stake\030\005 \001" + - "(\003R\005stake\022.\n\023last_bonding_height\030\006 \001(\rR\021" + - "lastBondingHeight\0222\n\025last_sortition_heig" + - "ht\030\007 \001(\rR\023lastSortitionHeight\022)\n\020unbondi" + - "ng_height\030\010 \001(\rR\017unbondingHeight\022\030\n\007addr" + - "ess\030\t \001(\tR\007address\022-\n\022availability_score" + - "\030\n \001(\001R\021availabilityScore\"\201\001\n\013AccountInf" + - "o\022\022\n\004hash\030\001 \001(\tR\004hash\022\022\n\004data\030\002 \001(\tR\004dat" + - "a\022\026\n\006number\030\003 \001(\005R\006number\022\030\n\007balance\030\004 \001" + - "(\003R\007balance\022\030\n\007address\030\005 \001(\tR\007address\"\304\001" + - "\n\017BlockHeaderInfo\022\030\n\007version\030\001 \001(\005R\007vers" + - "ion\022&\n\017prev_block_hash\030\002 \001(\tR\rprevBlockH" + - "ash\022\035\n\nstate_root\030\003 \001(\tR\tstateRoot\022%\n\016so" + - "rtition_seed\030\004 \001(\tR\rsortitionSeed\022)\n\020pro" + - "poser_address\030\005 \001(\tR\017proposerAddress\"\227\001\n" + - "\017CertificateInfo\022\022\n\004hash\030\001 \001(\tR\004hash\022\024\n\005" + - "round\030\002 \001(\005R\005round\022\036\n\ncommitters\030\003 \003(\005R\n" + - "committers\022\034\n\tabsentees\030\004 \003(\005R\tabsentees" + - "\022\034\n\tsignature\030\005 \001(\tR\tsignature\"\261\001\n\010VoteI" + - "nfo\022$\n\004type\030\001 \001(\0162\020.pactus.VoteTypeR\004typ" + - "e\022\024\n\005voter\030\002 \001(\tR\005voter\022\035\n\nblock_hash\030\003 " + - "\001(\tR\tblockHash\022\024\n\005round\030\004 \001(\005R\005round\022\031\n\010" + - "cp_round\030\005 \001(\005R\007cpRound\022\031\n\010cp_value\030\006 \001(" + - "\005R\007cpValue\"\227\001\n\rConsensusInfo\022\030\n\007address\030" + - "\001 \001(\tR\007address\022\026\n\006active\030\002 \001(\010R\006active\022\026" + - "\n\006height\030\003 \001(\rR\006height\022\024\n\005round\030\004 \001(\005R\005r" + - "ound\022&\n\005votes\030\005 \003(\0132\020.pactus.VoteInfoR\005v" + - "otes\"~\n\010Proposal\022\026\n\006height\030\001 \001(\rR\006height" + - "\022\024\n\005round\030\002 \001(\005R\005round\022\035\n\nblock_data\030\003 \001" + - "(\tR\tblockData\022%\n\016signature_data\030\004 \001(\tR\rs" + - "ignatureData*H\n\016BlockVerbosity\022\016\n\nBLOCK_" + - "DATA\020\000\022\016\n\nBLOCK_INFO\020\001\022\026\n\022BLOCK_TRANSACT" + - "IONS\020\002*\\\n\010VoteType\022\020\n\014VOTE_UNKNOWN\020\000\022\020\n\014" + - "VOTE_PREPARE\020\001\022\022\n\016VOTE_PRECOMMIT\020\002\022\030\n\024VO" + - "TE_CHANGE_PROPOSER\020\0032\213\007\n\nBlockchain\022=\n\010G" + - "etBlock\022\027.pactus.GetBlockRequest\032\030.pactu" + - "s.GetBlockResponse\022I\n\014GetBlockHash\022\033.pac" + - "tus.GetBlockHashRequest\032\034.pactus.GetBloc" + - "kHashResponse\022O\n\016GetBlockHeight\022\035.pactus" + - ".GetBlockHeightRequest\032\036.pactus.GetBlock" + - "HeightResponse\022X\n\021GetBlockchainInfo\022 .pa" + - "ctus.GetBlockchainInfoRequest\032!.pactus.G" + - "etBlockchainInfoResponse\022U\n\020GetConsensus" + - "Info\022\037.pactus.GetConsensusInfoRequest\032 ." + - "pactus.GetConsensusInfoResponse\022C\n\nGetAc" + - "count\022\031.pactus.GetAccountRequest\032\032.pactu" + - "s.GetAccountResponse\022I\n\014GetValidator\022\033.p" + - "actus.GetValidatorRequest\032\034.pactus.GetVa" + - "lidatorResponse\022Y\n\024GetValidatorByNumber\022" + - "#.pactus.GetValidatorByNumberRequest\032\034.p" + - "actus.GetValidatorResponse\022d\n\025GetValidat" + - "orAddresses\022$.pactus.GetValidatorAddress" + - "esRequest\032%.pactus.GetValidatorAddresses" + - "Response\022I\n\014GetPublicKey\022\033.pactus.GetPub" + - "licKeyRequest\032\034.pactus.GetPublicKeyRespo" + - "nse\022U\n\020GetTxPoolContent\022\037.pactus.GetTxPo" + - "olContentRequest\032 .pactus.GetTxPoolConte" + - "ntResponseBE\n\021pactus.blockchainZ0github." + - "com/pactus-project/pactus/www/grpc/pactu" + - "sb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - pactus.transaction.TransactionOuterClass.getDescriptor(), - }); - internal_static_pactus_GetAccountRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_pactus_GetAccountRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetAccountRequest_descriptor, - new java.lang.String[] { "Address", }); - internal_static_pactus_GetAccountResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_pactus_GetAccountResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetAccountResponse_descriptor, - new java.lang.String[] { "Account", }); - internal_static_pactus_GetValidatorAddressesRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetValidatorAddressesRequest_descriptor, - new java.lang.String[] { }); - internal_static_pactus_GetValidatorAddressesResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetValidatorAddressesResponse_descriptor, - new java.lang.String[] { "Addresses", }); - internal_static_pactus_GetValidatorRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_pactus_GetValidatorRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetValidatorRequest_descriptor, - new java.lang.String[] { "Address", }); - internal_static_pactus_GetValidatorByNumberRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetValidatorByNumberRequest_descriptor, - new java.lang.String[] { "Number", }); - internal_static_pactus_GetValidatorResponse_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_pactus_GetValidatorResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetValidatorResponse_descriptor, - new java.lang.String[] { "Validator", }); - internal_static_pactus_GetPublicKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetPublicKeyRequest_descriptor, - new java.lang.String[] { "Address", }); - internal_static_pactus_GetPublicKeyResponse_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetPublicKeyResponse_descriptor, - new java.lang.String[] { "PublicKey", }); - internal_static_pactus_GetBlockRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_pactus_GetBlockRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetBlockRequest_descriptor, - new java.lang.String[] { "Height", "Verbosity", }); - internal_static_pactus_GetBlockResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_pactus_GetBlockResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetBlockResponse_descriptor, - new java.lang.String[] { "Height", "Hash", "Data", "BlockTime", "Header", "PrevCert", "Txs", }); - internal_static_pactus_GetBlockHashRequest_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_pactus_GetBlockHashRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetBlockHashRequest_descriptor, - new java.lang.String[] { "Height", }); - internal_static_pactus_GetBlockHashResponse_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_pactus_GetBlockHashResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetBlockHashResponse_descriptor, - new java.lang.String[] { "Hash", }); - internal_static_pactus_GetBlockHeightRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetBlockHeightRequest_descriptor, - new java.lang.String[] { "Hash", }); - internal_static_pactus_GetBlockHeightResponse_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetBlockHeightResponse_descriptor, - new java.lang.String[] { "Height", }); - internal_static_pactus_GetBlockchainInfoRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetBlockchainInfoRequest_descriptor, - new java.lang.String[] { }); - internal_static_pactus_GetBlockchainInfoResponse_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetBlockchainInfoResponse_descriptor, - new java.lang.String[] { "LastBlockHeight", "LastBlockHash", "TotalAccounts", "TotalValidators", "TotalPower", "CommitteePower", "CommitteeValidators", "IsPruned", "PruningHeight", "LastBlockTime", }); - internal_static_pactus_GetConsensusInfoRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetConsensusInfoRequest_descriptor, - new java.lang.String[] { }); - internal_static_pactus_GetConsensusInfoResponse_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetConsensusInfoResponse_descriptor, - new java.lang.String[] { "Proposal", "Instances", }); - internal_static_pactus_GetTxPoolContentRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetTxPoolContentRequest_descriptor, - new java.lang.String[] { "PayloadType", }); - internal_static_pactus_GetTxPoolContentResponse_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetTxPoolContentResponse_descriptor, - new java.lang.String[] { "Txs", }); - internal_static_pactus_ValidatorInfo_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_pactus_ValidatorInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_ValidatorInfo_descriptor, - new java.lang.String[] { "Hash", "Data", "PublicKey", "Number", "Stake", "LastBondingHeight", "LastSortitionHeight", "UnbondingHeight", "Address", "AvailabilityScore", }); - internal_static_pactus_AccountInfo_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_pactus_AccountInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_AccountInfo_descriptor, - new java.lang.String[] { "Hash", "Data", "Number", "Balance", "Address", }); - internal_static_pactus_BlockHeaderInfo_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_pactus_BlockHeaderInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_BlockHeaderInfo_descriptor, - new java.lang.String[] { "Version", "PrevBlockHash", "StateRoot", "SortitionSeed", "ProposerAddress", }); - internal_static_pactus_CertificateInfo_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_pactus_CertificateInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_CertificateInfo_descriptor, - new java.lang.String[] { "Hash", "Round", "Committers", "Absentees", "Signature", }); - internal_static_pactus_VoteInfo_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_pactus_VoteInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_VoteInfo_descriptor, - new java.lang.String[] { "Type", "Voter", "BlockHash", "Round", "CpRound", "CpValue", }); - internal_static_pactus_ConsensusInfo_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_pactus_ConsensusInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_ConsensusInfo_descriptor, - new java.lang.String[] { "Address", "Active", "Height", "Round", "Votes", }); - internal_static_pactus_Proposal_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_pactus_Proposal_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_Proposal_descriptor, - new java.lang.String[] { "Height", "Round", "BlockData", "SignatureData", }); - pactus.transaction.TransactionOuterClass.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/www/grpc/gen/java/pactus/network/NetworkGrpc.java b/www/grpc/gen/java/pactus/network/NetworkGrpc.java deleted file mode 100644 index af9bfd962..000000000 --- a/www/grpc/gen/java/pactus/network/NetworkGrpc.java +++ /dev/null @@ -1,389 +0,0 @@ -package pactus.network; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Network service provides RPCs for retrieving information about the network.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.50.2)", - comments = "Source: network.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class NetworkGrpc { - - private NetworkGrpc() {} - - public static final String SERVICE_NAME = "pactus.Network"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getGetNetworkInfoMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNetworkInfo", - requestType = pactus.network.NetworkOuterClass.GetNetworkInfoRequest.class, - responseType = pactus.network.NetworkOuterClass.GetNetworkInfoResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetNetworkInfoMethod() { - io.grpc.MethodDescriptor getGetNetworkInfoMethod; - if ((getGetNetworkInfoMethod = NetworkGrpc.getGetNetworkInfoMethod) == null) { - synchronized (NetworkGrpc.class) { - if ((getGetNetworkInfoMethod = NetworkGrpc.getGetNetworkInfoMethod) == null) { - NetworkGrpc.getGetNetworkInfoMethod = getGetNetworkInfoMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNetworkInfo")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.network.NetworkOuterClass.GetNetworkInfoRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.network.NetworkOuterClass.GetNetworkInfoResponse.getDefaultInstance())) - .setSchemaDescriptor(new NetworkMethodDescriptorSupplier("GetNetworkInfo")) - .build(); - } - } - } - return getGetNetworkInfoMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetNodeInfoMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNodeInfo", - requestType = pactus.network.NetworkOuterClass.GetNodeInfoRequest.class, - responseType = pactus.network.NetworkOuterClass.GetNodeInfoResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetNodeInfoMethod() { - io.grpc.MethodDescriptor getGetNodeInfoMethod; - if ((getGetNodeInfoMethod = NetworkGrpc.getGetNodeInfoMethod) == null) { - synchronized (NetworkGrpc.class) { - if ((getGetNodeInfoMethod = NetworkGrpc.getGetNodeInfoMethod) == null) { - NetworkGrpc.getGetNodeInfoMethod = getGetNodeInfoMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNodeInfo")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.network.NetworkOuterClass.GetNodeInfoRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.network.NetworkOuterClass.GetNodeInfoResponse.getDefaultInstance())) - .setSchemaDescriptor(new NetworkMethodDescriptorSupplier("GetNodeInfo")) - .build(); - } - } - } - return getGetNodeInfoMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static NetworkStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public NetworkStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NetworkStub(channel, callOptions); - } - }; - return NetworkStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static NetworkBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public NetworkBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NetworkBlockingStub(channel, callOptions); - } - }; - return NetworkBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static NetworkFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public NetworkFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NetworkFutureStub(channel, callOptions); - } - }; - return NetworkFutureStub.newStub(factory, channel); - } - - /** - *
-   * Network service provides RPCs for retrieving information about the network.
-   * 
- */ - public static abstract class NetworkImplBase implements io.grpc.BindableService { - - /** - *
-     * GetNetworkInfo retrieves information about the overall network.
-     * 
- */ - public void getNetworkInfo(pactus.network.NetworkOuterClass.GetNetworkInfoRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNetworkInfoMethod(), responseObserver); - } - - /** - *
-     * GetNodeInfo retrieves information about a specific node in the network.
-     * 
- */ - public void getNodeInfo(pactus.network.NetworkOuterClass.GetNodeInfoRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeInfoMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetNetworkInfoMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.network.NetworkOuterClass.GetNetworkInfoRequest, - pactus.network.NetworkOuterClass.GetNetworkInfoResponse>( - this, METHODID_GET_NETWORK_INFO))) - .addMethod( - getGetNodeInfoMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.network.NetworkOuterClass.GetNodeInfoRequest, - pactus.network.NetworkOuterClass.GetNodeInfoResponse>( - this, METHODID_GET_NODE_INFO))) - .build(); - } - } - - /** - *
-   * Network service provides RPCs for retrieving information about the network.
-   * 
- */ - public static final class NetworkStub extends io.grpc.stub.AbstractAsyncStub { - private NetworkStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected NetworkStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NetworkStub(channel, callOptions); - } - - /** - *
-     * GetNetworkInfo retrieves information about the overall network.
-     * 
- */ - public void getNetworkInfo(pactus.network.NetworkOuterClass.GetNetworkInfoRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNetworkInfoMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetNodeInfo retrieves information about a specific node in the network.
-     * 
- */ - public void getNodeInfo(pactus.network.NetworkOuterClass.GetNodeInfoRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNodeInfoMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Network service provides RPCs for retrieving information about the network.
-   * 
- */ - public static final class NetworkBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private NetworkBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected NetworkBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NetworkBlockingStub(channel, callOptions); - } - - /** - *
-     * GetNetworkInfo retrieves information about the overall network.
-     * 
- */ - public pactus.network.NetworkOuterClass.GetNetworkInfoResponse getNetworkInfo(pactus.network.NetworkOuterClass.GetNetworkInfoRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNetworkInfoMethod(), getCallOptions(), request); - } - - /** - *
-     * GetNodeInfo retrieves information about a specific node in the network.
-     * 
- */ - public pactus.network.NetworkOuterClass.GetNodeInfoResponse getNodeInfo(pactus.network.NetworkOuterClass.GetNodeInfoRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNodeInfoMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Network service provides RPCs for retrieving information about the network.
-   * 
- */ - public static final class NetworkFutureStub extends io.grpc.stub.AbstractFutureStub { - private NetworkFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected NetworkFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new NetworkFutureStub(channel, callOptions); - } - - /** - *
-     * GetNetworkInfo retrieves information about the overall network.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getNetworkInfo( - pactus.network.NetworkOuterClass.GetNetworkInfoRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNetworkInfoMethod(), getCallOptions()), request); - } - - /** - *
-     * GetNodeInfo retrieves information about a specific node in the network.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getNodeInfo( - pactus.network.NetworkOuterClass.GetNodeInfoRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNodeInfoMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_NETWORK_INFO = 0; - private static final int METHODID_GET_NODE_INFO = 1; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final NetworkImplBase serviceImpl; - private final int methodId; - - MethodHandlers(NetworkImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_GET_NETWORK_INFO: - serviceImpl.getNetworkInfo((pactus.network.NetworkOuterClass.GetNetworkInfoRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_NODE_INFO: - serviceImpl.getNodeInfo((pactus.network.NetworkOuterClass.GetNodeInfoRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class NetworkBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - NetworkBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return pactus.network.NetworkOuterClass.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Network"); - } - } - - private static final class NetworkFileDescriptorSupplier - extends NetworkBaseDescriptorSupplier { - NetworkFileDescriptorSupplier() {} - } - - private static final class NetworkMethodDescriptorSupplier - extends NetworkBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - NetworkMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (NetworkGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new NetworkFileDescriptorSupplier()) - .addMethod(getGetNetworkInfoMethod()) - .addMethod(getGetNodeInfoMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/www/grpc/gen/java/pactus/network/NetworkOuterClass.java b/www/grpc/gen/java/pactus/network/NetworkOuterClass.java deleted file mode 100644 index e9f7b041f..000000000 --- a/www/grpc/gen/java/pactus/network/NetworkOuterClass.java +++ /dev/null @@ -1,10189 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: network.proto - -package pactus.network; - -public final class NetworkOuterClass { - private NetworkOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface GetNetworkInfoRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetNetworkInfoRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * If true, only returns peers with connected status.
-     * 
- * - * bool only_connected = 1 [json_name = "onlyConnected"]; - * @return The onlyConnected. - */ - boolean getOnlyConnected(); - } - /** - *
-   * Request message for retrieving overall network information.
-   * 
- * - * Protobuf type {@code pactus.GetNetworkInfoRequest} - */ - public static final class GetNetworkInfoRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetNetworkInfoRequest) - GetNetworkInfoRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetNetworkInfoRequest.newBuilder() to construct. - private GetNetworkInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNetworkInfoRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNetworkInfoRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.GetNetworkInfoRequest.class, pactus.network.NetworkOuterClass.GetNetworkInfoRequest.Builder.class); - } - - public static final int ONLY_CONNECTED_FIELD_NUMBER = 1; - private boolean onlyConnected_; - /** - *
-     * If true, only returns peers with connected status.
-     * 
- * - * bool only_connected = 1 [json_name = "onlyConnected"]; - * @return The onlyConnected. - */ - @java.lang.Override - public boolean getOnlyConnected() { - return onlyConnected_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (onlyConnected_ != false) { - output.writeBool(1, onlyConnected_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (onlyConnected_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, onlyConnected_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.network.NetworkOuterClass.GetNetworkInfoRequest)) { - return super.equals(obj); - } - pactus.network.NetworkOuterClass.GetNetworkInfoRequest other = (pactus.network.NetworkOuterClass.GetNetworkInfoRequest) obj; - - if (getOnlyConnected() - != other.getOnlyConnected()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ONLY_CONNECTED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getOnlyConnected()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.network.NetworkOuterClass.GetNetworkInfoRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for retrieving overall network information.
-     * 
- * - * Protobuf type {@code pactus.GetNetworkInfoRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetNetworkInfoRequest) - pactus.network.NetworkOuterClass.GetNetworkInfoRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.GetNetworkInfoRequest.class, pactus.network.NetworkOuterClass.GetNetworkInfoRequest.Builder.class); - } - - // Construct using pactus.network.NetworkOuterClass.GetNetworkInfoRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - onlyConnected_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_descriptor; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNetworkInfoRequest getDefaultInstanceForType() { - return pactus.network.NetworkOuterClass.GetNetworkInfoRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNetworkInfoRequest build() { - pactus.network.NetworkOuterClass.GetNetworkInfoRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNetworkInfoRequest buildPartial() { - pactus.network.NetworkOuterClass.GetNetworkInfoRequest result = new pactus.network.NetworkOuterClass.GetNetworkInfoRequest(this); - result.onlyConnected_ = onlyConnected_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.network.NetworkOuterClass.GetNetworkInfoRequest) { - return mergeFrom((pactus.network.NetworkOuterClass.GetNetworkInfoRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.network.NetworkOuterClass.GetNetworkInfoRequest other) { - if (other == pactus.network.NetworkOuterClass.GetNetworkInfoRequest.getDefaultInstance()) return this; - if (other.getOnlyConnected() != false) { - setOnlyConnected(other.getOnlyConnected()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - onlyConnected_ = input.readBool(); - - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private boolean onlyConnected_ ; - /** - *
-       * If true, only returns peers with connected status.
-       * 
- * - * bool only_connected = 1 [json_name = "onlyConnected"]; - * @return The onlyConnected. - */ - @java.lang.Override - public boolean getOnlyConnected() { - return onlyConnected_; - } - /** - *
-       * If true, only returns peers with connected status.
-       * 
- * - * bool only_connected = 1 [json_name = "onlyConnected"]; - * @param value The onlyConnected to set. - * @return This builder for chaining. - */ - public Builder setOnlyConnected(boolean value) { - - onlyConnected_ = value; - onChanged(); - return this; - } - /** - *
-       * If true, only returns peers with connected status.
-       * 
- * - * bool only_connected = 1 [json_name = "onlyConnected"]; - * @return This builder for chaining. - */ - public Builder clearOnlyConnected() { - - onlyConnected_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetNetworkInfoRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetNetworkInfoRequest) - private static final pactus.network.NetworkOuterClass.GetNetworkInfoRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.GetNetworkInfoRequest(); - } - - public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNetworkInfoRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNetworkInfoRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetNetworkInfoResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetNetworkInfoResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Name of the network.
-     * 
- * - * string network_name = 1 [json_name = "networkName"]; - * @return The networkName. - */ - java.lang.String getNetworkName(); - /** - *
-     * Name of the network.
-     * 
- * - * string network_name = 1 [json_name = "networkName"]; - * @return The bytes for networkName. - */ - com.google.protobuf.ByteString - getNetworkNameBytes(); - - /** - *
-     * Total bytes sent across the network.
-     * 
- * - * int64 total_sent_bytes = 2 [json_name = "totalSentBytes"]; - * @return The totalSentBytes. - */ - long getTotalSentBytes(); - - /** - *
-     * Total bytes received across the network.
-     * 
- * - * int64 total_received_bytes = 3 [json_name = "totalReceivedBytes"]; - * @return The totalReceivedBytes. - */ - long getTotalReceivedBytes(); - - /** - *
-     * Number of connected peers.
-     * 
- * - * uint32 connected_peers_count = 4 [json_name = "connectedPeersCount"]; - * @return The connectedPeersCount. - */ - int getConnectedPeersCount4(); - - /** - *
-     * List of connected peers.
-     * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - java.util.List - getConnectedPeers5List(); - /** - *
-     * List of connected peers.
-     * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - pactus.network.NetworkOuterClass.PeerInfo getConnectedPeers5(int index); - /** - *
-     * List of connected peers.
-     * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - int getConnectedPeers5Count(); - /** - *
-     * List of connected peers.
-     * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - java.util.List - getConnectedPeers5OrBuilderList(); - /** - *
-     * List of connected peers.
-     * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - pactus.network.NetworkOuterClass.PeerInfoOrBuilder getConnectedPeers5OrBuilder( - int index); - - /** - *
-     * Bytes sent per peer ID.
-     * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - int getSentBytesCount(); - /** - *
-     * Bytes sent per peer ID.
-     * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - boolean containsSentBytes( - int key); - /** - * Use {@link #getSentBytesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getSentBytes(); - /** - *
-     * Bytes sent per peer ID.
-     * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - java.util.Map - getSentBytesMap(); - /** - *
-     * Bytes sent per peer ID.
-     * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - - long getSentBytesOrDefault( - int key, - long defaultValue); - /** - *
-     * Bytes sent per peer ID.
-     * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - - long getSentBytesOrThrow( - int key); - - /** - *
-     * Bytes received per peer ID.
-     * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - int getReceivedBytesCount(); - /** - *
-     * Bytes received per peer ID.
-     * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - boolean containsReceivedBytes( - int key); - /** - * Use {@link #getReceivedBytesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getReceivedBytes(); - /** - *
-     * Bytes received per peer ID.
-     * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - java.util.Map - getReceivedBytesMap(); - /** - *
-     * Bytes received per peer ID.
-     * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - - long getReceivedBytesOrDefault( - int key, - long defaultValue); - /** - *
-     * Bytes received per peer ID.
-     * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - - long getReceivedBytesOrThrow( - int key); - } - /** - *
-   * Response message containing information about the overall network.
-   * 
- * - * Protobuf type {@code pactus.GetNetworkInfoResponse} - */ - public static final class GetNetworkInfoResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetNetworkInfoResponse) - GetNetworkInfoResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetNetworkInfoResponse.newBuilder() to construct. - private GetNetworkInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNetworkInfoResponse() { - networkName_ = ""; - connectedPeers5_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNetworkInfoResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 6: - return internalGetSentBytes(); - case 7: - return internalGetReceivedBytes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.GetNetworkInfoResponse.class, pactus.network.NetworkOuterClass.GetNetworkInfoResponse.Builder.class); - } - - public static final int NETWORK_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object networkName_; - /** - *
-     * Name of the network.
-     * 
- * - * string network_name = 1 [json_name = "networkName"]; - * @return The networkName. - */ - @java.lang.Override - public java.lang.String getNetworkName() { - java.lang.Object ref = networkName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - networkName_ = s; - return s; - } - } - /** - *
-     * Name of the network.
-     * 
- * - * string network_name = 1 [json_name = "networkName"]; - * @return The bytes for networkName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNetworkNameBytes() { - java.lang.Object ref = networkName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - networkName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOTAL_SENT_BYTES_FIELD_NUMBER = 2; - private long totalSentBytes_; - /** - *
-     * Total bytes sent across the network.
-     * 
- * - * int64 total_sent_bytes = 2 [json_name = "totalSentBytes"]; - * @return The totalSentBytes. - */ - @java.lang.Override - public long getTotalSentBytes() { - return totalSentBytes_; - } - - public static final int TOTAL_RECEIVED_BYTES_FIELD_NUMBER = 3; - private long totalReceivedBytes_; - /** - *
-     * Total bytes received across the network.
-     * 
- * - * int64 total_received_bytes = 3 [json_name = "totalReceivedBytes"]; - * @return The totalReceivedBytes. - */ - @java.lang.Override - public long getTotalReceivedBytes() { - return totalReceivedBytes_; - } - - public static final int CONNECTED_PEERS_COUNT_FIELD_NUMBER = 4; - private int connectedPeersCount4_; - // An alternative name is used for field "connected_peers_count" because: - // both repeated field "connected_peers" and singular field "connected_peers_count" generate the method "getConnectedPeersCount()" - /** - *
-     * Number of connected peers.
-     * 
- * - * uint32 connected_peers_count = 4 [json_name = "connectedPeersCount"]; - * @return The connectedPeersCount. - */ - @java.lang.Override - public int getConnectedPeersCount4() { - return connectedPeersCount4_; - } - - public static final int CONNECTED_PEERS_FIELD_NUMBER = 5; - private java.util.List connectedPeers5_; - // An alternative name is used for field "connected_peers" because: - // both repeated field "connected_peers" and singular field "connected_peers_count" generate the method "getConnectedPeersCount()" - /** - *
-     * List of connected peers.
-     * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - @java.lang.Override - public java.util.List getConnectedPeers5List() { - return connectedPeers5_; - } - /** - *
-     * List of connected peers.
-     * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - @java.lang.Override - public java.util.List - getConnectedPeers5OrBuilderList() { - return connectedPeers5_; - } - /** - *
-     * List of connected peers.
-     * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - @java.lang.Override - public int getConnectedPeers5Count() { - return connectedPeers5_.size(); - } - /** - *
-     * List of connected peers.
-     * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - @java.lang.Override - public pactus.network.NetworkOuterClass.PeerInfo getConnectedPeers5(int index) { - return connectedPeers5_.get(index); - } - /** - *
-     * List of connected peers.
-     * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - @java.lang.Override - public pactus.network.NetworkOuterClass.PeerInfoOrBuilder getConnectedPeers5OrBuilder( - int index) { - return connectedPeers5_.get(index); - } - - public static final int SENT_BYTES_FIELD_NUMBER = 6; - private static final class SentBytesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Long> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT64, - 0L); - } - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Long> sentBytes_; - private com.google.protobuf.MapField - internalGetSentBytes() { - if (sentBytes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SentBytesDefaultEntryHolder.defaultEntry); - } - return sentBytes_; - } - - public int getSentBytesCount() { - return internalGetSentBytes().getMap().size(); - } - /** - *
-     * Bytes sent per peer ID.
-     * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - - @java.lang.Override - public boolean containsSentBytes( - int key) { - - return internalGetSentBytes().getMap().containsKey(key); - } - /** - * Use {@link #getSentBytesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSentBytes() { - return getSentBytesMap(); - } - /** - *
-     * Bytes sent per peer ID.
-     * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public java.util.Map getSentBytesMap() { - return internalGetSentBytes().getMap(); - } - /** - *
-     * Bytes sent per peer ID.
-     * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public long getSentBytesOrDefault( - int key, - long defaultValue) { - - java.util.Map map = - internalGetSentBytes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Bytes sent per peer ID.
-     * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public long getSentBytesOrThrow( - int key) { - - java.util.Map map = - internalGetSentBytes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int RECEIVED_BYTES_FIELD_NUMBER = 7; - private static final class ReceivedBytesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Long> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT64, - 0L); - } - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Long> receivedBytes_; - private com.google.protobuf.MapField - internalGetReceivedBytes() { - if (receivedBytes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ReceivedBytesDefaultEntryHolder.defaultEntry); - } - return receivedBytes_; - } - - public int getReceivedBytesCount() { - return internalGetReceivedBytes().getMap().size(); - } - /** - *
-     * Bytes received per peer ID.
-     * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - - @java.lang.Override - public boolean containsReceivedBytes( - int key) { - - return internalGetReceivedBytes().getMap().containsKey(key); - } - /** - * Use {@link #getReceivedBytesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getReceivedBytes() { - return getReceivedBytesMap(); - } - /** - *
-     * Bytes received per peer ID.
-     * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public java.util.Map getReceivedBytesMap() { - return internalGetReceivedBytes().getMap(); - } - /** - *
-     * Bytes received per peer ID.
-     * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public long getReceivedBytesOrDefault( - int key, - long defaultValue) { - - java.util.Map map = - internalGetReceivedBytes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Bytes received per peer ID.
-     * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public long getReceivedBytesOrThrow( - int key) { - - java.util.Map map = - internalGetReceivedBytes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, networkName_); - } - if (totalSentBytes_ != 0L) { - output.writeInt64(2, totalSentBytes_); - } - if (totalReceivedBytes_ != 0L) { - output.writeInt64(3, totalReceivedBytes_); - } - if (connectedPeersCount4_ != 0) { - output.writeUInt32(4, connectedPeersCount4_); - } - for (int i = 0; i < connectedPeers5_.size(); i++) { - output.writeMessage(5, connectedPeers5_.get(i)); - } - com.google.protobuf.GeneratedMessageV3 - .serializeIntegerMapTo( - output, - internalGetSentBytes(), - SentBytesDefaultEntryHolder.defaultEntry, - 6); - com.google.protobuf.GeneratedMessageV3 - .serializeIntegerMapTo( - output, - internalGetReceivedBytes(), - ReceivedBytesDefaultEntryHolder.defaultEntry, - 7); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, networkName_); - } - if (totalSentBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, totalSentBytes_); - } - if (totalReceivedBytes_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, totalReceivedBytes_); - } - if (connectedPeersCount4_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, connectedPeersCount4_); - } - for (int i = 0; i < connectedPeers5_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, connectedPeers5_.get(i)); - } - for (java.util.Map.Entry entry - : internalGetSentBytes().getMap().entrySet()) { - com.google.protobuf.MapEntry - sentBytes__ = SentBytesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, sentBytes__); - } - for (java.util.Map.Entry entry - : internalGetReceivedBytes().getMap().entrySet()) { - com.google.protobuf.MapEntry - receivedBytes__ = ReceivedBytesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, receivedBytes__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.network.NetworkOuterClass.GetNetworkInfoResponse)) { - return super.equals(obj); - } - pactus.network.NetworkOuterClass.GetNetworkInfoResponse other = (pactus.network.NetworkOuterClass.GetNetworkInfoResponse) obj; - - if (!getNetworkName() - .equals(other.getNetworkName())) return false; - if (getTotalSentBytes() - != other.getTotalSentBytes()) return false; - if (getTotalReceivedBytes() - != other.getTotalReceivedBytes()) return false; - if (getConnectedPeersCount4() - != other.getConnectedPeersCount4()) return false; - if (!getConnectedPeers5List() - .equals(other.getConnectedPeers5List())) return false; - if (!internalGetSentBytes().equals( - other.internalGetSentBytes())) return false; - if (!internalGetReceivedBytes().equals( - other.internalGetReceivedBytes())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NETWORK_NAME_FIELD_NUMBER; - hash = (53 * hash) + getNetworkName().hashCode(); - hash = (37 * hash) + TOTAL_SENT_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTotalSentBytes()); - hash = (37 * hash) + TOTAL_RECEIVED_BYTES_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTotalReceivedBytes()); - hash = (37 * hash) + CONNECTED_PEERS_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getConnectedPeersCount4(); - if (getConnectedPeers5Count() > 0) { - hash = (37 * hash) + CONNECTED_PEERS_FIELD_NUMBER; - hash = (53 * hash) + getConnectedPeers5List().hashCode(); - } - if (!internalGetSentBytes().getMap().isEmpty()) { - hash = (37 * hash) + SENT_BYTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetSentBytes().hashCode(); - } - if (!internalGetReceivedBytes().getMap().isEmpty()) { - hash = (37 * hash) + RECEIVED_BYTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetReceivedBytes().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.network.NetworkOuterClass.GetNetworkInfoResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing information about the overall network.
-     * 
- * - * Protobuf type {@code pactus.GetNetworkInfoResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetNetworkInfoResponse) - pactus.network.NetworkOuterClass.GetNetworkInfoResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 6: - return internalGetSentBytes(); - case 7: - return internalGetReceivedBytes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 6: - return internalGetMutableSentBytes(); - case 7: - return internalGetMutableReceivedBytes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.GetNetworkInfoResponse.class, pactus.network.NetworkOuterClass.GetNetworkInfoResponse.Builder.class); - } - - // Construct using pactus.network.NetworkOuterClass.GetNetworkInfoResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - networkName_ = ""; - - totalSentBytes_ = 0L; - - totalReceivedBytes_ = 0L; - - connectedPeersCount4_ = 0; - - if (connectedPeers5Builder_ == null) { - connectedPeers5_ = java.util.Collections.emptyList(); - } else { - connectedPeers5_ = null; - connectedPeers5Builder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableSentBytes().clear(); - internalGetMutableReceivedBytes().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_descriptor; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNetworkInfoResponse getDefaultInstanceForType() { - return pactus.network.NetworkOuterClass.GetNetworkInfoResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNetworkInfoResponse build() { - pactus.network.NetworkOuterClass.GetNetworkInfoResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNetworkInfoResponse buildPartial() { - pactus.network.NetworkOuterClass.GetNetworkInfoResponse result = new pactus.network.NetworkOuterClass.GetNetworkInfoResponse(this); - int from_bitField0_ = bitField0_; - result.networkName_ = networkName_; - result.totalSentBytes_ = totalSentBytes_; - result.totalReceivedBytes_ = totalReceivedBytes_; - result.connectedPeersCount4_ = connectedPeersCount4_; - if (connectedPeers5Builder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - connectedPeers5_ = java.util.Collections.unmodifiableList(connectedPeers5_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.connectedPeers5_ = connectedPeers5_; - } else { - result.connectedPeers5_ = connectedPeers5Builder_.build(); - } - result.sentBytes_ = internalGetSentBytes(); - result.sentBytes_.makeImmutable(); - result.receivedBytes_ = internalGetReceivedBytes(); - result.receivedBytes_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.network.NetworkOuterClass.GetNetworkInfoResponse) { - return mergeFrom((pactus.network.NetworkOuterClass.GetNetworkInfoResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.network.NetworkOuterClass.GetNetworkInfoResponse other) { - if (other == pactus.network.NetworkOuterClass.GetNetworkInfoResponse.getDefaultInstance()) return this; - if (!other.getNetworkName().isEmpty()) { - networkName_ = other.networkName_; - onChanged(); - } - if (other.getTotalSentBytes() != 0L) { - setTotalSentBytes(other.getTotalSentBytes()); - } - if (other.getTotalReceivedBytes() != 0L) { - setTotalReceivedBytes(other.getTotalReceivedBytes()); - } - if (other.getConnectedPeersCount4() != 0) { - setConnectedPeersCount4(other.getConnectedPeersCount4()); - } - if (connectedPeers5Builder_ == null) { - if (!other.connectedPeers5_.isEmpty()) { - if (connectedPeers5_.isEmpty()) { - connectedPeers5_ = other.connectedPeers5_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConnectedPeers5IsMutable(); - connectedPeers5_.addAll(other.connectedPeers5_); - } - onChanged(); - } - } else { - if (!other.connectedPeers5_.isEmpty()) { - if (connectedPeers5Builder_.isEmpty()) { - connectedPeers5Builder_.dispose(); - connectedPeers5Builder_ = null; - connectedPeers5_ = other.connectedPeers5_; - bitField0_ = (bitField0_ & ~0x00000001); - connectedPeers5Builder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConnectedPeers5FieldBuilder() : null; - } else { - connectedPeers5Builder_.addAllMessages(other.connectedPeers5_); - } - } - } - internalGetMutableSentBytes().mergeFrom( - other.internalGetSentBytes()); - internalGetMutableReceivedBytes().mergeFrom( - other.internalGetReceivedBytes()); - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - networkName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: { - totalSentBytes_ = input.readInt64(); - - break; - } // case 16 - case 24: { - totalReceivedBytes_ = input.readInt64(); - - break; - } // case 24 - case 32: { - connectedPeersCount4_ = input.readUInt32(); - - break; - } // case 32 - case 42: { - pactus.network.NetworkOuterClass.PeerInfo m = - input.readMessage( - pactus.network.NetworkOuterClass.PeerInfo.parser(), - extensionRegistry); - if (connectedPeers5Builder_ == null) { - ensureConnectedPeers5IsMutable(); - connectedPeers5_.add(m); - } else { - connectedPeers5Builder_.addMessage(m); - } - break; - } // case 42 - case 50: { - com.google.protobuf.MapEntry - sentBytes__ = input.readMessage( - SentBytesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableSentBytes().getMutableMap().put( - sentBytes__.getKey(), sentBytes__.getValue()); - break; - } // case 50 - case 58: { - com.google.protobuf.MapEntry - receivedBytes__ = input.readMessage( - ReceivedBytesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableReceivedBytes().getMutableMap().put( - receivedBytes__.getKey(), receivedBytes__.getValue()); - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object networkName_ = ""; - /** - *
-       * Name of the network.
-       * 
- * - * string network_name = 1 [json_name = "networkName"]; - * @return The networkName. - */ - public java.lang.String getNetworkName() { - java.lang.Object ref = networkName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - networkName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Name of the network.
-       * 
- * - * string network_name = 1 [json_name = "networkName"]; - * @return The bytes for networkName. - */ - public com.google.protobuf.ByteString - getNetworkNameBytes() { - java.lang.Object ref = networkName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - networkName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Name of the network.
-       * 
- * - * string network_name = 1 [json_name = "networkName"]; - * @param value The networkName to set. - * @return This builder for chaining. - */ - public Builder setNetworkName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - networkName_ = value; - onChanged(); - return this; - } - /** - *
-       * Name of the network.
-       * 
- * - * string network_name = 1 [json_name = "networkName"]; - * @return This builder for chaining. - */ - public Builder clearNetworkName() { - - networkName_ = getDefaultInstance().getNetworkName(); - onChanged(); - return this; - } - /** - *
-       * Name of the network.
-       * 
- * - * string network_name = 1 [json_name = "networkName"]; - * @param value The bytes for networkName to set. - * @return This builder for chaining. - */ - public Builder setNetworkNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - networkName_ = value; - onChanged(); - return this; - } - - private long totalSentBytes_ ; - /** - *
-       * Total bytes sent across the network.
-       * 
- * - * int64 total_sent_bytes = 2 [json_name = "totalSentBytes"]; - * @return The totalSentBytes. - */ - @java.lang.Override - public long getTotalSentBytes() { - return totalSentBytes_; - } - /** - *
-       * Total bytes sent across the network.
-       * 
- * - * int64 total_sent_bytes = 2 [json_name = "totalSentBytes"]; - * @param value The totalSentBytes to set. - * @return This builder for chaining. - */ - public Builder setTotalSentBytes(long value) { - - totalSentBytes_ = value; - onChanged(); - return this; - } - /** - *
-       * Total bytes sent across the network.
-       * 
- * - * int64 total_sent_bytes = 2 [json_name = "totalSentBytes"]; - * @return This builder for chaining. - */ - public Builder clearTotalSentBytes() { - - totalSentBytes_ = 0L; - onChanged(); - return this; - } - - private long totalReceivedBytes_ ; - /** - *
-       * Total bytes received across the network.
-       * 
- * - * int64 total_received_bytes = 3 [json_name = "totalReceivedBytes"]; - * @return The totalReceivedBytes. - */ - @java.lang.Override - public long getTotalReceivedBytes() { - return totalReceivedBytes_; - } - /** - *
-       * Total bytes received across the network.
-       * 
- * - * int64 total_received_bytes = 3 [json_name = "totalReceivedBytes"]; - * @param value The totalReceivedBytes to set. - * @return This builder for chaining. - */ - public Builder setTotalReceivedBytes(long value) { - - totalReceivedBytes_ = value; - onChanged(); - return this; - } - /** - *
-       * Total bytes received across the network.
-       * 
- * - * int64 total_received_bytes = 3 [json_name = "totalReceivedBytes"]; - * @return This builder for chaining. - */ - public Builder clearTotalReceivedBytes() { - - totalReceivedBytes_ = 0L; - onChanged(); - return this; - } - - private int connectedPeersCount4_ ; - /** - *
-       * Number of connected peers.
-       * 
- * - * uint32 connected_peers_count = 4 [json_name = "connectedPeersCount"]; - * @return The connectedPeersCount. - */ - @java.lang.Override - public int getConnectedPeersCount4() { - return connectedPeersCount4_; - } - /** - *
-       * Number of connected peers.
-       * 
- * - * uint32 connected_peers_count = 4 [json_name = "connectedPeersCount"]; - * @param value The connectedPeersCount to set. - * @return This builder for chaining. - */ - public Builder setConnectedPeersCount4(int value) { - - connectedPeersCount4_ = value; - onChanged(); - return this; - } - /** - *
-       * Number of connected peers.
-       * 
- * - * uint32 connected_peers_count = 4 [json_name = "connectedPeersCount"]; - * @return This builder for chaining. - */ - public Builder clearConnectedPeersCount4() { - - connectedPeersCount4_ = 0; - onChanged(); - return this; - } - - private java.util.List connectedPeers5_ = - java.util.Collections.emptyList(); - private void ensureConnectedPeers5IsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - connectedPeers5_ = new java.util.ArrayList(connectedPeers5_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.network.NetworkOuterClass.PeerInfo, pactus.network.NetworkOuterClass.PeerInfo.Builder, pactus.network.NetworkOuterClass.PeerInfoOrBuilder> connectedPeers5Builder_; - - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public java.util.List getConnectedPeers5List() { - if (connectedPeers5Builder_ == null) { - return java.util.Collections.unmodifiableList(connectedPeers5_); - } else { - return connectedPeers5Builder_.getMessageList(); - } - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public int getConnectedPeers5Count() { - if (connectedPeers5Builder_ == null) { - return connectedPeers5_.size(); - } else { - return connectedPeers5Builder_.getCount(); - } - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public pactus.network.NetworkOuterClass.PeerInfo getConnectedPeers5(int index) { - if (connectedPeers5Builder_ == null) { - return connectedPeers5_.get(index); - } else { - return connectedPeers5Builder_.getMessage(index); - } - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public Builder setConnectedPeers5( - int index, pactus.network.NetworkOuterClass.PeerInfo value) { - if (connectedPeers5Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectedPeers5IsMutable(); - connectedPeers5_.set(index, value); - onChanged(); - } else { - connectedPeers5Builder_.setMessage(index, value); - } - return this; - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public Builder setConnectedPeers5( - int index, pactus.network.NetworkOuterClass.PeerInfo.Builder builderForValue) { - if (connectedPeers5Builder_ == null) { - ensureConnectedPeers5IsMutable(); - connectedPeers5_.set(index, builderForValue.build()); - onChanged(); - } else { - connectedPeers5Builder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public Builder addConnectedPeers5(pactus.network.NetworkOuterClass.PeerInfo value) { - if (connectedPeers5Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectedPeers5IsMutable(); - connectedPeers5_.add(value); - onChanged(); - } else { - connectedPeers5Builder_.addMessage(value); - } - return this; - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public Builder addConnectedPeers5( - int index, pactus.network.NetworkOuterClass.PeerInfo value) { - if (connectedPeers5Builder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConnectedPeers5IsMutable(); - connectedPeers5_.add(index, value); - onChanged(); - } else { - connectedPeers5Builder_.addMessage(index, value); - } - return this; - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public Builder addConnectedPeers5( - pactus.network.NetworkOuterClass.PeerInfo.Builder builderForValue) { - if (connectedPeers5Builder_ == null) { - ensureConnectedPeers5IsMutable(); - connectedPeers5_.add(builderForValue.build()); - onChanged(); - } else { - connectedPeers5Builder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public Builder addConnectedPeers5( - int index, pactus.network.NetworkOuterClass.PeerInfo.Builder builderForValue) { - if (connectedPeers5Builder_ == null) { - ensureConnectedPeers5IsMutable(); - connectedPeers5_.add(index, builderForValue.build()); - onChanged(); - } else { - connectedPeers5Builder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public Builder addAllConnectedPeers5( - java.lang.Iterable values) { - if (connectedPeers5Builder_ == null) { - ensureConnectedPeers5IsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, connectedPeers5_); - onChanged(); - } else { - connectedPeers5Builder_.addAllMessages(values); - } - return this; - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public Builder clearConnectedPeers5() { - if (connectedPeers5Builder_ == null) { - connectedPeers5_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - connectedPeers5Builder_.clear(); - } - return this; - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public Builder removeConnectedPeers5(int index) { - if (connectedPeers5Builder_ == null) { - ensureConnectedPeers5IsMutable(); - connectedPeers5_.remove(index); - onChanged(); - } else { - connectedPeers5Builder_.remove(index); - } - return this; - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public pactus.network.NetworkOuterClass.PeerInfo.Builder getConnectedPeers5Builder( - int index) { - return getConnectedPeers5FieldBuilder().getBuilder(index); - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public pactus.network.NetworkOuterClass.PeerInfoOrBuilder getConnectedPeers5OrBuilder( - int index) { - if (connectedPeers5Builder_ == null) { - return connectedPeers5_.get(index); } else { - return connectedPeers5Builder_.getMessageOrBuilder(index); - } - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public java.util.List - getConnectedPeers5OrBuilderList() { - if (connectedPeers5Builder_ != null) { - return connectedPeers5Builder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(connectedPeers5_); - } - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public pactus.network.NetworkOuterClass.PeerInfo.Builder addConnectedPeers5Builder() { - return getConnectedPeers5FieldBuilder().addBuilder( - pactus.network.NetworkOuterClass.PeerInfo.getDefaultInstance()); - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public pactus.network.NetworkOuterClass.PeerInfo.Builder addConnectedPeers5Builder( - int index) { - return getConnectedPeers5FieldBuilder().addBuilder( - index, pactus.network.NetworkOuterClass.PeerInfo.getDefaultInstance()); - } - /** - *
-       * List of connected peers.
-       * 
- * - * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; - */ - public java.util.List - getConnectedPeers5BuilderList() { - return getConnectedPeers5FieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.network.NetworkOuterClass.PeerInfo, pactus.network.NetworkOuterClass.PeerInfo.Builder, pactus.network.NetworkOuterClass.PeerInfoOrBuilder> - getConnectedPeers5FieldBuilder() { - if (connectedPeers5Builder_ == null) { - connectedPeers5Builder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - pactus.network.NetworkOuterClass.PeerInfo, pactus.network.NetworkOuterClass.PeerInfo.Builder, pactus.network.NetworkOuterClass.PeerInfoOrBuilder>( - connectedPeers5_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - connectedPeers5_ = null; - } - return connectedPeers5Builder_; - } - - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Long> sentBytes_; - private com.google.protobuf.MapField - internalGetSentBytes() { - if (sentBytes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SentBytesDefaultEntryHolder.defaultEntry); - } - return sentBytes_; - } - private com.google.protobuf.MapField - internalGetMutableSentBytes() { - onChanged();; - if (sentBytes_ == null) { - sentBytes_ = com.google.protobuf.MapField.newMapField( - SentBytesDefaultEntryHolder.defaultEntry); - } - if (!sentBytes_.isMutable()) { - sentBytes_ = sentBytes_.copy(); - } - return sentBytes_; - } - - public int getSentBytesCount() { - return internalGetSentBytes().getMap().size(); - } - /** - *
-       * Bytes sent per peer ID.
-       * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - - @java.lang.Override - public boolean containsSentBytes( - int key) { - - return internalGetSentBytes().getMap().containsKey(key); - } - /** - * Use {@link #getSentBytesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSentBytes() { - return getSentBytesMap(); - } - /** - *
-       * Bytes sent per peer ID.
-       * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public java.util.Map getSentBytesMap() { - return internalGetSentBytes().getMap(); - } - /** - *
-       * Bytes sent per peer ID.
-       * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public long getSentBytesOrDefault( - int key, - long defaultValue) { - - java.util.Map map = - internalGetSentBytes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * Bytes sent per peer ID.
-       * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public long getSentBytesOrThrow( - int key) { - - java.util.Map map = - internalGetSentBytes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearSentBytes() { - internalGetMutableSentBytes().getMutableMap() - .clear(); - return this; - } - /** - *
-       * Bytes sent per peer ID.
-       * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - - public Builder removeSentBytes( - int key) { - - internalGetMutableSentBytes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableSentBytes() { - return internalGetMutableSentBytes().getMutableMap(); - } - /** - *
-       * Bytes sent per peer ID.
-       * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - public Builder putSentBytes( - int key, - long value) { - - - internalGetMutableSentBytes().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * Bytes sent per peer ID.
-       * 
- * - * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; - */ - - public Builder putAllSentBytes( - java.util.Map values) { - internalGetMutableSentBytes().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Long> receivedBytes_; - private com.google.protobuf.MapField - internalGetReceivedBytes() { - if (receivedBytes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ReceivedBytesDefaultEntryHolder.defaultEntry); - } - return receivedBytes_; - } - private com.google.protobuf.MapField - internalGetMutableReceivedBytes() { - onChanged();; - if (receivedBytes_ == null) { - receivedBytes_ = com.google.protobuf.MapField.newMapField( - ReceivedBytesDefaultEntryHolder.defaultEntry); - } - if (!receivedBytes_.isMutable()) { - receivedBytes_ = receivedBytes_.copy(); - } - return receivedBytes_; - } - - public int getReceivedBytesCount() { - return internalGetReceivedBytes().getMap().size(); - } - /** - *
-       * Bytes received per peer ID.
-       * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - - @java.lang.Override - public boolean containsReceivedBytes( - int key) { - - return internalGetReceivedBytes().getMap().containsKey(key); - } - /** - * Use {@link #getReceivedBytesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getReceivedBytes() { - return getReceivedBytesMap(); - } - /** - *
-       * Bytes received per peer ID.
-       * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public java.util.Map getReceivedBytesMap() { - return internalGetReceivedBytes().getMap(); - } - /** - *
-       * Bytes received per peer ID.
-       * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public long getReceivedBytesOrDefault( - int key, - long defaultValue) { - - java.util.Map map = - internalGetReceivedBytes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * Bytes received per peer ID.
-       * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public long getReceivedBytesOrThrow( - int key) { - - java.util.Map map = - internalGetReceivedBytes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearReceivedBytes() { - internalGetMutableReceivedBytes().getMutableMap() - .clear(); - return this; - } - /** - *
-       * Bytes received per peer ID.
-       * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - - public Builder removeReceivedBytes( - int key) { - - internalGetMutableReceivedBytes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableReceivedBytes() { - return internalGetMutableReceivedBytes().getMutableMap(); - } - /** - *
-       * Bytes received per peer ID.
-       * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - public Builder putReceivedBytes( - int key, - long value) { - - - internalGetMutableReceivedBytes().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * Bytes received per peer ID.
-       * 
- * - * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; - */ - - public Builder putAllReceivedBytes( - java.util.Map values) { - internalGetMutableReceivedBytes().getMutableMap() - .putAll(values); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetNetworkInfoResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetNetworkInfoResponse) - private static final pactus.network.NetworkOuterClass.GetNetworkInfoResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.GetNetworkInfoResponse(); - } - - public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNetworkInfoResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNetworkInfoResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetNodeInfoRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetNodeInfoRequest) - com.google.protobuf.MessageOrBuilder { - } - /** - *
-   * Request message for retrieving information about a specific node in the
-   * network.
-   * 
- * - * Protobuf type {@code pactus.GetNodeInfoRequest} - */ - public static final class GetNodeInfoRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetNodeInfoRequest) - GetNodeInfoRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetNodeInfoRequest.newBuilder() to construct. - private GetNodeInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNodeInfoRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNodeInfoRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.GetNodeInfoRequest.class, pactus.network.NetworkOuterClass.GetNodeInfoRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.network.NetworkOuterClass.GetNodeInfoRequest)) { - return super.equals(obj); - } - pactus.network.NetworkOuterClass.GetNodeInfoRequest other = (pactus.network.NetworkOuterClass.GetNodeInfoRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.network.NetworkOuterClass.GetNodeInfoRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for retrieving information about a specific node in the
-     * network.
-     * 
- * - * Protobuf type {@code pactus.GetNodeInfoRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetNodeInfoRequest) - pactus.network.NetworkOuterClass.GetNodeInfoRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.GetNodeInfoRequest.class, pactus.network.NetworkOuterClass.GetNodeInfoRequest.Builder.class); - } - - // Construct using pactus.network.NetworkOuterClass.GetNodeInfoRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_descriptor; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNodeInfoRequest getDefaultInstanceForType() { - return pactus.network.NetworkOuterClass.GetNodeInfoRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNodeInfoRequest build() { - pactus.network.NetworkOuterClass.GetNodeInfoRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNodeInfoRequest buildPartial() { - pactus.network.NetworkOuterClass.GetNodeInfoRequest result = new pactus.network.NetworkOuterClass.GetNodeInfoRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.network.NetworkOuterClass.GetNodeInfoRequest) { - return mergeFrom((pactus.network.NetworkOuterClass.GetNodeInfoRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.network.NetworkOuterClass.GetNodeInfoRequest other) { - if (other == pactus.network.NetworkOuterClass.GetNodeInfoRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetNodeInfoRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetNodeInfoRequest) - private static final pactus.network.NetworkOuterClass.GetNodeInfoRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.GetNodeInfoRequest(); - } - - public static pactus.network.NetworkOuterClass.GetNodeInfoRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNodeInfoRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNodeInfoRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetNodeInfoResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetNodeInfoResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Moniker of the node.
-     * 
- * - * string moniker = 1 [json_name = "moniker"]; - * @return The moniker. - */ - java.lang.String getMoniker(); - /** - *
-     * Moniker of the node.
-     * 
- * - * string moniker = 1 [json_name = "moniker"]; - * @return The bytes for moniker. - */ - com.google.protobuf.ByteString - getMonikerBytes(); - - /** - *
-     * Agent information of the node.
-     * 
- * - * string agent = 2 [json_name = "agent"]; - * @return The agent. - */ - java.lang.String getAgent(); - /** - *
-     * Agent information of the node.
-     * 
- * - * string agent = 2 [json_name = "agent"]; - * @return The bytes for agent. - */ - com.google.protobuf.ByteString - getAgentBytes(); - - /** - *
-     * Peer ID of the node.
-     * 
- * - * string peer_id = 3 [json_name = "peerId"]; - * @return The peerId. - */ - java.lang.String getPeerId(); - /** - *
-     * Peer ID of the node.
-     * 
- * - * string peer_id = 3 [json_name = "peerId"]; - * @return The bytes for peerId. - */ - com.google.protobuf.ByteString - getPeerIdBytes(); - - /** - *
-     * Timestamp when the node started.
-     * 
- * - * uint64 started_at = 4 [json_name = "startedAt"]; - * @return The startedAt. - */ - long getStartedAt(); - - /** - *
-     * Reachability status of the node.
-     * 
- * - * string reachability = 5 [json_name = "reachability"]; - * @return The reachability. - */ - java.lang.String getReachability(); - /** - *
-     * Reachability status of the node.
-     * 
- * - * string reachability = 5 [json_name = "reachability"]; - * @return The bytes for reachability. - */ - com.google.protobuf.ByteString - getReachabilityBytes(); - - /** - *
-     * A bitfield indicating the services provided by the node.
-     * 
- * - * int32 services = 6 [json_name = "services"]; - * @return The services. - */ - int getServices(); - - /** - *
-     * Names of services provided by the node.
-     * 
- * - * string services_names = 7 [json_name = "servicesNames"]; - * @return The servicesNames. - */ - java.lang.String getServicesNames(); - /** - *
-     * Names of services provided by the node.
-     * 
- * - * string services_names = 7 [json_name = "servicesNames"]; - * @return The bytes for servicesNames. - */ - com.google.protobuf.ByteString - getServicesNamesBytes(); - - /** - *
-     * List of addresses associated with the node.
-     * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @return A list containing the localAddrs. - */ - java.util.List - getLocalAddrsList(); - /** - *
-     * List of addresses associated with the node.
-     * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @return The count of localAddrs. - */ - int getLocalAddrsCount(); - /** - *
-     * List of addresses associated with the node.
-     * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @param index The index of the element to return. - * @return The localAddrs at the given index. - */ - java.lang.String getLocalAddrs(int index); - /** - *
-     * List of addresses associated with the node.
-     * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @param index The index of the value to return. - * @return The bytes of the localAddrs at the given index. - */ - com.google.protobuf.ByteString - getLocalAddrsBytes(int index); - - /** - *
-     * List of protocols supported by the node.
-     * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @return A list containing the protocols. - */ - java.util.List - getProtocolsList(); - /** - *
-     * List of protocols supported by the node.
-     * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @return The count of protocols. - */ - int getProtocolsCount(); - /** - *
-     * List of protocols supported by the node.
-     * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @param index The index of the element to return. - * @return The protocols at the given index. - */ - java.lang.String getProtocols(int index); - /** - *
-     * List of protocols supported by the node.
-     * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @param index The index of the value to return. - * @return The bytes of the protocols at the given index. - */ - com.google.protobuf.ByteString - getProtocolsBytes(int index); - - /** - *
-     * Clock offset of the node.
-     * 
- * - * double clock_offset = 13 [json_name = "clockOffset"]; - * @return The clockOffset. - */ - double getClockOffset(); - - /** - *
-     * Information about the node's connections.
-     * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - * @return Whether the connectionInfo field is set. - */ - boolean hasConnectionInfo(); - /** - *
-     * Information about the node's connections.
-     * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - * @return The connectionInfo. - */ - pactus.network.NetworkOuterClass.ConnectionInfo getConnectionInfo(); - /** - *
-     * Information about the node's connections.
-     * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - */ - pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder(); - } - /** - *
-   * Response message containing information about a specific node in the network.
-   * 
- * - * Protobuf type {@code pactus.GetNodeInfoResponse} - */ - public static final class GetNodeInfoResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetNodeInfoResponse) - GetNodeInfoResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetNodeInfoResponse.newBuilder() to construct. - private GetNodeInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNodeInfoResponse() { - moniker_ = ""; - agent_ = ""; - peerId_ = ""; - reachability_ = ""; - servicesNames_ = ""; - localAddrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; - protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNodeInfoResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.GetNodeInfoResponse.class, pactus.network.NetworkOuterClass.GetNodeInfoResponse.Builder.class); - } - - public static final int MONIKER_FIELD_NUMBER = 1; - private volatile java.lang.Object moniker_; - /** - *
-     * Moniker of the node.
-     * 
- * - * string moniker = 1 [json_name = "moniker"]; - * @return The moniker. - */ - @java.lang.Override - public java.lang.String getMoniker() { - java.lang.Object ref = moniker_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - moniker_ = s; - return s; - } - } - /** - *
-     * Moniker of the node.
-     * 
- * - * string moniker = 1 [json_name = "moniker"]; - * @return The bytes for moniker. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMonikerBytes() { - java.lang.Object ref = moniker_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - moniker_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AGENT_FIELD_NUMBER = 2; - private volatile java.lang.Object agent_; - /** - *
-     * Agent information of the node.
-     * 
- * - * string agent = 2 [json_name = "agent"]; - * @return The agent. - */ - @java.lang.Override - public java.lang.String getAgent() { - java.lang.Object ref = agent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - agent_ = s; - return s; - } - } - /** - *
-     * Agent information of the node.
-     * 
- * - * string agent = 2 [json_name = "agent"]; - * @return The bytes for agent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAgentBytes() { - java.lang.Object ref = agent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - agent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PEER_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object peerId_; - /** - *
-     * Peer ID of the node.
-     * 
- * - * string peer_id = 3 [json_name = "peerId"]; - * @return The peerId. - */ - @java.lang.Override - public java.lang.String getPeerId() { - java.lang.Object ref = peerId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - peerId_ = s; - return s; - } - } - /** - *
-     * Peer ID of the node.
-     * 
- * - * string peer_id = 3 [json_name = "peerId"]; - * @return The bytes for peerId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPeerIdBytes() { - java.lang.Object ref = peerId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - peerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STARTED_AT_FIELD_NUMBER = 4; - private long startedAt_; - /** - *
-     * Timestamp when the node started.
-     * 
- * - * uint64 started_at = 4 [json_name = "startedAt"]; - * @return The startedAt. - */ - @java.lang.Override - public long getStartedAt() { - return startedAt_; - } - - public static final int REACHABILITY_FIELD_NUMBER = 5; - private volatile java.lang.Object reachability_; - /** - *
-     * Reachability status of the node.
-     * 
- * - * string reachability = 5 [json_name = "reachability"]; - * @return The reachability. - */ - @java.lang.Override - public java.lang.String getReachability() { - java.lang.Object ref = reachability_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reachability_ = s; - return s; - } - } - /** - *
-     * Reachability status of the node.
-     * 
- * - * string reachability = 5 [json_name = "reachability"]; - * @return The bytes for reachability. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReachabilityBytes() { - java.lang.Object ref = reachability_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reachability_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICES_FIELD_NUMBER = 6; - private int services_; - /** - *
-     * A bitfield indicating the services provided by the node.
-     * 
- * - * int32 services = 6 [json_name = "services"]; - * @return The services. - */ - @java.lang.Override - public int getServices() { - return services_; - } - - public static final int SERVICES_NAMES_FIELD_NUMBER = 7; - private volatile java.lang.Object servicesNames_; - /** - *
-     * Names of services provided by the node.
-     * 
- * - * string services_names = 7 [json_name = "servicesNames"]; - * @return The servicesNames. - */ - @java.lang.Override - public java.lang.String getServicesNames() { - java.lang.Object ref = servicesNames_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - servicesNames_ = s; - return s; - } - } - /** - *
-     * Names of services provided by the node.
-     * 
- * - * string services_names = 7 [json_name = "servicesNames"]; - * @return The bytes for servicesNames. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getServicesNamesBytes() { - java.lang.Object ref = servicesNames_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - servicesNames_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LOCAL_ADDRS_FIELD_NUMBER = 8; - private com.google.protobuf.LazyStringList localAddrs_; - /** - *
-     * List of addresses associated with the node.
-     * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @return A list containing the localAddrs. - */ - public com.google.protobuf.ProtocolStringList - getLocalAddrsList() { - return localAddrs_; - } - /** - *
-     * List of addresses associated with the node.
-     * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @return The count of localAddrs. - */ - public int getLocalAddrsCount() { - return localAddrs_.size(); - } - /** - *
-     * List of addresses associated with the node.
-     * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @param index The index of the element to return. - * @return The localAddrs at the given index. - */ - public java.lang.String getLocalAddrs(int index) { - return localAddrs_.get(index); - } - /** - *
-     * List of addresses associated with the node.
-     * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @param index The index of the value to return. - * @return The bytes of the localAddrs at the given index. - */ - public com.google.protobuf.ByteString - getLocalAddrsBytes(int index) { - return localAddrs_.getByteString(index); - } - - public static final int PROTOCOLS_FIELD_NUMBER = 9; - private com.google.protobuf.LazyStringList protocols_; - /** - *
-     * List of protocols supported by the node.
-     * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @return A list containing the protocols. - */ - public com.google.protobuf.ProtocolStringList - getProtocolsList() { - return protocols_; - } - /** - *
-     * List of protocols supported by the node.
-     * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @return The count of protocols. - */ - public int getProtocolsCount() { - return protocols_.size(); - } - /** - *
-     * List of protocols supported by the node.
-     * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @param index The index of the element to return. - * @return The protocols at the given index. - */ - public java.lang.String getProtocols(int index) { - return protocols_.get(index); - } - /** - *
-     * List of protocols supported by the node.
-     * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @param index The index of the value to return. - * @return The bytes of the protocols at the given index. - */ - public com.google.protobuf.ByteString - getProtocolsBytes(int index) { - return protocols_.getByteString(index); - } - - public static final int CLOCK_OFFSET_FIELD_NUMBER = 13; - private double clockOffset_; - /** - *
-     * Clock offset of the node.
-     * 
- * - * double clock_offset = 13 [json_name = "clockOffset"]; - * @return The clockOffset. - */ - @java.lang.Override - public double getClockOffset() { - return clockOffset_; - } - - public static final int CONNECTION_INFO_FIELD_NUMBER = 14; - private pactus.network.NetworkOuterClass.ConnectionInfo connectionInfo_; - /** - *
-     * Information about the node's connections.
-     * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - * @return Whether the connectionInfo field is set. - */ - @java.lang.Override - public boolean hasConnectionInfo() { - return connectionInfo_ != null; - } - /** - *
-     * Information about the node's connections.
-     * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - * @return The connectionInfo. - */ - @java.lang.Override - public pactus.network.NetworkOuterClass.ConnectionInfo getConnectionInfo() { - return connectionInfo_ == null ? pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_; - } - /** - *
-     * Information about the node's connections.
-     * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - */ - @java.lang.Override - public pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder() { - return getConnectionInfo(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moniker_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, moniker_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, agent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, peerId_); - } - if (startedAt_ != 0L) { - output.writeUInt64(4, startedAt_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reachability_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, reachability_); - } - if (services_ != 0) { - output.writeInt32(6, services_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servicesNames_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, servicesNames_); - } - for (int i = 0; i < localAddrs_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, localAddrs_.getRaw(i)); - } - for (int i = 0; i < protocols_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, protocols_.getRaw(i)); - } - if (java.lang.Double.doubleToRawLongBits(clockOffset_) != 0) { - output.writeDouble(13, clockOffset_); - } - if (connectionInfo_ != null) { - output.writeMessage(14, getConnectionInfo()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moniker_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, moniker_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, agent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, peerId_); - } - if (startedAt_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(4, startedAt_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reachability_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, reachability_); - } - if (services_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(6, services_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servicesNames_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, servicesNames_); - } - { - int dataSize = 0; - for (int i = 0; i < localAddrs_.size(); i++) { - dataSize += computeStringSizeNoTag(localAddrs_.getRaw(i)); - } - size += dataSize; - size += 1 * getLocalAddrsList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < protocols_.size(); i++) { - dataSize += computeStringSizeNoTag(protocols_.getRaw(i)); - } - size += dataSize; - size += 1 * getProtocolsList().size(); - } - if (java.lang.Double.doubleToRawLongBits(clockOffset_) != 0) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(13, clockOffset_); - } - if (connectionInfo_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, getConnectionInfo()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.network.NetworkOuterClass.GetNodeInfoResponse)) { - return super.equals(obj); - } - pactus.network.NetworkOuterClass.GetNodeInfoResponse other = (pactus.network.NetworkOuterClass.GetNodeInfoResponse) obj; - - if (!getMoniker() - .equals(other.getMoniker())) return false; - if (!getAgent() - .equals(other.getAgent())) return false; - if (!getPeerId() - .equals(other.getPeerId())) return false; - if (getStartedAt() - != other.getStartedAt()) return false; - if (!getReachability() - .equals(other.getReachability())) return false; - if (getServices() - != other.getServices()) return false; - if (!getServicesNames() - .equals(other.getServicesNames())) return false; - if (!getLocalAddrsList() - .equals(other.getLocalAddrsList())) return false; - if (!getProtocolsList() - .equals(other.getProtocolsList())) return false; - if (java.lang.Double.doubleToLongBits(getClockOffset()) - != java.lang.Double.doubleToLongBits( - other.getClockOffset())) return false; - if (hasConnectionInfo() != other.hasConnectionInfo()) return false; - if (hasConnectionInfo()) { - if (!getConnectionInfo() - .equals(other.getConnectionInfo())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MONIKER_FIELD_NUMBER; - hash = (53 * hash) + getMoniker().hashCode(); - hash = (37 * hash) + AGENT_FIELD_NUMBER; - hash = (53 * hash) + getAgent().hashCode(); - hash = (37 * hash) + PEER_ID_FIELD_NUMBER; - hash = (53 * hash) + getPeerId().hashCode(); - hash = (37 * hash) + STARTED_AT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getStartedAt()); - hash = (37 * hash) + REACHABILITY_FIELD_NUMBER; - hash = (53 * hash) + getReachability().hashCode(); - hash = (37 * hash) + SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getServices(); - hash = (37 * hash) + SERVICES_NAMES_FIELD_NUMBER; - hash = (53 * hash) + getServicesNames().hashCode(); - if (getLocalAddrsCount() > 0) { - hash = (37 * hash) + LOCAL_ADDRS_FIELD_NUMBER; - hash = (53 * hash) + getLocalAddrsList().hashCode(); - } - if (getProtocolsCount() > 0) { - hash = (37 * hash) + PROTOCOLS_FIELD_NUMBER; - hash = (53 * hash) + getProtocolsList().hashCode(); - } - hash = (37 * hash) + CLOCK_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getClockOffset())); - if (hasConnectionInfo()) { - hash = (37 * hash) + CONNECTION_INFO_FIELD_NUMBER; - hash = (53 * hash) + getConnectionInfo().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.network.NetworkOuterClass.GetNodeInfoResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing information about a specific node in the network.
-     * 
- * - * Protobuf type {@code pactus.GetNodeInfoResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetNodeInfoResponse) - pactus.network.NetworkOuterClass.GetNodeInfoResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.GetNodeInfoResponse.class, pactus.network.NetworkOuterClass.GetNodeInfoResponse.Builder.class); - } - - // Construct using pactus.network.NetworkOuterClass.GetNodeInfoResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - moniker_ = ""; - - agent_ = ""; - - peerId_ = ""; - - startedAt_ = 0L; - - reachability_ = ""; - - services_ = 0; - - servicesNames_ = ""; - - localAddrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - clockOffset_ = 0D; - - if (connectionInfoBuilder_ == null) { - connectionInfo_ = null; - } else { - connectionInfo_ = null; - connectionInfoBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_descriptor; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNodeInfoResponse getDefaultInstanceForType() { - return pactus.network.NetworkOuterClass.GetNodeInfoResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNodeInfoResponse build() { - pactus.network.NetworkOuterClass.GetNodeInfoResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNodeInfoResponse buildPartial() { - pactus.network.NetworkOuterClass.GetNodeInfoResponse result = new pactus.network.NetworkOuterClass.GetNodeInfoResponse(this); - int from_bitField0_ = bitField0_; - result.moniker_ = moniker_; - result.agent_ = agent_; - result.peerId_ = peerId_; - result.startedAt_ = startedAt_; - result.reachability_ = reachability_; - result.services_ = services_; - result.servicesNames_ = servicesNames_; - if (((bitField0_ & 0x00000001) != 0)) { - localAddrs_ = localAddrs_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.localAddrs_ = localAddrs_; - if (((bitField0_ & 0x00000002) != 0)) { - protocols_ = protocols_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.protocols_ = protocols_; - result.clockOffset_ = clockOffset_; - if (connectionInfoBuilder_ == null) { - result.connectionInfo_ = connectionInfo_; - } else { - result.connectionInfo_ = connectionInfoBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.network.NetworkOuterClass.GetNodeInfoResponse) { - return mergeFrom((pactus.network.NetworkOuterClass.GetNodeInfoResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.network.NetworkOuterClass.GetNodeInfoResponse other) { - if (other == pactus.network.NetworkOuterClass.GetNodeInfoResponse.getDefaultInstance()) return this; - if (!other.getMoniker().isEmpty()) { - moniker_ = other.moniker_; - onChanged(); - } - if (!other.getAgent().isEmpty()) { - agent_ = other.agent_; - onChanged(); - } - if (!other.getPeerId().isEmpty()) { - peerId_ = other.peerId_; - onChanged(); - } - if (other.getStartedAt() != 0L) { - setStartedAt(other.getStartedAt()); - } - if (!other.getReachability().isEmpty()) { - reachability_ = other.reachability_; - onChanged(); - } - if (other.getServices() != 0) { - setServices(other.getServices()); - } - if (!other.getServicesNames().isEmpty()) { - servicesNames_ = other.servicesNames_; - onChanged(); - } - if (!other.localAddrs_.isEmpty()) { - if (localAddrs_.isEmpty()) { - localAddrs_ = other.localAddrs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLocalAddrsIsMutable(); - localAddrs_.addAll(other.localAddrs_); - } - onChanged(); - } - if (!other.protocols_.isEmpty()) { - if (protocols_.isEmpty()) { - protocols_ = other.protocols_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureProtocolsIsMutable(); - protocols_.addAll(other.protocols_); - } - onChanged(); - } - if (other.getClockOffset() != 0D) { - setClockOffset(other.getClockOffset()); - } - if (other.hasConnectionInfo()) { - mergeConnectionInfo(other.getConnectionInfo()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - moniker_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - agent_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - peerId_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 32: { - startedAt_ = input.readUInt64(); - - break; - } // case 32 - case 42: { - reachability_ = input.readStringRequireUtf8(); - - break; - } // case 42 - case 48: { - services_ = input.readInt32(); - - break; - } // case 48 - case 58: { - servicesNames_ = input.readStringRequireUtf8(); - - break; - } // case 58 - case 66: { - java.lang.String s = input.readStringRequireUtf8(); - ensureLocalAddrsIsMutable(); - localAddrs_.add(s); - break; - } // case 66 - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - ensureProtocolsIsMutable(); - protocols_.add(s); - break; - } // case 74 - case 105: { - clockOffset_ = input.readDouble(); - - break; - } // case 105 - case 114: { - input.readMessage( - getConnectionInfoFieldBuilder().getBuilder(), - extensionRegistry); - - break; - } // case 114 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object moniker_ = ""; - /** - *
-       * Moniker of the node.
-       * 
- * - * string moniker = 1 [json_name = "moniker"]; - * @return The moniker. - */ - public java.lang.String getMoniker() { - java.lang.Object ref = moniker_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - moniker_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Moniker of the node.
-       * 
- * - * string moniker = 1 [json_name = "moniker"]; - * @return The bytes for moniker. - */ - public com.google.protobuf.ByteString - getMonikerBytes() { - java.lang.Object ref = moniker_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - moniker_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Moniker of the node.
-       * 
- * - * string moniker = 1 [json_name = "moniker"]; - * @param value The moniker to set. - * @return This builder for chaining. - */ - public Builder setMoniker( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - moniker_ = value; - onChanged(); - return this; - } - /** - *
-       * Moniker of the node.
-       * 
- * - * string moniker = 1 [json_name = "moniker"]; - * @return This builder for chaining. - */ - public Builder clearMoniker() { - - moniker_ = getDefaultInstance().getMoniker(); - onChanged(); - return this; - } - /** - *
-       * Moniker of the node.
-       * 
- * - * string moniker = 1 [json_name = "moniker"]; - * @param value The bytes for moniker to set. - * @return This builder for chaining. - */ - public Builder setMonikerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - moniker_ = value; - onChanged(); - return this; - } - - private java.lang.Object agent_ = ""; - /** - *
-       * Agent information of the node.
-       * 
- * - * string agent = 2 [json_name = "agent"]; - * @return The agent. - */ - public java.lang.String getAgent() { - java.lang.Object ref = agent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - agent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Agent information of the node.
-       * 
- * - * string agent = 2 [json_name = "agent"]; - * @return The bytes for agent. - */ - public com.google.protobuf.ByteString - getAgentBytes() { - java.lang.Object ref = agent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - agent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Agent information of the node.
-       * 
- * - * string agent = 2 [json_name = "agent"]; - * @param value The agent to set. - * @return This builder for chaining. - */ - public Builder setAgent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - agent_ = value; - onChanged(); - return this; - } - /** - *
-       * Agent information of the node.
-       * 
- * - * string agent = 2 [json_name = "agent"]; - * @return This builder for chaining. - */ - public Builder clearAgent() { - - agent_ = getDefaultInstance().getAgent(); - onChanged(); - return this; - } - /** - *
-       * Agent information of the node.
-       * 
- * - * string agent = 2 [json_name = "agent"]; - * @param value The bytes for agent to set. - * @return This builder for chaining. - */ - public Builder setAgentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - agent_ = value; - onChanged(); - return this; - } - - private java.lang.Object peerId_ = ""; - /** - *
-       * Peer ID of the node.
-       * 
- * - * string peer_id = 3 [json_name = "peerId"]; - * @return The peerId. - */ - public java.lang.String getPeerId() { - java.lang.Object ref = peerId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - peerId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Peer ID of the node.
-       * 
- * - * string peer_id = 3 [json_name = "peerId"]; - * @return The bytes for peerId. - */ - public com.google.protobuf.ByteString - getPeerIdBytes() { - java.lang.Object ref = peerId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - peerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Peer ID of the node.
-       * 
- * - * string peer_id = 3 [json_name = "peerId"]; - * @param value The peerId to set. - * @return This builder for chaining. - */ - public Builder setPeerId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - peerId_ = value; - onChanged(); - return this; - } - /** - *
-       * Peer ID of the node.
-       * 
- * - * string peer_id = 3 [json_name = "peerId"]; - * @return This builder for chaining. - */ - public Builder clearPeerId() { - - peerId_ = getDefaultInstance().getPeerId(); - onChanged(); - return this; - } - /** - *
-       * Peer ID of the node.
-       * 
- * - * string peer_id = 3 [json_name = "peerId"]; - * @param value The bytes for peerId to set. - * @return This builder for chaining. - */ - public Builder setPeerIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - peerId_ = value; - onChanged(); - return this; - } - - private long startedAt_ ; - /** - *
-       * Timestamp when the node started.
-       * 
- * - * uint64 started_at = 4 [json_name = "startedAt"]; - * @return The startedAt. - */ - @java.lang.Override - public long getStartedAt() { - return startedAt_; - } - /** - *
-       * Timestamp when the node started.
-       * 
- * - * uint64 started_at = 4 [json_name = "startedAt"]; - * @param value The startedAt to set. - * @return This builder for chaining. - */ - public Builder setStartedAt(long value) { - - startedAt_ = value; - onChanged(); - return this; - } - /** - *
-       * Timestamp when the node started.
-       * 
- * - * uint64 started_at = 4 [json_name = "startedAt"]; - * @return This builder for chaining. - */ - public Builder clearStartedAt() { - - startedAt_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object reachability_ = ""; - /** - *
-       * Reachability status of the node.
-       * 
- * - * string reachability = 5 [json_name = "reachability"]; - * @return The reachability. - */ - public java.lang.String getReachability() { - java.lang.Object ref = reachability_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - reachability_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Reachability status of the node.
-       * 
- * - * string reachability = 5 [json_name = "reachability"]; - * @return The bytes for reachability. - */ - public com.google.protobuf.ByteString - getReachabilityBytes() { - java.lang.Object ref = reachability_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - reachability_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Reachability status of the node.
-       * 
- * - * string reachability = 5 [json_name = "reachability"]; - * @param value The reachability to set. - * @return This builder for chaining. - */ - public Builder setReachability( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - reachability_ = value; - onChanged(); - return this; - } - /** - *
-       * Reachability status of the node.
-       * 
- * - * string reachability = 5 [json_name = "reachability"]; - * @return This builder for chaining. - */ - public Builder clearReachability() { - - reachability_ = getDefaultInstance().getReachability(); - onChanged(); - return this; - } - /** - *
-       * Reachability status of the node.
-       * 
- * - * string reachability = 5 [json_name = "reachability"]; - * @param value The bytes for reachability to set. - * @return This builder for chaining. - */ - public Builder setReachabilityBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - reachability_ = value; - onChanged(); - return this; - } - - private int services_ ; - /** - *
-       * A bitfield indicating the services provided by the node.
-       * 
- * - * int32 services = 6 [json_name = "services"]; - * @return The services. - */ - @java.lang.Override - public int getServices() { - return services_; - } - /** - *
-       * A bitfield indicating the services provided by the node.
-       * 
- * - * int32 services = 6 [json_name = "services"]; - * @param value The services to set. - * @return This builder for chaining. - */ - public Builder setServices(int value) { - - services_ = value; - onChanged(); - return this; - } - /** - *
-       * A bitfield indicating the services provided by the node.
-       * 
- * - * int32 services = 6 [json_name = "services"]; - * @return This builder for chaining. - */ - public Builder clearServices() { - - services_ = 0; - onChanged(); - return this; - } - - private java.lang.Object servicesNames_ = ""; - /** - *
-       * Names of services provided by the node.
-       * 
- * - * string services_names = 7 [json_name = "servicesNames"]; - * @return The servicesNames. - */ - public java.lang.String getServicesNames() { - java.lang.Object ref = servicesNames_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - servicesNames_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Names of services provided by the node.
-       * 
- * - * string services_names = 7 [json_name = "servicesNames"]; - * @return The bytes for servicesNames. - */ - public com.google.protobuf.ByteString - getServicesNamesBytes() { - java.lang.Object ref = servicesNames_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - servicesNames_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Names of services provided by the node.
-       * 
- * - * string services_names = 7 [json_name = "servicesNames"]; - * @param value The servicesNames to set. - * @return This builder for chaining. - */ - public Builder setServicesNames( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - servicesNames_ = value; - onChanged(); - return this; - } - /** - *
-       * Names of services provided by the node.
-       * 
- * - * string services_names = 7 [json_name = "servicesNames"]; - * @return This builder for chaining. - */ - public Builder clearServicesNames() { - - servicesNames_ = getDefaultInstance().getServicesNames(); - onChanged(); - return this; - } - /** - *
-       * Names of services provided by the node.
-       * 
- * - * string services_names = 7 [json_name = "servicesNames"]; - * @param value The bytes for servicesNames to set. - * @return This builder for chaining. - */ - public Builder setServicesNamesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - servicesNames_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList localAddrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureLocalAddrsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - localAddrs_ = new com.google.protobuf.LazyStringArrayList(localAddrs_); - bitField0_ |= 0x00000001; - } - } - /** - *
-       * List of addresses associated with the node.
-       * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @return A list containing the localAddrs. - */ - public com.google.protobuf.ProtocolStringList - getLocalAddrsList() { - return localAddrs_.getUnmodifiableView(); - } - /** - *
-       * List of addresses associated with the node.
-       * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @return The count of localAddrs. - */ - public int getLocalAddrsCount() { - return localAddrs_.size(); - } - /** - *
-       * List of addresses associated with the node.
-       * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @param index The index of the element to return. - * @return The localAddrs at the given index. - */ - public java.lang.String getLocalAddrs(int index) { - return localAddrs_.get(index); - } - /** - *
-       * List of addresses associated with the node.
-       * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @param index The index of the value to return. - * @return The bytes of the localAddrs at the given index. - */ - public com.google.protobuf.ByteString - getLocalAddrsBytes(int index) { - return localAddrs_.getByteString(index); - } - /** - *
-       * List of addresses associated with the node.
-       * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @param index The index to set the value at. - * @param value The localAddrs to set. - * @return This builder for chaining. - */ - public Builder setLocalAddrs( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalAddrsIsMutable(); - localAddrs_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * List of addresses associated with the node.
-       * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @param value The localAddrs to add. - * @return This builder for chaining. - */ - public Builder addLocalAddrs( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocalAddrsIsMutable(); - localAddrs_.add(value); - onChanged(); - return this; - } - /** - *
-       * List of addresses associated with the node.
-       * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @param values The localAddrs to add. - * @return This builder for chaining. - */ - public Builder addAllLocalAddrs( - java.lang.Iterable values) { - ensureLocalAddrsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, localAddrs_); - onChanged(); - return this; - } - /** - *
-       * List of addresses associated with the node.
-       * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @return This builder for chaining. - */ - public Builder clearLocalAddrs() { - localAddrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * List of addresses associated with the node.
-       * 
- * - * repeated string local_addrs = 8 [json_name = "localAddrs"]; - * @param value The bytes of the localAddrs to add. - * @return This builder for chaining. - */ - public Builder addLocalAddrsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureLocalAddrsIsMutable(); - localAddrs_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureProtocolsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - protocols_ = new com.google.protobuf.LazyStringArrayList(protocols_); - bitField0_ |= 0x00000002; - } - } - /** - *
-       * List of protocols supported by the node.
-       * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @return A list containing the protocols. - */ - public com.google.protobuf.ProtocolStringList - getProtocolsList() { - return protocols_.getUnmodifiableView(); - } - /** - *
-       * List of protocols supported by the node.
-       * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @return The count of protocols. - */ - public int getProtocolsCount() { - return protocols_.size(); - } - /** - *
-       * List of protocols supported by the node.
-       * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @param index The index of the element to return. - * @return The protocols at the given index. - */ - public java.lang.String getProtocols(int index) { - return protocols_.get(index); - } - /** - *
-       * List of protocols supported by the node.
-       * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @param index The index of the value to return. - * @return The bytes of the protocols at the given index. - */ - public com.google.protobuf.ByteString - getProtocolsBytes(int index) { - return protocols_.getByteString(index); - } - /** - *
-       * List of protocols supported by the node.
-       * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @param index The index to set the value at. - * @param value The protocols to set. - * @return This builder for chaining. - */ - public Builder setProtocols( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProtocolsIsMutable(); - protocols_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * List of protocols supported by the node.
-       * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @param value The protocols to add. - * @return This builder for chaining. - */ - public Builder addProtocols( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProtocolsIsMutable(); - protocols_.add(value); - onChanged(); - return this; - } - /** - *
-       * List of protocols supported by the node.
-       * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @param values The protocols to add. - * @return This builder for chaining. - */ - public Builder addAllProtocols( - java.lang.Iterable values) { - ensureProtocolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, protocols_); - onChanged(); - return this; - } - /** - *
-       * List of protocols supported by the node.
-       * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @return This builder for chaining. - */ - public Builder clearProtocols() { - protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * List of protocols supported by the node.
-       * 
- * - * repeated string protocols = 9 [json_name = "protocols"]; - * @param value The bytes of the protocols to add. - * @return This builder for chaining. - */ - public Builder addProtocolsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureProtocolsIsMutable(); - protocols_.add(value); - onChanged(); - return this; - } - - private double clockOffset_ ; - /** - *
-       * Clock offset of the node.
-       * 
- * - * double clock_offset = 13 [json_name = "clockOffset"]; - * @return The clockOffset. - */ - @java.lang.Override - public double getClockOffset() { - return clockOffset_; - } - /** - *
-       * Clock offset of the node.
-       * 
- * - * double clock_offset = 13 [json_name = "clockOffset"]; - * @param value The clockOffset to set. - * @return This builder for chaining. - */ - public Builder setClockOffset(double value) { - - clockOffset_ = value; - onChanged(); - return this; - } - /** - *
-       * Clock offset of the node.
-       * 
- * - * double clock_offset = 13 [json_name = "clockOffset"]; - * @return This builder for chaining. - */ - public Builder clearClockOffset() { - - clockOffset_ = 0D; - onChanged(); - return this; - } - - private pactus.network.NetworkOuterClass.ConnectionInfo connectionInfo_; - private com.google.protobuf.SingleFieldBuilderV3< - pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder> connectionInfoBuilder_; - /** - *
-       * Information about the node's connections.
-       * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - * @return Whether the connectionInfo field is set. - */ - public boolean hasConnectionInfo() { - return connectionInfoBuilder_ != null || connectionInfo_ != null; - } - /** - *
-       * Information about the node's connections.
-       * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - * @return The connectionInfo. - */ - public pactus.network.NetworkOuterClass.ConnectionInfo getConnectionInfo() { - if (connectionInfoBuilder_ == null) { - return connectionInfo_ == null ? pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_; - } else { - return connectionInfoBuilder_.getMessage(); - } - } - /** - *
-       * Information about the node's connections.
-       * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - */ - public Builder setConnectionInfo(pactus.network.NetworkOuterClass.ConnectionInfo value) { - if (connectionInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - connectionInfo_ = value; - onChanged(); - } else { - connectionInfoBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Information about the node's connections.
-       * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - */ - public Builder setConnectionInfo( - pactus.network.NetworkOuterClass.ConnectionInfo.Builder builderForValue) { - if (connectionInfoBuilder_ == null) { - connectionInfo_ = builderForValue.build(); - onChanged(); - } else { - connectionInfoBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Information about the node's connections.
-       * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - */ - public Builder mergeConnectionInfo(pactus.network.NetworkOuterClass.ConnectionInfo value) { - if (connectionInfoBuilder_ == null) { - if (connectionInfo_ != null) { - connectionInfo_ = - pactus.network.NetworkOuterClass.ConnectionInfo.newBuilder(connectionInfo_).mergeFrom(value).buildPartial(); - } else { - connectionInfo_ = value; - } - onChanged(); - } else { - connectionInfoBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Information about the node's connections.
-       * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - */ - public Builder clearConnectionInfo() { - if (connectionInfoBuilder_ == null) { - connectionInfo_ = null; - onChanged(); - } else { - connectionInfo_ = null; - connectionInfoBuilder_ = null; - } - - return this; - } - /** - *
-       * Information about the node's connections.
-       * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - */ - public pactus.network.NetworkOuterClass.ConnectionInfo.Builder getConnectionInfoBuilder() { - - onChanged(); - return getConnectionInfoFieldBuilder().getBuilder(); - } - /** - *
-       * Information about the node's connections.
-       * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - */ - public pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder() { - if (connectionInfoBuilder_ != null) { - return connectionInfoBuilder_.getMessageOrBuilder(); - } else { - return connectionInfo_ == null ? - pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_; - } - } - /** - *
-       * Information about the node's connections.
-       * 
- * - * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder> - getConnectionInfoFieldBuilder() { - if (connectionInfoBuilder_ == null) { - connectionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder>( - getConnectionInfo(), - getParentForChildren(), - isClean()); - connectionInfo_ = null; - } - return connectionInfoBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetNodeInfoResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetNodeInfoResponse) - private static final pactus.network.NetworkOuterClass.GetNodeInfoResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.GetNodeInfoResponse(); - } - - public static pactus.network.NetworkOuterClass.GetNodeInfoResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNodeInfoResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.GetNodeInfoResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PeerInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.PeerInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Status of the peer.
-     * 
- * - * int32 status = 1 [json_name = "status"]; - * @return The status. - */ - int getStatus(); - - /** - *
-     * Moniker of the peer.
-     * 
- * - * string moniker = 2 [json_name = "moniker"]; - * @return The moniker. - */ - java.lang.String getMoniker(); - /** - *
-     * Moniker of the peer.
-     * 
- * - * string moniker = 2 [json_name = "moniker"]; - * @return The bytes for moniker. - */ - com.google.protobuf.ByteString - getMonikerBytes(); - - /** - *
-     * Agent information of the peer.
-     * 
- * - * string agent = 3 [json_name = "agent"]; - * @return The agent. - */ - java.lang.String getAgent(); - /** - *
-     * Agent information of the peer.
-     * 
- * - * string agent = 3 [json_name = "agent"]; - * @return The bytes for agent. - */ - com.google.protobuf.ByteString - getAgentBytes(); - - /** - *
-     * Peer ID of the peer.
-     * 
- * - * string peer_id = 4 [json_name = "peerId"]; - * @return The peerId. - */ - java.lang.String getPeerId(); - /** - *
-     * Peer ID of the peer.
-     * 
- * - * string peer_id = 4 [json_name = "peerId"]; - * @return The bytes for peerId. - */ - com.google.protobuf.ByteString - getPeerIdBytes(); - - /** - *
-     * Consensus keys used by the peer.
-     * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @return A list containing the consensusKeys. - */ - java.util.List - getConsensusKeysList(); - /** - *
-     * Consensus keys used by the peer.
-     * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @return The count of consensusKeys. - */ - int getConsensusKeysCount(); - /** - *
-     * Consensus keys used by the peer.
-     * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @param index The index of the element to return. - * @return The consensusKeys at the given index. - */ - java.lang.String getConsensusKeys(int index); - /** - *
-     * Consensus keys used by the peer.
-     * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @param index The index of the value to return. - * @return The bytes of the consensusKeys at the given index. - */ - com.google.protobuf.ByteString - getConsensusKeysBytes(int index); - - /** - *
-     * Consensus addresses of the peer.
-     * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @return A list containing the consensusAddresses. - */ - java.util.List - getConsensusAddressesList(); - /** - *
-     * Consensus addresses of the peer.
-     * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @return The count of consensusAddresses. - */ - int getConsensusAddressesCount(); - /** - *
-     * Consensus addresses of the peer.
-     * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @param index The index of the element to return. - * @return The consensusAddresses at the given index. - */ - java.lang.String getConsensusAddresses(int index); - /** - *
-     * Consensus addresses of the peer.
-     * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @param index The index of the value to return. - * @return The bytes of the consensusAddresses at the given index. - */ - com.google.protobuf.ByteString - getConsensusAddressesBytes(int index); - - /** - *
-     * Services provided by the peer.
-     * 
- * - * uint32 services = 7 [json_name = "services"]; - * @return The services. - */ - int getServices(); - - /** - *
-     * Hash of the last block the peer knows.
-     * 
- * - * string last_block_hash = 8 [json_name = "lastBlockHash"]; - * @return The lastBlockHash. - */ - java.lang.String getLastBlockHash(); - /** - *
-     * Hash of the last block the peer knows.
-     * 
- * - * string last_block_hash = 8 [json_name = "lastBlockHash"]; - * @return The bytes for lastBlockHash. - */ - com.google.protobuf.ByteString - getLastBlockHashBytes(); - - /** - *
-     * Blockchain height of the peer.
-     * 
- * - * uint32 height = 9 [json_name = "height"]; - * @return The height. - */ - int getHeight(); - - /** - *
-     * Number of received bundles.
-     * 
- * - * int32 received_bundles = 10 [json_name = "receivedBundles"]; - * @return The receivedBundles. - */ - int getReceivedBundles(); - - /** - *
-     * Number of invalid bundles received.
-     * 
- * - * int32 invalid_bundles = 11 [json_name = "invalidBundles"]; - * @return The invalidBundles. - */ - int getInvalidBundles(); - - /** - *
-     * Timestamp of the last sent bundle.
-     * 
- * - * int64 last_sent = 12 [json_name = "lastSent"]; - * @return The lastSent. - */ - long getLastSent(); - - /** - *
-     * Timestamp of the last received bundle.
-     * 
- * - * int64 last_received = 13 [json_name = "lastReceived"]; - * @return The lastReceived. - */ - long getLastReceived(); - - /** - *
-     * Bytes sent per message type.
-     * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - int getSentBytesCount(); - /** - *
-     * Bytes sent per message type.
-     * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - boolean containsSentBytes( - int key); - /** - * Use {@link #getSentBytesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getSentBytes(); - /** - *
-     * Bytes sent per message type.
-     * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - java.util.Map - getSentBytesMap(); - /** - *
-     * Bytes sent per message type.
-     * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - - long getSentBytesOrDefault( - int key, - long defaultValue); - /** - *
-     * Bytes sent per message type.
-     * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - - long getSentBytesOrThrow( - int key); - - /** - *
-     * Bytes received per message type.
-     * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - int getReceivedBytesCount(); - /** - *
-     * Bytes received per message type.
-     * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - boolean containsReceivedBytes( - int key); - /** - * Use {@link #getReceivedBytesMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getReceivedBytes(); - /** - *
-     * Bytes received per message type.
-     * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - java.util.Map - getReceivedBytesMap(); - /** - *
-     * Bytes received per message type.
-     * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - - long getReceivedBytesOrDefault( - int key, - long defaultValue); - /** - *
-     * Bytes received per message type.
-     * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - - long getReceivedBytesOrThrow( - int key); - - /** - *
-     * Network address of the peer.
-     * 
- * - * string address = 16 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * Network address of the peer.
-     * 
- * - * string address = 16 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - - /** - *
-     * Direction of connection with the peer.
-     * 
- * - * string direction = 17 [json_name = "direction"]; - * @return The direction. - */ - java.lang.String getDirection(); - /** - *
-     * Direction of connection with the peer.
-     * 
- * - * string direction = 17 [json_name = "direction"]; - * @return The bytes for direction. - */ - com.google.protobuf.ByteString - getDirectionBytes(); - - /** - *
-     * List of protocols supported by the peer.
-     * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @return A list containing the protocols. - */ - java.util.List - getProtocolsList(); - /** - *
-     * List of protocols supported by the peer.
-     * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @return The count of protocols. - */ - int getProtocolsCount(); - /** - *
-     * List of protocols supported by the peer.
-     * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @param index The index of the element to return. - * @return The protocols at the given index. - */ - java.lang.String getProtocols(int index); - /** - *
-     * List of protocols supported by the peer.
-     * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @param index The index of the value to return. - * @return The bytes of the protocols at the given index. - */ - com.google.protobuf.ByteString - getProtocolsBytes(int index); - - /** - *
-     * Total download sessions with the peer.
-     * 
- * - * int32 total_sessions = 19 [json_name = "totalSessions"]; - * @return The totalSessions. - */ - int getTotalSessions(); - - /** - *
-     * Completed download sessions with the peer.
-     * 
- * - * int32 completed_sessions = 20 [json_name = "completedSessions"]; - * @return The completedSessions. - */ - int getCompletedSessions(); - } - /** - *
-   * Information about a peer in the network.
-   * 
- * - * Protobuf type {@code pactus.PeerInfo} - */ - public static final class PeerInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.PeerInfo) - PeerInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use PeerInfo.newBuilder() to construct. - private PeerInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PeerInfo() { - moniker_ = ""; - agent_ = ""; - peerId_ = ""; - consensusKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - consensusAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - lastBlockHash_ = ""; - address_ = ""; - direction_ = ""; - protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PeerInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 14: - return internalGetSentBytes(); - case 15: - return internalGetReceivedBytes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.PeerInfo.class, pactus.network.NetworkOuterClass.PeerInfo.Builder.class); - } - - public static final int STATUS_FIELD_NUMBER = 1; - private int status_; - /** - *
-     * Status of the peer.
-     * 
- * - * int32 status = 1 [json_name = "status"]; - * @return The status. - */ - @java.lang.Override - public int getStatus() { - return status_; - } - - public static final int MONIKER_FIELD_NUMBER = 2; - private volatile java.lang.Object moniker_; - /** - *
-     * Moniker of the peer.
-     * 
- * - * string moniker = 2 [json_name = "moniker"]; - * @return The moniker. - */ - @java.lang.Override - public java.lang.String getMoniker() { - java.lang.Object ref = moniker_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - moniker_ = s; - return s; - } - } - /** - *
-     * Moniker of the peer.
-     * 
- * - * string moniker = 2 [json_name = "moniker"]; - * @return The bytes for moniker. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMonikerBytes() { - java.lang.Object ref = moniker_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - moniker_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AGENT_FIELD_NUMBER = 3; - private volatile java.lang.Object agent_; - /** - *
-     * Agent information of the peer.
-     * 
- * - * string agent = 3 [json_name = "agent"]; - * @return The agent. - */ - @java.lang.Override - public java.lang.String getAgent() { - java.lang.Object ref = agent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - agent_ = s; - return s; - } - } - /** - *
-     * Agent information of the peer.
-     * 
- * - * string agent = 3 [json_name = "agent"]; - * @return The bytes for agent. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAgentBytes() { - java.lang.Object ref = agent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - agent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PEER_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object peerId_; - /** - *
-     * Peer ID of the peer.
-     * 
- * - * string peer_id = 4 [json_name = "peerId"]; - * @return The peerId. - */ - @java.lang.Override - public java.lang.String getPeerId() { - java.lang.Object ref = peerId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - peerId_ = s; - return s; - } - } - /** - *
-     * Peer ID of the peer.
-     * 
- * - * string peer_id = 4 [json_name = "peerId"]; - * @return The bytes for peerId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPeerIdBytes() { - java.lang.Object ref = peerId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - peerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONSENSUS_KEYS_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList consensusKeys_; - /** - *
-     * Consensus keys used by the peer.
-     * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @return A list containing the consensusKeys. - */ - public com.google.protobuf.ProtocolStringList - getConsensusKeysList() { - return consensusKeys_; - } - /** - *
-     * Consensus keys used by the peer.
-     * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @return The count of consensusKeys. - */ - public int getConsensusKeysCount() { - return consensusKeys_.size(); - } - /** - *
-     * Consensus keys used by the peer.
-     * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @param index The index of the element to return. - * @return The consensusKeys at the given index. - */ - public java.lang.String getConsensusKeys(int index) { - return consensusKeys_.get(index); - } - /** - *
-     * Consensus keys used by the peer.
-     * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @param index The index of the value to return. - * @return The bytes of the consensusKeys at the given index. - */ - public com.google.protobuf.ByteString - getConsensusKeysBytes(int index) { - return consensusKeys_.getByteString(index); - } - - public static final int CONSENSUS_ADDRESSES_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList consensusAddresses_; - /** - *
-     * Consensus addresses of the peer.
-     * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @return A list containing the consensusAddresses. - */ - public com.google.protobuf.ProtocolStringList - getConsensusAddressesList() { - return consensusAddresses_; - } - /** - *
-     * Consensus addresses of the peer.
-     * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @return The count of consensusAddresses. - */ - public int getConsensusAddressesCount() { - return consensusAddresses_.size(); - } - /** - *
-     * Consensus addresses of the peer.
-     * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @param index The index of the element to return. - * @return The consensusAddresses at the given index. - */ - public java.lang.String getConsensusAddresses(int index) { - return consensusAddresses_.get(index); - } - /** - *
-     * Consensus addresses of the peer.
-     * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @param index The index of the value to return. - * @return The bytes of the consensusAddresses at the given index. - */ - public com.google.protobuf.ByteString - getConsensusAddressesBytes(int index) { - return consensusAddresses_.getByteString(index); - } - - public static final int SERVICES_FIELD_NUMBER = 7; - private int services_; - /** - *
-     * Services provided by the peer.
-     * 
- * - * uint32 services = 7 [json_name = "services"]; - * @return The services. - */ - @java.lang.Override - public int getServices() { - return services_; - } - - public static final int LAST_BLOCK_HASH_FIELD_NUMBER = 8; - private volatile java.lang.Object lastBlockHash_; - /** - *
-     * Hash of the last block the peer knows.
-     * 
- * - * string last_block_hash = 8 [json_name = "lastBlockHash"]; - * @return The lastBlockHash. - */ - @java.lang.Override - public java.lang.String getLastBlockHash() { - java.lang.Object ref = lastBlockHash_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - lastBlockHash_ = s; - return s; - } - } - /** - *
-     * Hash of the last block the peer knows.
-     * 
- * - * string last_block_hash = 8 [json_name = "lastBlockHash"]; - * @return The bytes for lastBlockHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLastBlockHashBytes() { - java.lang.Object ref = lastBlockHash_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lastBlockHash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int HEIGHT_FIELD_NUMBER = 9; - private int height_; - /** - *
-     * Blockchain height of the peer.
-     * 
- * - * uint32 height = 9 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - - public static final int RECEIVED_BUNDLES_FIELD_NUMBER = 10; - private int receivedBundles_; - /** - *
-     * Number of received bundles.
-     * 
- * - * int32 received_bundles = 10 [json_name = "receivedBundles"]; - * @return The receivedBundles. - */ - @java.lang.Override - public int getReceivedBundles() { - return receivedBundles_; - } - - public static final int INVALID_BUNDLES_FIELD_NUMBER = 11; - private int invalidBundles_; - /** - *
-     * Number of invalid bundles received.
-     * 
- * - * int32 invalid_bundles = 11 [json_name = "invalidBundles"]; - * @return The invalidBundles. - */ - @java.lang.Override - public int getInvalidBundles() { - return invalidBundles_; - } - - public static final int LAST_SENT_FIELD_NUMBER = 12; - private long lastSent_; - /** - *
-     * Timestamp of the last sent bundle.
-     * 
- * - * int64 last_sent = 12 [json_name = "lastSent"]; - * @return The lastSent. - */ - @java.lang.Override - public long getLastSent() { - return lastSent_; - } - - public static final int LAST_RECEIVED_FIELD_NUMBER = 13; - private long lastReceived_; - /** - *
-     * Timestamp of the last received bundle.
-     * 
- * - * int64 last_received = 13 [json_name = "lastReceived"]; - * @return The lastReceived. - */ - @java.lang.Override - public long getLastReceived() { - return lastReceived_; - } - - public static final int SENT_BYTES_FIELD_NUMBER = 14; - private static final class SentBytesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Long> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_SentBytesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT64, - 0L); - } - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Long> sentBytes_; - private com.google.protobuf.MapField - internalGetSentBytes() { - if (sentBytes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SentBytesDefaultEntryHolder.defaultEntry); - } - return sentBytes_; - } - - public int getSentBytesCount() { - return internalGetSentBytes().getMap().size(); - } - /** - *
-     * Bytes sent per message type.
-     * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - - @java.lang.Override - public boolean containsSentBytes( - int key) { - - return internalGetSentBytes().getMap().containsKey(key); - } - /** - * Use {@link #getSentBytesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSentBytes() { - return getSentBytesMap(); - } - /** - *
-     * Bytes sent per message type.
-     * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public java.util.Map getSentBytesMap() { - return internalGetSentBytes().getMap(); - } - /** - *
-     * Bytes sent per message type.
-     * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public long getSentBytesOrDefault( - int key, - long defaultValue) { - - java.util.Map map = - internalGetSentBytes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Bytes sent per message type.
-     * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public long getSentBytesOrThrow( - int key) { - - java.util.Map map = - internalGetSentBytes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int RECEIVED_BYTES_FIELD_NUMBER = 15; - private static final class ReceivedBytesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.Integer, java.lang.Long> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_ReceivedBytesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT64, - 0L); - } - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Long> receivedBytes_; - private com.google.protobuf.MapField - internalGetReceivedBytes() { - if (receivedBytes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ReceivedBytesDefaultEntryHolder.defaultEntry); - } - return receivedBytes_; - } - - public int getReceivedBytesCount() { - return internalGetReceivedBytes().getMap().size(); - } - /** - *
-     * Bytes received per message type.
-     * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - - @java.lang.Override - public boolean containsReceivedBytes( - int key) { - - return internalGetReceivedBytes().getMap().containsKey(key); - } - /** - * Use {@link #getReceivedBytesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getReceivedBytes() { - return getReceivedBytesMap(); - } - /** - *
-     * Bytes received per message type.
-     * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public java.util.Map getReceivedBytesMap() { - return internalGetReceivedBytes().getMap(); - } - /** - *
-     * Bytes received per message type.
-     * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public long getReceivedBytesOrDefault( - int key, - long defaultValue) { - - java.util.Map map = - internalGetReceivedBytes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-     * Bytes received per message type.
-     * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public long getReceivedBytesOrThrow( - int key) { - - java.util.Map map = - internalGetReceivedBytes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ADDRESS_FIELD_NUMBER = 16; - private volatile java.lang.Object address_; - /** - *
-     * Network address of the peer.
-     * 
- * - * string address = 16 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * Network address of the peer.
-     * 
- * - * string address = 16 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DIRECTION_FIELD_NUMBER = 17; - private volatile java.lang.Object direction_; - /** - *
-     * Direction of connection with the peer.
-     * 
- * - * string direction = 17 [json_name = "direction"]; - * @return The direction. - */ - @java.lang.Override - public java.lang.String getDirection() { - java.lang.Object ref = direction_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - direction_ = s; - return s; - } - } - /** - *
-     * Direction of connection with the peer.
-     * 
- * - * string direction = 17 [json_name = "direction"]; - * @return The bytes for direction. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDirectionBytes() { - java.lang.Object ref = direction_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - direction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROTOCOLS_FIELD_NUMBER = 18; - private com.google.protobuf.LazyStringList protocols_; - /** - *
-     * List of protocols supported by the peer.
-     * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @return A list containing the protocols. - */ - public com.google.protobuf.ProtocolStringList - getProtocolsList() { - return protocols_; - } - /** - *
-     * List of protocols supported by the peer.
-     * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @return The count of protocols. - */ - public int getProtocolsCount() { - return protocols_.size(); - } - /** - *
-     * List of protocols supported by the peer.
-     * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @param index The index of the element to return. - * @return The protocols at the given index. - */ - public java.lang.String getProtocols(int index) { - return protocols_.get(index); - } - /** - *
-     * List of protocols supported by the peer.
-     * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @param index The index of the value to return. - * @return The bytes of the protocols at the given index. - */ - public com.google.protobuf.ByteString - getProtocolsBytes(int index) { - return protocols_.getByteString(index); - } - - public static final int TOTAL_SESSIONS_FIELD_NUMBER = 19; - private int totalSessions_; - /** - *
-     * Total download sessions with the peer.
-     * 
- * - * int32 total_sessions = 19 [json_name = "totalSessions"]; - * @return The totalSessions. - */ - @java.lang.Override - public int getTotalSessions() { - return totalSessions_; - } - - public static final int COMPLETED_SESSIONS_FIELD_NUMBER = 20; - private int completedSessions_; - /** - *
-     * Completed download sessions with the peer.
-     * 
- * - * int32 completed_sessions = 20 [json_name = "completedSessions"]; - * @return The completedSessions. - */ - @java.lang.Override - public int getCompletedSessions() { - return completedSessions_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (status_ != 0) { - output.writeInt32(1, status_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moniker_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, moniker_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, agent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, peerId_); - } - for (int i = 0; i < consensusKeys_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, consensusKeys_.getRaw(i)); - } - for (int i = 0; i < consensusAddresses_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, consensusAddresses_.getRaw(i)); - } - if (services_ != 0) { - output.writeUInt32(7, services_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastBlockHash_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, lastBlockHash_); - } - if (height_ != 0) { - output.writeUInt32(9, height_); - } - if (receivedBundles_ != 0) { - output.writeInt32(10, receivedBundles_); - } - if (invalidBundles_ != 0) { - output.writeInt32(11, invalidBundles_); - } - if (lastSent_ != 0L) { - output.writeInt64(12, lastSent_); - } - if (lastReceived_ != 0L) { - output.writeInt64(13, lastReceived_); - } - com.google.protobuf.GeneratedMessageV3 - .serializeIntegerMapTo( - output, - internalGetSentBytes(), - SentBytesDefaultEntryHolder.defaultEntry, - 14); - com.google.protobuf.GeneratedMessageV3 - .serializeIntegerMapTo( - output, - internalGetReceivedBytes(), - ReceivedBytesDefaultEntryHolder.defaultEntry, - 15); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 16, address_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(direction_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 17, direction_); - } - for (int i = 0; i < protocols_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 18, protocols_.getRaw(i)); - } - if (totalSessions_ != 0) { - output.writeInt32(19, totalSessions_); - } - if (completedSessions_ != 0) { - output.writeInt32(20, completedSessions_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (status_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, status_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moniker_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, moniker_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, agent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, peerId_); - } - { - int dataSize = 0; - for (int i = 0; i < consensusKeys_.size(); i++) { - dataSize += computeStringSizeNoTag(consensusKeys_.getRaw(i)); - } - size += dataSize; - size += 1 * getConsensusKeysList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < consensusAddresses_.size(); i++) { - dataSize += computeStringSizeNoTag(consensusAddresses_.getRaw(i)); - } - size += dataSize; - size += 1 * getConsensusAddressesList().size(); - } - if (services_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, services_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastBlockHash_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, lastBlockHash_); - } - if (height_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(9, height_); - } - if (receivedBundles_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(10, receivedBundles_); - } - if (invalidBundles_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(11, invalidBundles_); - } - if (lastSent_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(12, lastSent_); - } - if (lastReceived_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(13, lastReceived_); - } - for (java.util.Map.Entry entry - : internalGetSentBytes().getMap().entrySet()) { - com.google.protobuf.MapEntry - sentBytes__ = SentBytesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, sentBytes__); - } - for (java.util.Map.Entry entry - : internalGetReceivedBytes().getMap().entrySet()) { - com.google.protobuf.MapEntry - receivedBytes__ = ReceivedBytesDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, receivedBytes__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, address_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(direction_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, direction_); - } - { - int dataSize = 0; - for (int i = 0; i < protocols_.size(); i++) { - dataSize += computeStringSizeNoTag(protocols_.getRaw(i)); - } - size += dataSize; - size += 2 * getProtocolsList().size(); - } - if (totalSessions_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(19, totalSessions_); - } - if (completedSessions_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(20, completedSessions_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.network.NetworkOuterClass.PeerInfo)) { - return super.equals(obj); - } - pactus.network.NetworkOuterClass.PeerInfo other = (pactus.network.NetworkOuterClass.PeerInfo) obj; - - if (getStatus() - != other.getStatus()) return false; - if (!getMoniker() - .equals(other.getMoniker())) return false; - if (!getAgent() - .equals(other.getAgent())) return false; - if (!getPeerId() - .equals(other.getPeerId())) return false; - if (!getConsensusKeysList() - .equals(other.getConsensusKeysList())) return false; - if (!getConsensusAddressesList() - .equals(other.getConsensusAddressesList())) return false; - if (getServices() - != other.getServices()) return false; - if (!getLastBlockHash() - .equals(other.getLastBlockHash())) return false; - if (getHeight() - != other.getHeight()) return false; - if (getReceivedBundles() - != other.getReceivedBundles()) return false; - if (getInvalidBundles() - != other.getInvalidBundles()) return false; - if (getLastSent() - != other.getLastSent()) return false; - if (getLastReceived() - != other.getLastReceived()) return false; - if (!internalGetSentBytes().equals( - other.internalGetSentBytes())) return false; - if (!internalGetReceivedBytes().equals( - other.internalGetReceivedBytes())) return false; - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getDirection() - .equals(other.getDirection())) return false; - if (!getProtocolsList() - .equals(other.getProtocolsList())) return false; - if (getTotalSessions() - != other.getTotalSessions()) return false; - if (getCompletedSessions() - != other.getCompletedSessions()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + getStatus(); - hash = (37 * hash) + MONIKER_FIELD_NUMBER; - hash = (53 * hash) + getMoniker().hashCode(); - hash = (37 * hash) + AGENT_FIELD_NUMBER; - hash = (53 * hash) + getAgent().hashCode(); - hash = (37 * hash) + PEER_ID_FIELD_NUMBER; - hash = (53 * hash) + getPeerId().hashCode(); - if (getConsensusKeysCount() > 0) { - hash = (37 * hash) + CONSENSUS_KEYS_FIELD_NUMBER; - hash = (53 * hash) + getConsensusKeysList().hashCode(); - } - if (getConsensusAddressesCount() > 0) { - hash = (37 * hash) + CONSENSUS_ADDRESSES_FIELD_NUMBER; - hash = (53 * hash) + getConsensusAddressesList().hashCode(); - } - hash = (37 * hash) + SERVICES_FIELD_NUMBER; - hash = (53 * hash) + getServices(); - hash = (37 * hash) + LAST_BLOCK_HASH_FIELD_NUMBER; - hash = (53 * hash) + getLastBlockHash().hashCode(); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getHeight(); - hash = (37 * hash) + RECEIVED_BUNDLES_FIELD_NUMBER; - hash = (53 * hash) + getReceivedBundles(); - hash = (37 * hash) + INVALID_BUNDLES_FIELD_NUMBER; - hash = (53 * hash) + getInvalidBundles(); - hash = (37 * hash) + LAST_SENT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLastSent()); - hash = (37 * hash) + LAST_RECEIVED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getLastReceived()); - if (!internalGetSentBytes().getMap().isEmpty()) { - hash = (37 * hash) + SENT_BYTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetSentBytes().hashCode(); - } - if (!internalGetReceivedBytes().getMap().isEmpty()) { - hash = (37 * hash) + RECEIVED_BYTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetReceivedBytes().hashCode(); - } - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (37 * hash) + DIRECTION_FIELD_NUMBER; - hash = (53 * hash) + getDirection().hashCode(); - if (getProtocolsCount() > 0) { - hash = (37 * hash) + PROTOCOLS_FIELD_NUMBER; - hash = (53 * hash) + getProtocolsList().hashCode(); - } - hash = (37 * hash) + TOTAL_SESSIONS_FIELD_NUMBER; - hash = (53 * hash) + getTotalSessions(); - hash = (37 * hash) + COMPLETED_SESSIONS_FIELD_NUMBER; - hash = (53 * hash) + getCompletedSessions(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.network.NetworkOuterClass.PeerInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Information about a peer in the network.
-     * 
- * - * Protobuf type {@code pactus.PeerInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.PeerInfo) - pactus.network.NetworkOuterClass.PeerInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 14: - return internalGetSentBytes(); - case 15: - return internalGetReceivedBytes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 14: - return internalGetMutableSentBytes(); - case 15: - return internalGetMutableReceivedBytes(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.PeerInfo.class, pactus.network.NetworkOuterClass.PeerInfo.Builder.class); - } - - // Construct using pactus.network.NetworkOuterClass.PeerInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - status_ = 0; - - moniker_ = ""; - - agent_ = ""; - - peerId_ = ""; - - consensusKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - consensusAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - services_ = 0; - - lastBlockHash_ = ""; - - height_ = 0; - - receivedBundles_ = 0; - - invalidBundles_ = 0; - - lastSent_ = 0L; - - lastReceived_ = 0L; - - internalGetMutableSentBytes().clear(); - internalGetMutableReceivedBytes().clear(); - address_ = ""; - - direction_ = ""; - - protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - totalSessions_ = 0; - - completedSessions_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_descriptor; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.PeerInfo getDefaultInstanceForType() { - return pactus.network.NetworkOuterClass.PeerInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.PeerInfo build() { - pactus.network.NetworkOuterClass.PeerInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.PeerInfo buildPartial() { - pactus.network.NetworkOuterClass.PeerInfo result = new pactus.network.NetworkOuterClass.PeerInfo(this); - int from_bitField0_ = bitField0_; - result.status_ = status_; - result.moniker_ = moniker_; - result.agent_ = agent_; - result.peerId_ = peerId_; - if (((bitField0_ & 0x00000001) != 0)) { - consensusKeys_ = consensusKeys_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.consensusKeys_ = consensusKeys_; - if (((bitField0_ & 0x00000002) != 0)) { - consensusAddresses_ = consensusAddresses_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.consensusAddresses_ = consensusAddresses_; - result.services_ = services_; - result.lastBlockHash_ = lastBlockHash_; - result.height_ = height_; - result.receivedBundles_ = receivedBundles_; - result.invalidBundles_ = invalidBundles_; - result.lastSent_ = lastSent_; - result.lastReceived_ = lastReceived_; - result.sentBytes_ = internalGetSentBytes(); - result.sentBytes_.makeImmutable(); - result.receivedBytes_ = internalGetReceivedBytes(); - result.receivedBytes_.makeImmutable(); - result.address_ = address_; - result.direction_ = direction_; - if (((bitField0_ & 0x00000010) != 0)) { - protocols_ = protocols_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.protocols_ = protocols_; - result.totalSessions_ = totalSessions_; - result.completedSessions_ = completedSessions_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.network.NetworkOuterClass.PeerInfo) { - return mergeFrom((pactus.network.NetworkOuterClass.PeerInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.network.NetworkOuterClass.PeerInfo other) { - if (other == pactus.network.NetworkOuterClass.PeerInfo.getDefaultInstance()) return this; - if (other.getStatus() != 0) { - setStatus(other.getStatus()); - } - if (!other.getMoniker().isEmpty()) { - moniker_ = other.moniker_; - onChanged(); - } - if (!other.getAgent().isEmpty()) { - agent_ = other.agent_; - onChanged(); - } - if (!other.getPeerId().isEmpty()) { - peerId_ = other.peerId_; - onChanged(); - } - if (!other.consensusKeys_.isEmpty()) { - if (consensusKeys_.isEmpty()) { - consensusKeys_ = other.consensusKeys_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConsensusKeysIsMutable(); - consensusKeys_.addAll(other.consensusKeys_); - } - onChanged(); - } - if (!other.consensusAddresses_.isEmpty()) { - if (consensusAddresses_.isEmpty()) { - consensusAddresses_ = other.consensusAddresses_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureConsensusAddressesIsMutable(); - consensusAddresses_.addAll(other.consensusAddresses_); - } - onChanged(); - } - if (other.getServices() != 0) { - setServices(other.getServices()); - } - if (!other.getLastBlockHash().isEmpty()) { - lastBlockHash_ = other.lastBlockHash_; - onChanged(); - } - if (other.getHeight() != 0) { - setHeight(other.getHeight()); - } - if (other.getReceivedBundles() != 0) { - setReceivedBundles(other.getReceivedBundles()); - } - if (other.getInvalidBundles() != 0) { - setInvalidBundles(other.getInvalidBundles()); - } - if (other.getLastSent() != 0L) { - setLastSent(other.getLastSent()); - } - if (other.getLastReceived() != 0L) { - setLastReceived(other.getLastReceived()); - } - internalGetMutableSentBytes().mergeFrom( - other.internalGetSentBytes()); - internalGetMutableReceivedBytes().mergeFrom( - other.internalGetReceivedBytes()); - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - if (!other.getDirection().isEmpty()) { - direction_ = other.direction_; - onChanged(); - } - if (!other.protocols_.isEmpty()) { - if (protocols_.isEmpty()) { - protocols_ = other.protocols_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureProtocolsIsMutable(); - protocols_.addAll(other.protocols_); - } - onChanged(); - } - if (other.getTotalSessions() != 0) { - setTotalSessions(other.getTotalSessions()); - } - if (other.getCompletedSessions() != 0) { - setCompletedSessions(other.getCompletedSessions()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - status_ = input.readInt32(); - - break; - } // case 8 - case 18: { - moniker_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - agent_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: { - peerId_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - ensureConsensusKeysIsMutable(); - consensusKeys_.add(s); - break; - } // case 42 - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - ensureConsensusAddressesIsMutable(); - consensusAddresses_.add(s); - break; - } // case 50 - case 56: { - services_ = input.readUInt32(); - - break; - } // case 56 - case 66: { - lastBlockHash_ = input.readStringRequireUtf8(); - - break; - } // case 66 - case 72: { - height_ = input.readUInt32(); - - break; - } // case 72 - case 80: { - receivedBundles_ = input.readInt32(); - - break; - } // case 80 - case 88: { - invalidBundles_ = input.readInt32(); - - break; - } // case 88 - case 96: { - lastSent_ = input.readInt64(); - - break; - } // case 96 - case 104: { - lastReceived_ = input.readInt64(); - - break; - } // case 104 - case 114: { - com.google.protobuf.MapEntry - sentBytes__ = input.readMessage( - SentBytesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableSentBytes().getMutableMap().put( - sentBytes__.getKey(), sentBytes__.getValue()); - break; - } // case 114 - case 122: { - com.google.protobuf.MapEntry - receivedBytes__ = input.readMessage( - ReceivedBytesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableReceivedBytes().getMutableMap().put( - receivedBytes__.getKey(), receivedBytes__.getValue()); - break; - } // case 122 - case 130: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 130 - case 138: { - direction_ = input.readStringRequireUtf8(); - - break; - } // case 138 - case 146: { - java.lang.String s = input.readStringRequireUtf8(); - ensureProtocolsIsMutable(); - protocols_.add(s); - break; - } // case 146 - case 152: { - totalSessions_ = input.readInt32(); - - break; - } // case 152 - case 160: { - completedSessions_ = input.readInt32(); - - break; - } // case 160 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private int status_ ; - /** - *
-       * Status of the peer.
-       * 
- * - * int32 status = 1 [json_name = "status"]; - * @return The status. - */ - @java.lang.Override - public int getStatus() { - return status_; - } - /** - *
-       * Status of the peer.
-       * 
- * - * int32 status = 1 [json_name = "status"]; - * @param value The status to set. - * @return This builder for chaining. - */ - public Builder setStatus(int value) { - - status_ = value; - onChanged(); - return this; - } - /** - *
-       * Status of the peer.
-       * 
- * - * int32 status = 1 [json_name = "status"]; - * @return This builder for chaining. - */ - public Builder clearStatus() { - - status_ = 0; - onChanged(); - return this; - } - - private java.lang.Object moniker_ = ""; - /** - *
-       * Moniker of the peer.
-       * 
- * - * string moniker = 2 [json_name = "moniker"]; - * @return The moniker. - */ - public java.lang.String getMoniker() { - java.lang.Object ref = moniker_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - moniker_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Moniker of the peer.
-       * 
- * - * string moniker = 2 [json_name = "moniker"]; - * @return The bytes for moniker. - */ - public com.google.protobuf.ByteString - getMonikerBytes() { - java.lang.Object ref = moniker_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - moniker_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Moniker of the peer.
-       * 
- * - * string moniker = 2 [json_name = "moniker"]; - * @param value The moniker to set. - * @return This builder for chaining. - */ - public Builder setMoniker( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - moniker_ = value; - onChanged(); - return this; - } - /** - *
-       * Moniker of the peer.
-       * 
- * - * string moniker = 2 [json_name = "moniker"]; - * @return This builder for chaining. - */ - public Builder clearMoniker() { - - moniker_ = getDefaultInstance().getMoniker(); - onChanged(); - return this; - } - /** - *
-       * Moniker of the peer.
-       * 
- * - * string moniker = 2 [json_name = "moniker"]; - * @param value The bytes for moniker to set. - * @return This builder for chaining. - */ - public Builder setMonikerBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - moniker_ = value; - onChanged(); - return this; - } - - private java.lang.Object agent_ = ""; - /** - *
-       * Agent information of the peer.
-       * 
- * - * string agent = 3 [json_name = "agent"]; - * @return The agent. - */ - public java.lang.String getAgent() { - java.lang.Object ref = agent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - agent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Agent information of the peer.
-       * 
- * - * string agent = 3 [json_name = "agent"]; - * @return The bytes for agent. - */ - public com.google.protobuf.ByteString - getAgentBytes() { - java.lang.Object ref = agent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - agent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Agent information of the peer.
-       * 
- * - * string agent = 3 [json_name = "agent"]; - * @param value The agent to set. - * @return This builder for chaining. - */ - public Builder setAgent( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - agent_ = value; - onChanged(); - return this; - } - /** - *
-       * Agent information of the peer.
-       * 
- * - * string agent = 3 [json_name = "agent"]; - * @return This builder for chaining. - */ - public Builder clearAgent() { - - agent_ = getDefaultInstance().getAgent(); - onChanged(); - return this; - } - /** - *
-       * Agent information of the peer.
-       * 
- * - * string agent = 3 [json_name = "agent"]; - * @param value The bytes for agent to set. - * @return This builder for chaining. - */ - public Builder setAgentBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - agent_ = value; - onChanged(); - return this; - } - - private java.lang.Object peerId_ = ""; - /** - *
-       * Peer ID of the peer.
-       * 
- * - * string peer_id = 4 [json_name = "peerId"]; - * @return The peerId. - */ - public java.lang.String getPeerId() { - java.lang.Object ref = peerId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - peerId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Peer ID of the peer.
-       * 
- * - * string peer_id = 4 [json_name = "peerId"]; - * @return The bytes for peerId. - */ - public com.google.protobuf.ByteString - getPeerIdBytes() { - java.lang.Object ref = peerId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - peerId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Peer ID of the peer.
-       * 
- * - * string peer_id = 4 [json_name = "peerId"]; - * @param value The peerId to set. - * @return This builder for chaining. - */ - public Builder setPeerId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - peerId_ = value; - onChanged(); - return this; - } - /** - *
-       * Peer ID of the peer.
-       * 
- * - * string peer_id = 4 [json_name = "peerId"]; - * @return This builder for chaining. - */ - public Builder clearPeerId() { - - peerId_ = getDefaultInstance().getPeerId(); - onChanged(); - return this; - } - /** - *
-       * Peer ID of the peer.
-       * 
- * - * string peer_id = 4 [json_name = "peerId"]; - * @param value The bytes for peerId to set. - * @return This builder for chaining. - */ - public Builder setPeerIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - peerId_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList consensusKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureConsensusKeysIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - consensusKeys_ = new com.google.protobuf.LazyStringArrayList(consensusKeys_); - bitField0_ |= 0x00000001; - } - } - /** - *
-       * Consensus keys used by the peer.
-       * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @return A list containing the consensusKeys. - */ - public com.google.protobuf.ProtocolStringList - getConsensusKeysList() { - return consensusKeys_.getUnmodifiableView(); - } - /** - *
-       * Consensus keys used by the peer.
-       * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @return The count of consensusKeys. - */ - public int getConsensusKeysCount() { - return consensusKeys_.size(); - } - /** - *
-       * Consensus keys used by the peer.
-       * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @param index The index of the element to return. - * @return The consensusKeys at the given index. - */ - public java.lang.String getConsensusKeys(int index) { - return consensusKeys_.get(index); - } - /** - *
-       * Consensus keys used by the peer.
-       * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @param index The index of the value to return. - * @return The bytes of the consensusKeys at the given index. - */ - public com.google.protobuf.ByteString - getConsensusKeysBytes(int index) { - return consensusKeys_.getByteString(index); - } - /** - *
-       * Consensus keys used by the peer.
-       * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @param index The index to set the value at. - * @param value The consensusKeys to set. - * @return This builder for chaining. - */ - public Builder setConsensusKeys( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsensusKeysIsMutable(); - consensusKeys_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * Consensus keys used by the peer.
-       * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @param value The consensusKeys to add. - * @return This builder for chaining. - */ - public Builder addConsensusKeys( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsensusKeysIsMutable(); - consensusKeys_.add(value); - onChanged(); - return this; - } - /** - *
-       * Consensus keys used by the peer.
-       * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @param values The consensusKeys to add. - * @return This builder for chaining. - */ - public Builder addAllConsensusKeys( - java.lang.Iterable values) { - ensureConsensusKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, consensusKeys_); - onChanged(); - return this; - } - /** - *
-       * Consensus keys used by the peer.
-       * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @return This builder for chaining. - */ - public Builder clearConsensusKeys() { - consensusKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
-       * Consensus keys used by the peer.
-       * 
- * - * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; - * @param value The bytes of the consensusKeys to add. - * @return This builder for chaining. - */ - public Builder addConsensusKeysBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureConsensusKeysIsMutable(); - consensusKeys_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList consensusAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureConsensusAddressesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - consensusAddresses_ = new com.google.protobuf.LazyStringArrayList(consensusAddresses_); - bitField0_ |= 0x00000002; - } - } - /** - *
-       * Consensus addresses of the peer.
-       * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @return A list containing the consensusAddresses. - */ - public com.google.protobuf.ProtocolStringList - getConsensusAddressesList() { - return consensusAddresses_.getUnmodifiableView(); - } - /** - *
-       * Consensus addresses of the peer.
-       * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @return The count of consensusAddresses. - */ - public int getConsensusAddressesCount() { - return consensusAddresses_.size(); - } - /** - *
-       * Consensus addresses of the peer.
-       * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @param index The index of the element to return. - * @return The consensusAddresses at the given index. - */ - public java.lang.String getConsensusAddresses(int index) { - return consensusAddresses_.get(index); - } - /** - *
-       * Consensus addresses of the peer.
-       * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @param index The index of the value to return. - * @return The bytes of the consensusAddresses at the given index. - */ - public com.google.protobuf.ByteString - getConsensusAddressesBytes(int index) { - return consensusAddresses_.getByteString(index); - } - /** - *
-       * Consensus addresses of the peer.
-       * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @param index The index to set the value at. - * @param value The consensusAddresses to set. - * @return This builder for chaining. - */ - public Builder setConsensusAddresses( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsensusAddressesIsMutable(); - consensusAddresses_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * Consensus addresses of the peer.
-       * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @param value The consensusAddresses to add. - * @return This builder for chaining. - */ - public Builder addConsensusAddresses( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureConsensusAddressesIsMutable(); - consensusAddresses_.add(value); - onChanged(); - return this; - } - /** - *
-       * Consensus addresses of the peer.
-       * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @param values The consensusAddresses to add. - * @return This builder for chaining. - */ - public Builder addAllConsensusAddresses( - java.lang.Iterable values) { - ensureConsensusAddressesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, consensusAddresses_); - onChanged(); - return this; - } - /** - *
-       * Consensus addresses of the peer.
-       * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @return This builder for chaining. - */ - public Builder clearConsensusAddresses() { - consensusAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
-       * Consensus addresses of the peer.
-       * 
- * - * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; - * @param value The bytes of the consensusAddresses to add. - * @return This builder for chaining. - */ - public Builder addConsensusAddressesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureConsensusAddressesIsMutable(); - consensusAddresses_.add(value); - onChanged(); - return this; - } - - private int services_ ; - /** - *
-       * Services provided by the peer.
-       * 
- * - * uint32 services = 7 [json_name = "services"]; - * @return The services. - */ - @java.lang.Override - public int getServices() { - return services_; - } - /** - *
-       * Services provided by the peer.
-       * 
- * - * uint32 services = 7 [json_name = "services"]; - * @param value The services to set. - * @return This builder for chaining. - */ - public Builder setServices(int value) { - - services_ = value; - onChanged(); - return this; - } - /** - *
-       * Services provided by the peer.
-       * 
- * - * uint32 services = 7 [json_name = "services"]; - * @return This builder for chaining. - */ - public Builder clearServices() { - - services_ = 0; - onChanged(); - return this; - } - - private java.lang.Object lastBlockHash_ = ""; - /** - *
-       * Hash of the last block the peer knows.
-       * 
- * - * string last_block_hash = 8 [json_name = "lastBlockHash"]; - * @return The lastBlockHash. - */ - public java.lang.String getLastBlockHash() { - java.lang.Object ref = lastBlockHash_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - lastBlockHash_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Hash of the last block the peer knows.
-       * 
- * - * string last_block_hash = 8 [json_name = "lastBlockHash"]; - * @return The bytes for lastBlockHash. - */ - public com.google.protobuf.ByteString - getLastBlockHashBytes() { - java.lang.Object ref = lastBlockHash_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - lastBlockHash_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Hash of the last block the peer knows.
-       * 
- * - * string last_block_hash = 8 [json_name = "lastBlockHash"]; - * @param value The lastBlockHash to set. - * @return This builder for chaining. - */ - public Builder setLastBlockHash( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - lastBlockHash_ = value; - onChanged(); - return this; - } - /** - *
-       * Hash of the last block the peer knows.
-       * 
- * - * string last_block_hash = 8 [json_name = "lastBlockHash"]; - * @return This builder for chaining. - */ - public Builder clearLastBlockHash() { - - lastBlockHash_ = getDefaultInstance().getLastBlockHash(); - onChanged(); - return this; - } - /** - *
-       * Hash of the last block the peer knows.
-       * 
- * - * string last_block_hash = 8 [json_name = "lastBlockHash"]; - * @param value The bytes for lastBlockHash to set. - * @return This builder for chaining. - */ - public Builder setLastBlockHashBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - lastBlockHash_ = value; - onChanged(); - return this; - } - - private int height_ ; - /** - *
-       * Blockchain height of the peer.
-       * 
- * - * uint32 height = 9 [json_name = "height"]; - * @return The height. - */ - @java.lang.Override - public int getHeight() { - return height_; - } - /** - *
-       * Blockchain height of the peer.
-       * 
- * - * uint32 height = 9 [json_name = "height"]; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(int value) { - - height_ = value; - onChanged(); - return this; - } - /** - *
-       * Blockchain height of the peer.
-       * 
- * - * uint32 height = 9 [json_name = "height"]; - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 0; - onChanged(); - return this; - } - - private int receivedBundles_ ; - /** - *
-       * Number of received bundles.
-       * 
- * - * int32 received_bundles = 10 [json_name = "receivedBundles"]; - * @return The receivedBundles. - */ - @java.lang.Override - public int getReceivedBundles() { - return receivedBundles_; - } - /** - *
-       * Number of received bundles.
-       * 
- * - * int32 received_bundles = 10 [json_name = "receivedBundles"]; - * @param value The receivedBundles to set. - * @return This builder for chaining. - */ - public Builder setReceivedBundles(int value) { - - receivedBundles_ = value; - onChanged(); - return this; - } - /** - *
-       * Number of received bundles.
-       * 
- * - * int32 received_bundles = 10 [json_name = "receivedBundles"]; - * @return This builder for chaining. - */ - public Builder clearReceivedBundles() { - - receivedBundles_ = 0; - onChanged(); - return this; - } - - private int invalidBundles_ ; - /** - *
-       * Number of invalid bundles received.
-       * 
- * - * int32 invalid_bundles = 11 [json_name = "invalidBundles"]; - * @return The invalidBundles. - */ - @java.lang.Override - public int getInvalidBundles() { - return invalidBundles_; - } - /** - *
-       * Number of invalid bundles received.
-       * 
- * - * int32 invalid_bundles = 11 [json_name = "invalidBundles"]; - * @param value The invalidBundles to set. - * @return This builder for chaining. - */ - public Builder setInvalidBundles(int value) { - - invalidBundles_ = value; - onChanged(); - return this; - } - /** - *
-       * Number of invalid bundles received.
-       * 
- * - * int32 invalid_bundles = 11 [json_name = "invalidBundles"]; - * @return This builder for chaining. - */ - public Builder clearInvalidBundles() { - - invalidBundles_ = 0; - onChanged(); - return this; - } - - private long lastSent_ ; - /** - *
-       * Timestamp of the last sent bundle.
-       * 
- * - * int64 last_sent = 12 [json_name = "lastSent"]; - * @return The lastSent. - */ - @java.lang.Override - public long getLastSent() { - return lastSent_; - } - /** - *
-       * Timestamp of the last sent bundle.
-       * 
- * - * int64 last_sent = 12 [json_name = "lastSent"]; - * @param value The lastSent to set. - * @return This builder for chaining. - */ - public Builder setLastSent(long value) { - - lastSent_ = value; - onChanged(); - return this; - } - /** - *
-       * Timestamp of the last sent bundle.
-       * 
- * - * int64 last_sent = 12 [json_name = "lastSent"]; - * @return This builder for chaining. - */ - public Builder clearLastSent() { - - lastSent_ = 0L; - onChanged(); - return this; - } - - private long lastReceived_ ; - /** - *
-       * Timestamp of the last received bundle.
-       * 
- * - * int64 last_received = 13 [json_name = "lastReceived"]; - * @return The lastReceived. - */ - @java.lang.Override - public long getLastReceived() { - return lastReceived_; - } - /** - *
-       * Timestamp of the last received bundle.
-       * 
- * - * int64 last_received = 13 [json_name = "lastReceived"]; - * @param value The lastReceived to set. - * @return This builder for chaining. - */ - public Builder setLastReceived(long value) { - - lastReceived_ = value; - onChanged(); - return this; - } - /** - *
-       * Timestamp of the last received bundle.
-       * 
- * - * int64 last_received = 13 [json_name = "lastReceived"]; - * @return This builder for chaining. - */ - public Builder clearLastReceived() { - - lastReceived_ = 0L; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Long> sentBytes_; - private com.google.protobuf.MapField - internalGetSentBytes() { - if (sentBytes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - SentBytesDefaultEntryHolder.defaultEntry); - } - return sentBytes_; - } - private com.google.protobuf.MapField - internalGetMutableSentBytes() { - onChanged();; - if (sentBytes_ == null) { - sentBytes_ = com.google.protobuf.MapField.newMapField( - SentBytesDefaultEntryHolder.defaultEntry); - } - if (!sentBytes_.isMutable()) { - sentBytes_ = sentBytes_.copy(); - } - return sentBytes_; - } - - public int getSentBytesCount() { - return internalGetSentBytes().getMap().size(); - } - /** - *
-       * Bytes sent per message type.
-       * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - - @java.lang.Override - public boolean containsSentBytes( - int key) { - - return internalGetSentBytes().getMap().containsKey(key); - } - /** - * Use {@link #getSentBytesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getSentBytes() { - return getSentBytesMap(); - } - /** - *
-       * Bytes sent per message type.
-       * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public java.util.Map getSentBytesMap() { - return internalGetSentBytes().getMap(); - } - /** - *
-       * Bytes sent per message type.
-       * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public long getSentBytesOrDefault( - int key, - long defaultValue) { - - java.util.Map map = - internalGetSentBytes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * Bytes sent per message type.
-       * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - @java.lang.Override - - public long getSentBytesOrThrow( - int key) { - - java.util.Map map = - internalGetSentBytes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearSentBytes() { - internalGetMutableSentBytes().getMutableMap() - .clear(); - return this; - } - /** - *
-       * Bytes sent per message type.
-       * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - - public Builder removeSentBytes( - int key) { - - internalGetMutableSentBytes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableSentBytes() { - return internalGetMutableSentBytes().getMutableMap(); - } - /** - *
-       * Bytes sent per message type.
-       * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - public Builder putSentBytes( - int key, - long value) { - - - internalGetMutableSentBytes().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * Bytes sent per message type.
-       * 
- * - * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; - */ - - public Builder putAllSentBytes( - java.util.Map values) { - internalGetMutableSentBytes().getMutableMap() - .putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.Integer, java.lang.Long> receivedBytes_; - private com.google.protobuf.MapField - internalGetReceivedBytes() { - if (receivedBytes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ReceivedBytesDefaultEntryHolder.defaultEntry); - } - return receivedBytes_; - } - private com.google.protobuf.MapField - internalGetMutableReceivedBytes() { - onChanged();; - if (receivedBytes_ == null) { - receivedBytes_ = com.google.protobuf.MapField.newMapField( - ReceivedBytesDefaultEntryHolder.defaultEntry); - } - if (!receivedBytes_.isMutable()) { - receivedBytes_ = receivedBytes_.copy(); - } - return receivedBytes_; - } - - public int getReceivedBytesCount() { - return internalGetReceivedBytes().getMap().size(); - } - /** - *
-       * Bytes received per message type.
-       * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - - @java.lang.Override - public boolean containsReceivedBytes( - int key) { - - return internalGetReceivedBytes().getMap().containsKey(key); - } - /** - * Use {@link #getReceivedBytesMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getReceivedBytes() { - return getReceivedBytesMap(); - } - /** - *
-       * Bytes received per message type.
-       * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public java.util.Map getReceivedBytesMap() { - return internalGetReceivedBytes().getMap(); - } - /** - *
-       * Bytes received per message type.
-       * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public long getReceivedBytesOrDefault( - int key, - long defaultValue) { - - java.util.Map map = - internalGetReceivedBytes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - *
-       * Bytes received per message type.
-       * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - @java.lang.Override - - public long getReceivedBytesOrThrow( - int key) { - - java.util.Map map = - internalGetReceivedBytes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearReceivedBytes() { - internalGetMutableReceivedBytes().getMutableMap() - .clear(); - return this; - } - /** - *
-       * Bytes received per message type.
-       * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - - public Builder removeReceivedBytes( - int key) { - - internalGetMutableReceivedBytes().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableReceivedBytes() { - return internalGetMutableReceivedBytes().getMutableMap(); - } - /** - *
-       * Bytes received per message type.
-       * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - public Builder putReceivedBytes( - int key, - long value) { - - - internalGetMutableReceivedBytes().getMutableMap() - .put(key, value); - return this; - } - /** - *
-       * Bytes received per message type.
-       * 
- * - * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; - */ - - public Builder putAllReceivedBytes( - java.util.Map values) { - internalGetMutableReceivedBytes().getMutableMap() - .putAll(values); - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * Network address of the peer.
-       * 
- * - * string address = 16 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Network address of the peer.
-       * 
- * - * string address = 16 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Network address of the peer.
-       * 
- * - * string address = 16 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * Network address of the peer.
-       * 
- * - * string address = 16 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * Network address of the peer.
-       * 
- * - * string address = 16 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - - private java.lang.Object direction_ = ""; - /** - *
-       * Direction of connection with the peer.
-       * 
- * - * string direction = 17 [json_name = "direction"]; - * @return The direction. - */ - public java.lang.String getDirection() { - java.lang.Object ref = direction_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - direction_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Direction of connection with the peer.
-       * 
- * - * string direction = 17 [json_name = "direction"]; - * @return The bytes for direction. - */ - public com.google.protobuf.ByteString - getDirectionBytes() { - java.lang.Object ref = direction_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - direction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Direction of connection with the peer.
-       * 
- * - * string direction = 17 [json_name = "direction"]; - * @param value The direction to set. - * @return This builder for chaining. - */ - public Builder setDirection( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - direction_ = value; - onChanged(); - return this; - } - /** - *
-       * Direction of connection with the peer.
-       * 
- * - * string direction = 17 [json_name = "direction"]; - * @return This builder for chaining. - */ - public Builder clearDirection() { - - direction_ = getDefaultInstance().getDirection(); - onChanged(); - return this; - } - /** - *
-       * Direction of connection with the peer.
-       * 
- * - * string direction = 17 [json_name = "direction"]; - * @param value The bytes for direction to set. - * @return This builder for chaining. - */ - public Builder setDirectionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - direction_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureProtocolsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - protocols_ = new com.google.protobuf.LazyStringArrayList(protocols_); - bitField0_ |= 0x00000010; - } - } - /** - *
-       * List of protocols supported by the peer.
-       * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @return A list containing the protocols. - */ - public com.google.protobuf.ProtocolStringList - getProtocolsList() { - return protocols_.getUnmodifiableView(); - } - /** - *
-       * List of protocols supported by the peer.
-       * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @return The count of protocols. - */ - public int getProtocolsCount() { - return protocols_.size(); - } - /** - *
-       * List of protocols supported by the peer.
-       * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @param index The index of the element to return. - * @return The protocols at the given index. - */ - public java.lang.String getProtocols(int index) { - return protocols_.get(index); - } - /** - *
-       * List of protocols supported by the peer.
-       * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @param index The index of the value to return. - * @return The bytes of the protocols at the given index. - */ - public com.google.protobuf.ByteString - getProtocolsBytes(int index) { - return protocols_.getByteString(index); - } - /** - *
-       * List of protocols supported by the peer.
-       * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @param index The index to set the value at. - * @param value The protocols to set. - * @return This builder for chaining. - */ - public Builder setProtocols( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProtocolsIsMutable(); - protocols_.set(index, value); - onChanged(); - return this; - } - /** - *
-       * List of protocols supported by the peer.
-       * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @param value The protocols to add. - * @return This builder for chaining. - */ - public Builder addProtocols( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureProtocolsIsMutable(); - protocols_.add(value); - onChanged(); - return this; - } - /** - *
-       * List of protocols supported by the peer.
-       * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @param values The protocols to add. - * @return This builder for chaining. - */ - public Builder addAllProtocols( - java.lang.Iterable values) { - ensureProtocolsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, protocols_); - onChanged(); - return this; - } - /** - *
-       * List of protocols supported by the peer.
-       * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @return This builder for chaining. - */ - public Builder clearProtocols() { - protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - *
-       * List of protocols supported by the peer.
-       * 
- * - * repeated string protocols = 18 [json_name = "protocols"]; - * @param value The bytes of the protocols to add. - * @return This builder for chaining. - */ - public Builder addProtocolsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureProtocolsIsMutable(); - protocols_.add(value); - onChanged(); - return this; - } - - private int totalSessions_ ; - /** - *
-       * Total download sessions with the peer.
-       * 
- * - * int32 total_sessions = 19 [json_name = "totalSessions"]; - * @return The totalSessions. - */ - @java.lang.Override - public int getTotalSessions() { - return totalSessions_; - } - /** - *
-       * Total download sessions with the peer.
-       * 
- * - * int32 total_sessions = 19 [json_name = "totalSessions"]; - * @param value The totalSessions to set. - * @return This builder for chaining. - */ - public Builder setTotalSessions(int value) { - - totalSessions_ = value; - onChanged(); - return this; - } - /** - *
-       * Total download sessions with the peer.
-       * 
- * - * int32 total_sessions = 19 [json_name = "totalSessions"]; - * @return This builder for chaining. - */ - public Builder clearTotalSessions() { - - totalSessions_ = 0; - onChanged(); - return this; - } - - private int completedSessions_ ; - /** - *
-       * Completed download sessions with the peer.
-       * 
- * - * int32 completed_sessions = 20 [json_name = "completedSessions"]; - * @return The completedSessions. - */ - @java.lang.Override - public int getCompletedSessions() { - return completedSessions_; - } - /** - *
-       * Completed download sessions with the peer.
-       * 
- * - * int32 completed_sessions = 20 [json_name = "completedSessions"]; - * @param value The completedSessions to set. - * @return This builder for chaining. - */ - public Builder setCompletedSessions(int value) { - - completedSessions_ = value; - onChanged(); - return this; - } - /** - *
-       * Completed download sessions with the peer.
-       * 
- * - * int32 completed_sessions = 20 [json_name = "completedSessions"]; - * @return This builder for chaining. - */ - public Builder clearCompletedSessions() { - - completedSessions_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.PeerInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.PeerInfo) - private static final pactus.network.NetworkOuterClass.PeerInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.PeerInfo(); - } - - public static pactus.network.NetworkOuterClass.PeerInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PeerInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.PeerInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ConnectionInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.ConnectionInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Total number of connections.
-     * 
- * - * uint64 connections = 1 [json_name = "connections"]; - * @return The connections. - */ - long getConnections(); - - /** - *
-     * Number of inbound connections.
-     * 
- * - * uint64 inbound_connections = 2 [json_name = "inboundConnections"]; - * @return The inboundConnections. - */ - long getInboundConnections(); - - /** - *
-     * Number of outbound connections.
-     * 
- * - * uint64 outbound_connections = 3 [json_name = "outboundConnections"]; - * @return The outboundConnections. - */ - long getOutboundConnections(); - } - /** - *
-   * ConnectionInfo contains information about the node's connections.
-   * 
- * - * Protobuf type {@code pactus.ConnectionInfo} - */ - public static final class ConnectionInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.ConnectionInfo) - ConnectionInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConnectionInfo.newBuilder() to construct. - private ConnectionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ConnectionInfo() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ConnectionInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_ConnectionInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_ConnectionInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.ConnectionInfo.class, pactus.network.NetworkOuterClass.ConnectionInfo.Builder.class); - } - - public static final int CONNECTIONS_FIELD_NUMBER = 1; - private long connections_; - /** - *
-     * Total number of connections.
-     * 
- * - * uint64 connections = 1 [json_name = "connections"]; - * @return The connections. - */ - @java.lang.Override - public long getConnections() { - return connections_; - } - - public static final int INBOUND_CONNECTIONS_FIELD_NUMBER = 2; - private long inboundConnections_; - /** - *
-     * Number of inbound connections.
-     * 
- * - * uint64 inbound_connections = 2 [json_name = "inboundConnections"]; - * @return The inboundConnections. - */ - @java.lang.Override - public long getInboundConnections() { - return inboundConnections_; - } - - public static final int OUTBOUND_CONNECTIONS_FIELD_NUMBER = 3; - private long outboundConnections_; - /** - *
-     * Number of outbound connections.
-     * 
- * - * uint64 outbound_connections = 3 [json_name = "outboundConnections"]; - * @return The outboundConnections. - */ - @java.lang.Override - public long getOutboundConnections() { - return outboundConnections_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (connections_ != 0L) { - output.writeUInt64(1, connections_); - } - if (inboundConnections_ != 0L) { - output.writeUInt64(2, inboundConnections_); - } - if (outboundConnections_ != 0L) { - output.writeUInt64(3, outboundConnections_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (connections_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, connections_); - } - if (inboundConnections_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(2, inboundConnections_); - } - if (outboundConnections_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(3, outboundConnections_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.network.NetworkOuterClass.ConnectionInfo)) { - return super.equals(obj); - } - pactus.network.NetworkOuterClass.ConnectionInfo other = (pactus.network.NetworkOuterClass.ConnectionInfo) obj; - - if (getConnections() - != other.getConnections()) return false; - if (getInboundConnections() - != other.getInboundConnections()) return false; - if (getOutboundConnections() - != other.getOutboundConnections()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getConnections()); - hash = (37 * hash) + INBOUND_CONNECTIONS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getInboundConnections()); - hash = (37 * hash) + OUTBOUND_CONNECTIONS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getOutboundConnections()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.network.NetworkOuterClass.ConnectionInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * ConnectionInfo contains information about the node's connections.
-     * 
- * - * Protobuf type {@code pactus.ConnectionInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.ConnectionInfo) - pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.network.NetworkOuterClass.internal_static_pactus_ConnectionInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.network.NetworkOuterClass.internal_static_pactus_ConnectionInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.network.NetworkOuterClass.ConnectionInfo.class, pactus.network.NetworkOuterClass.ConnectionInfo.Builder.class); - } - - // Construct using pactus.network.NetworkOuterClass.ConnectionInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - connections_ = 0L; - - inboundConnections_ = 0L; - - outboundConnections_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.network.NetworkOuterClass.internal_static_pactus_ConnectionInfo_descriptor; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.ConnectionInfo getDefaultInstanceForType() { - return pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.ConnectionInfo build() { - pactus.network.NetworkOuterClass.ConnectionInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.ConnectionInfo buildPartial() { - pactus.network.NetworkOuterClass.ConnectionInfo result = new pactus.network.NetworkOuterClass.ConnectionInfo(this); - result.connections_ = connections_; - result.inboundConnections_ = inboundConnections_; - result.outboundConnections_ = outboundConnections_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.network.NetworkOuterClass.ConnectionInfo) { - return mergeFrom((pactus.network.NetworkOuterClass.ConnectionInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.network.NetworkOuterClass.ConnectionInfo other) { - if (other == pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance()) return this; - if (other.getConnections() != 0L) { - setConnections(other.getConnections()); - } - if (other.getInboundConnections() != 0L) { - setInboundConnections(other.getInboundConnections()); - } - if (other.getOutboundConnections() != 0L) { - setOutboundConnections(other.getOutboundConnections()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - connections_ = input.readUInt64(); - - break; - } // case 8 - case 16: { - inboundConnections_ = input.readUInt64(); - - break; - } // case 16 - case 24: { - outboundConnections_ = input.readUInt64(); - - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private long connections_ ; - /** - *
-       * Total number of connections.
-       * 
- * - * uint64 connections = 1 [json_name = "connections"]; - * @return The connections. - */ - @java.lang.Override - public long getConnections() { - return connections_; - } - /** - *
-       * Total number of connections.
-       * 
- * - * uint64 connections = 1 [json_name = "connections"]; - * @param value The connections to set. - * @return This builder for chaining. - */ - public Builder setConnections(long value) { - - connections_ = value; - onChanged(); - return this; - } - /** - *
-       * Total number of connections.
-       * 
- * - * uint64 connections = 1 [json_name = "connections"]; - * @return This builder for chaining. - */ - public Builder clearConnections() { - - connections_ = 0L; - onChanged(); - return this; - } - - private long inboundConnections_ ; - /** - *
-       * Number of inbound connections.
-       * 
- * - * uint64 inbound_connections = 2 [json_name = "inboundConnections"]; - * @return The inboundConnections. - */ - @java.lang.Override - public long getInboundConnections() { - return inboundConnections_; - } - /** - *
-       * Number of inbound connections.
-       * 
- * - * uint64 inbound_connections = 2 [json_name = "inboundConnections"]; - * @param value The inboundConnections to set. - * @return This builder for chaining. - */ - public Builder setInboundConnections(long value) { - - inboundConnections_ = value; - onChanged(); - return this; - } - /** - *
-       * Number of inbound connections.
-       * 
- * - * uint64 inbound_connections = 2 [json_name = "inboundConnections"]; - * @return This builder for chaining. - */ - public Builder clearInboundConnections() { - - inboundConnections_ = 0L; - onChanged(); - return this; - } - - private long outboundConnections_ ; - /** - *
-       * Number of outbound connections.
-       * 
- * - * uint64 outbound_connections = 3 [json_name = "outboundConnections"]; - * @return The outboundConnections. - */ - @java.lang.Override - public long getOutboundConnections() { - return outboundConnections_; - } - /** - *
-       * Number of outbound connections.
-       * 
- * - * uint64 outbound_connections = 3 [json_name = "outboundConnections"]; - * @param value The outboundConnections to set. - * @return This builder for chaining. - */ - public Builder setOutboundConnections(long value) { - - outboundConnections_ = value; - onChanged(); - return this; - } - /** - *
-       * Number of outbound connections.
-       * 
- * - * uint64 outbound_connections = 3 [json_name = "outboundConnections"]; - * @return This builder for chaining. - */ - public Builder clearOutboundConnections() { - - outboundConnections_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.ConnectionInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.ConnectionInfo) - private static final pactus.network.NetworkOuterClass.ConnectionInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.ConnectionInfo(); - } - - public static pactus.network.NetworkOuterClass.ConnectionInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConnectionInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.network.NetworkOuterClass.ConnectionInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetNetworkInfoRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetNetworkInfoResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetNodeInfoRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetNodeInfoResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_PeerInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_PeerInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_PeerInfo_SentBytesEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_PeerInfo_SentBytesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_PeerInfo_ReceivedBytesEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_PeerInfo_ReceivedBytesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_ConnectionInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_ConnectionInfo_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\rnetwork.proto\022\006pactus\">\n\025GetNetworkInf" + - "oRequest\022%\n\016only_connected\030\001 \001(\010R\ronlyCo" + - "nnected\"\256\004\n\026GetNetworkInfoResponse\022!\n\014ne" + - "twork_name\030\001 \001(\tR\013networkName\022(\n\020total_s" + - "ent_bytes\030\002 \001(\003R\016totalSentBytes\0220\n\024total" + - "_received_bytes\030\003 \001(\003R\022totalReceivedByte" + - "s\0222\n\025connected_peers_count\030\004 \001(\rR\023connec" + - "tedPeersCount\0229\n\017connected_peers\030\005 \003(\0132\020" + - ".pactus.PeerInfoR\016connectedPeers\022L\n\nsent" + - "_bytes\030\006 \003(\0132-.pactus.GetNetworkInfoResp" + - "onse.SentBytesEntryR\tsentBytes\022X\n\016receiv" + - "ed_bytes\030\007 \003(\01321.pactus.GetNetworkInfoRe" + - "sponse.ReceivedBytesEntryR\rreceivedBytes" + - "\032<\n\016SentBytesEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005" + - "value\030\002 \001(\003R\005value:\0028\001\032@\n\022ReceivedBytesE" + - "ntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\003R\005v" + - "alue:\0028\001\"\024\n\022GetNodeInfoRequest\"\207\003\n\023GetNo" + - "deInfoResponse\022\030\n\007moniker\030\001 \001(\tR\007moniker" + - "\022\024\n\005agent\030\002 \001(\tR\005agent\022\027\n\007peer_id\030\003 \001(\tR" + - "\006peerId\022\035\n\nstarted_at\030\004 \001(\004R\tstartedAt\022\"" + - "\n\014reachability\030\005 \001(\tR\014reachability\022\032\n\010se" + - "rvices\030\006 \001(\005R\010services\022%\n\016services_names" + - "\030\007 \001(\tR\rservicesNames\022\037\n\013local_addrs\030\010 \003" + - "(\tR\nlocalAddrs\022\034\n\tprotocols\030\t \003(\tR\tproto" + - "cols\022!\n\014clock_offset\030\r \001(\001R\013clockOffset\022" + - "?\n\017connection_info\030\016 \001(\0132\026.pactus.Connec" + - "tionInfoR\016connectionInfo\"\355\006\n\010PeerInfo\022\026\n" + - "\006status\030\001 \001(\005R\006status\022\030\n\007moniker\030\002 \001(\tR\007" + - "moniker\022\024\n\005agent\030\003 \001(\tR\005agent\022\027\n\007peer_id" + - "\030\004 \001(\tR\006peerId\022%\n\016consensus_keys\030\005 \003(\tR\r" + - "consensusKeys\022/\n\023consensus_addresses\030\006 \003" + - "(\tR\022consensusAddresses\022\032\n\010services\030\007 \001(\r" + - "R\010services\022&\n\017last_block_hash\030\010 \001(\tR\rlas" + - "tBlockHash\022\026\n\006height\030\t \001(\rR\006height\022)\n\020re" + - "ceived_bundles\030\n \001(\005R\017receivedBundles\022\'\n" + - "\017invalid_bundles\030\013 \001(\005R\016invalidBundles\022\033" + - "\n\tlast_sent\030\014 \001(\003R\010lastSent\022#\n\rlast_rece" + - "ived\030\r \001(\003R\014lastReceived\022>\n\nsent_bytes\030\016" + - " \003(\0132\037.pactus.PeerInfo.SentBytesEntryR\ts" + - "entBytes\022J\n\016received_bytes\030\017 \003(\0132#.pactu" + - "s.PeerInfo.ReceivedBytesEntryR\rreceivedB" + - "ytes\022\030\n\007address\030\020 \001(\tR\007address\022\034\n\tdirect" + - "ion\030\021 \001(\tR\tdirection\022\034\n\tprotocols\030\022 \003(\tR" + - "\tprotocols\022%\n\016total_sessions\030\023 \001(\005R\rtota" + - "lSessions\022-\n\022completed_sessions\030\024 \001(\005R\021c" + - "ompletedSessions\032<\n\016SentBytesEntry\022\020\n\003ke" + - "y\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\003R\005value:\0028\001\032@" + - "\n\022ReceivedBytesEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024" + - "\n\005value\030\002 \001(\003R\005value:\0028\001\"\226\001\n\016ConnectionI" + - "nfo\022 \n\013connections\030\001 \001(\004R\013connections\022/\n" + - "\023inbound_connections\030\002 \001(\004R\022inboundConne" + - "ctions\0221\n\024outbound_connections\030\003 \001(\004R\023ou" + - "tboundConnections2\242\001\n\007Network\022O\n\016GetNetw" + - "orkInfo\022\035.pactus.GetNetworkInfoRequest\032\036" + - ".pactus.GetNetworkInfoResponse\022F\n\013GetNod" + - "eInfo\022\032.pactus.GetNodeInfoRequest\032\033.pact" + - "us.GetNodeInfoResponseBB\n\016pactus.network" + - "Z0github.com/pactus-project/pactus/www/g" + - "rpc/pactusb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_pactus_GetNetworkInfoRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetNetworkInfoRequest_descriptor, - new java.lang.String[] { "OnlyConnected", }); - internal_static_pactus_GetNetworkInfoResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetNetworkInfoResponse_descriptor, - new java.lang.String[] { "NetworkName", "TotalSentBytes", "TotalReceivedBytes", "ConnectedPeersCount4", "ConnectedPeers5", "SentBytes", "ReceivedBytes", }); - internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_descriptor = - internal_static_pactus_GetNetworkInfoResponse_descriptor.getNestedTypes().get(0); - internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_descriptor = - internal_static_pactus_GetNetworkInfoResponse_descriptor.getNestedTypes().get(1); - internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_pactus_GetNodeInfoRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetNodeInfoRequest_descriptor, - new java.lang.String[] { }); - internal_static_pactus_GetNodeInfoResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetNodeInfoResponse_descriptor, - new java.lang.String[] { "Moniker", "Agent", "PeerId", "StartedAt", "Reachability", "Services", "ServicesNames", "LocalAddrs", "Protocols", "ClockOffset", "ConnectionInfo", }); - internal_static_pactus_PeerInfo_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_pactus_PeerInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_PeerInfo_descriptor, - new java.lang.String[] { "Status", "Moniker", "Agent", "PeerId", "ConsensusKeys", "ConsensusAddresses", "Services", "LastBlockHash", "Height", "ReceivedBundles", "InvalidBundles", "LastSent", "LastReceived", "SentBytes", "ReceivedBytes", "Address", "Direction", "Protocols", "TotalSessions", "CompletedSessions", }); - internal_static_pactus_PeerInfo_SentBytesEntry_descriptor = - internal_static_pactus_PeerInfo_descriptor.getNestedTypes().get(0); - internal_static_pactus_PeerInfo_SentBytesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_PeerInfo_SentBytesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_pactus_PeerInfo_ReceivedBytesEntry_descriptor = - internal_static_pactus_PeerInfo_descriptor.getNestedTypes().get(1); - internal_static_pactus_PeerInfo_ReceivedBytesEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_PeerInfo_ReceivedBytesEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_pactus_ConnectionInfo_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_pactus_ConnectionInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_ConnectionInfo_descriptor, - new java.lang.String[] { "Connections", "InboundConnections", "OutboundConnections", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java b/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java deleted file mode 100644 index 159e34a58..000000000 --- a/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java +++ /dev/null @@ -1,832 +0,0 @@ -package pactus.transaction; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Transaction service defines various RPC methods for interacting with
- * transactions.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.50.2)", - comments = "Source: transaction.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class TransactionGrpc { - - private TransactionGrpc() {} - - public static final String SERVICE_NAME = "pactus.Transaction"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getGetTransactionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTransaction", - requestType = pactus.transaction.TransactionOuterClass.GetTransactionRequest.class, - responseType = pactus.transaction.TransactionOuterClass.GetTransactionResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetTransactionMethod() { - io.grpc.MethodDescriptor getGetTransactionMethod; - if ((getGetTransactionMethod = TransactionGrpc.getGetTransactionMethod) == null) { - synchronized (TransactionGrpc.class) { - if ((getGetTransactionMethod = TransactionGrpc.getGetTransactionMethod) == null) { - TransactionGrpc.getGetTransactionMethod = getGetTransactionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransaction")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.GetTransactionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.GetTransactionResponse.getDefaultInstance())) - .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetTransaction")) - .build(); - } - } - } - return getGetTransactionMethod; - } - - private static volatile io.grpc.MethodDescriptor getCalculateFeeMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CalculateFee", - requestType = pactus.transaction.TransactionOuterClass.CalculateFeeRequest.class, - responseType = pactus.transaction.TransactionOuterClass.CalculateFeeResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCalculateFeeMethod() { - io.grpc.MethodDescriptor getCalculateFeeMethod; - if ((getCalculateFeeMethod = TransactionGrpc.getCalculateFeeMethod) == null) { - synchronized (TransactionGrpc.class) { - if ((getCalculateFeeMethod = TransactionGrpc.getCalculateFeeMethod) == null) { - TransactionGrpc.getCalculateFeeMethod = getCalculateFeeMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CalculateFee")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.CalculateFeeRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.CalculateFeeResponse.getDefaultInstance())) - .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("CalculateFee")) - .build(); - } - } - } - return getCalculateFeeMethod; - } - - private static volatile io.grpc.MethodDescriptor getBroadcastTransactionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BroadcastTransaction", - requestType = pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.class, - responseType = pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getBroadcastTransactionMethod() { - io.grpc.MethodDescriptor getBroadcastTransactionMethod; - if ((getBroadcastTransactionMethod = TransactionGrpc.getBroadcastTransactionMethod) == null) { - synchronized (TransactionGrpc.class) { - if ((getBroadcastTransactionMethod = TransactionGrpc.getBroadcastTransactionMethod) == null) { - TransactionGrpc.getBroadcastTransactionMethod = getBroadcastTransactionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BroadcastTransaction")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.getDefaultInstance())) - .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("BroadcastTransaction")) - .build(); - } - } - } - return getBroadcastTransactionMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetRawTransferTransactionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetRawTransferTransaction", - requestType = pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.class, - responseType = pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetRawTransferTransactionMethod() { - io.grpc.MethodDescriptor getGetRawTransferTransactionMethod; - if ((getGetRawTransferTransactionMethod = TransactionGrpc.getGetRawTransferTransactionMethod) == null) { - synchronized (TransactionGrpc.class) { - if ((getGetRawTransferTransactionMethod = TransactionGrpc.getGetRawTransferTransactionMethod) == null) { - TransactionGrpc.getGetRawTransferTransactionMethod = getGetRawTransferTransactionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRawTransferTransaction")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance())) - .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetRawTransferTransaction")) - .build(); - } - } - } - return getGetRawTransferTransactionMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetRawBondTransactionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetRawBondTransaction", - requestType = pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.class, - responseType = pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetRawBondTransactionMethod() { - io.grpc.MethodDescriptor getGetRawBondTransactionMethod; - if ((getGetRawBondTransactionMethod = TransactionGrpc.getGetRawBondTransactionMethod) == null) { - synchronized (TransactionGrpc.class) { - if ((getGetRawBondTransactionMethod = TransactionGrpc.getGetRawBondTransactionMethod) == null) { - TransactionGrpc.getGetRawBondTransactionMethod = getGetRawBondTransactionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRawBondTransaction")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance())) - .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetRawBondTransaction")) - .build(); - } - } - } - return getGetRawBondTransactionMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetRawUnbondTransactionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetRawUnbondTransaction", - requestType = pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.class, - responseType = pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetRawUnbondTransactionMethod() { - io.grpc.MethodDescriptor getGetRawUnbondTransactionMethod; - if ((getGetRawUnbondTransactionMethod = TransactionGrpc.getGetRawUnbondTransactionMethod) == null) { - synchronized (TransactionGrpc.class) { - if ((getGetRawUnbondTransactionMethod = TransactionGrpc.getGetRawUnbondTransactionMethod) == null) { - TransactionGrpc.getGetRawUnbondTransactionMethod = getGetRawUnbondTransactionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRawUnbondTransaction")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance())) - .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetRawUnbondTransaction")) - .build(); - } - } - } - return getGetRawUnbondTransactionMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetRawWithdrawTransactionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetRawWithdrawTransaction", - requestType = pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, - responseType = pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetRawWithdrawTransactionMethod() { - io.grpc.MethodDescriptor getGetRawWithdrawTransactionMethod; - if ((getGetRawWithdrawTransactionMethod = TransactionGrpc.getGetRawWithdrawTransactionMethod) == null) { - synchronized (TransactionGrpc.class) { - if ((getGetRawWithdrawTransactionMethod = TransactionGrpc.getGetRawWithdrawTransactionMethod) == null) { - TransactionGrpc.getGetRawWithdrawTransactionMethod = getGetRawWithdrawTransactionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRawWithdrawTransaction")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance())) - .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetRawWithdrawTransaction")) - .build(); - } - } - } - return getGetRawWithdrawTransactionMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static TransactionStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public TransactionStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TransactionStub(channel, callOptions); - } - }; - return TransactionStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static TransactionBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public TransactionBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TransactionBlockingStub(channel, callOptions); - } - }; - return TransactionBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static TransactionFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public TransactionFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TransactionFutureStub(channel, callOptions); - } - }; - return TransactionFutureStub.newStub(factory, channel); - } - - /** - *
-   * Transaction service defines various RPC methods for interacting with
-   * transactions.
-   * 
- */ - public static abstract class TransactionImplBase implements io.grpc.BindableService { - - /** - *
-     * GetTransaction retrieves transaction details based on the provided request
-     * parameters.
-     * 
- */ - public void getTransaction(pactus.transaction.TransactionOuterClass.GetTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTransactionMethod(), responseObserver); - } - - /** - *
-     * CalculateFee calculates the transaction fee based on the specified amount
-     * and payload type.
-     * 
- */ - public void calculateFee(pactus.transaction.TransactionOuterClass.CalculateFeeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCalculateFeeMethod(), responseObserver); - } - - /** - *
-     * BroadcastTransaction broadcasts a signed transaction to the network.
-     * 
- */ - public void broadcastTransaction(pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBroadcastTransactionMethod(), responseObserver); - } - - /** - *
-     * GetRawTransferTransaction retrieves raw details of a transfer transaction.
-     * 
- */ - public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawTransferTransactionMethod(), responseObserver); - } - - /** - *
-     * GetRawBondTransaction retrieves raw details of a bond transaction.
-     * 
- */ - public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawBondTransactionMethod(), responseObserver); - } - - /** - *
-     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.
-     * 
- */ - public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawUnbondTransactionMethod(), responseObserver); - } - - /** - *
-     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
-     * 
- */ - public void getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawWithdrawTransactionMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetTransactionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.transaction.TransactionOuterClass.GetTransactionRequest, - pactus.transaction.TransactionOuterClass.GetTransactionResponse>( - this, METHODID_GET_TRANSACTION))) - .addMethod( - getCalculateFeeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.transaction.TransactionOuterClass.CalculateFeeRequest, - pactus.transaction.TransactionOuterClass.CalculateFeeResponse>( - this, METHODID_CALCULATE_FEE))) - .addMethod( - getBroadcastTransactionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest, - pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse>( - this, METHODID_BROADCAST_TRANSACTION))) - .addMethod( - getGetRawTransferTransactionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest, - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse>( - this, METHODID_GET_RAW_TRANSFER_TRANSACTION))) - .addMethod( - getGetRawBondTransactionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest, - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse>( - this, METHODID_GET_RAW_BOND_TRANSACTION))) - .addMethod( - getGetRawUnbondTransactionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest, - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse>( - this, METHODID_GET_RAW_UNBOND_TRANSACTION))) - .addMethod( - getGetRawWithdrawTransactionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest, - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse>( - this, METHODID_GET_RAW_WITHDRAW_TRANSACTION))) - .build(); - } - } - - /** - *
-   * Transaction service defines various RPC methods for interacting with
-   * transactions.
-   * 
- */ - public static final class TransactionStub extends io.grpc.stub.AbstractAsyncStub { - private TransactionStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected TransactionStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TransactionStub(channel, callOptions); - } - - /** - *
-     * GetTransaction retrieves transaction details based on the provided request
-     * parameters.
-     * 
- */ - public void getTransaction(pactus.transaction.TransactionOuterClass.GetTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetTransactionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * CalculateFee calculates the transaction fee based on the specified amount
-     * and payload type.
-     * 
- */ - public void calculateFee(pactus.transaction.TransactionOuterClass.CalculateFeeRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCalculateFeeMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * BroadcastTransaction broadcasts a signed transaction to the network.
-     * 
- */ - public void broadcastTransaction(pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getBroadcastTransactionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetRawTransferTransaction retrieves raw details of a transfer transaction.
-     * 
- */ - public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetRawTransferTransactionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetRawBondTransaction retrieves raw details of a bond transaction.
-     * 
- */ - public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetRawBondTransactionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.
-     * 
- */ - public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetRawUnbondTransactionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
-     * 
- */ - public void getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetRawWithdrawTransactionMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Transaction service defines various RPC methods for interacting with
-   * transactions.
-   * 
- */ - public static final class TransactionBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private TransactionBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected TransactionBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TransactionBlockingStub(channel, callOptions); - } - - /** - *
-     * GetTransaction retrieves transaction details based on the provided request
-     * parameters.
-     * 
- */ - public pactus.transaction.TransactionOuterClass.GetTransactionResponse getTransaction(pactus.transaction.TransactionOuterClass.GetTransactionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetTransactionMethod(), getCallOptions(), request); - } - - /** - *
-     * CalculateFee calculates the transaction fee based on the specified amount
-     * and payload type.
-     * 
- */ - public pactus.transaction.TransactionOuterClass.CalculateFeeResponse calculateFee(pactus.transaction.TransactionOuterClass.CalculateFeeRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCalculateFeeMethod(), getCallOptions(), request); - } - - /** - *
-     * BroadcastTransaction broadcasts a signed transaction to the network.
-     * 
- */ - public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse broadcastTransaction(pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getBroadcastTransactionMethod(), getCallOptions(), request); - } - - /** - *
-     * GetRawTransferTransaction retrieves raw details of a transfer transaction.
-     * 
- */ - public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetRawTransferTransactionMethod(), getCallOptions(), request); - } - - /** - *
-     * GetRawBondTransaction retrieves raw details of a bond transaction.
-     * 
- */ - public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetRawBondTransactionMethod(), getCallOptions(), request); - } - - /** - *
-     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.
-     * 
- */ - public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetRawUnbondTransactionMethod(), getCallOptions(), request); - } - - /** - *
-     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
-     * 
- */ - public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetRawWithdrawTransactionMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Transaction service defines various RPC methods for interacting with
-   * transactions.
-   * 
- */ - public static final class TransactionFutureStub extends io.grpc.stub.AbstractFutureStub { - private TransactionFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected TransactionFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new TransactionFutureStub(channel, callOptions); - } - - /** - *
-     * GetTransaction retrieves transaction details based on the provided request
-     * parameters.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getTransaction( - pactus.transaction.TransactionOuterClass.GetTransactionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetTransactionMethod(), getCallOptions()), request); - } - - /** - *
-     * CalculateFee calculates the transaction fee based on the specified amount
-     * and payload type.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture calculateFee( - pactus.transaction.TransactionOuterClass.CalculateFeeRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCalculateFeeMethod(), getCallOptions()), request); - } - - /** - *
-     * BroadcastTransaction broadcasts a signed transaction to the network.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture broadcastTransaction( - pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getBroadcastTransactionMethod(), getCallOptions()), request); - } - - /** - *
-     * GetRawTransferTransaction retrieves raw details of a transfer transaction.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getRawTransferTransaction( - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetRawTransferTransactionMethod(), getCallOptions()), request); - } - - /** - *
-     * GetRawBondTransaction retrieves raw details of a bond transaction.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getRawBondTransaction( - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetRawBondTransactionMethod(), getCallOptions()), request); - } - - /** - *
-     * GetRawUnbondTransaction retrieves raw details of an unbond transaction.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getRawUnbondTransaction( - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetRawUnbondTransactionMethod(), getCallOptions()), request); - } - - /** - *
-     * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getRawWithdrawTransaction( - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetRawWithdrawTransactionMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_TRANSACTION = 0; - private static final int METHODID_CALCULATE_FEE = 1; - private static final int METHODID_BROADCAST_TRANSACTION = 2; - private static final int METHODID_GET_RAW_TRANSFER_TRANSACTION = 3; - private static final int METHODID_GET_RAW_BOND_TRANSACTION = 4; - private static final int METHODID_GET_RAW_UNBOND_TRANSACTION = 5; - private static final int METHODID_GET_RAW_WITHDRAW_TRANSACTION = 6; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final TransactionImplBase serviceImpl; - private final int methodId; - - MethodHandlers(TransactionImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_GET_TRANSACTION: - serviceImpl.getTransaction((pactus.transaction.TransactionOuterClass.GetTransactionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CALCULATE_FEE: - serviceImpl.calculateFee((pactus.transaction.TransactionOuterClass.CalculateFeeRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_BROADCAST_TRANSACTION: - serviceImpl.broadcastTransaction((pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_RAW_TRANSFER_TRANSACTION: - serviceImpl.getRawTransferTransaction((pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_RAW_BOND_TRANSACTION: - serviceImpl.getRawBondTransaction((pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_RAW_UNBOND_TRANSACTION: - serviceImpl.getRawUnbondTransaction((pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_RAW_WITHDRAW_TRANSACTION: - serviceImpl.getRawWithdrawTransaction((pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class TransactionBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - TransactionBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return pactus.transaction.TransactionOuterClass.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Transaction"); - } - } - - private static final class TransactionFileDescriptorSupplier - extends TransactionBaseDescriptorSupplier { - TransactionFileDescriptorSupplier() {} - } - - private static final class TransactionMethodDescriptorSupplier - extends TransactionBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - TransactionMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (TransactionGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new TransactionFileDescriptorSupplier()) - .addMethod(getGetTransactionMethod()) - .addMethod(getCalculateFeeMethod()) - .addMethod(getBroadcastTransactionMethod()) - .addMethod(getGetRawTransferTransactionMethod()) - .addMethod(getGetRawBondTransactionMethod()) - .addMethod(getGetRawUnbondTransactionMethod()) - .addMethod(getGetRawWithdrawTransactionMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java deleted file mode 100644 index 74863a534..000000000 --- a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java +++ /dev/null @@ -1,17403 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: transaction.proto - -package pactus.transaction; - -public final class TransactionOuterClass { - private TransactionOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - *
-   * Enumeration for different types of transaction payloads.
-   * 
- * - * Protobuf enum {@code pactus.PayloadType} - */ - public enum PayloadType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Unknown payload type.
-     * 
- * - * UNKNOWN = 0; - */ - UNKNOWN(0), - /** - *
-     * Transfer payload type.
-     * 
- * - * TRANSFER_PAYLOAD = 1; - */ - TRANSFER_PAYLOAD(1), - /** - *
-     * Bond payload type.
-     * 
- * - * BOND_PAYLOAD = 2; - */ - BOND_PAYLOAD(2), - /** - *
-     * Sortition payload type.
-     * 
- * - * SORTITION_PAYLOAD = 3; - */ - SORTITION_PAYLOAD(3), - /** - *
-     * Unbond payload type.
-     * 
- * - * UNBOND_PAYLOAD = 4; - */ - UNBOND_PAYLOAD(4), - /** - *
-     * Withdraw payload type.
-     * 
- * - * WITHDRAW_PAYLOAD = 5; - */ - WITHDRAW_PAYLOAD(5), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Unknown payload type.
-     * 
- * - * UNKNOWN = 0; - */ - public static final int UNKNOWN_VALUE = 0; - /** - *
-     * Transfer payload type.
-     * 
- * - * TRANSFER_PAYLOAD = 1; - */ - public static final int TRANSFER_PAYLOAD_VALUE = 1; - /** - *
-     * Bond payload type.
-     * 
- * - * BOND_PAYLOAD = 2; - */ - public static final int BOND_PAYLOAD_VALUE = 2; - /** - *
-     * Sortition payload type.
-     * 
- * - * SORTITION_PAYLOAD = 3; - */ - public static final int SORTITION_PAYLOAD_VALUE = 3; - /** - *
-     * Unbond payload type.
-     * 
- * - * UNBOND_PAYLOAD = 4; - */ - public static final int UNBOND_PAYLOAD_VALUE = 4; - /** - *
-     * Withdraw payload type.
-     * 
- * - * WITHDRAW_PAYLOAD = 5; - */ - public static final int WITHDRAW_PAYLOAD_VALUE = 5; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PayloadType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static PayloadType forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return TRANSFER_PAYLOAD; - case 2: return BOND_PAYLOAD; - case 3: return SORTITION_PAYLOAD; - case 4: return UNBOND_PAYLOAD; - case 5: return WITHDRAW_PAYLOAD; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - PayloadType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PayloadType findValueByNumber(int number) { - return PayloadType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.getDescriptor().getEnumTypes().get(0); - } - - private static final PayloadType[] VALUES = values(); - - public static PayloadType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private PayloadType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:pactus.PayloadType) - } - - /** - *
-   * Enumeration for verbosity levels when requesting transaction details.
-   * 
- * - * Protobuf enum {@code pactus.TransactionVerbosity} - */ - public enum TransactionVerbosity - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Request transaction data only.
-     * 
- * - * TRANSACTION_DATA = 0; - */ - TRANSACTION_DATA(0), - /** - *
-     * Request detailed transaction information.
-     * 
- * - * TRANSACTION_INFO = 1; - */ - TRANSACTION_INFO(1), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Request transaction data only.
-     * 
- * - * TRANSACTION_DATA = 0; - */ - public static final int TRANSACTION_DATA_VALUE = 0; - /** - *
-     * Request detailed transaction information.
-     * 
- * - * TRANSACTION_INFO = 1; - */ - public static final int TRANSACTION_INFO_VALUE = 1; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static TransactionVerbosity valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static TransactionVerbosity forNumber(int value) { - switch (value) { - case 0: return TRANSACTION_DATA; - case 1: return TRANSACTION_INFO; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - TransactionVerbosity> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public TransactionVerbosity findValueByNumber(int number) { - return TransactionVerbosity.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.getDescriptor().getEnumTypes().get(1); - } - - private static final TransactionVerbosity[] VALUES = values(); - - public static TransactionVerbosity valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private TransactionVerbosity(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:pactus.TransactionVerbosity) - } - - public interface GetTransactionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetTransactionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The unique ID of the transaction to retrieve.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - *
-     * The unique ID of the transaction to retrieve.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-     * The verbosity level for transaction details.
-     * 
- * - * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The enum numeric value on the wire for verbosity. - */ - int getVerbosityValue(); - /** - *
-     * The verbosity level for transaction details.
-     * 
- * - * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The verbosity. - */ - pactus.transaction.TransactionOuterClass.TransactionVerbosity getVerbosity(); - } - /** - *
-   * Request message for retrieving transaction details.
-   * 
- * - * Protobuf type {@code pactus.GetTransactionRequest} - */ - public static final class GetTransactionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetTransactionRequest) - GetTransactionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetTransactionRequest.newBuilder() to construct. - private GetTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetTransactionRequest() { - id_ = ""; - verbosity_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetTransactionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetTransactionRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - private volatile java.lang.Object id_; - /** - *
-     * The unique ID of the transaction to retrieve.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-     * The unique ID of the transaction to retrieve.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERBOSITY_FIELD_NUMBER = 2; - private int verbosity_; - /** - *
-     * The verbosity level for transaction details.
-     * 
- * - * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The enum numeric value on the wire for verbosity. - */ - @java.lang.Override public int getVerbosityValue() { - return verbosity_; - } - /** - *
-     * The verbosity level for transaction details.
-     * 
- * - * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The verbosity. - */ - @java.lang.Override public pactus.transaction.TransactionOuterClass.TransactionVerbosity getVerbosity() { - @SuppressWarnings("deprecation") - pactus.transaction.TransactionOuterClass.TransactionVerbosity result = pactus.transaction.TransactionOuterClass.TransactionVerbosity.valueOf(verbosity_); - return result == null ? pactus.transaction.TransactionOuterClass.TransactionVerbosity.UNRECOGNIZED : result; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (verbosity_ != pactus.transaction.TransactionOuterClass.TransactionVerbosity.TRANSACTION_DATA.getNumber()) { - output.writeEnum(2, verbosity_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (verbosity_ != pactus.transaction.TransactionOuterClass.TransactionVerbosity.TRANSACTION_DATA.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, verbosity_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetTransactionRequest)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.GetTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetTransactionRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (verbosity_ != other.verbosity_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + VERBOSITY_FIELD_NUMBER; - hash = (53 * hash) + verbosity_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetTransactionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for retrieving transaction details.
-     * 
- * - * Protobuf type {@code pactus.GetTransactionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetTransactionRequest) - pactus.transaction.TransactionOuterClass.GetTransactionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetTransactionRequest.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.GetTransactionRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - id_ = ""; - - verbosity_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetTransactionRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetTransactionRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetTransactionRequest build() { - pactus.transaction.TransactionOuterClass.GetTransactionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetTransactionRequest buildPartial() { - pactus.transaction.TransactionOuterClass.GetTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetTransactionRequest(this); - result.id_ = id_; - result.verbosity_ = verbosity_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetTransactionRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetTransactionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetTransactionRequest other) { - if (other == pactus.transaction.TransactionOuterClass.GetTransactionRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - onChanged(); - } - if (other.verbosity_ != 0) { - setVerbosityValue(other.getVerbosityValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: { - verbosity_ = input.readEnum(); - - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object id_ = ""; - /** - *
-       * The unique ID of the transaction to retrieve.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The unique ID of the transaction to retrieve.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The unique ID of the transaction to retrieve.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - id_ = value; - onChanged(); - return this; - } - /** - *
-       * The unique ID of the transaction to retrieve.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = getDefaultInstance().getId(); - onChanged(); - return this; - } - /** - *
-       * The unique ID of the transaction to retrieve.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - id_ = value; - onChanged(); - return this; - } - - private int verbosity_ = 0; - /** - *
-       * The verbosity level for transaction details.
-       * 
- * - * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The enum numeric value on the wire for verbosity. - */ - @java.lang.Override public int getVerbosityValue() { - return verbosity_; - } - /** - *
-       * The verbosity level for transaction details.
-       * 
- * - * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; - * @param value The enum numeric value on the wire for verbosity to set. - * @return This builder for chaining. - */ - public Builder setVerbosityValue(int value) { - - verbosity_ = value; - onChanged(); - return this; - } - /** - *
-       * The verbosity level for transaction details.
-       * 
- * - * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return The verbosity. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionVerbosity getVerbosity() { - @SuppressWarnings("deprecation") - pactus.transaction.TransactionOuterClass.TransactionVerbosity result = pactus.transaction.TransactionOuterClass.TransactionVerbosity.valueOf(verbosity_); - return result == null ? pactus.transaction.TransactionOuterClass.TransactionVerbosity.UNRECOGNIZED : result; - } - /** - *
-       * The verbosity level for transaction details.
-       * 
- * - * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; - * @param value The verbosity to set. - * @return This builder for chaining. - */ - public Builder setVerbosity(pactus.transaction.TransactionOuterClass.TransactionVerbosity value) { - if (value == null) { - throw new NullPointerException(); - } - - verbosity_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The verbosity level for transaction details.
-       * 
- * - * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; - * @return This builder for chaining. - */ - public Builder clearVerbosity() { - - verbosity_ = 0; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetTransactionRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetTransactionRequest) - private static final pactus.transaction.TransactionOuterClass.GetTransactionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetTransactionRequest(); - } - - public static pactus.transaction.TransactionOuterClass.GetTransactionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetTransactionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetTransactionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetTransactionResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetTransactionResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The height of the block containing the transaction.
-     * 
- * - * uint32 block_height = 1 [json_name = "blockHeight"]; - * @return The blockHeight. - */ - int getBlockHeight(); - - /** - *
-     * The UNIX timestamp of the block containing the transaction.
-     * 
- * - * uint32 block_time = 2 [json_name = "blockTime"]; - * @return The blockTime. - */ - int getBlockTime(); - - /** - *
-     * Detailed information about the transaction.
-     * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - * @return Whether the transaction field is set. - */ - boolean hasTransaction(); - /** - *
-     * Detailed information about the transaction.
-     * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - * @return The transaction. - */ - pactus.transaction.TransactionOuterClass.TransactionInfo getTransaction(); - /** - *
-     * Detailed information about the transaction.
-     * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - */ - pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder(); - } - /** - *
-   * Response message containing details of a transaction.
-   * 
- * - * Protobuf type {@code pactus.GetTransactionResponse} - */ - public static final class GetTransactionResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetTransactionResponse) - GetTransactionResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetTransactionResponse.newBuilder() to construct. - private GetTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetTransactionResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetTransactionResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetTransactionResponse.class, pactus.transaction.TransactionOuterClass.GetTransactionResponse.Builder.class); - } - - public static final int BLOCK_HEIGHT_FIELD_NUMBER = 1; - private int blockHeight_; - /** - *
-     * The height of the block containing the transaction.
-     * 
- * - * uint32 block_height = 1 [json_name = "blockHeight"]; - * @return The blockHeight. - */ - @java.lang.Override - public int getBlockHeight() { - return blockHeight_; - } - - public static final int BLOCK_TIME_FIELD_NUMBER = 2; - private int blockTime_; - /** - *
-     * The UNIX timestamp of the block containing the transaction.
-     * 
- * - * uint32 block_time = 2 [json_name = "blockTime"]; - * @return The blockTime. - */ - @java.lang.Override - public int getBlockTime() { - return blockTime_; - } - - public static final int TRANSACTION_FIELD_NUMBER = 3; - private pactus.transaction.TransactionOuterClass.TransactionInfo transaction_; - /** - *
-     * Detailed information about the transaction.
-     * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - * @return Whether the transaction field is set. - */ - @java.lang.Override - public boolean hasTransaction() { - return transaction_ != null; - } - /** - *
-     * Detailed information about the transaction.
-     * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - * @return The transaction. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionInfo getTransaction() { - return transaction_ == null ? pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_; - } - /** - *
-     * Detailed information about the transaction.
-     * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder() { - return getTransaction(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (blockHeight_ != 0) { - output.writeUInt32(1, blockHeight_); - } - if (blockTime_ != 0) { - output.writeUInt32(2, blockTime_); - } - if (transaction_ != null) { - output.writeMessage(3, getTransaction()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (blockHeight_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, blockHeight_); - } - if (blockTime_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, blockTime_); - } - if (transaction_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getTransaction()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetTransactionResponse)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.GetTransactionResponse other = (pactus.transaction.TransactionOuterClass.GetTransactionResponse) obj; - - if (getBlockHeight() - != other.getBlockHeight()) return false; - if (getBlockTime() - != other.getBlockTime()) return false; - if (hasTransaction() != other.hasTransaction()) return false; - if (hasTransaction()) { - if (!getTransaction() - .equals(other.getTransaction())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BLOCK_HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + getBlockHeight(); - hash = (37 * hash) + BLOCK_TIME_FIELD_NUMBER; - hash = (53 * hash) + getBlockTime(); - if (hasTransaction()) { - hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; - hash = (53 * hash) + getTransaction().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetTransactionResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing details of a transaction.
-     * 
- * - * Protobuf type {@code pactus.GetTransactionResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetTransactionResponse) - pactus.transaction.TransactionOuterClass.GetTransactionResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetTransactionResponse.class, pactus.transaction.TransactionOuterClass.GetTransactionResponse.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.GetTransactionResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - blockHeight_ = 0; - - blockTime_ = 0; - - if (transactionBuilder_ == null) { - transaction_ = null; - } else { - transaction_ = null; - transactionBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetTransactionResponse getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetTransactionResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetTransactionResponse build() { - pactus.transaction.TransactionOuterClass.GetTransactionResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetTransactionResponse buildPartial() { - pactus.transaction.TransactionOuterClass.GetTransactionResponse result = new pactus.transaction.TransactionOuterClass.GetTransactionResponse(this); - result.blockHeight_ = blockHeight_; - result.blockTime_ = blockTime_; - if (transactionBuilder_ == null) { - result.transaction_ = transaction_; - } else { - result.transaction_ = transactionBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetTransactionResponse) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetTransactionResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetTransactionResponse other) { - if (other == pactus.transaction.TransactionOuterClass.GetTransactionResponse.getDefaultInstance()) return this; - if (other.getBlockHeight() != 0) { - setBlockHeight(other.getBlockHeight()); - } - if (other.getBlockTime() != 0) { - setBlockTime(other.getBlockTime()); - } - if (other.hasTransaction()) { - mergeTransaction(other.getTransaction()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - blockHeight_ = input.readUInt32(); - - break; - } // case 8 - case 16: { - blockTime_ = input.readUInt32(); - - break; - } // case 16 - case 26: { - input.readMessage( - getTransactionFieldBuilder().getBuilder(), - extensionRegistry); - - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int blockHeight_ ; - /** - *
-       * The height of the block containing the transaction.
-       * 
- * - * uint32 block_height = 1 [json_name = "blockHeight"]; - * @return The blockHeight. - */ - @java.lang.Override - public int getBlockHeight() { - return blockHeight_; - } - /** - *
-       * The height of the block containing the transaction.
-       * 
- * - * uint32 block_height = 1 [json_name = "blockHeight"]; - * @param value The blockHeight to set. - * @return This builder for chaining. - */ - public Builder setBlockHeight(int value) { - - blockHeight_ = value; - onChanged(); - return this; - } - /** - *
-       * The height of the block containing the transaction.
-       * 
- * - * uint32 block_height = 1 [json_name = "blockHeight"]; - * @return This builder for chaining. - */ - public Builder clearBlockHeight() { - - blockHeight_ = 0; - onChanged(); - return this; - } - - private int blockTime_ ; - /** - *
-       * The UNIX timestamp of the block containing the transaction.
-       * 
- * - * uint32 block_time = 2 [json_name = "blockTime"]; - * @return The blockTime. - */ - @java.lang.Override - public int getBlockTime() { - return blockTime_; - } - /** - *
-       * The UNIX timestamp of the block containing the transaction.
-       * 
- * - * uint32 block_time = 2 [json_name = "blockTime"]; - * @param value The blockTime to set. - * @return This builder for chaining. - */ - public Builder setBlockTime(int value) { - - blockTime_ = value; - onChanged(); - return this; - } - /** - *
-       * The UNIX timestamp of the block containing the transaction.
-       * 
- * - * uint32 block_time = 2 [json_name = "blockTime"]; - * @return This builder for chaining. - */ - public Builder clearBlockTime() { - - blockTime_ = 0; - onChanged(); - return this; - } - - private pactus.transaction.TransactionOuterClass.TransactionInfo transaction_; - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> transactionBuilder_; - /** - *
-       * Detailed information about the transaction.
-       * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - * @return Whether the transaction field is set. - */ - public boolean hasTransaction() { - return transactionBuilder_ != null || transaction_ != null; - } - /** - *
-       * Detailed information about the transaction.
-       * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - * @return The transaction. - */ - public pactus.transaction.TransactionOuterClass.TransactionInfo getTransaction() { - if (transactionBuilder_ == null) { - return transaction_ == null ? pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_; - } else { - return transactionBuilder_.getMessage(); - } - } - /** - *
-       * Detailed information about the transaction.
-       * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - */ - public Builder setTransaction(pactus.transaction.TransactionOuterClass.TransactionInfo value) { - if (transactionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - transaction_ = value; - onChanged(); - } else { - transactionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Detailed information about the transaction.
-       * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - */ - public Builder setTransaction( - pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { - if (transactionBuilder_ == null) { - transaction_ = builderForValue.build(); - onChanged(); - } else { - transactionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Detailed information about the transaction.
-       * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - */ - public Builder mergeTransaction(pactus.transaction.TransactionOuterClass.TransactionInfo value) { - if (transactionBuilder_ == null) { - if (transaction_ != null) { - transaction_ = - pactus.transaction.TransactionOuterClass.TransactionInfo.newBuilder(transaction_).mergeFrom(value).buildPartial(); - } else { - transaction_ = value; - } - onChanged(); - } else { - transactionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Detailed information about the transaction.
-       * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - */ - public Builder clearTransaction() { - if (transactionBuilder_ == null) { - transaction_ = null; - onChanged(); - } else { - transaction_ = null; - transactionBuilder_ = null; - } - - return this; - } - /** - *
-       * Detailed information about the transaction.
-       * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder getTransactionBuilder() { - - onChanged(); - return getTransactionFieldBuilder().getBuilder(); - } - /** - *
-       * Detailed information about the transaction.
-       * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - */ - public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder() { - if (transactionBuilder_ != null) { - return transactionBuilder_.getMessageOrBuilder(); - } else { - return transaction_ == null ? - pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_; - } - } - /** - *
-       * Detailed information about the transaction.
-       * 
- * - * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> - getTransactionFieldBuilder() { - if (transactionBuilder_ == null) { - transactionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder>( - getTransaction(), - getParentForChildren(), - isClean()); - transaction_ = null; - } - return transactionBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetTransactionResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetTransactionResponse) - private static final pactus.transaction.TransactionOuterClass.GetTransactionResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetTransactionResponse(); - } - - public static pactus.transaction.TransactionOuterClass.GetTransactionResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetTransactionResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetTransactionResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface CalculateFeeRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.CalculateFeeRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The amount involved in the transaction, specified in NanoPAC.
-     * 
- * - * int64 amount = 1 [json_name = "amount"]; - * @return The amount. - */ - long getAmount(); - - /** - *
-     * The type of transaction payload.
-     * 
- * - * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; - * @return The enum numeric value on the wire for payloadType. - */ - int getPayloadTypeValue(); - /** - *
-     * The type of transaction payload.
-     * 
- * - * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; - * @return The payloadType. - */ - pactus.transaction.TransactionOuterClass.PayloadType getPayloadType(); - - /** - *
-     * Indicates if the amount should be fixed and include the fee.
-     * 
- * - * bool fixed_amount = 3 [json_name = "fixedAmount"]; - * @return The fixedAmount. - */ - boolean getFixedAmount(); - } - /** - *
-   * Request message for calculating transaction fee.
-   * 
- * - * Protobuf type {@code pactus.CalculateFeeRequest} - */ - public static final class CalculateFeeRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.CalculateFeeRequest) - CalculateFeeRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CalculateFeeRequest.newBuilder() to construct. - private CalculateFeeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CalculateFeeRequest() { - payloadType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CalculateFeeRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.CalculateFeeRequest.class, pactus.transaction.TransactionOuterClass.CalculateFeeRequest.Builder.class); - } - - public static final int AMOUNT_FIELD_NUMBER = 1; - private long amount_; - /** - *
-     * The amount involved in the transaction, specified in NanoPAC.
-     * 
- * - * int64 amount = 1 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - - public static final int PAYLOAD_TYPE_FIELD_NUMBER = 2; - private int payloadType_; - /** - *
-     * The type of transaction payload.
-     * 
- * - * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; - * @return The enum numeric value on the wire for payloadType. - */ - @java.lang.Override public int getPayloadTypeValue() { - return payloadType_; - } - /** - *
-     * The type of transaction payload.
-     * 
- * - * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; - * @return The payloadType. - */ - @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { - @SuppressWarnings("deprecation") - pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); - return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; - } - - public static final int FIXED_AMOUNT_FIELD_NUMBER = 3; - private boolean fixedAmount_; - /** - *
-     * Indicates if the amount should be fixed and include the fee.
-     * 
- * - * bool fixed_amount = 3 [json_name = "fixedAmount"]; - * @return The fixedAmount. - */ - @java.lang.Override - public boolean getFixedAmount() { - return fixedAmount_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (amount_ != 0L) { - output.writeInt64(1, amount_); - } - if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { - output.writeEnum(2, payloadType_); - } - if (fixedAmount_ != false) { - output.writeBool(3, fixedAmount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (amount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, amount_); - } - if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, payloadType_); - } - if (fixedAmount_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, fixedAmount_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.CalculateFeeRequest)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.CalculateFeeRequest other = (pactus.transaction.TransactionOuterClass.CalculateFeeRequest) obj; - - if (getAmount() - != other.getAmount()) return false; - if (payloadType_ != other.payloadType_) return false; - if (getFixedAmount() - != other.getFixedAmount()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAmount()); - hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; - hash = (53 * hash) + payloadType_; - hash = (37 * hash) + FIXED_AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFixedAmount()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.CalculateFeeRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for calculating transaction fee.
-     * 
- * - * Protobuf type {@code pactus.CalculateFeeRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.CalculateFeeRequest) - pactus.transaction.TransactionOuterClass.CalculateFeeRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.CalculateFeeRequest.class, pactus.transaction.TransactionOuterClass.CalculateFeeRequest.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.CalculateFeeRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - amount_ = 0L; - - payloadType_ = 0; - - fixedAmount_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.CalculateFeeRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.CalculateFeeRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.CalculateFeeRequest build() { - pactus.transaction.TransactionOuterClass.CalculateFeeRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.CalculateFeeRequest buildPartial() { - pactus.transaction.TransactionOuterClass.CalculateFeeRequest result = new pactus.transaction.TransactionOuterClass.CalculateFeeRequest(this); - result.amount_ = amount_; - result.payloadType_ = payloadType_; - result.fixedAmount_ = fixedAmount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.CalculateFeeRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.CalculateFeeRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.CalculateFeeRequest other) { - if (other == pactus.transaction.TransactionOuterClass.CalculateFeeRequest.getDefaultInstance()) return this; - if (other.getAmount() != 0L) { - setAmount(other.getAmount()); - } - if (other.payloadType_ != 0) { - setPayloadTypeValue(other.getPayloadTypeValue()); - } - if (other.getFixedAmount() != false) { - setFixedAmount(other.getFixedAmount()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - amount_ = input.readInt64(); - - break; - } // case 8 - case 16: { - payloadType_ = input.readEnum(); - - break; - } // case 16 - case 24: { - fixedAmount_ = input.readBool(); - - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private long amount_ ; - /** - *
-       * The amount involved in the transaction, specified in NanoPAC.
-       * 
- * - * int64 amount = 1 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - /** - *
-       * The amount involved in the transaction, specified in NanoPAC.
-       * 
- * - * int64 amount = 1 [json_name = "amount"]; - * @param value The amount to set. - * @return This builder for chaining. - */ - public Builder setAmount(long value) { - - amount_ = value; - onChanged(); - return this; - } - /** - *
-       * The amount involved in the transaction, specified in NanoPAC.
-       * 
- * - * int64 amount = 1 [json_name = "amount"]; - * @return This builder for chaining. - */ - public Builder clearAmount() { - - amount_ = 0L; - onChanged(); - return this; - } - - private int payloadType_ = 0; - /** - *
-       * The type of transaction payload.
-       * 
- * - * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; - * @return The enum numeric value on the wire for payloadType. - */ - @java.lang.Override public int getPayloadTypeValue() { - return payloadType_; - } - /** - *
-       * The type of transaction payload.
-       * 
- * - * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; - * @param value The enum numeric value on the wire for payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadTypeValue(int value) { - - payloadType_ = value; - onChanged(); - return this; - } - /** - *
-       * The type of transaction payload.
-       * 
- * - * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; - * @return The payloadType. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { - @SuppressWarnings("deprecation") - pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); - return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; - } - /** - *
-       * The type of transaction payload.
-       * 
- * - * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; - * @param value The payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadType(pactus.transaction.TransactionOuterClass.PayloadType value) { - if (value == null) { - throw new NullPointerException(); - } - - payloadType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The type of transaction payload.
-       * 
- * - * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; - * @return This builder for chaining. - */ - public Builder clearPayloadType() { - - payloadType_ = 0; - onChanged(); - return this; - } - - private boolean fixedAmount_ ; - /** - *
-       * Indicates if the amount should be fixed and include the fee.
-       * 
- * - * bool fixed_amount = 3 [json_name = "fixedAmount"]; - * @return The fixedAmount. - */ - @java.lang.Override - public boolean getFixedAmount() { - return fixedAmount_; - } - /** - *
-       * Indicates if the amount should be fixed and include the fee.
-       * 
- * - * bool fixed_amount = 3 [json_name = "fixedAmount"]; - * @param value The fixedAmount to set. - * @return This builder for chaining. - */ - public Builder setFixedAmount(boolean value) { - - fixedAmount_ = value; - onChanged(); - return this; - } - /** - *
-       * Indicates if the amount should be fixed and include the fee.
-       * 
- * - * bool fixed_amount = 3 [json_name = "fixedAmount"]; - * @return This builder for chaining. - */ - public Builder clearFixedAmount() { - - fixedAmount_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.CalculateFeeRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.CalculateFeeRequest) - private static final pactus.transaction.TransactionOuterClass.CalculateFeeRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.CalculateFeeRequest(); - } - - public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CalculateFeeRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.CalculateFeeRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface CalculateFeeResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.CalculateFeeResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The calculated amount in NanoPAC.
-     * 
- * - * int64 amount = 1 [json_name = "amount"]; - * @return The amount. - */ - long getAmount(); - - /** - *
-     * The calculated transaction fee in NanoPAC.
-     * 
- * - * int64 fee = 2 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); - } - /** - *
-   * Response message containing the calculated transaction fee.
-   * 
- * - * Protobuf type {@code pactus.CalculateFeeResponse} - */ - public static final class CalculateFeeResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.CalculateFeeResponse) - CalculateFeeResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use CalculateFeeResponse.newBuilder() to construct. - private CalculateFeeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CalculateFeeResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CalculateFeeResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.CalculateFeeResponse.class, pactus.transaction.TransactionOuterClass.CalculateFeeResponse.Builder.class); - } - - public static final int AMOUNT_FIELD_NUMBER = 1; - private long amount_; - /** - *
-     * The calculated amount in NanoPAC.
-     * 
- * - * int64 amount = 1 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - - public static final int FEE_FIELD_NUMBER = 2; - private long fee_; - /** - *
-     * The calculated transaction fee in NanoPAC.
-     * 
- * - * int64 fee = 2 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (amount_ != 0L) { - output.writeInt64(1, amount_); - } - if (fee_ != 0L) { - output.writeInt64(2, fee_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (amount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, amount_); - } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, fee_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.CalculateFeeResponse)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.CalculateFeeResponse other = (pactus.transaction.TransactionOuterClass.CalculateFeeResponse) obj; - - if (getAmount() - != other.getAmount()) return false; - if (getFee() - != other.getFee()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAmount()); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.CalculateFeeResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the calculated transaction fee.
-     * 
- * - * Protobuf type {@code pactus.CalculateFeeResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.CalculateFeeResponse) - pactus.transaction.TransactionOuterClass.CalculateFeeResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.CalculateFeeResponse.class, pactus.transaction.TransactionOuterClass.CalculateFeeResponse.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.CalculateFeeResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - amount_ = 0L; - - fee_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.CalculateFeeResponse getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.CalculateFeeResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.CalculateFeeResponse build() { - pactus.transaction.TransactionOuterClass.CalculateFeeResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.CalculateFeeResponse buildPartial() { - pactus.transaction.TransactionOuterClass.CalculateFeeResponse result = new pactus.transaction.TransactionOuterClass.CalculateFeeResponse(this); - result.amount_ = amount_; - result.fee_ = fee_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.CalculateFeeResponse) { - return mergeFrom((pactus.transaction.TransactionOuterClass.CalculateFeeResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.CalculateFeeResponse other) { - if (other == pactus.transaction.TransactionOuterClass.CalculateFeeResponse.getDefaultInstance()) return this; - if (other.getAmount() != 0L) { - setAmount(other.getAmount()); - } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - amount_ = input.readInt64(); - - break; - } // case 8 - case 16: { - fee_ = input.readInt64(); - - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private long amount_ ; - /** - *
-       * The calculated amount in NanoPAC.
-       * 
- * - * int64 amount = 1 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - /** - *
-       * The calculated amount in NanoPAC.
-       * 
- * - * int64 amount = 1 [json_name = "amount"]; - * @param value The amount to set. - * @return This builder for chaining. - */ - public Builder setAmount(long value) { - - amount_ = value; - onChanged(); - return this; - } - /** - *
-       * The calculated amount in NanoPAC.
-       * 
- * - * int64 amount = 1 [json_name = "amount"]; - * @return This builder for chaining. - */ - public Builder clearAmount() { - - amount_ = 0L; - onChanged(); - return this; - } - - private long fee_ ; - /** - *
-       * The calculated transaction fee in NanoPAC.
-       * 
- * - * int64 fee = 2 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
-       * The calculated transaction fee in NanoPAC.
-       * 
- * - * int64 fee = 2 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
-       * The calculated transaction fee in NanoPAC.
-       * 
- * - * int64 fee = 2 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.CalculateFeeResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.CalculateFeeResponse) - private static final pactus.transaction.TransactionOuterClass.CalculateFeeResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.CalculateFeeResponse(); - } - - public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CalculateFeeResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.CalculateFeeResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface BroadcastTransactionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.BroadcastTransactionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The signed raw transaction data to be broadcasted.
-     * 
- * - * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; - * @return The signedRawTransaction. - */ - java.lang.String getSignedRawTransaction(); - /** - *
-     * The signed raw transaction data to be broadcasted.
-     * 
- * - * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; - * @return The bytes for signedRawTransaction. - */ - com.google.protobuf.ByteString - getSignedRawTransactionBytes(); - } - /** - *
-   * Request message for broadcasting a signed transaction.
-   * 
- * - * Protobuf type {@code pactus.BroadcastTransactionRequest} - */ - public static final class BroadcastTransactionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.BroadcastTransactionRequest) - BroadcastTransactionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use BroadcastTransactionRequest.newBuilder() to construct. - private BroadcastTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BroadcastTransactionRequest() { - signedRawTransaction_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BroadcastTransactionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.class, pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.Builder.class); - } - - public static final int SIGNED_RAW_TRANSACTION_FIELD_NUMBER = 1; - private volatile java.lang.Object signedRawTransaction_; - /** - *
-     * The signed raw transaction data to be broadcasted.
-     * 
- * - * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; - * @return The signedRawTransaction. - */ - @java.lang.Override - public java.lang.String getSignedRawTransaction() { - java.lang.Object ref = signedRawTransaction_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signedRawTransaction_ = s; - return s; - } - } - /** - *
-     * The signed raw transaction data to be broadcasted.
-     * 
- * - * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; - * @return The bytes for signedRawTransaction. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSignedRawTransactionBytes() { - java.lang.Object ref = signedRawTransaction_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signedRawTransaction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRawTransaction_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signedRawTransaction_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRawTransaction_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signedRawTransaction_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest other = (pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest) obj; - - if (!getSignedRawTransaction() - .equals(other.getSignedRawTransaction())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SIGNED_RAW_TRANSACTION_FIELD_NUMBER; - hash = (53 * hash) + getSignedRawTransaction().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for broadcasting a signed transaction.
-     * 
- * - * Protobuf type {@code pactus.BroadcastTransactionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.BroadcastTransactionRequest) - pactus.transaction.TransactionOuterClass.BroadcastTransactionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.class, pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - signedRawTransaction_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest build() { - pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest buildPartial() { - pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest result = new pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest(this); - result.signedRawTransaction_ = signedRawTransaction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest other) { - if (other == pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.getDefaultInstance()) return this; - if (!other.getSignedRawTransaction().isEmpty()) { - signedRawTransaction_ = other.signedRawTransaction_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - signedRawTransaction_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object signedRawTransaction_ = ""; - /** - *
-       * The signed raw transaction data to be broadcasted.
-       * 
- * - * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; - * @return The signedRawTransaction. - */ - public java.lang.String getSignedRawTransaction() { - java.lang.Object ref = signedRawTransaction_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signedRawTransaction_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The signed raw transaction data to be broadcasted.
-       * 
- * - * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; - * @return The bytes for signedRawTransaction. - */ - public com.google.protobuf.ByteString - getSignedRawTransactionBytes() { - java.lang.Object ref = signedRawTransaction_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signedRawTransaction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The signed raw transaction data to be broadcasted.
-       * 
- * - * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; - * @param value The signedRawTransaction to set. - * @return This builder for chaining. - */ - public Builder setSignedRawTransaction( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - signedRawTransaction_ = value; - onChanged(); - return this; - } - /** - *
-       * The signed raw transaction data to be broadcasted.
-       * 
- * - * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; - * @return This builder for chaining. - */ - public Builder clearSignedRawTransaction() { - - signedRawTransaction_ = getDefaultInstance().getSignedRawTransaction(); - onChanged(); - return this; - } - /** - *
-       * The signed raw transaction data to be broadcasted.
-       * 
- * - * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; - * @param value The bytes for signedRawTransaction to set. - * @return This builder for chaining. - */ - public Builder setSignedRawTransactionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - signedRawTransaction_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.BroadcastTransactionRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.BroadcastTransactionRequest) - private static final pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest(); - } - - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BroadcastTransactionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface BroadcastTransactionResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.BroadcastTransactionResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The unique ID of the broadcasted transaction.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - *
-     * The unique ID of the broadcasted transaction.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - } - /** - *
-   * Response message containing the ID of the broadcasted transaction.
-   * 
- * - * Protobuf type {@code pactus.BroadcastTransactionResponse} - */ - public static final class BroadcastTransactionResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.BroadcastTransactionResponse) - BroadcastTransactionResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use BroadcastTransactionResponse.newBuilder() to construct. - private BroadcastTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BroadcastTransactionResponse() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BroadcastTransactionResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.class, pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - private volatile java.lang.Object id_; - /** - *
-     * The unique ID of the broadcasted transaction.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-     * The unique ID of the broadcasted transaction.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse other = (pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the ID of the broadcasted transaction.
-     * 
- * - * Protobuf type {@code pactus.BroadcastTransactionResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.BroadcastTransactionResponse) - pactus.transaction.TransactionOuterClass.BroadcastTransactionResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.class, pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - id_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse build() { - pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse buildPartial() { - pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse result = new pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse(this); - result.id_ = id_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse) { - return mergeFrom((pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse other) { - if (other == pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object id_ = ""; - /** - *
-       * The unique ID of the broadcasted transaction.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The unique ID of the broadcasted transaction.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The unique ID of the broadcasted transaction.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - id_ = value; - onChanged(); - return this; - } - /** - *
-       * The unique ID of the broadcasted transaction.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = getDefaultInstance().getId(); - onChanged(); - return this; - } - /** - *
-       * The unique ID of the broadcasted transaction.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - id_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.BroadcastTransactionResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.BroadcastTransactionResponse) - private static final pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse(); - } - - public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BroadcastTransactionResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetRawTransferTransactionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetRawTransferTransactionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The lock time for the transaction. If not set, defaults to the last block
-     * height.
-     * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - int getLockTime(); - - /** - *
-     * The sender's account address.
-     * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The sender. - */ - java.lang.String getSender(); - /** - *
-     * The sender's account address.
-     * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The bytes for sender. - */ - com.google.protobuf.ByteString - getSenderBytes(); - - /** - *
-     * The receiver's account address.
-     * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The receiver. - */ - java.lang.String getReceiver(); - /** - *
-     * The receiver's account address.
-     * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - com.google.protobuf.ByteString - getReceiverBytes(); - - /** - *
-     * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
-     * 
- * - * int64 amount = 4 [json_name = "amount"]; - * @return The amount. - */ - long getAmount(); - - /** - *
-     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-     * 
- * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); - - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The memo. - */ - java.lang.String getMemo(); - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The bytes for memo. - */ - com.google.protobuf.ByteString - getMemoBytes(); - } - /** - *
-   * Request message for retrieving raw details of a transfer transaction.
-   * 
- * - * Protobuf type {@code pactus.GetRawTransferTransactionRequest} - */ - public static final class GetRawTransferTransactionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetRawTransferTransactionRequest) - GetRawTransferTransactionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetRawTransferTransactionRequest.newBuilder() to construct. - private GetRawTransferTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetRawTransferTransactionRequest() { - sender_ = ""; - receiver_ = ""; - memo_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetRawTransferTransactionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder.class); - } - - public static final int LOCK_TIME_FIELD_NUMBER = 1; - private int lockTime_; - /** - *
-     * The lock time for the transaction. If not set, defaults to the last block
-     * height.
-     * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - @java.lang.Override - public int getLockTime() { - return lockTime_; - } - - public static final int SENDER_FIELD_NUMBER = 2; - private volatile java.lang.Object sender_; - /** - *
-     * The sender's account address.
-     * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The sender. - */ - @java.lang.Override - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } - } - /** - *
-     * The sender's account address.
-     * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The bytes for sender. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RECEIVER_FIELD_NUMBER = 3; - private volatile java.lang.Object receiver_; - /** - *
-     * The receiver's account address.
-     * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The receiver. - */ - @java.lang.Override - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } - } - /** - *
-     * The receiver's account address.
-     * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AMOUNT_FIELD_NUMBER = 4; - private long amount_; - /** - *
-     * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
-     * 
- * - * int64 amount = 4 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - - public static final int FEE_FIELD_NUMBER = 5; - private long fee_; - /** - *
-     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-     * 
- * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - - public static final int MEMO_FIELD_NUMBER = 6; - private volatile java.lang.Object memo_; - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - java.lang.Object ref = memo_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - memo_ = s; - return s; - } - } - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - java.lang.Object ref = memo_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - memo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (lockTime_ != 0) { - output.writeUInt32(1, lockTime_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, receiver_); - } - if (amount_ != 0L) { - output.writeInt64(4, amount_); - } - if (fee_ != 0L) { - output.writeInt64(5, fee_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, memo_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (lockTime_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, lockTime_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, receiver_); - } - if (amount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, amount_); - } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, fee_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, memo_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) obj; - - if (getLockTime() - != other.getLockTime()) return false; - if (!getSender() - .equals(other.getSender())) return false; - if (!getReceiver() - .equals(other.getReceiver())) return false; - if (getAmount() - != other.getAmount()) return false; - if (getFee() - != other.getFee()) return false; - if (!getMemo() - .equals(other.getMemo())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLockTime(); - hash = (37 * hash) + SENDER_FIELD_NUMBER; - hash = (53 * hash) + getSender().hashCode(); - hash = (37 * hash) + RECEIVER_FIELD_NUMBER; - hash = (53 * hash) + getReceiver().hashCode(); - hash = (37 * hash) + AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAmount()); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); - hash = (37 * hash) + MEMO_FIELD_NUMBER; - hash = (53 * hash) + getMemo().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for retrieving raw details of a transfer transaction.
-     * 
- * - * Protobuf type {@code pactus.GetRawTransferTransactionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetRawTransferTransactionRequest) - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - lockTime_ = 0; - - sender_ = ""; - - receiver_ = ""; - - amount_ = 0L; - - fee_ = 0L; - - memo_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest build() { - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest buildPartial() { - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest(this); - result.lockTime_ = lockTime_; - result.sender_ = sender_; - result.receiver_ = receiver_; - result.amount_ = amount_; - result.fee_ = fee_; - result.memo_ = memo_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest other) { - if (other == pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance()) return this; - if (other.getLockTime() != 0) { - setLockTime(other.getLockTime()); - } - if (!other.getSender().isEmpty()) { - sender_ = other.sender_; - onChanged(); - } - if (!other.getReceiver().isEmpty()) { - receiver_ = other.receiver_; - onChanged(); - } - if (other.getAmount() != 0L) { - setAmount(other.getAmount()); - } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } - if (!other.getMemo().isEmpty()) { - memo_ = other.memo_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - lockTime_ = input.readUInt32(); - - break; - } // case 8 - case 18: { - sender_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - receiver_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 32: { - amount_ = input.readInt64(); - - break; - } // case 32 - case 40: { - fee_ = input.readInt64(); - - break; - } // case 40 - case 50: { - memo_ = input.readStringRequireUtf8(); - - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int lockTime_ ; - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - @java.lang.Override - public int getLockTime() { - return lockTime_; - } - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @param value The lockTime to set. - * @return This builder for chaining. - */ - public Builder setLockTime(int value) { - - lockTime_ = value; - onChanged(); - return this; - } - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return This builder for chaining. - */ - public Builder clearLockTime() { - - lockTime_ = 0; - onChanged(); - return this; - } - - private java.lang.Object sender_ = ""; - /** - *
-       * The sender's account address.
-       * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The sender. - */ - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The sender's account address.
-       * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The bytes for sender. - */ - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The sender's account address.
-       * 
- * - * string sender = 2 [json_name = "sender"]; - * @param value The sender to set. - * @return This builder for chaining. - */ - public Builder setSender( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sender_ = value; - onChanged(); - return this; - } - /** - *
-       * The sender's account address.
-       * 
- * - * string sender = 2 [json_name = "sender"]; - * @return This builder for chaining. - */ - public Builder clearSender() { - - sender_ = getDefaultInstance().getSender(); - onChanged(); - return this; - } - /** - *
-       * The sender's account address.
-       * 
- * - * string sender = 2 [json_name = "sender"]; - * @param value The bytes for sender to set. - * @return This builder for chaining. - */ - public Builder setSenderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sender_ = value; - onChanged(); - return this; - } - - private java.lang.Object receiver_ = ""; - /** - *
-       * The receiver's account address.
-       * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The receiver. - */ - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The receiver's account address.
-       * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The receiver's account address.
-       * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @param value The receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiver( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - receiver_ = value; - onChanged(); - return this; - } - /** - *
-       * The receiver's account address.
-       * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return This builder for chaining. - */ - public Builder clearReceiver() { - - receiver_ = getDefaultInstance().getReceiver(); - onChanged(); - return this; - } - /** - *
-       * The receiver's account address.
-       * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @param value The bytes for receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiverBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - receiver_ = value; - onChanged(); - return this; - } - - private long amount_ ; - /** - *
-       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
-       * 
- * - * int64 amount = 4 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - /** - *
-       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
-       * 
- * - * int64 amount = 4 [json_name = "amount"]; - * @param value The amount to set. - * @return This builder for chaining. - */ - public Builder setAmount(long value) { - - amount_ = value; - onChanged(); - return this; - } - /** - *
-       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
-       * 
- * - * int64 amount = 4 [json_name = "amount"]; - * @return This builder for chaining. - */ - public Builder clearAmount() { - - amount_ = 0L; - onChanged(); - return this; - } - - private long fee_ ; - /** - *
-       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-       * 
- * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
-       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-       * 
- * - * int64 fee = 5 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
-       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-       * 
- * - * int64 fee = 5 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object memo_ = ""; - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The memo. - */ - public java.lang.String getMemo() { - java.lang.Object ref = memo_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - memo_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The bytes for memo. - */ - public com.google.protobuf.ByteString - getMemoBytes() { - java.lang.Object ref = memo_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - memo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 6 [json_name = "memo"]; - * @param value The memo to set. - * @return This builder for chaining. - */ - public Builder setMemo( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - memo_ = value; - onChanged(); - return this; - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 6 [json_name = "memo"]; - * @return This builder for chaining. - */ - public Builder clearMemo() { - - memo_ = getDefaultInstance().getMemo(); - onChanged(); - return this; - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 6 [json_name = "memo"]; - * @param value The bytes for memo to set. - * @return This builder for chaining. - */ - public Builder setMemoBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - memo_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetRawTransferTransactionRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetRawTransferTransactionRequest) - private static final pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest(); - } - - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetRawTransferTransactionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetRawBondTransactionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetRawBondTransactionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The lock time for the transaction. If not set, defaults to the last block
-     * height.
-     * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - int getLockTime(); - - /** - *
-     * The sender's account address.
-     * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The sender. - */ - java.lang.String getSender(); - /** - *
-     * The sender's account address.
-     * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The bytes for sender. - */ - com.google.protobuf.ByteString - getSenderBytes(); - - /** - *
-     * The receiver's validator address.
-     * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The receiver. - */ - java.lang.String getReceiver(); - /** - *
-     * The receiver's validator address.
-     * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - com.google.protobuf.ByteString - getReceiverBytes(); - - /** - *
-     * The stake amount in NanoPAC. Must be greater than 0.
-     * 
- * - * int64 stake = 4 [json_name = "stake"]; - * @return The stake. - */ - long getStake(); - - /** - *
-     * The public key of the validator.
-     * 
- * - * string public_key = 5 [json_name = "publicKey"]; - * @return The publicKey. - */ - java.lang.String getPublicKey(); - /** - *
-     * The public key of the validator.
-     * 
- * - * string public_key = 5 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - com.google.protobuf.ByteString - getPublicKeyBytes(); - - /** - *
-     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-     * 
- * - * int64 fee = 6 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); - - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 7 [json_name = "memo"]; - * @return The memo. - */ - java.lang.String getMemo(); - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 7 [json_name = "memo"]; - * @return The bytes for memo. - */ - com.google.protobuf.ByteString - getMemoBytes(); - } - /** - *
-   * Request message for retrieving raw details of a bond transaction.
-   * 
- * - * Protobuf type {@code pactus.GetRawBondTransactionRequest} - */ - public static final class GetRawBondTransactionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetRawBondTransactionRequest) - GetRawBondTransactionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetRawBondTransactionRequest.newBuilder() to construct. - private GetRawBondTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetRawBondTransactionRequest() { - sender_ = ""; - receiver_ = ""; - publicKey_ = ""; - memo_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetRawBondTransactionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder.class); - } - - public static final int LOCK_TIME_FIELD_NUMBER = 1; - private int lockTime_; - /** - *
-     * The lock time for the transaction. If not set, defaults to the last block
-     * height.
-     * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - @java.lang.Override - public int getLockTime() { - return lockTime_; - } - - public static final int SENDER_FIELD_NUMBER = 2; - private volatile java.lang.Object sender_; - /** - *
-     * The sender's account address.
-     * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The sender. - */ - @java.lang.Override - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } - } - /** - *
-     * The sender's account address.
-     * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The bytes for sender. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RECEIVER_FIELD_NUMBER = 3; - private volatile java.lang.Object receiver_; - /** - *
-     * The receiver's validator address.
-     * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The receiver. - */ - @java.lang.Override - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } - } - /** - *
-     * The receiver's validator address.
-     * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STAKE_FIELD_NUMBER = 4; - private long stake_; - /** - *
-     * The stake amount in NanoPAC. Must be greater than 0.
-     * 
- * - * int64 stake = 4 [json_name = "stake"]; - * @return The stake. - */ - @java.lang.Override - public long getStake() { - return stake_; - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 5; - private volatile java.lang.Object publicKey_; - /** - *
-     * The public key of the validator.
-     * 
- * - * string public_key = 5 [json_name = "publicKey"]; - * @return The publicKey. - */ - @java.lang.Override - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } - } - /** - *
-     * The public key of the validator.
-     * 
- * - * string public_key = 5 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEE_FIELD_NUMBER = 6; - private long fee_; - /** - *
-     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-     * 
- * - * int64 fee = 6 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - - public static final int MEMO_FIELD_NUMBER = 7; - private volatile java.lang.Object memo_; - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 7 [json_name = "memo"]; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - java.lang.Object ref = memo_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - memo_ = s; - return s; - } - } - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 7 [json_name = "memo"]; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - java.lang.Object ref = memo_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - memo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (lockTime_ != 0) { - output.writeUInt32(1, lockTime_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, receiver_); - } - if (stake_ != 0L) { - output.writeInt64(4, stake_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, publicKey_); - } - if (fee_ != 0L) { - output.writeInt64(6, fee_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, memo_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (lockTime_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, lockTime_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, receiver_); - } - if (stake_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, stake_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, publicKey_); - } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(6, fee_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, memo_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) obj; - - if (getLockTime() - != other.getLockTime()) return false; - if (!getSender() - .equals(other.getSender())) return false; - if (!getReceiver() - .equals(other.getReceiver())) return false; - if (getStake() - != other.getStake()) return false; - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - if (getFee() - != other.getFee()) return false; - if (!getMemo() - .equals(other.getMemo())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLockTime(); - hash = (37 * hash) + SENDER_FIELD_NUMBER; - hash = (53 * hash) + getSender().hashCode(); - hash = (37 * hash) + RECEIVER_FIELD_NUMBER; - hash = (53 * hash) + getReceiver().hashCode(); - hash = (37 * hash) + STAKE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getStake()); - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); - hash = (37 * hash) + MEMO_FIELD_NUMBER; - hash = (53 * hash) + getMemo().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for retrieving raw details of a bond transaction.
-     * 
- * - * Protobuf type {@code pactus.GetRawBondTransactionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetRawBondTransactionRequest) - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - lockTime_ = 0; - - sender_ = ""; - - receiver_ = ""; - - stake_ = 0L; - - publicKey_ = ""; - - fee_ = 0L; - - memo_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest build() { - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest buildPartial() { - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest(this); - result.lockTime_ = lockTime_; - result.sender_ = sender_; - result.receiver_ = receiver_; - result.stake_ = stake_; - result.publicKey_ = publicKey_; - result.fee_ = fee_; - result.memo_ = memo_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest other) { - if (other == pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance()) return this; - if (other.getLockTime() != 0) { - setLockTime(other.getLockTime()); - } - if (!other.getSender().isEmpty()) { - sender_ = other.sender_; - onChanged(); - } - if (!other.getReceiver().isEmpty()) { - receiver_ = other.receiver_; - onChanged(); - } - if (other.getStake() != 0L) { - setStake(other.getStake()); - } - if (!other.getPublicKey().isEmpty()) { - publicKey_ = other.publicKey_; - onChanged(); - } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } - if (!other.getMemo().isEmpty()) { - memo_ = other.memo_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - lockTime_ = input.readUInt32(); - - break; - } // case 8 - case 18: { - sender_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - receiver_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 32: { - stake_ = input.readInt64(); - - break; - } // case 32 - case 42: { - publicKey_ = input.readStringRequireUtf8(); - - break; - } // case 42 - case 48: { - fee_ = input.readInt64(); - - break; - } // case 48 - case 58: { - memo_ = input.readStringRequireUtf8(); - - break; - } // case 58 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int lockTime_ ; - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - @java.lang.Override - public int getLockTime() { - return lockTime_; - } - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @param value The lockTime to set. - * @return This builder for chaining. - */ - public Builder setLockTime(int value) { - - lockTime_ = value; - onChanged(); - return this; - } - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return This builder for chaining. - */ - public Builder clearLockTime() { - - lockTime_ = 0; - onChanged(); - return this; - } - - private java.lang.Object sender_ = ""; - /** - *
-       * The sender's account address.
-       * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The sender. - */ - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The sender's account address.
-       * 
- * - * string sender = 2 [json_name = "sender"]; - * @return The bytes for sender. - */ - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The sender's account address.
-       * 
- * - * string sender = 2 [json_name = "sender"]; - * @param value The sender to set. - * @return This builder for chaining. - */ - public Builder setSender( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sender_ = value; - onChanged(); - return this; - } - /** - *
-       * The sender's account address.
-       * 
- * - * string sender = 2 [json_name = "sender"]; - * @return This builder for chaining. - */ - public Builder clearSender() { - - sender_ = getDefaultInstance().getSender(); - onChanged(); - return this; - } - /** - *
-       * The sender's account address.
-       * 
- * - * string sender = 2 [json_name = "sender"]; - * @param value The bytes for sender to set. - * @return This builder for chaining. - */ - public Builder setSenderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sender_ = value; - onChanged(); - return this; - } - - private java.lang.Object receiver_ = ""; - /** - *
-       * The receiver's validator address.
-       * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The receiver. - */ - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The receiver's validator address.
-       * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The receiver's validator address.
-       * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @param value The receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiver( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - receiver_ = value; - onChanged(); - return this; - } - /** - *
-       * The receiver's validator address.
-       * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @return This builder for chaining. - */ - public Builder clearReceiver() { - - receiver_ = getDefaultInstance().getReceiver(); - onChanged(); - return this; - } - /** - *
-       * The receiver's validator address.
-       * 
- * - * string receiver = 3 [json_name = "receiver"]; - * @param value The bytes for receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiverBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - receiver_ = value; - onChanged(); - return this; - } - - private long stake_ ; - /** - *
-       * The stake amount in NanoPAC. Must be greater than 0.
-       * 
- * - * int64 stake = 4 [json_name = "stake"]; - * @return The stake. - */ - @java.lang.Override - public long getStake() { - return stake_; - } - /** - *
-       * The stake amount in NanoPAC. Must be greater than 0.
-       * 
- * - * int64 stake = 4 [json_name = "stake"]; - * @param value The stake to set. - * @return This builder for chaining. - */ - public Builder setStake(long value) { - - stake_ = value; - onChanged(); - return this; - } - /** - *
-       * The stake amount in NanoPAC. Must be greater than 0.
-       * 
- * - * int64 stake = 4 [json_name = "stake"]; - * @return This builder for chaining. - */ - public Builder clearStake() { - - stake_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object publicKey_ = ""; - /** - *
-       * The public key of the validator.
-       * 
- * - * string public_key = 5 [json_name = "publicKey"]; - * @return The publicKey. - */ - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The public key of the validator.
-       * 
- * - * string public_key = 5 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The public key of the validator.
-       * 
- * - * string public_key = 5 [json_name = "publicKey"]; - * @param value The publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - publicKey_ = value; - onChanged(); - return this; - } - /** - *
-       * The public key of the validator.
-       * 
- * - * string public_key = 5 [json_name = "publicKey"]; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - - publicKey_ = getDefaultInstance().getPublicKey(); - onChanged(); - return this; - } - /** - *
-       * The public key of the validator.
-       * 
- * - * string public_key = 5 [json_name = "publicKey"]; - * @param value The bytes for publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - publicKey_ = value; - onChanged(); - return this; - } - - private long fee_ ; - /** - *
-       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-       * 
- * - * int64 fee = 6 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
-       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-       * 
- * - * int64 fee = 6 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
-       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-       * 
- * - * int64 fee = 6 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object memo_ = ""; - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 7 [json_name = "memo"]; - * @return The memo. - */ - public java.lang.String getMemo() { - java.lang.Object ref = memo_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - memo_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 7 [json_name = "memo"]; - * @return The bytes for memo. - */ - public com.google.protobuf.ByteString - getMemoBytes() { - java.lang.Object ref = memo_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - memo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 7 [json_name = "memo"]; - * @param value The memo to set. - * @return This builder for chaining. - */ - public Builder setMemo( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - memo_ = value; - onChanged(); - return this; - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 7 [json_name = "memo"]; - * @return This builder for chaining. - */ - public Builder clearMemo() { - - memo_ = getDefaultInstance().getMemo(); - onChanged(); - return this; - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 7 [json_name = "memo"]; - * @param value The bytes for memo to set. - * @return This builder for chaining. - */ - public Builder setMemoBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - memo_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetRawBondTransactionRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetRawBondTransactionRequest) - private static final pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest(); - } - - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetRawBondTransactionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetRawUnbondTransactionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetRawUnbondTransactionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The lock time for the transaction. If not set, defaults to the last block
-     * height.
-     * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - int getLockTime(); - - /** - *
-     * The address of the validator to unbond from.
-     * 
- * - * string validator_address = 3 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - java.lang.String getValidatorAddress(); - /** - *
-     * The address of the validator to unbond from.
-     * 
- * - * string validator_address = 3 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - com.google.protobuf.ByteString - getValidatorAddressBytes(); - - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 4 [json_name = "memo"]; - * @return The memo. - */ - java.lang.String getMemo(); - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 4 [json_name = "memo"]; - * @return The bytes for memo. - */ - com.google.protobuf.ByteString - getMemoBytes(); - } - /** - *
-   * Request message for retrieving raw details of an unbond transaction.
-   * 
- * - * Protobuf type {@code pactus.GetRawUnbondTransactionRequest} - */ - public static final class GetRawUnbondTransactionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetRawUnbondTransactionRequest) - GetRawUnbondTransactionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetRawUnbondTransactionRequest.newBuilder() to construct. - private GetRawUnbondTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetRawUnbondTransactionRequest() { - validatorAddress_ = ""; - memo_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetRawUnbondTransactionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder.class); - } - - public static final int LOCK_TIME_FIELD_NUMBER = 1; - private int lockTime_; - /** - *
-     * The lock time for the transaction. If not set, defaults to the last block
-     * height.
-     * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - @java.lang.Override - public int getLockTime() { - return lockTime_; - } - - public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 3; - private volatile java.lang.Object validatorAddress_; - /** - *
-     * The address of the validator to unbond from.
-     * 
- * - * string validator_address = 3 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - @java.lang.Override - public java.lang.String getValidatorAddress() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - validatorAddress_ = s; - return s; - } - } - /** - *
-     * The address of the validator to unbond from.
-     * 
- * - * string validator_address = 3 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValidatorAddressBytes() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - validatorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEMO_FIELD_NUMBER = 4; - private volatile java.lang.Object memo_; - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 4 [json_name = "memo"]; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - java.lang.Object ref = memo_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - memo_ = s; - return s; - } - } - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 4 [json_name = "memo"]; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - java.lang.Object ref = memo_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - memo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (lockTime_ != 0) { - output.writeUInt32(1, lockTime_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, validatorAddress_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, memo_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (lockTime_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, lockTime_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, validatorAddress_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, memo_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) obj; - - if (getLockTime() - != other.getLockTime()) return false; - if (!getValidatorAddress() - .equals(other.getValidatorAddress())) return false; - if (!getMemo() - .equals(other.getMemo())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLockTime(); - hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getValidatorAddress().hashCode(); - hash = (37 * hash) + MEMO_FIELD_NUMBER; - hash = (53 * hash) + getMemo().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for retrieving raw details of an unbond transaction.
-     * 
- * - * Protobuf type {@code pactus.GetRawUnbondTransactionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetRawUnbondTransactionRequest) - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - lockTime_ = 0; - - validatorAddress_ = ""; - - memo_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest build() { - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest buildPartial() { - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest(this); - result.lockTime_ = lockTime_; - result.validatorAddress_ = validatorAddress_; - result.memo_ = memo_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest other) { - if (other == pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance()) return this; - if (other.getLockTime() != 0) { - setLockTime(other.getLockTime()); - } - if (!other.getValidatorAddress().isEmpty()) { - validatorAddress_ = other.validatorAddress_; - onChanged(); - } - if (!other.getMemo().isEmpty()) { - memo_ = other.memo_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - lockTime_ = input.readUInt32(); - - break; - } // case 8 - case 26: { - validatorAddress_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: { - memo_ = input.readStringRequireUtf8(); - - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int lockTime_ ; - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - @java.lang.Override - public int getLockTime() { - return lockTime_; - } - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @param value The lockTime to set. - * @return This builder for chaining. - */ - public Builder setLockTime(int value) { - - lockTime_ = value; - onChanged(); - return this; - } - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return This builder for chaining. - */ - public Builder clearLockTime() { - - lockTime_ = 0; - onChanged(); - return this; - } - - private java.lang.Object validatorAddress_ = ""; - /** - *
-       * The address of the validator to unbond from.
-       * 
- * - * string validator_address = 3 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - public java.lang.String getValidatorAddress() { - java.lang.Object ref = validatorAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - validatorAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the validator to unbond from.
-       * 
- * - * string validator_address = 3 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - public com.google.protobuf.ByteString - getValidatorAddressBytes() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - validatorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the validator to unbond from.
-       * 
- * - * string validator_address = 3 [json_name = "validatorAddress"]; - * @param value The validatorAddress to set. - * @return This builder for chaining. - */ - public Builder setValidatorAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - validatorAddress_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the validator to unbond from.
-       * 
- * - * string validator_address = 3 [json_name = "validatorAddress"]; - * @return This builder for chaining. - */ - public Builder clearValidatorAddress() { - - validatorAddress_ = getDefaultInstance().getValidatorAddress(); - onChanged(); - return this; - } - /** - *
-       * The address of the validator to unbond from.
-       * 
- * - * string validator_address = 3 [json_name = "validatorAddress"]; - * @param value The bytes for validatorAddress to set. - * @return This builder for chaining. - */ - public Builder setValidatorAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - validatorAddress_ = value; - onChanged(); - return this; - } - - private java.lang.Object memo_ = ""; - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 4 [json_name = "memo"]; - * @return The memo. - */ - public java.lang.String getMemo() { - java.lang.Object ref = memo_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - memo_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 4 [json_name = "memo"]; - * @return The bytes for memo. - */ - public com.google.protobuf.ByteString - getMemoBytes() { - java.lang.Object ref = memo_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - memo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 4 [json_name = "memo"]; - * @param value The memo to set. - * @return This builder for chaining. - */ - public Builder setMemo( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - memo_ = value; - onChanged(); - return this; - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 4 [json_name = "memo"]; - * @return This builder for chaining. - */ - public Builder clearMemo() { - - memo_ = getDefaultInstance().getMemo(); - onChanged(); - return this; - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 4 [json_name = "memo"]; - * @param value The bytes for memo to set. - * @return This builder for chaining. - */ - public Builder setMemoBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - memo_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetRawUnbondTransactionRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetRawUnbondTransactionRequest) - private static final pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest(); - } - - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetRawUnbondTransactionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetRawWithdrawTransactionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetRawWithdrawTransactionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The lock time for the transaction. If not set, defaults to the last block
-     * height.
-     * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - int getLockTime(); - - /** - *
-     * The address of the validator to withdraw from.
-     * 
- * - * string validator_address = 2 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - java.lang.String getValidatorAddress(); - /** - *
-     * The address of the validator to withdraw from.
-     * 
- * - * string validator_address = 2 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - com.google.protobuf.ByteString - getValidatorAddressBytes(); - - /** - *
-     * The address of the account to withdraw to.
-     * 
- * - * string account_address = 3 [json_name = "accountAddress"]; - * @return The accountAddress. - */ - java.lang.String getAccountAddress(); - /** - *
-     * The address of the account to withdraw to.
-     * 
- * - * string account_address = 3 [json_name = "accountAddress"]; - * @return The bytes for accountAddress. - */ - com.google.protobuf.ByteString - getAccountAddressBytes(); - - /** - *
-     * The withdrawal amount in NanoPAC. Must be greater than 0.
-     * 
- * - * int64 amount = 4 [json_name = "amount"]; - * @return The amount. - */ - long getAmount(); - - /** - *
-     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-     * 
- * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); - - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The memo. - */ - java.lang.String getMemo(); - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The bytes for memo. - */ - com.google.protobuf.ByteString - getMemoBytes(); - } - /** - *
-   * Request message for retrieving raw details of a withdraw transaction.
-   * 
- * - * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest} - */ - public static final class GetRawWithdrawTransactionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetRawWithdrawTransactionRequest) - GetRawWithdrawTransactionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetRawWithdrawTransactionRequest.newBuilder() to construct. - private GetRawWithdrawTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetRawWithdrawTransactionRequest() { - validatorAddress_ = ""; - accountAddress_ = ""; - memo_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetRawWithdrawTransactionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder.class); - } - - public static final int LOCK_TIME_FIELD_NUMBER = 1; - private int lockTime_; - /** - *
-     * The lock time for the transaction. If not set, defaults to the last block
-     * height.
-     * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - @java.lang.Override - public int getLockTime() { - return lockTime_; - } - - public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object validatorAddress_; - /** - *
-     * The address of the validator to withdraw from.
-     * 
- * - * string validator_address = 2 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - @java.lang.Override - public java.lang.String getValidatorAddress() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - validatorAddress_ = s; - return s; - } - } - /** - *
-     * The address of the validator to withdraw from.
-     * 
- * - * string validator_address = 2 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValidatorAddressBytes() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - validatorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACCOUNT_ADDRESS_FIELD_NUMBER = 3; - private volatile java.lang.Object accountAddress_; - /** - *
-     * The address of the account to withdraw to.
-     * 
- * - * string account_address = 3 [json_name = "accountAddress"]; - * @return The accountAddress. - */ - @java.lang.Override - public java.lang.String getAccountAddress() { - java.lang.Object ref = accountAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accountAddress_ = s; - return s; - } - } - /** - *
-     * The address of the account to withdraw to.
-     * 
- * - * string account_address = 3 [json_name = "accountAddress"]; - * @return The bytes for accountAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAccountAddressBytes() { - java.lang.Object ref = accountAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - accountAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AMOUNT_FIELD_NUMBER = 4; - private long amount_; - /** - *
-     * The withdrawal amount in NanoPAC. Must be greater than 0.
-     * 
- * - * int64 amount = 4 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - - public static final int FEE_FIELD_NUMBER = 5; - private long fee_; - /** - *
-     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-     * 
- * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - - public static final int MEMO_FIELD_NUMBER = 6; - private volatile java.lang.Object memo_; - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - java.lang.Object ref = memo_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - memo_ = s; - return s; - } - } - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - java.lang.Object ref = memo_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - memo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (lockTime_ != 0) { - output.writeUInt32(1, lockTime_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, validatorAddress_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, accountAddress_); - } - if (amount_ != 0L) { - output.writeInt64(4, amount_); - } - if (fee_ != 0L) { - output.writeInt64(5, fee_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, memo_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (lockTime_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, lockTime_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, validatorAddress_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, accountAddress_); - } - if (amount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, amount_); - } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, fee_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, memo_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) obj; - - if (getLockTime() - != other.getLockTime()) return false; - if (!getValidatorAddress() - .equals(other.getValidatorAddress())) return false; - if (!getAccountAddress() - .equals(other.getAccountAddress())) return false; - if (getAmount() - != other.getAmount()) return false; - if (getFee() - != other.getFee()) return false; - if (!getMemo() - .equals(other.getMemo())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLockTime(); - hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getValidatorAddress().hashCode(); - hash = (37 * hash) + ACCOUNT_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAccountAddress().hashCode(); - hash = (37 * hash) + AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAmount()); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); - hash = (37 * hash) + MEMO_FIELD_NUMBER; - hash = (53 * hash) + getMemo().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for retrieving raw details of a withdraw transaction.
-     * 
- * - * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetRawWithdrawTransactionRequest) - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - lockTime_ = 0; - - validatorAddress_ = ""; - - accountAddress_ = ""; - - amount_ = 0L; - - fee_ = 0L; - - memo_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest build() { - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest buildPartial() { - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest(this); - result.lockTime_ = lockTime_; - result.validatorAddress_ = validatorAddress_; - result.accountAddress_ = accountAddress_; - result.amount_ = amount_; - result.fee_ = fee_; - result.memo_ = memo_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest other) { - if (other == pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance()) return this; - if (other.getLockTime() != 0) { - setLockTime(other.getLockTime()); - } - if (!other.getValidatorAddress().isEmpty()) { - validatorAddress_ = other.validatorAddress_; - onChanged(); - } - if (!other.getAccountAddress().isEmpty()) { - accountAddress_ = other.accountAddress_; - onChanged(); - } - if (other.getAmount() != 0L) { - setAmount(other.getAmount()); - } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } - if (!other.getMemo().isEmpty()) { - memo_ = other.memo_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - lockTime_ = input.readUInt32(); - - break; - } // case 8 - case 18: { - validatorAddress_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - accountAddress_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 32: { - amount_ = input.readInt64(); - - break; - } // case 32 - case 40: { - fee_ = input.readInt64(); - - break; - } // case 40 - case 50: { - memo_ = input.readStringRequireUtf8(); - - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int lockTime_ ; - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return The lockTime. - */ - @java.lang.Override - public int getLockTime() { - return lockTime_; - } - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @param value The lockTime to set. - * @return This builder for chaining. - */ - public Builder setLockTime(int value) { - - lockTime_ = value; - onChanged(); - return this; - } - /** - *
-       * The lock time for the transaction. If not set, defaults to the last block
-       * height.
-       * 
- * - * uint32 lock_time = 1 [json_name = "lockTime"]; - * @return This builder for chaining. - */ - public Builder clearLockTime() { - - lockTime_ = 0; - onChanged(); - return this; - } - - private java.lang.Object validatorAddress_ = ""; - /** - *
-       * The address of the validator to withdraw from.
-       * 
- * - * string validator_address = 2 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - public java.lang.String getValidatorAddress() { - java.lang.Object ref = validatorAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - validatorAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the validator to withdraw from.
-       * 
- * - * string validator_address = 2 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - public com.google.protobuf.ByteString - getValidatorAddressBytes() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - validatorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the validator to withdraw from.
-       * 
- * - * string validator_address = 2 [json_name = "validatorAddress"]; - * @param value The validatorAddress to set. - * @return This builder for chaining. - */ - public Builder setValidatorAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - validatorAddress_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the validator to withdraw from.
-       * 
- * - * string validator_address = 2 [json_name = "validatorAddress"]; - * @return This builder for chaining. - */ - public Builder clearValidatorAddress() { - - validatorAddress_ = getDefaultInstance().getValidatorAddress(); - onChanged(); - return this; - } - /** - *
-       * The address of the validator to withdraw from.
-       * 
- * - * string validator_address = 2 [json_name = "validatorAddress"]; - * @param value The bytes for validatorAddress to set. - * @return This builder for chaining. - */ - public Builder setValidatorAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - validatorAddress_ = value; - onChanged(); - return this; - } - - private java.lang.Object accountAddress_ = ""; - /** - *
-       * The address of the account to withdraw to.
-       * 
- * - * string account_address = 3 [json_name = "accountAddress"]; - * @return The accountAddress. - */ - public java.lang.String getAccountAddress() { - java.lang.Object ref = accountAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accountAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the account to withdraw to.
-       * 
- * - * string account_address = 3 [json_name = "accountAddress"]; - * @return The bytes for accountAddress. - */ - public com.google.protobuf.ByteString - getAccountAddressBytes() { - java.lang.Object ref = accountAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - accountAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the account to withdraw to.
-       * 
- * - * string account_address = 3 [json_name = "accountAddress"]; - * @param value The accountAddress to set. - * @return This builder for chaining. - */ - public Builder setAccountAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - accountAddress_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the account to withdraw to.
-       * 
- * - * string account_address = 3 [json_name = "accountAddress"]; - * @return This builder for chaining. - */ - public Builder clearAccountAddress() { - - accountAddress_ = getDefaultInstance().getAccountAddress(); - onChanged(); - return this; - } - /** - *
-       * The address of the account to withdraw to.
-       * 
- * - * string account_address = 3 [json_name = "accountAddress"]; - * @param value The bytes for accountAddress to set. - * @return This builder for chaining. - */ - public Builder setAccountAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - accountAddress_ = value; - onChanged(); - return this; - } - - private long amount_ ; - /** - *
-       * The withdrawal amount in NanoPAC. Must be greater than 0.
-       * 
- * - * int64 amount = 4 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - /** - *
-       * The withdrawal amount in NanoPAC. Must be greater than 0.
-       * 
- * - * int64 amount = 4 [json_name = "amount"]; - * @param value The amount to set. - * @return This builder for chaining. - */ - public Builder setAmount(long value) { - - amount_ = value; - onChanged(); - return this; - } - /** - *
-       * The withdrawal amount in NanoPAC. Must be greater than 0.
-       * 
- * - * int64 amount = 4 [json_name = "amount"]; - * @return This builder for chaining. - */ - public Builder clearAmount() { - - amount_ = 0L; - onChanged(); - return this; - } - - private long fee_ ; - /** - *
-       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-       * 
- * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
-       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-       * 
- * - * int64 fee = 5 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
-       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
-       * 
- * - * int64 fee = 5 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object memo_ = ""; - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The memo. - */ - public java.lang.String getMemo() { - java.lang.Object ref = memo_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - memo_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 6 [json_name = "memo"]; - * @return The bytes for memo. - */ - public com.google.protobuf.ByteString - getMemoBytes() { - java.lang.Object ref = memo_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - memo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 6 [json_name = "memo"]; - * @param value The memo to set. - * @return This builder for chaining. - */ - public Builder setMemo( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - memo_ = value; - onChanged(); - return this; - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 6 [json_name = "memo"]; - * @return This builder for chaining. - */ - public Builder clearMemo() { - - memo_ = getDefaultInstance().getMemo(); - onChanged(); - return this; - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 6 [json_name = "memo"]; - * @param value The bytes for memo to set. - * @return This builder for chaining. - */ - public Builder setMemoBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - memo_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetRawWithdrawTransactionRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetRawWithdrawTransactionRequest) - private static final pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest(); - } - - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetRawWithdrawTransactionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetRawTransactionResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetRawTransactionResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The raw transaction data.
-     * 
- * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return The rawTransaction. - */ - java.lang.String getRawTransaction(); - /** - *
-     * The raw transaction data.
-     * 
- * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return The bytes for rawTransaction. - */ - com.google.protobuf.ByteString - getRawTransactionBytes(); - } - /** - *
-   * Response message containing raw transaction data.
-   * 
- * - * Protobuf type {@code pactus.GetRawTransactionResponse} - */ - public static final class GetRawTransactionResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetRawTransactionResponse) - GetRawTransactionResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetRawTransactionResponse.newBuilder() to construct. - private GetRawTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetRawTransactionResponse() { - rawTransaction_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetRawTransactionResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.Builder.class); - } - - public static final int RAW_TRANSACTION_FIELD_NUMBER = 1; - private volatile java.lang.Object rawTransaction_; - /** - *
-     * The raw transaction data.
-     * 
- * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return The rawTransaction. - */ - @java.lang.Override - public java.lang.String getRawTransaction() { - java.lang.Object ref = rawTransaction_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rawTransaction_ = s; - return s; - } - } - /** - *
-     * The raw transaction data.
-     * 
- * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return The bytes for rawTransaction. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRawTransactionBytes() { - java.lang.Object ref = rawTransaction_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rawTransaction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rawTransaction_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rawTransaction_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawTransactionResponse)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse other = (pactus.transaction.TransactionOuterClass.GetRawTransactionResponse) obj; - - if (!getRawTransaction() - .equals(other.getRawTransaction())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + RAW_TRANSACTION_FIELD_NUMBER; - hash = (53 * hash) + getRawTransaction().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawTransactionResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing raw transaction data.
-     * 
- * - * Protobuf type {@code pactus.GetRawTransactionResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetRawTransactionResponse) - pactus.transaction.TransactionOuterClass.GetRawTransactionResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - rawTransaction_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse build() { - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse buildPartial() { - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse result = new pactus.transaction.TransactionOuterClass.GetRawTransactionResponse(this); - result.rawTransaction_ = rawTransaction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetRawTransactionResponse) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawTransactionResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransactionResponse other) { - if (other == pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance()) return this; - if (!other.getRawTransaction().isEmpty()) { - rawTransaction_ = other.rawTransaction_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - rawTransaction_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object rawTransaction_ = ""; - /** - *
-       * The raw transaction data.
-       * 
- * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return The rawTransaction. - */ - public java.lang.String getRawTransaction() { - java.lang.Object ref = rawTransaction_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rawTransaction_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The raw transaction data.
-       * 
- * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return The bytes for rawTransaction. - */ - public com.google.protobuf.ByteString - getRawTransactionBytes() { - java.lang.Object ref = rawTransaction_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rawTransaction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The raw transaction data.
-       * 
- * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @param value The rawTransaction to set. - * @return This builder for chaining. - */ - public Builder setRawTransaction( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - rawTransaction_ = value; - onChanged(); - return this; - } - /** - *
-       * The raw transaction data.
-       * 
- * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return This builder for chaining. - */ - public Builder clearRawTransaction() { - - rawTransaction_ = getDefaultInstance().getRawTransaction(); - onChanged(); - return this; - } - /** - *
-       * The raw transaction data.
-       * 
- * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @param value The bytes for rawTransaction to set. - * @return This builder for chaining. - */ - public Builder setRawTransactionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - rawTransaction_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetRawTransactionResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetRawTransactionResponse) - private static final pactus.transaction.TransactionOuterClass.GetRawTransactionResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawTransactionResponse(); - } - - public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetRawTransactionResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PayloadTransferOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.PayloadTransfer) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The sender's address.
-     * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - java.lang.String getSender(); - /** - *
-     * The sender's address.
-     * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - com.google.protobuf.ByteString - getSenderBytes(); - - /** - *
-     * The receiver's address.
-     * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ - java.lang.String getReceiver(); - /** - *
-     * The receiver's address.
-     * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - com.google.protobuf.ByteString - getReceiverBytes(); - - /** - *
-     * The amount to be transferred in NanoPAC.
-     * 
- * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - long getAmount(); - } - /** - *
-   * Payload for a transfer transaction.
-   * 
- * - * Protobuf type {@code pactus.PayloadTransfer} - */ - public static final class PayloadTransfer extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.PayloadTransfer) - PayloadTransferOrBuilder { - private static final long serialVersionUID = 0L; - // Use PayloadTransfer.newBuilder() to construct. - private PayloadTransfer(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PayloadTransfer() { - sender_ = ""; - receiver_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PayloadTransfer(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadTransfer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadTransfer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.PayloadTransfer.class, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder.class); - } - - public static final int SENDER_FIELD_NUMBER = 1; - private volatile java.lang.Object sender_; - /** - *
-     * The sender's address.
-     * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - @java.lang.Override - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } - } - /** - *
-     * The sender's address.
-     * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RECEIVER_FIELD_NUMBER = 2; - private volatile java.lang.Object receiver_; - /** - *
-     * The receiver's address.
-     * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ - @java.lang.Override - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } - } - /** - *
-     * The receiver's address.
-     * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AMOUNT_FIELD_NUMBER = 3; - private long amount_; - /** - *
-     * The amount to be transferred in NanoPAC.
-     * 
- * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_); - } - if (amount_ != 0L) { - output.writeInt64(3, amount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_); - } - if (amount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, amount_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.PayloadTransfer)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.PayloadTransfer other = (pactus.transaction.TransactionOuterClass.PayloadTransfer) obj; - - if (!getSender() - .equals(other.getSender())) return false; - if (!getReceiver() - .equals(other.getReceiver())) return false; - if (getAmount() - != other.getAmount()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SENDER_FIELD_NUMBER; - hash = (53 * hash) + getSender().hashCode(); - hash = (37 * hash) + RECEIVER_FIELD_NUMBER; - hash = (53 * hash) + getReceiver().hashCode(); - hash = (37 * hash) + AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAmount()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.PayloadTransfer prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Payload for a transfer transaction.
-     * 
- * - * Protobuf type {@code pactus.PayloadTransfer} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.PayloadTransfer) - pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadTransfer_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadTransfer_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.PayloadTransfer.class, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.PayloadTransfer.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - sender_ = ""; - - receiver_ = ""; - - amount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadTransfer_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadTransfer getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadTransfer build() { - pactus.transaction.TransactionOuterClass.PayloadTransfer result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadTransfer buildPartial() { - pactus.transaction.TransactionOuterClass.PayloadTransfer result = new pactus.transaction.TransactionOuterClass.PayloadTransfer(this); - result.sender_ = sender_; - result.receiver_ = receiver_; - result.amount_ = amount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.PayloadTransfer) { - return mergeFrom((pactus.transaction.TransactionOuterClass.PayloadTransfer)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadTransfer other) { - if (other == pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance()) return this; - if (!other.getSender().isEmpty()) { - sender_ = other.sender_; - onChanged(); - } - if (!other.getReceiver().isEmpty()) { - receiver_ = other.receiver_; - onChanged(); - } - if (other.getAmount() != 0L) { - setAmount(other.getAmount()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - sender_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - receiver_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: { - amount_ = input.readInt64(); - - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object sender_ = ""; - /** - *
-       * The sender's address.
-       * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The sender's address.
-       * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The sender's address.
-       * 
- * - * string sender = 1 [json_name = "sender"]; - * @param value The sender to set. - * @return This builder for chaining. - */ - public Builder setSender( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sender_ = value; - onChanged(); - return this; - } - /** - *
-       * The sender's address.
-       * 
- * - * string sender = 1 [json_name = "sender"]; - * @return This builder for chaining. - */ - public Builder clearSender() { - - sender_ = getDefaultInstance().getSender(); - onChanged(); - return this; - } - /** - *
-       * The sender's address.
-       * 
- * - * string sender = 1 [json_name = "sender"]; - * @param value The bytes for sender to set. - * @return This builder for chaining. - */ - public Builder setSenderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sender_ = value; - onChanged(); - return this; - } - - private java.lang.Object receiver_ = ""; - /** - *
-       * The receiver's address.
-       * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The receiver's address.
-       * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The receiver's address.
-       * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @param value The receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiver( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - receiver_ = value; - onChanged(); - return this; - } - /** - *
-       * The receiver's address.
-       * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return This builder for chaining. - */ - public Builder clearReceiver() { - - receiver_ = getDefaultInstance().getReceiver(); - onChanged(); - return this; - } - /** - *
-       * The receiver's address.
-       * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @param value The bytes for receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiverBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - receiver_ = value; - onChanged(); - return this; - } - - private long amount_ ; - /** - *
-       * The amount to be transferred in NanoPAC.
-       * 
- * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - /** - *
-       * The amount to be transferred in NanoPAC.
-       * 
- * - * int64 amount = 3 [json_name = "amount"]; - * @param value The amount to set. - * @return This builder for chaining. - */ - public Builder setAmount(long value) { - - amount_ = value; - onChanged(); - return this; - } - /** - *
-       * The amount to be transferred in NanoPAC.
-       * 
- * - * int64 amount = 3 [json_name = "amount"]; - * @return This builder for chaining. - */ - public Builder clearAmount() { - - amount_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.PayloadTransfer) - } - - // @@protoc_insertion_point(class_scope:pactus.PayloadTransfer) - private static final pactus.transaction.TransactionOuterClass.PayloadTransfer DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.PayloadTransfer(); - } - - public static pactus.transaction.TransactionOuterClass.PayloadTransfer getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PayloadTransfer parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadTransfer getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PayloadBondOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.PayloadBond) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The sender's address.
-     * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - java.lang.String getSender(); - /** - *
-     * The sender's address.
-     * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - com.google.protobuf.ByteString - getSenderBytes(); - - /** - *
-     * The receiver's address.
-     * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ - java.lang.String getReceiver(); - /** - *
-     * The receiver's address.
-     * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - com.google.protobuf.ByteString - getReceiverBytes(); - - /** - *
-     * The stake amount in NanoPAC.
-     * 
- * - * int64 stake = 3 [json_name = "stake"]; - * @return The stake. - */ - long getStake(); - } - /** - *
-   * Payload for a bond transaction.
-   * 
- * - * Protobuf type {@code pactus.PayloadBond} - */ - public static final class PayloadBond extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.PayloadBond) - PayloadBondOrBuilder { - private static final long serialVersionUID = 0L; - // Use PayloadBond.newBuilder() to construct. - private PayloadBond(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PayloadBond() { - sender_ = ""; - receiver_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PayloadBond(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadBond_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadBond_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.PayloadBond.class, pactus.transaction.TransactionOuterClass.PayloadBond.Builder.class); - } - - public static final int SENDER_FIELD_NUMBER = 1; - private volatile java.lang.Object sender_; - /** - *
-     * The sender's address.
-     * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - @java.lang.Override - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } - } - /** - *
-     * The sender's address.
-     * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RECEIVER_FIELD_NUMBER = 2; - private volatile java.lang.Object receiver_; - /** - *
-     * The receiver's address.
-     * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ - @java.lang.Override - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } - } - /** - *
-     * The receiver's address.
-     * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STAKE_FIELD_NUMBER = 3; - private long stake_; - /** - *
-     * The stake amount in NanoPAC.
-     * 
- * - * int64 stake = 3 [json_name = "stake"]; - * @return The stake. - */ - @java.lang.Override - public long getStake() { - return stake_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_); - } - if (stake_ != 0L) { - output.writeInt64(3, stake_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_); - } - if (stake_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, stake_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.PayloadBond)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.PayloadBond other = (pactus.transaction.TransactionOuterClass.PayloadBond) obj; - - if (!getSender() - .equals(other.getSender())) return false; - if (!getReceiver() - .equals(other.getReceiver())) return false; - if (getStake() - != other.getStake()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SENDER_FIELD_NUMBER; - hash = (53 * hash) + getSender().hashCode(); - hash = (37 * hash) + RECEIVER_FIELD_NUMBER; - hash = (53 * hash) + getReceiver().hashCode(); - hash = (37 * hash) + STAKE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getStake()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.PayloadBond prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Payload for a bond transaction.
-     * 
- * - * Protobuf type {@code pactus.PayloadBond} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.PayloadBond) - pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadBond_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadBond_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.PayloadBond.class, pactus.transaction.TransactionOuterClass.PayloadBond.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.PayloadBond.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - sender_ = ""; - - receiver_ = ""; - - stake_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadBond_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadBond getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadBond build() { - pactus.transaction.TransactionOuterClass.PayloadBond result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadBond buildPartial() { - pactus.transaction.TransactionOuterClass.PayloadBond result = new pactus.transaction.TransactionOuterClass.PayloadBond(this); - result.sender_ = sender_; - result.receiver_ = receiver_; - result.stake_ = stake_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.PayloadBond) { - return mergeFrom((pactus.transaction.TransactionOuterClass.PayloadBond)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadBond other) { - if (other == pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance()) return this; - if (!other.getSender().isEmpty()) { - sender_ = other.sender_; - onChanged(); - } - if (!other.getReceiver().isEmpty()) { - receiver_ = other.receiver_; - onChanged(); - } - if (other.getStake() != 0L) { - setStake(other.getStake()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - sender_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - receiver_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: { - stake_ = input.readInt64(); - - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object sender_ = ""; - /** - *
-       * The sender's address.
-       * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The sender's address.
-       * 
- * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The sender's address.
-       * 
- * - * string sender = 1 [json_name = "sender"]; - * @param value The sender to set. - * @return This builder for chaining. - */ - public Builder setSender( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sender_ = value; - onChanged(); - return this; - } - /** - *
-       * The sender's address.
-       * 
- * - * string sender = 1 [json_name = "sender"]; - * @return This builder for chaining. - */ - public Builder clearSender() { - - sender_ = getDefaultInstance().getSender(); - onChanged(); - return this; - } - /** - *
-       * The sender's address.
-       * 
- * - * string sender = 1 [json_name = "sender"]; - * @param value The bytes for sender to set. - * @return This builder for chaining. - */ - public Builder setSenderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sender_ = value; - onChanged(); - return this; - } - - private java.lang.Object receiver_ = ""; - /** - *
-       * The receiver's address.
-       * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The receiver's address.
-       * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The receiver's address.
-       * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @param value The receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiver( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - receiver_ = value; - onChanged(); - return this; - } - /** - *
-       * The receiver's address.
-       * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @return This builder for chaining. - */ - public Builder clearReceiver() { - - receiver_ = getDefaultInstance().getReceiver(); - onChanged(); - return this; - } - /** - *
-       * The receiver's address.
-       * 
- * - * string receiver = 2 [json_name = "receiver"]; - * @param value The bytes for receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiverBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - receiver_ = value; - onChanged(); - return this; - } - - private long stake_ ; - /** - *
-       * The stake amount in NanoPAC.
-       * 
- * - * int64 stake = 3 [json_name = "stake"]; - * @return The stake. - */ - @java.lang.Override - public long getStake() { - return stake_; - } - /** - *
-       * The stake amount in NanoPAC.
-       * 
- * - * int64 stake = 3 [json_name = "stake"]; - * @param value The stake to set. - * @return This builder for chaining. - */ - public Builder setStake(long value) { - - stake_ = value; - onChanged(); - return this; - } - /** - *
-       * The stake amount in NanoPAC.
-       * 
- * - * int64 stake = 3 [json_name = "stake"]; - * @return This builder for chaining. - */ - public Builder clearStake() { - - stake_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.PayloadBond) - } - - // @@protoc_insertion_point(class_scope:pactus.PayloadBond) - private static final pactus.transaction.TransactionOuterClass.PayloadBond DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.PayloadBond(); - } - - public static pactus.transaction.TransactionOuterClass.PayloadBond getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PayloadBond parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadBond getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PayloadSortitionOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.PayloadSortition) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The validator address associated with the sortition proof.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The validator address associated with the sortition proof.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - - /** - *
-     * The proof for the sortition.
-     * 
- * - * string proof = 2 [json_name = "proof"]; - * @return The proof. - */ - java.lang.String getProof(); - /** - *
-     * The proof for the sortition.
-     * 
- * - * string proof = 2 [json_name = "proof"]; - * @return The bytes for proof. - */ - com.google.protobuf.ByteString - getProofBytes(); - } - /** - *
-   * Payload for a sortition transaction.
-   * 
- * - * Protobuf type {@code pactus.PayloadSortition} - */ - public static final class PayloadSortition extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.PayloadSortition) - PayloadSortitionOrBuilder { - private static final long serialVersionUID = 0L; - // Use PayloadSortition.newBuilder() to construct. - private PayloadSortition(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PayloadSortition() { - address_ = ""; - proof_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PayloadSortition(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadSortition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadSortition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.PayloadSortition.class, pactus.transaction.TransactionOuterClass.PayloadSortition.Builder.class); - } - - public static final int ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object address_; - /** - *
-     * The validator address associated with the sortition proof.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The validator address associated with the sortition proof.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROOF_FIELD_NUMBER = 2; - private volatile java.lang.Object proof_; - /** - *
-     * The proof for the sortition.
-     * 
- * - * string proof = 2 [json_name = "proof"]; - * @return The proof. - */ - @java.lang.Override - public java.lang.String getProof() { - java.lang.Object ref = proof_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - proof_ = s; - return s; - } - } - /** - *
-     * The proof for the sortition.
-     * 
- * - * string proof = 2 [json_name = "proof"]; - * @return The bytes for proof. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getProofBytes() { - java.lang.Object ref = proof_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - proof_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proof_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, proof_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proof_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, proof_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.PayloadSortition)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.PayloadSortition other = (pactus.transaction.TransactionOuterClass.PayloadSortition) obj; - - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getProof() - .equals(other.getProof())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (37 * hash) + PROOF_FIELD_NUMBER; - hash = (53 * hash) + getProof().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.PayloadSortition prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Payload for a sortition transaction.
-     * 
- * - * Protobuf type {@code pactus.PayloadSortition} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.PayloadSortition) - pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadSortition_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadSortition_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.PayloadSortition.class, pactus.transaction.TransactionOuterClass.PayloadSortition.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.PayloadSortition.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - address_ = ""; - - proof_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadSortition_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadSortition getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadSortition build() { - pactus.transaction.TransactionOuterClass.PayloadSortition result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadSortition buildPartial() { - pactus.transaction.TransactionOuterClass.PayloadSortition result = new pactus.transaction.TransactionOuterClass.PayloadSortition(this); - result.address_ = address_; - result.proof_ = proof_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.PayloadSortition) { - return mergeFrom((pactus.transaction.TransactionOuterClass.PayloadSortition)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadSortition other) { - if (other == pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance()) return this; - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - if (!other.getProof().isEmpty()) { - proof_ = other.proof_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - proof_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * The validator address associated with the sortition proof.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The validator address associated with the sortition proof.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The validator address associated with the sortition proof.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The validator address associated with the sortition proof.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The validator address associated with the sortition proof.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - - private java.lang.Object proof_ = ""; - /** - *
-       * The proof for the sortition.
-       * 
- * - * string proof = 2 [json_name = "proof"]; - * @return The proof. - */ - public java.lang.String getProof() { - java.lang.Object ref = proof_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - proof_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The proof for the sortition.
-       * 
- * - * string proof = 2 [json_name = "proof"]; - * @return The bytes for proof. - */ - public com.google.protobuf.ByteString - getProofBytes() { - java.lang.Object ref = proof_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - proof_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The proof for the sortition.
-       * 
- * - * string proof = 2 [json_name = "proof"]; - * @param value The proof to set. - * @return This builder for chaining. - */ - public Builder setProof( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - proof_ = value; - onChanged(); - return this; - } - /** - *
-       * The proof for the sortition.
-       * 
- * - * string proof = 2 [json_name = "proof"]; - * @return This builder for chaining. - */ - public Builder clearProof() { - - proof_ = getDefaultInstance().getProof(); - onChanged(); - return this; - } - /** - *
-       * The proof for the sortition.
-       * 
- * - * string proof = 2 [json_name = "proof"]; - * @param value The bytes for proof to set. - * @return This builder for chaining. - */ - public Builder setProofBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - proof_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.PayloadSortition) - } - - // @@protoc_insertion_point(class_scope:pactus.PayloadSortition) - private static final pactus.transaction.TransactionOuterClass.PayloadSortition DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.PayloadSortition(); - } - - public static pactus.transaction.TransactionOuterClass.PayloadSortition getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PayloadSortition parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadSortition getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PayloadUnbondOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.PayloadUnbond) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The address of the validator to unbond from.
-     * 
- * - * string validator = 1 [json_name = "validator"]; - * @return The validator. - */ - java.lang.String getValidator(); - /** - *
-     * The address of the validator to unbond from.
-     * 
- * - * string validator = 1 [json_name = "validator"]; - * @return The bytes for validator. - */ - com.google.protobuf.ByteString - getValidatorBytes(); - } - /** - *
-   * Payload for an unbond transaction.
-   * 
- * - * Protobuf type {@code pactus.PayloadUnbond} - */ - public static final class PayloadUnbond extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.PayloadUnbond) - PayloadUnbondOrBuilder { - private static final long serialVersionUID = 0L; - // Use PayloadUnbond.newBuilder() to construct. - private PayloadUnbond(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PayloadUnbond() { - validator_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PayloadUnbond(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadUnbond_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadUnbond_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.PayloadUnbond.class, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder.class); - } - - public static final int VALIDATOR_FIELD_NUMBER = 1; - private volatile java.lang.Object validator_; - /** - *
-     * The address of the validator to unbond from.
-     * 
- * - * string validator = 1 [json_name = "validator"]; - * @return The validator. - */ - @java.lang.Override - public java.lang.String getValidator() { - java.lang.Object ref = validator_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - validator_ = s; - return s; - } - } - /** - *
-     * The address of the validator to unbond from.
-     * 
- * - * string validator = 1 [json_name = "validator"]; - * @return The bytes for validator. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValidatorBytes() { - java.lang.Object ref = validator_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - validator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validator_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, validator_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validator_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, validator_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.PayloadUnbond)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.PayloadUnbond other = (pactus.transaction.TransactionOuterClass.PayloadUnbond) obj; - - if (!getValidator() - .equals(other.getValidator())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VALIDATOR_FIELD_NUMBER; - hash = (53 * hash) + getValidator().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.PayloadUnbond prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Payload for an unbond transaction.
-     * 
- * - * Protobuf type {@code pactus.PayloadUnbond} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.PayloadUnbond) - pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadUnbond_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadUnbond_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.PayloadUnbond.class, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.PayloadUnbond.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - validator_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadUnbond_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadUnbond getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadUnbond build() { - pactus.transaction.TransactionOuterClass.PayloadUnbond result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadUnbond buildPartial() { - pactus.transaction.TransactionOuterClass.PayloadUnbond result = new pactus.transaction.TransactionOuterClass.PayloadUnbond(this); - result.validator_ = validator_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.PayloadUnbond) { - return mergeFrom((pactus.transaction.TransactionOuterClass.PayloadUnbond)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadUnbond other) { - if (other == pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance()) return this; - if (!other.getValidator().isEmpty()) { - validator_ = other.validator_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - validator_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object validator_ = ""; - /** - *
-       * The address of the validator to unbond from.
-       * 
- * - * string validator = 1 [json_name = "validator"]; - * @return The validator. - */ - public java.lang.String getValidator() { - java.lang.Object ref = validator_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - validator_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address of the validator to unbond from.
-       * 
- * - * string validator = 1 [json_name = "validator"]; - * @return The bytes for validator. - */ - public com.google.protobuf.ByteString - getValidatorBytes() { - java.lang.Object ref = validator_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - validator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address of the validator to unbond from.
-       * 
- * - * string validator = 1 [json_name = "validator"]; - * @param value The validator to set. - * @return This builder for chaining. - */ - public Builder setValidator( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - validator_ = value; - onChanged(); - return this; - } - /** - *
-       * The address of the validator to unbond from.
-       * 
- * - * string validator = 1 [json_name = "validator"]; - * @return This builder for chaining. - */ - public Builder clearValidator() { - - validator_ = getDefaultInstance().getValidator(); - onChanged(); - return this; - } - /** - *
-       * The address of the validator to unbond from.
-       * 
- * - * string validator = 1 [json_name = "validator"]; - * @param value The bytes for validator to set. - * @return This builder for chaining. - */ - public Builder setValidatorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - validator_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.PayloadUnbond) - } - - // @@protoc_insertion_point(class_scope:pactus.PayloadUnbond) - private static final pactus.transaction.TransactionOuterClass.PayloadUnbond DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.PayloadUnbond(); - } - - public static pactus.transaction.TransactionOuterClass.PayloadUnbond getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PayloadUnbond parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadUnbond getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface PayloadWithdrawOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.PayloadWithdraw) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The address to withdraw from.
-     * 
- * - * string from = 1 [json_name = "from"]; - * @return The from. - */ - java.lang.String getFrom(); - /** - *
-     * The address to withdraw from.
-     * 
- * - * string from = 1 [json_name = "from"]; - * @return The bytes for from. - */ - com.google.protobuf.ByteString - getFromBytes(); - - /** - *
-     * The address to withdraw to.
-     * 
- * - * string to = 2 [json_name = "to"]; - * @return The to. - */ - java.lang.String getTo(); - /** - *
-     * The address to withdraw to.
-     * 
- * - * string to = 2 [json_name = "to"]; - * @return The bytes for to. - */ - com.google.protobuf.ByteString - getToBytes(); - - /** - *
-     * The withdrawal amount in NanoPAC.
-     * 
- * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - long getAmount(); - } - /** - *
-   * Payload for a withdraw transaction.
-   * 
- * - * Protobuf type {@code pactus.PayloadWithdraw} - */ - public static final class PayloadWithdraw extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.PayloadWithdraw) - PayloadWithdrawOrBuilder { - private static final long serialVersionUID = 0L; - // Use PayloadWithdraw.newBuilder() to construct. - private PayloadWithdraw(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private PayloadWithdraw() { - from_ = ""; - to_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new PayloadWithdraw(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.PayloadWithdraw.class, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder.class); - } - - public static final int FROM_FIELD_NUMBER = 1; - private volatile java.lang.Object from_; - /** - *
-     * The address to withdraw from.
-     * 
- * - * string from = 1 [json_name = "from"]; - * @return The from. - */ - @java.lang.Override - public java.lang.String getFrom() { - java.lang.Object ref = from_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - from_ = s; - return s; - } - } - /** - *
-     * The address to withdraw from.
-     * 
- * - * string from = 1 [json_name = "from"]; - * @return The bytes for from. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFromBytes() { - java.lang.Object ref = from_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - from_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TO_FIELD_NUMBER = 2; - private volatile java.lang.Object to_; - /** - *
-     * The address to withdraw to.
-     * 
- * - * string to = 2 [json_name = "to"]; - * @return The to. - */ - @java.lang.Override - public java.lang.String getTo() { - java.lang.Object ref = to_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - to_ = s; - return s; - } - } - /** - *
-     * The address to withdraw to.
-     * 
- * - * string to = 2 [json_name = "to"]; - * @return The bytes for to. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getToBytes() { - java.lang.Object ref = to_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - to_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AMOUNT_FIELD_NUMBER = 3; - private long amount_; - /** - *
-     * The withdrawal amount in NanoPAC.
-     * 
- * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(from_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, from_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(to_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, to_); - } - if (amount_ != 0L) { - output.writeInt64(3, amount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(from_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, from_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(to_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, to_); - } - if (amount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, amount_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.PayloadWithdraw)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.PayloadWithdraw other = (pactus.transaction.TransactionOuterClass.PayloadWithdraw) obj; - - if (!getFrom() - .equals(other.getFrom())) return false; - if (!getTo() - .equals(other.getTo())) return false; - if (getAmount() - != other.getAmount()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FROM_FIELD_NUMBER; - hash = (53 * hash) + getFrom().hashCode(); - hash = (37 * hash) + TO_FIELD_NUMBER; - hash = (53 * hash) + getTo().hashCode(); - hash = (37 * hash) + AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAmount()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.PayloadWithdraw prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Payload for a withdraw transaction.
-     * 
- * - * Protobuf type {@code pactus.PayloadWithdraw} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.PayloadWithdraw) - pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.PayloadWithdraw.class, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.PayloadWithdraw.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - from_ = ""; - - to_ = ""; - - amount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadWithdraw getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadWithdraw build() { - pactus.transaction.TransactionOuterClass.PayloadWithdraw result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadWithdraw buildPartial() { - pactus.transaction.TransactionOuterClass.PayloadWithdraw result = new pactus.transaction.TransactionOuterClass.PayloadWithdraw(this); - result.from_ = from_; - result.to_ = to_; - result.amount_ = amount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.PayloadWithdraw) { - return mergeFrom((pactus.transaction.TransactionOuterClass.PayloadWithdraw)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadWithdraw other) { - if (other == pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance()) return this; - if (!other.getFrom().isEmpty()) { - from_ = other.from_; - onChanged(); - } - if (!other.getTo().isEmpty()) { - to_ = other.to_; - onChanged(); - } - if (other.getAmount() != 0L) { - setAmount(other.getAmount()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - from_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - to_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: { - amount_ = input.readInt64(); - - break; - } // case 24 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object from_ = ""; - /** - *
-       * The address to withdraw from.
-       * 
- * - * string from = 1 [json_name = "from"]; - * @return The from. - */ - public java.lang.String getFrom() { - java.lang.Object ref = from_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - from_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address to withdraw from.
-       * 
- * - * string from = 1 [json_name = "from"]; - * @return The bytes for from. - */ - public com.google.protobuf.ByteString - getFromBytes() { - java.lang.Object ref = from_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - from_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address to withdraw from.
-       * 
- * - * string from = 1 [json_name = "from"]; - * @param value The from to set. - * @return This builder for chaining. - */ - public Builder setFrom( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - from_ = value; - onChanged(); - return this; - } - /** - *
-       * The address to withdraw from.
-       * 
- * - * string from = 1 [json_name = "from"]; - * @return This builder for chaining. - */ - public Builder clearFrom() { - - from_ = getDefaultInstance().getFrom(); - onChanged(); - return this; - } - /** - *
-       * The address to withdraw from.
-       * 
- * - * string from = 1 [json_name = "from"]; - * @param value The bytes for from to set. - * @return This builder for chaining. - */ - public Builder setFromBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - from_ = value; - onChanged(); - return this; - } - - private java.lang.Object to_ = ""; - /** - *
-       * The address to withdraw to.
-       * 
- * - * string to = 2 [json_name = "to"]; - * @return The to. - */ - public java.lang.String getTo() { - java.lang.Object ref = to_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - to_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address to withdraw to.
-       * 
- * - * string to = 2 [json_name = "to"]; - * @return The bytes for to. - */ - public com.google.protobuf.ByteString - getToBytes() { - java.lang.Object ref = to_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - to_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address to withdraw to.
-       * 
- * - * string to = 2 [json_name = "to"]; - * @param value The to to set. - * @return This builder for chaining. - */ - public Builder setTo( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - to_ = value; - onChanged(); - return this; - } - /** - *
-       * The address to withdraw to.
-       * 
- * - * string to = 2 [json_name = "to"]; - * @return This builder for chaining. - */ - public Builder clearTo() { - - to_ = getDefaultInstance().getTo(); - onChanged(); - return this; - } - /** - *
-       * The address to withdraw to.
-       * 
- * - * string to = 2 [json_name = "to"]; - * @param value The bytes for to to set. - * @return This builder for chaining. - */ - public Builder setToBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - to_ = value; - onChanged(); - return this; - } - - private long amount_ ; - /** - *
-       * The withdrawal amount in NanoPAC.
-       * 
- * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - /** - *
-       * The withdrawal amount in NanoPAC.
-       * 
- * - * int64 amount = 3 [json_name = "amount"]; - * @param value The amount to set. - * @return This builder for chaining. - */ - public Builder setAmount(long value) { - - amount_ = value; - onChanged(); - return this; - } - /** - *
-       * The withdrawal amount in NanoPAC.
-       * 
- * - * int64 amount = 3 [json_name = "amount"]; - * @return This builder for chaining. - */ - public Builder clearAmount() { - - amount_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.PayloadWithdraw) - } - - // @@protoc_insertion_point(class_scope:pactus.PayloadWithdraw) - private static final pactus.transaction.TransactionOuterClass.PayloadWithdraw DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.PayloadWithdraw(); - } - - public static pactus.transaction.TransactionOuterClass.PayloadWithdraw getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PayloadWithdraw parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadWithdraw getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TransactionInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.TransactionInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The unique ID of the transaction.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - *
-     * The unique ID of the transaction.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - *
-     * The raw transaction data.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The data. - */ - java.lang.String getData(); - /** - *
-     * The raw transaction data.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The bytes for data. - */ - com.google.protobuf.ByteString - getDataBytes(); - - /** - *
-     * The version of the transaction.
-     * 
- * - * int32 version = 3 [json_name = "version"]; - * @return The version. - */ - int getVersion(); - - /** - *
-     * The lock time for the transaction.
-     * 
- * - * uint32 lock_time = 4 [json_name = "lockTime"]; - * @return The lockTime. - */ - int getLockTime(); - - /** - *
-     * The value of the transaction in NanoPAC.
-     * 
- * - * int64 value = 5 [json_name = "value"]; - * @return The value. - */ - long getValue(); - - /** - *
-     * The fee for the transaction in NanoPAC.
-     * 
- * - * int64 fee = 6 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); - - /** - *
-     * The type of transaction payload.
-     * 
- * - * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; - * @return The enum numeric value on the wire for payloadType. - */ - int getPayloadTypeValue(); - /** - *
-     * The type of transaction payload.
-     * 
- * - * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; - * @return The payloadType. - */ - pactus.transaction.TransactionOuterClass.PayloadType getPayloadType(); - - /** - *
-     * Transfer transaction payload.
-     * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - * @return Whether the transfer field is set. - */ - boolean hasTransfer(); - /** - *
-     * Transfer transaction payload.
-     * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - * @return The transfer. - */ - pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer(); - /** - *
-     * Transfer transaction payload.
-     * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - */ - pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder(); - - /** - *
-     * Bond transaction payload.
-     * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - * @return Whether the bond field is set. - */ - boolean hasBond(); - /** - *
-     * Bond transaction payload.
-     * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - * @return The bond. - */ - pactus.transaction.TransactionOuterClass.PayloadBond getBond(); - /** - *
-     * Bond transaction payload.
-     * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - */ - pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder(); - - /** - *
-     * Sortition transaction payload.
-     * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - * @return Whether the sortition field is set. - */ - boolean hasSortition(); - /** - *
-     * Sortition transaction payload.
-     * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - * @return The sortition. - */ - pactus.transaction.TransactionOuterClass.PayloadSortition getSortition(); - /** - *
-     * Sortition transaction payload.
-     * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - */ - pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder getSortitionOrBuilder(); - - /** - *
-     * Unbond transaction payload.
-     * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - * @return Whether the unbond field is set. - */ - boolean hasUnbond(); - /** - *
-     * Unbond transaction payload.
-     * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - * @return The unbond. - */ - pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond(); - /** - *
-     * Unbond transaction payload.
-     * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - */ - pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder(); - - /** - *
-     * Withdraw transaction payload.
-     * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - * @return Whether the withdraw field is set. - */ - boolean hasWithdraw(); - /** - *
-     * Withdraw transaction payload.
-     * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - * @return The withdraw. - */ - pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw(); - /** - *
-     * Withdraw transaction payload.
-     * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - */ - pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder(); - - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 8 [json_name = "memo"]; - * @return The memo. - */ - java.lang.String getMemo(); - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 8 [json_name = "memo"]; - * @return The bytes for memo. - */ - com.google.protobuf.ByteString - getMemoBytes(); - - /** - *
-     * The public key associated with the transaction.
-     * 
- * - * string public_key = 9 [json_name = "publicKey"]; - * @return The publicKey. - */ - java.lang.String getPublicKey(); - /** - *
-     * The public key associated with the transaction.
-     * 
- * - * string public_key = 9 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - com.google.protobuf.ByteString - getPublicKeyBytes(); - - /** - *
-     * The signature for the transaction.
-     * 
- * - * string signature = 10 [json_name = "signature"]; - * @return The signature. - */ - java.lang.String getSignature(); - /** - *
-     * The signature for the transaction.
-     * 
- * - * string signature = 10 [json_name = "signature"]; - * @return The bytes for signature. - */ - com.google.protobuf.ByteString - getSignatureBytes(); - - public pactus.transaction.TransactionOuterClass.TransactionInfo.PayloadCase getPayloadCase(); - } - /** - *
-   * Information about a transaction.
-   * 
- * - * Protobuf type {@code pactus.TransactionInfo} - */ - public static final class TransactionInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.TransactionInfo) - TransactionInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use TransactionInfo.newBuilder() to construct. - private TransactionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private TransactionInfo() { - id_ = ""; - data_ = ""; - payloadType_ = 0; - memo_ = ""; - publicKey_ = ""; - signature_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new TransactionInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransactionInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransactionInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.TransactionInfo.class, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder.class); - } - - private int payloadCase_ = 0; - private java.lang.Object payload_; - public enum PayloadCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - TRANSFER(30), - BOND(31), - SORTITION(32), - UNBOND(33), - WITHDRAW(34), - PAYLOAD_NOT_SET(0); - private final int value; - private PayloadCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static PayloadCase valueOf(int value) { - return forNumber(value); - } - - public static PayloadCase forNumber(int value) { - switch (value) { - case 30: return TRANSFER; - case 31: return BOND; - case 32: return SORTITION; - case 33: return UNBOND; - case 34: return WITHDRAW; - case 0: return PAYLOAD_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public PayloadCase - getPayloadCase() { - return PayloadCase.forNumber( - payloadCase_); - } - - public static final int ID_FIELD_NUMBER = 1; - private volatile java.lang.Object id_; - /** - *
-     * The unique ID of the transaction.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - *
-     * The unique ID of the transaction.
-     * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATA_FIELD_NUMBER = 2; - private volatile java.lang.Object data_; - /** - *
-     * The raw transaction data.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The data. - */ - @java.lang.Override - public java.lang.String getData() { - java.lang.Object ref = data_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - data_ = s; - return s; - } - } - /** - *
-     * The raw transaction data.
-     * 
- * - * string data = 2 [json_name = "data"]; - * @return The bytes for data. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDataBytes() { - java.lang.Object ref = data_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - data_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERSION_FIELD_NUMBER = 3; - private int version_; - /** - *
-     * The version of the transaction.
-     * 
- * - * int32 version = 3 [json_name = "version"]; - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - - public static final int LOCK_TIME_FIELD_NUMBER = 4; - private int lockTime_; - /** - *
-     * The lock time for the transaction.
-     * 
- * - * uint32 lock_time = 4 [json_name = "lockTime"]; - * @return The lockTime. - */ - @java.lang.Override - public int getLockTime() { - return lockTime_; - } - - public static final int VALUE_FIELD_NUMBER = 5; - private long value_; - /** - *
-     * The value of the transaction in NanoPAC.
-     * 
- * - * int64 value = 5 [json_name = "value"]; - * @return The value. - */ - @java.lang.Override - public long getValue() { - return value_; - } - - public static final int FEE_FIELD_NUMBER = 6; - private long fee_; - /** - *
-     * The fee for the transaction in NanoPAC.
-     * 
- * - * int64 fee = 6 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - - public static final int PAYLOAD_TYPE_FIELD_NUMBER = 7; - private int payloadType_; - /** - *
-     * The type of transaction payload.
-     * 
- * - * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; - * @return The enum numeric value on the wire for payloadType. - */ - @java.lang.Override public int getPayloadTypeValue() { - return payloadType_; - } - /** - *
-     * The type of transaction payload.
-     * 
- * - * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; - * @return The payloadType. - */ - @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { - @SuppressWarnings("deprecation") - pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); - return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; - } - - public static final int TRANSFER_FIELD_NUMBER = 30; - /** - *
-     * Transfer transaction payload.
-     * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - * @return Whether the transfer field is set. - */ - @java.lang.Override - public boolean hasTransfer() { - return payloadCase_ == 30; - } - /** - *
-     * Transfer transaction payload.
-     * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - * @return The transfer. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer() { - if (payloadCase_ == 30) { - return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); - } - /** - *
-     * Transfer transaction payload.
-     * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() { - if (payloadCase_ == 30) { - return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); - } - - public static final int BOND_FIELD_NUMBER = 31; - /** - *
-     * Bond transaction payload.
-     * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - * @return Whether the bond field is set. - */ - @java.lang.Override - public boolean hasBond() { - return payloadCase_ == 31; - } - /** - *
-     * Bond transaction payload.
-     * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - * @return The bond. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadBond getBond() { - if (payloadCase_ == 31) { - return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); - } - /** - *
-     * Bond transaction payload.
-     * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() { - if (payloadCase_ == 31) { - return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); - } - - public static final int SORTITION_FIELD_NUMBER = 32; - /** - *
-     * Sortition transaction payload.
-     * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - * @return Whether the sortition field is set. - */ - @java.lang.Override - public boolean hasSortition() { - return payloadCase_ == 32; - } - /** - *
-     * Sortition transaction payload.
-     * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - * @return The sortition. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadSortition getSortition() { - if (payloadCase_ == 32) { - return (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); - } - /** - *
-     * Sortition transaction payload.
-     * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder getSortitionOrBuilder() { - if (payloadCase_ == 32) { - return (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); - } - - public static final int UNBOND_FIELD_NUMBER = 33; - /** - *
-     * Unbond transaction payload.
-     * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - * @return Whether the unbond field is set. - */ - @java.lang.Override - public boolean hasUnbond() { - return payloadCase_ == 33; - } - /** - *
-     * Unbond transaction payload.
-     * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - * @return The unbond. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond() { - if (payloadCase_ == 33) { - return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); - } - /** - *
-     * Unbond transaction payload.
-     * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() { - if (payloadCase_ == 33) { - return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); - } - - public static final int WITHDRAW_FIELD_NUMBER = 34; - /** - *
-     * Withdraw transaction payload.
-     * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - * @return Whether the withdraw field is set. - */ - @java.lang.Override - public boolean hasWithdraw() { - return payloadCase_ == 34; - } - /** - *
-     * Withdraw transaction payload.
-     * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - * @return The withdraw. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw() { - if (payloadCase_ == 34) { - return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); - } - /** - *
-     * Withdraw transaction payload.
-     * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() { - if (payloadCase_ == 34) { - return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); - } - - public static final int MEMO_FIELD_NUMBER = 8; - private volatile java.lang.Object memo_; - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 8 [json_name = "memo"]; - * @return The memo. - */ - @java.lang.Override - public java.lang.String getMemo() { - java.lang.Object ref = memo_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - memo_ = s; - return s; - } - } - /** - *
-     * A memo string for the transaction.
-     * 
- * - * string memo = 8 [json_name = "memo"]; - * @return The bytes for memo. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMemoBytes() { - java.lang.Object ref = memo_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - memo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 9; - private volatile java.lang.Object publicKey_; - /** - *
-     * The public key associated with the transaction.
-     * 
- * - * string public_key = 9 [json_name = "publicKey"]; - * @return The publicKey. - */ - @java.lang.Override - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } - } - /** - *
-     * The public key associated with the transaction.
-     * 
- * - * string public_key = 9 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIGNATURE_FIELD_NUMBER = 10; - private volatile java.lang.Object signature_; - /** - *
-     * The signature for the transaction.
-     * 
- * - * string signature = 10 [json_name = "signature"]; - * @return The signature. - */ - @java.lang.Override - public java.lang.String getSignature() { - java.lang.Object ref = signature_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signature_ = s; - return s; - } - } - /** - *
-     * The signature for the transaction.
-     * 
- * - * string signature = 10 [json_name = "signature"]; - * @return The bytes for signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSignatureBytes() { - java.lang.Object ref = signature_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signature_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); - } - if (version_ != 0) { - output.writeInt32(3, version_); - } - if (lockTime_ != 0) { - output.writeUInt32(4, lockTime_); - } - if (value_ != 0L) { - output.writeInt64(5, value_); - } - if (fee_ != 0L) { - output.writeInt64(6, fee_); - } - if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { - output.writeEnum(7, payloadType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, memo_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, publicKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, signature_); - } - if (payloadCase_ == 30) { - output.writeMessage(30, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); - } - if (payloadCase_ == 31) { - output.writeMessage(31, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); - } - if (payloadCase_ == 32) { - output.writeMessage(32, (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_); - } - if (payloadCase_ == 33) { - output.writeMessage(33, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); - } - if (payloadCase_ == 34) { - output.writeMessage(34, (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); - } - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, version_); - } - if (lockTime_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, lockTime_); - } - if (value_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, value_); - } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(6, fee_); - } - if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(7, payloadType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, memo_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, publicKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, signature_); - } - if (payloadCase_ == 30) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(30, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); - } - if (payloadCase_ == 31) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(31, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); - } - if (payloadCase_ == 32) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(32, (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_); - } - if (payloadCase_ == 33) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(33, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); - } - if (payloadCase_ == 34) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(34, (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.TransactionInfo)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.TransactionInfo other = (pactus.transaction.TransactionOuterClass.TransactionInfo) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getData() - .equals(other.getData())) return false; - if (getVersion() - != other.getVersion()) return false; - if (getLockTime() - != other.getLockTime()) return false; - if (getValue() - != other.getValue()) return false; - if (getFee() - != other.getFee()) return false; - if (payloadType_ != other.payloadType_) return false; - if (!getMemo() - .equals(other.getMemo())) return false; - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - if (!getSignature() - .equals(other.getSignature())) return false; - if (!getPayloadCase().equals(other.getPayloadCase())) return false; - switch (payloadCase_) { - case 30: - if (!getTransfer() - .equals(other.getTransfer())) return false; - break; - case 31: - if (!getBond() - .equals(other.getBond())) return false; - break; - case 32: - if (!getSortition() - .equals(other.getSortition())) return false; - break; - case 33: - if (!getUnbond() - .equals(other.getUnbond())) return false; - break; - case 34: - if (!getWithdraw() - .equals(other.getWithdraw())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - hash = (37 * hash) + VERSION_FIELD_NUMBER; - hash = (53 * hash) + getVersion(); - hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; - hash = (53 * hash) + getLockTime(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getValue()); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); - hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; - hash = (53 * hash) + payloadType_; - hash = (37 * hash) + MEMO_FIELD_NUMBER; - hash = (53 * hash) + getMemo().hashCode(); - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getSignature().hashCode(); - switch (payloadCase_) { - case 30: - hash = (37 * hash) + TRANSFER_FIELD_NUMBER; - hash = (53 * hash) + getTransfer().hashCode(); - break; - case 31: - hash = (37 * hash) + BOND_FIELD_NUMBER; - hash = (53 * hash) + getBond().hashCode(); - break; - case 32: - hash = (37 * hash) + SORTITION_FIELD_NUMBER; - hash = (53 * hash) + getSortition().hashCode(); - break; - case 33: - hash = (37 * hash) + UNBOND_FIELD_NUMBER; - hash = (53 * hash) + getUnbond().hashCode(); - break; - case 34: - hash = (37 * hash) + WITHDRAW_FIELD_NUMBER; - hash = (53 * hash) + getWithdraw().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.TransactionInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Information about a transaction.
-     * 
- * - * Protobuf type {@code pactus.TransactionInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.TransactionInfo) - pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransactionInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransactionInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.TransactionInfo.class, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.TransactionInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - id_ = ""; - - data_ = ""; - - version_ = 0; - - lockTime_ = 0; - - value_ = 0L; - - fee_ = 0L; - - payloadType_ = 0; - - if (transferBuilder_ != null) { - transferBuilder_.clear(); - } - if (bondBuilder_ != null) { - bondBuilder_.clear(); - } - if (sortitionBuilder_ != null) { - sortitionBuilder_.clear(); - } - if (unbondBuilder_ != null) { - unbondBuilder_.clear(); - } - if (withdrawBuilder_ != null) { - withdrawBuilder_.clear(); - } - memo_ = ""; - - publicKey_ = ""; - - signature_ = ""; - - payloadCase_ = 0; - payload_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransactionInfo_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionInfo build() { - pactus.transaction.TransactionOuterClass.TransactionInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionInfo buildPartial() { - pactus.transaction.TransactionOuterClass.TransactionInfo result = new pactus.transaction.TransactionOuterClass.TransactionInfo(this); - result.id_ = id_; - result.data_ = data_; - result.version_ = version_; - result.lockTime_ = lockTime_; - result.value_ = value_; - result.fee_ = fee_; - result.payloadType_ = payloadType_; - if (payloadCase_ == 30) { - if (transferBuilder_ == null) { - result.payload_ = payload_; - } else { - result.payload_ = transferBuilder_.build(); - } - } - if (payloadCase_ == 31) { - if (bondBuilder_ == null) { - result.payload_ = payload_; - } else { - result.payload_ = bondBuilder_.build(); - } - } - if (payloadCase_ == 32) { - if (sortitionBuilder_ == null) { - result.payload_ = payload_; - } else { - result.payload_ = sortitionBuilder_.build(); - } - } - if (payloadCase_ == 33) { - if (unbondBuilder_ == null) { - result.payload_ = payload_; - } else { - result.payload_ = unbondBuilder_.build(); - } - } - if (payloadCase_ == 34) { - if (withdrawBuilder_ == null) { - result.payload_ = payload_; - } else { - result.payload_ = withdrawBuilder_.build(); - } - } - result.memo_ = memo_; - result.publicKey_ = publicKey_; - result.signature_ = signature_; - result.payloadCase_ = payloadCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.TransactionInfo) { - return mergeFrom((pactus.transaction.TransactionOuterClass.TransactionInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.TransactionInfo other) { - if (other == pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - onChanged(); - } - if (!other.getData().isEmpty()) { - data_ = other.data_; - onChanged(); - } - if (other.getVersion() != 0) { - setVersion(other.getVersion()); - } - if (other.getLockTime() != 0) { - setLockTime(other.getLockTime()); - } - if (other.getValue() != 0L) { - setValue(other.getValue()); - } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } - if (other.payloadType_ != 0) { - setPayloadTypeValue(other.getPayloadTypeValue()); - } - if (!other.getMemo().isEmpty()) { - memo_ = other.memo_; - onChanged(); - } - if (!other.getPublicKey().isEmpty()) { - publicKey_ = other.publicKey_; - onChanged(); - } - if (!other.getSignature().isEmpty()) { - signature_ = other.signature_; - onChanged(); - } - switch (other.getPayloadCase()) { - case TRANSFER: { - mergeTransfer(other.getTransfer()); - break; - } - case BOND: { - mergeBond(other.getBond()); - break; - } - case SORTITION: { - mergeSortition(other.getSortition()); - break; - } - case UNBOND: { - mergeUnbond(other.getUnbond()); - break; - } - case WITHDRAW: { - mergeWithdraw(other.getWithdraw()); - break; - } - case PAYLOAD_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - data_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: { - version_ = input.readInt32(); - - break; - } // case 24 - case 32: { - lockTime_ = input.readUInt32(); - - break; - } // case 32 - case 40: { - value_ = input.readInt64(); - - break; - } // case 40 - case 48: { - fee_ = input.readInt64(); - - break; - } // case 48 - case 56: { - payloadType_ = input.readEnum(); - - break; - } // case 56 - case 66: { - memo_ = input.readStringRequireUtf8(); - - break; - } // case 66 - case 74: { - publicKey_ = input.readStringRequireUtf8(); - - break; - } // case 74 - case 82: { - signature_ = input.readStringRequireUtf8(); - - break; - } // case 82 - case 242: { - input.readMessage( - getTransferFieldBuilder().getBuilder(), - extensionRegistry); - payloadCase_ = 30; - break; - } // case 242 - case 250: { - input.readMessage( - getBondFieldBuilder().getBuilder(), - extensionRegistry); - payloadCase_ = 31; - break; - } // case 250 - case 258: { - input.readMessage( - getSortitionFieldBuilder().getBuilder(), - extensionRegistry); - payloadCase_ = 32; - break; - } // case 258 - case 266: { - input.readMessage( - getUnbondFieldBuilder().getBuilder(), - extensionRegistry); - payloadCase_ = 33; - break; - } // case 266 - case 274: { - input.readMessage( - getWithdrawFieldBuilder().getBuilder(), - extensionRegistry); - payloadCase_ = 34; - break; - } // case 274 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int payloadCase_ = 0; - private java.lang.Object payload_; - public PayloadCase - getPayloadCase() { - return PayloadCase.forNumber( - payloadCase_); - } - - public Builder clearPayload() { - payloadCase_ = 0; - payload_ = null; - onChanged(); - return this; - } - - - private java.lang.Object id_ = ""; - /** - *
-       * The unique ID of the transaction.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The unique ID of the transaction.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The unique ID of the transaction.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - id_ = value; - onChanged(); - return this; - } - /** - *
-       * The unique ID of the transaction.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = getDefaultInstance().getId(); - onChanged(); - return this; - } - /** - *
-       * The unique ID of the transaction.
-       * 
- * - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - id_ = value; - onChanged(); - return this; - } - - private java.lang.Object data_ = ""; - /** - *
-       * The raw transaction data.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @return The data. - */ - public java.lang.String getData() { - java.lang.Object ref = data_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - data_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The raw transaction data.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @return The bytes for data. - */ - public com.google.protobuf.ByteString - getDataBytes() { - java.lang.Object ref = data_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - data_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The raw transaction data.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @param value The data to set. - * @return This builder for chaining. - */ - public Builder setData( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - data_ = value; - onChanged(); - return this; - } - /** - *
-       * The raw transaction data.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @return This builder for chaining. - */ - public Builder clearData() { - - data_ = getDefaultInstance().getData(); - onChanged(); - return this; - } - /** - *
-       * The raw transaction data.
-       * 
- * - * string data = 2 [json_name = "data"]; - * @param value The bytes for data to set. - * @return This builder for chaining. - */ - public Builder setDataBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - data_ = value; - onChanged(); - return this; - } - - private int version_ ; - /** - *
-       * The version of the transaction.
-       * 
- * - * int32 version = 3 [json_name = "version"]; - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - /** - *
-       * The version of the transaction.
-       * 
- * - * int32 version = 3 [json_name = "version"]; - * @param value The version to set. - * @return This builder for chaining. - */ - public Builder setVersion(int value) { - - version_ = value; - onChanged(); - return this; - } - /** - *
-       * The version of the transaction.
-       * 
- * - * int32 version = 3 [json_name = "version"]; - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = 0; - onChanged(); - return this; - } - - private int lockTime_ ; - /** - *
-       * The lock time for the transaction.
-       * 
- * - * uint32 lock_time = 4 [json_name = "lockTime"]; - * @return The lockTime. - */ - @java.lang.Override - public int getLockTime() { - return lockTime_; - } - /** - *
-       * The lock time for the transaction.
-       * 
- * - * uint32 lock_time = 4 [json_name = "lockTime"]; - * @param value The lockTime to set. - * @return This builder for chaining. - */ - public Builder setLockTime(int value) { - - lockTime_ = value; - onChanged(); - return this; - } - /** - *
-       * The lock time for the transaction.
-       * 
- * - * uint32 lock_time = 4 [json_name = "lockTime"]; - * @return This builder for chaining. - */ - public Builder clearLockTime() { - - lockTime_ = 0; - onChanged(); - return this; - } - - private long value_ ; - /** - *
-       * The value of the transaction in NanoPAC.
-       * 
- * - * int64 value = 5 [json_name = "value"]; - * @return The value. - */ - @java.lang.Override - public long getValue() { - return value_; - } - /** - *
-       * The value of the transaction in NanoPAC.
-       * 
- * - * int64 value = 5 [json_name = "value"]; - * @param value The value to set. - * @return This builder for chaining. - */ - public Builder setValue(long value) { - - value_ = value; - onChanged(); - return this; - } - /** - *
-       * The value of the transaction in NanoPAC.
-       * 
- * - * int64 value = 5 [json_name = "value"]; - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = 0L; - onChanged(); - return this; - } - - private long fee_ ; - /** - *
-       * The fee for the transaction in NanoPAC.
-       * 
- * - * int64 fee = 6 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
-       * The fee for the transaction in NanoPAC.
-       * 
- * - * int64 fee = 6 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
-       * The fee for the transaction in NanoPAC.
-       * 
- * - * int64 fee = 6 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } - - private int payloadType_ = 0; - /** - *
-       * The type of transaction payload.
-       * 
- * - * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; - * @return The enum numeric value on the wire for payloadType. - */ - @java.lang.Override public int getPayloadTypeValue() { - return payloadType_; - } - /** - *
-       * The type of transaction payload.
-       * 
- * - * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; - * @param value The enum numeric value on the wire for payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadTypeValue(int value) { - - payloadType_ = value; - onChanged(); - return this; - } - /** - *
-       * The type of transaction payload.
-       * 
- * - * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; - * @return The payloadType. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { - @SuppressWarnings("deprecation") - pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); - return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; - } - /** - *
-       * The type of transaction payload.
-       * 
- * - * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; - * @param value The payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadType(pactus.transaction.TransactionOuterClass.PayloadType value) { - if (value == null) { - throw new NullPointerException(); - } - - payloadType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The type of transaction payload.
-       * 
- * - * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; - * @return This builder for chaining. - */ - public Builder clearPayloadType() { - - payloadType_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder> transferBuilder_; - /** - *
-       * Transfer transaction payload.
-       * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - * @return Whether the transfer field is set. - */ - @java.lang.Override - public boolean hasTransfer() { - return payloadCase_ == 30; - } - /** - *
-       * Transfer transaction payload.
-       * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - * @return The transfer. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer() { - if (transferBuilder_ == null) { - if (payloadCase_ == 30) { - return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); - } else { - if (payloadCase_ == 30) { - return transferBuilder_.getMessage(); - } - return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); - } - } - /** - *
-       * Transfer transaction payload.
-       * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - */ - public Builder setTransfer(pactus.transaction.TransactionOuterClass.PayloadTransfer value) { - if (transferBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - payload_ = value; - onChanged(); - } else { - transferBuilder_.setMessage(value); - } - payloadCase_ = 30; - return this; - } - /** - *
-       * Transfer transaction payload.
-       * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - */ - public Builder setTransfer( - pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder builderForValue) { - if (transferBuilder_ == null) { - payload_ = builderForValue.build(); - onChanged(); - } else { - transferBuilder_.setMessage(builderForValue.build()); - } - payloadCase_ = 30; - return this; - } - /** - *
-       * Transfer transaction payload.
-       * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - */ - public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.PayloadTransfer value) { - if (transferBuilder_ == null) { - if (payloadCase_ == 30 && - payload_ != pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance()) { - payload_ = pactus.transaction.TransactionOuterClass.PayloadTransfer.newBuilder((pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_) - .mergeFrom(value).buildPartial(); - } else { - payload_ = value; - } - onChanged(); - } else { - if (payloadCase_ == 30) { - transferBuilder_.mergeFrom(value); - } else { - transferBuilder_.setMessage(value); - } - } - payloadCase_ = 30; - return this; - } - /** - *
-       * Transfer transaction payload.
-       * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - */ - public Builder clearTransfer() { - if (transferBuilder_ == null) { - if (payloadCase_ == 30) { - payloadCase_ = 0; - payload_ = null; - onChanged(); - } - } else { - if (payloadCase_ == 30) { - payloadCase_ = 0; - payload_ = null; - } - transferBuilder_.clear(); - } - return this; - } - /** - *
-       * Transfer transaction payload.
-       * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - */ - public pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder getTransferBuilder() { - return getTransferFieldBuilder().getBuilder(); - } - /** - *
-       * Transfer transaction payload.
-       * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() { - if ((payloadCase_ == 30) && (transferBuilder_ != null)) { - return transferBuilder_.getMessageOrBuilder(); - } else { - if (payloadCase_ == 30) { - return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); - } - } - /** - *
-       * Transfer transaction payload.
-       * 
- * - * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder> - getTransferFieldBuilder() { - if (transferBuilder_ == null) { - if (!(payloadCase_ == 30)) { - payload_ = pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); - } - transferBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder>( - (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_, - getParentForChildren(), - isClean()); - payload_ = null; - } - payloadCase_ = 30; - onChanged();; - return transferBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder> bondBuilder_; - /** - *
-       * Bond transaction payload.
-       * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - * @return Whether the bond field is set. - */ - @java.lang.Override - public boolean hasBond() { - return payloadCase_ == 31; - } - /** - *
-       * Bond transaction payload.
-       * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - * @return The bond. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadBond getBond() { - if (bondBuilder_ == null) { - if (payloadCase_ == 31) { - return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); - } else { - if (payloadCase_ == 31) { - return bondBuilder_.getMessage(); - } - return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); - } - } - /** - *
-       * Bond transaction payload.
-       * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - */ - public Builder setBond(pactus.transaction.TransactionOuterClass.PayloadBond value) { - if (bondBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - payload_ = value; - onChanged(); - } else { - bondBuilder_.setMessage(value); - } - payloadCase_ = 31; - return this; - } - /** - *
-       * Bond transaction payload.
-       * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - */ - public Builder setBond( - pactus.transaction.TransactionOuterClass.PayloadBond.Builder builderForValue) { - if (bondBuilder_ == null) { - payload_ = builderForValue.build(); - onChanged(); - } else { - bondBuilder_.setMessage(builderForValue.build()); - } - payloadCase_ = 31; - return this; - } - /** - *
-       * Bond transaction payload.
-       * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - */ - public Builder mergeBond(pactus.transaction.TransactionOuterClass.PayloadBond value) { - if (bondBuilder_ == null) { - if (payloadCase_ == 31 && - payload_ != pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance()) { - payload_ = pactus.transaction.TransactionOuterClass.PayloadBond.newBuilder((pactus.transaction.TransactionOuterClass.PayloadBond) payload_) - .mergeFrom(value).buildPartial(); - } else { - payload_ = value; - } - onChanged(); - } else { - if (payloadCase_ == 31) { - bondBuilder_.mergeFrom(value); - } else { - bondBuilder_.setMessage(value); - } - } - payloadCase_ = 31; - return this; - } - /** - *
-       * Bond transaction payload.
-       * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - */ - public Builder clearBond() { - if (bondBuilder_ == null) { - if (payloadCase_ == 31) { - payloadCase_ = 0; - payload_ = null; - onChanged(); - } - } else { - if (payloadCase_ == 31) { - payloadCase_ = 0; - payload_ = null; - } - bondBuilder_.clear(); - } - return this; - } - /** - *
-       * Bond transaction payload.
-       * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - */ - public pactus.transaction.TransactionOuterClass.PayloadBond.Builder getBondBuilder() { - return getBondFieldBuilder().getBuilder(); - } - /** - *
-       * Bond transaction payload.
-       * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() { - if ((payloadCase_ == 31) && (bondBuilder_ != null)) { - return bondBuilder_.getMessageOrBuilder(); - } else { - if (payloadCase_ == 31) { - return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); - } - } - /** - *
-       * Bond transaction payload.
-       * 
- * - * .pactus.PayloadBond bond = 31 [json_name = "bond"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder> - getBondFieldBuilder() { - if (bondBuilder_ == null) { - if (!(payloadCase_ == 31)) { - payload_ = pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); - } - bondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder>( - (pactus.transaction.TransactionOuterClass.PayloadBond) payload_, - getParentForChildren(), - isClean()); - payload_ = null; - } - payloadCase_ = 31; - onChanged();; - return bondBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadSortition, pactus.transaction.TransactionOuterClass.PayloadSortition.Builder, pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder> sortitionBuilder_; - /** - *
-       * Sortition transaction payload.
-       * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - * @return Whether the sortition field is set. - */ - @java.lang.Override - public boolean hasSortition() { - return payloadCase_ == 32; - } - /** - *
-       * Sortition transaction payload.
-       * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - * @return The sortition. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadSortition getSortition() { - if (sortitionBuilder_ == null) { - if (payloadCase_ == 32) { - return (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); - } else { - if (payloadCase_ == 32) { - return sortitionBuilder_.getMessage(); - } - return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); - } - } - /** - *
-       * Sortition transaction payload.
-       * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - */ - public Builder setSortition(pactus.transaction.TransactionOuterClass.PayloadSortition value) { - if (sortitionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - payload_ = value; - onChanged(); - } else { - sortitionBuilder_.setMessage(value); - } - payloadCase_ = 32; - return this; - } - /** - *
-       * Sortition transaction payload.
-       * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - */ - public Builder setSortition( - pactus.transaction.TransactionOuterClass.PayloadSortition.Builder builderForValue) { - if (sortitionBuilder_ == null) { - payload_ = builderForValue.build(); - onChanged(); - } else { - sortitionBuilder_.setMessage(builderForValue.build()); - } - payloadCase_ = 32; - return this; - } - /** - *
-       * Sortition transaction payload.
-       * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - */ - public Builder mergeSortition(pactus.transaction.TransactionOuterClass.PayloadSortition value) { - if (sortitionBuilder_ == null) { - if (payloadCase_ == 32 && - payload_ != pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance()) { - payload_ = pactus.transaction.TransactionOuterClass.PayloadSortition.newBuilder((pactus.transaction.TransactionOuterClass.PayloadSortition) payload_) - .mergeFrom(value).buildPartial(); - } else { - payload_ = value; - } - onChanged(); - } else { - if (payloadCase_ == 32) { - sortitionBuilder_.mergeFrom(value); - } else { - sortitionBuilder_.setMessage(value); - } - } - payloadCase_ = 32; - return this; - } - /** - *
-       * Sortition transaction payload.
-       * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - */ - public Builder clearSortition() { - if (sortitionBuilder_ == null) { - if (payloadCase_ == 32) { - payloadCase_ = 0; - payload_ = null; - onChanged(); - } - } else { - if (payloadCase_ == 32) { - payloadCase_ = 0; - payload_ = null; - } - sortitionBuilder_.clear(); - } - return this; - } - /** - *
-       * Sortition transaction payload.
-       * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - */ - public pactus.transaction.TransactionOuterClass.PayloadSortition.Builder getSortitionBuilder() { - return getSortitionFieldBuilder().getBuilder(); - } - /** - *
-       * Sortition transaction payload.
-       * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder getSortitionOrBuilder() { - if ((payloadCase_ == 32) && (sortitionBuilder_ != null)) { - return sortitionBuilder_.getMessageOrBuilder(); - } else { - if (payloadCase_ == 32) { - return (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); - } - } - /** - *
-       * Sortition transaction payload.
-       * 
- * - * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadSortition, pactus.transaction.TransactionOuterClass.PayloadSortition.Builder, pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder> - getSortitionFieldBuilder() { - if (sortitionBuilder_ == null) { - if (!(payloadCase_ == 32)) { - payload_ = pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); - } - sortitionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadSortition, pactus.transaction.TransactionOuterClass.PayloadSortition.Builder, pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder>( - (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_, - getParentForChildren(), - isClean()); - payload_ = null; - } - payloadCase_ = 32; - onChanged();; - return sortitionBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder> unbondBuilder_; - /** - *
-       * Unbond transaction payload.
-       * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - * @return Whether the unbond field is set. - */ - @java.lang.Override - public boolean hasUnbond() { - return payloadCase_ == 33; - } - /** - *
-       * Unbond transaction payload.
-       * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - * @return The unbond. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond() { - if (unbondBuilder_ == null) { - if (payloadCase_ == 33) { - return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); - } else { - if (payloadCase_ == 33) { - return unbondBuilder_.getMessage(); - } - return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); - } - } - /** - *
-       * Unbond transaction payload.
-       * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - */ - public Builder setUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbond value) { - if (unbondBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - payload_ = value; - onChanged(); - } else { - unbondBuilder_.setMessage(value); - } - payloadCase_ = 33; - return this; - } - /** - *
-       * Unbond transaction payload.
-       * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - */ - public Builder setUnbond( - pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder builderForValue) { - if (unbondBuilder_ == null) { - payload_ = builderForValue.build(); - onChanged(); - } else { - unbondBuilder_.setMessage(builderForValue.build()); - } - payloadCase_ = 33; - return this; - } - /** - *
-       * Unbond transaction payload.
-       * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - */ - public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbond value) { - if (unbondBuilder_ == null) { - if (payloadCase_ == 33 && - payload_ != pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance()) { - payload_ = pactus.transaction.TransactionOuterClass.PayloadUnbond.newBuilder((pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_) - .mergeFrom(value).buildPartial(); - } else { - payload_ = value; - } - onChanged(); - } else { - if (payloadCase_ == 33) { - unbondBuilder_.mergeFrom(value); - } else { - unbondBuilder_.setMessage(value); - } - } - payloadCase_ = 33; - return this; - } - /** - *
-       * Unbond transaction payload.
-       * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - */ - public Builder clearUnbond() { - if (unbondBuilder_ == null) { - if (payloadCase_ == 33) { - payloadCase_ = 0; - payload_ = null; - onChanged(); - } - } else { - if (payloadCase_ == 33) { - payloadCase_ = 0; - payload_ = null; - } - unbondBuilder_.clear(); - } - return this; - } - /** - *
-       * Unbond transaction payload.
-       * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - */ - public pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder getUnbondBuilder() { - return getUnbondFieldBuilder().getBuilder(); - } - /** - *
-       * Unbond transaction payload.
-       * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() { - if ((payloadCase_ == 33) && (unbondBuilder_ != null)) { - return unbondBuilder_.getMessageOrBuilder(); - } else { - if (payloadCase_ == 33) { - return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); - } - } - /** - *
-       * Unbond transaction payload.
-       * 
- * - * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder> - getUnbondFieldBuilder() { - if (unbondBuilder_ == null) { - if (!(payloadCase_ == 33)) { - payload_ = pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); - } - unbondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder>( - (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_, - getParentForChildren(), - isClean()); - payload_ = null; - } - payloadCase_ = 33; - onChanged();; - return unbondBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder> withdrawBuilder_; - /** - *
-       * Withdraw transaction payload.
-       * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - * @return Whether the withdraw field is set. - */ - @java.lang.Override - public boolean hasWithdraw() { - return payloadCase_ == 34; - } - /** - *
-       * Withdraw transaction payload.
-       * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - * @return The withdraw. - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw() { - if (withdrawBuilder_ == null) { - if (payloadCase_ == 34) { - return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); - } else { - if (payloadCase_ == 34) { - return withdrawBuilder_.getMessage(); - } - return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); - } - } - /** - *
-       * Withdraw transaction payload.
-       * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - */ - public Builder setWithdraw(pactus.transaction.TransactionOuterClass.PayloadWithdraw value) { - if (withdrawBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - payload_ = value; - onChanged(); - } else { - withdrawBuilder_.setMessage(value); - } - payloadCase_ = 34; - return this; - } - /** - *
-       * Withdraw transaction payload.
-       * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - */ - public Builder setWithdraw( - pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder builderForValue) { - if (withdrawBuilder_ == null) { - payload_ = builderForValue.build(); - onChanged(); - } else { - withdrawBuilder_.setMessage(builderForValue.build()); - } - payloadCase_ = 34; - return this; - } - /** - *
-       * Withdraw transaction payload.
-       * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - */ - public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.PayloadWithdraw value) { - if (withdrawBuilder_ == null) { - if (payloadCase_ == 34 && - payload_ != pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance()) { - payload_ = pactus.transaction.TransactionOuterClass.PayloadWithdraw.newBuilder((pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_) - .mergeFrom(value).buildPartial(); - } else { - payload_ = value; - } - onChanged(); - } else { - if (payloadCase_ == 34) { - withdrawBuilder_.mergeFrom(value); - } else { - withdrawBuilder_.setMessage(value); - } - } - payloadCase_ = 34; - return this; - } - /** - *
-       * Withdraw transaction payload.
-       * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - */ - public Builder clearWithdraw() { - if (withdrawBuilder_ == null) { - if (payloadCase_ == 34) { - payloadCase_ = 0; - payload_ = null; - onChanged(); - } - } else { - if (payloadCase_ == 34) { - payloadCase_ = 0; - payload_ = null; - } - withdrawBuilder_.clear(); - } - return this; - } - /** - *
-       * Withdraw transaction payload.
-       * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - */ - public pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder getWithdrawBuilder() { - return getWithdrawFieldBuilder().getBuilder(); - } - /** - *
-       * Withdraw transaction payload.
-       * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - */ - @java.lang.Override - public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() { - if ((payloadCase_ == 34) && (withdrawBuilder_ != null)) { - return withdrawBuilder_.getMessageOrBuilder(); - } else { - if (payloadCase_ == 34) { - return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; - } - return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); - } - } - /** - *
-       * Withdraw transaction payload.
-       * 
- * - * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder> - getWithdrawFieldBuilder() { - if (withdrawBuilder_ == null) { - if (!(payloadCase_ == 34)) { - payload_ = pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); - } - withdrawBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder>( - (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_, - getParentForChildren(), - isClean()); - payload_ = null; - } - payloadCase_ = 34; - onChanged();; - return withdrawBuilder_; - } - - private java.lang.Object memo_ = ""; - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 8 [json_name = "memo"]; - * @return The memo. - */ - public java.lang.String getMemo() { - java.lang.Object ref = memo_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - memo_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 8 [json_name = "memo"]; - * @return The bytes for memo. - */ - public com.google.protobuf.ByteString - getMemoBytes() { - java.lang.Object ref = memo_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - memo_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 8 [json_name = "memo"]; - * @param value The memo to set. - * @return This builder for chaining. - */ - public Builder setMemo( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - memo_ = value; - onChanged(); - return this; - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 8 [json_name = "memo"]; - * @return This builder for chaining. - */ - public Builder clearMemo() { - - memo_ = getDefaultInstance().getMemo(); - onChanged(); - return this; - } - /** - *
-       * A memo string for the transaction.
-       * 
- * - * string memo = 8 [json_name = "memo"]; - * @param value The bytes for memo to set. - * @return This builder for chaining. - */ - public Builder setMemoBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - memo_ = value; - onChanged(); - return this; - } - - private java.lang.Object publicKey_ = ""; - /** - *
-       * The public key associated with the transaction.
-       * 
- * - * string public_key = 9 [json_name = "publicKey"]; - * @return The publicKey. - */ - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The public key associated with the transaction.
-       * 
- * - * string public_key = 9 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The public key associated with the transaction.
-       * 
- * - * string public_key = 9 [json_name = "publicKey"]; - * @param value The publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - publicKey_ = value; - onChanged(); - return this; - } - /** - *
-       * The public key associated with the transaction.
-       * 
- * - * string public_key = 9 [json_name = "publicKey"]; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - - publicKey_ = getDefaultInstance().getPublicKey(); - onChanged(); - return this; - } - /** - *
-       * The public key associated with the transaction.
-       * 
- * - * string public_key = 9 [json_name = "publicKey"]; - * @param value The bytes for publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - publicKey_ = value; - onChanged(); - return this; - } - - private java.lang.Object signature_ = ""; - /** - *
-       * The signature for the transaction.
-       * 
- * - * string signature = 10 [json_name = "signature"]; - * @return The signature. - */ - public java.lang.String getSignature() { - java.lang.Object ref = signature_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signature_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The signature for the transaction.
-       * 
- * - * string signature = 10 [json_name = "signature"]; - * @return The bytes for signature. - */ - public com.google.protobuf.ByteString - getSignatureBytes() { - java.lang.Object ref = signature_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signature_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The signature for the transaction.
-       * 
- * - * string signature = 10 [json_name = "signature"]; - * @param value The signature to set. - * @return This builder for chaining. - */ - public Builder setSignature( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - signature_ = value; - onChanged(); - return this; - } - /** - *
-       * The signature for the transaction.
-       * 
- * - * string signature = 10 [json_name = "signature"]; - * @return This builder for chaining. - */ - public Builder clearSignature() { - - signature_ = getDefaultInstance().getSignature(); - onChanged(); - return this; - } - /** - *
-       * The signature for the transaction.
-       * 
- * - * string signature = 10 [json_name = "signature"]; - * @param value The bytes for signature to set. - * @return This builder for chaining. - */ - public Builder setSignatureBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - signature_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.TransactionInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.TransactionInfo) - private static final pactus.transaction.TransactionOuterClass.TransactionInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.TransactionInfo(); - } - - public static pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransactionInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetTransactionRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetTransactionRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetTransactionResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetTransactionResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_CalculateFeeRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_CalculateFeeRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_CalculateFeeResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_CalculateFeeResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_BroadcastTransactionRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_BroadcastTransactionResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetRawTransferTransactionRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetRawBondTransactionRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetRawTransactionResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_PayloadTransfer_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_PayloadTransfer_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_PayloadBond_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_PayloadBond_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_PayloadSortition_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_PayloadSortition_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_PayloadUnbond_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_PayloadUnbond_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_PayloadWithdraw_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_PayloadWithdraw_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_TransactionInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_TransactionInfo_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\021transaction.proto\022\006pactus\"c\n\025GetTransa" + - "ctionRequest\022\016\n\002id\030\001 \001(\tR\002id\022:\n\tverbosit" + - "y\030\002 \001(\0162\034.pactus.TransactionVerbosityR\tv" + - "erbosity\"\225\001\n\026GetTransactionResponse\022!\n\014b" + - "lock_height\030\001 \001(\rR\013blockHeight\022\035\n\nblock_" + - "time\030\002 \001(\rR\tblockTime\0229\n\013transaction\030\003 \001" + - "(\0132\027.pactus.TransactionInfoR\013transaction" + - "\"\210\001\n\023CalculateFeeRequest\022\026\n\006amount\030\001 \001(\003" + - "R\006amount\0226\n\014payload_type\030\002 \001(\0162\023.pactus." + - "PayloadTypeR\013payloadType\022!\n\014fixed_amount" + - "\030\003 \001(\010R\013fixedAmount\"@\n\024CalculateFeeRespo" + - "nse\022\026\n\006amount\030\001 \001(\003R\006amount\022\020\n\003fee\030\002 \001(\003" + - "R\003fee\"S\n\033BroadcastTransactionRequest\0224\n\026" + - "signed_raw_transaction\030\001 \001(\tR\024signedRawT" + - "ransaction\".\n\034BroadcastTransactionRespon" + - "se\022\016\n\002id\030\001 \001(\tR\002id\"\261\001\n GetRawTransferTra" + - "nsactionRequest\022\033\n\tlock_time\030\001 \001(\rR\010lock" + - "Time\022\026\n\006sender\030\002 \001(\tR\006sender\022\032\n\010receiver" + - "\030\003 \001(\tR\010receiver\022\026\n\006amount\030\004 \001(\003R\006amount" + - "\022\020\n\003fee\030\005 \001(\003R\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"\312" + - "\001\n\034GetRawBondTransactionRequest\022\033\n\tlock_" + - "time\030\001 \001(\rR\010lockTime\022\026\n\006sender\030\002 \001(\tR\006se" + - "nder\022\032\n\010receiver\030\003 \001(\tR\010receiver\022\024\n\005stak" + - "e\030\004 \001(\003R\005stake\022\035\n\npublic_key\030\005 \001(\tR\tpubl" + - "icKey\022\020\n\003fee\030\006 \001(\003R\003fee\022\022\n\004memo\030\007 \001(\tR\004m" + - "emo\"~\n\036GetRawUnbondTransactionRequest\022\033\n" + - "\tlock_time\030\001 \001(\rR\010lockTime\022+\n\021validator_" + - "address\030\003 \001(\tR\020validatorAddress\022\022\n\004memo\030" + - "\004 \001(\tR\004memo\"\323\001\n GetRawWithdrawTransactio" + - "nRequest\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022+\n" + - "\021validator_address\030\002 \001(\tR\020validatorAddre" + - "ss\022\'\n\017account_address\030\003 \001(\tR\016accountAddr" + - "ess\022\026\n\006amount\030\004 \001(\003R\006amount\022\020\n\003fee\030\005 \001(\003" + - "R\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"D\n\031GetRawTrans" + - "actionResponse\022\'\n\017raw_transaction\030\001 \001(\tR" + - "\016rawTransaction\"]\n\017PayloadTransfer\022\026\n\006se" + - "nder\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 \001(\tR\010re" + - "ceiver\022\026\n\006amount\030\003 \001(\003R\006amount\"W\n\013Payloa" + - "dBond\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receive" + - "r\030\002 \001(\tR\010receiver\022\024\n\005stake\030\003 \001(\003R\005stake\"" + - "B\n\020PayloadSortition\022\030\n\007address\030\001 \001(\tR\007ad" + - "dress\022\024\n\005proof\030\002 \001(\tR\005proof\"-\n\rPayloadUn" + - "bond\022\034\n\tvalidator\030\001 \001(\tR\tvalidator\"M\n\017Pa" + - "yloadWithdraw\022\022\n\004from\030\001 \001(\tR\004from\022\016\n\002to\030" + - "\002 \001(\tR\002to\022\026\n\006amount\030\003 \001(\003R\006amount\"\254\004\n\017Tr" + - "ansactionInfo\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004data\030\002 " + - "\001(\tR\004data\022\030\n\007version\030\003 \001(\005R\007version\022\033\n\tl" + - "ock_time\030\004 \001(\rR\010lockTime\022\024\n\005value\030\005 \001(\003R" + - "\005value\022\020\n\003fee\030\006 \001(\003R\003fee\0226\n\014payload_type" + - "\030\007 \001(\0162\023.pactus.PayloadTypeR\013payloadType" + - "\0225\n\010transfer\030\036 \001(\0132\027.pactus.PayloadTrans" + - "ferH\000R\010transfer\022)\n\004bond\030\037 \001(\0132\023.pactus.P" + - "ayloadBondH\000R\004bond\0228\n\tsortition\030 \001(\0132\030." + - "pactus.PayloadSortitionH\000R\tsortition\022/\n\006" + - "unbond\030! \001(\0132\025.pactus.PayloadUnbondH\000R\006u" + - "nbond\0225\n\010withdraw\030\" \001(\0132\027.pactus.Payload" + - "WithdrawH\000R\010withdraw\022\022\n\004memo\030\010 \001(\tR\004memo" + - "\022\035\n\npublic_key\030\t \001(\tR\tpublicKey\022\034\n\tsigna" + - "ture\030\n \001(\tR\tsignatureB\t\n\007payload*\203\001\n\013Pay" + - "loadType\022\013\n\007UNKNOWN\020\000\022\024\n\020TRANSFER_PAYLOA" + - "D\020\001\022\020\n\014BOND_PAYLOAD\020\002\022\025\n\021SORTITION_PAYLO" + - "AD\020\003\022\022\n\016UNBOND_PAYLOAD\020\004\022\024\n\020WITHDRAW_PAY" + - "LOAD\020\005*B\n\024TransactionVerbosity\022\024\n\020TRANSA" + - "CTION_DATA\020\000\022\024\n\020TRANSACTION_INFO\020\0012\250\005\n\013T" + - "ransaction\022O\n\016GetTransaction\022\035.pactus.Ge" + - "tTransactionRequest\032\036.pactus.GetTransact" + - "ionResponse\022I\n\014CalculateFee\022\033.pactus.Cal" + - "culateFeeRequest\032\034.pactus.CalculateFeeRe" + - "sponse\022a\n\024BroadcastTransaction\022#.pactus." + - "BroadcastTransactionRequest\032$.pactus.Bro" + - "adcastTransactionResponse\022h\n\031GetRawTrans" + - "ferTransaction\022(.pactus.GetRawTransferTr" + - "ansactionRequest\032!.pactus.GetRawTransact" + - "ionResponse\022`\n\025GetRawBondTransaction\022$.p" + - "actus.GetRawBondTransactionRequest\032!.pac" + - "tus.GetRawTransactionResponse\022d\n\027GetRawU" + - "nbondTransaction\022&.pactus.GetRawUnbondTr" + - "ansactionRequest\032!.pactus.GetRawTransact" + - "ionResponse\022h\n\031GetRawWithdrawTransaction" + - "\022(.pactus.GetRawWithdrawTransactionReque" + - "st\032!.pactus.GetRawTransactionResponseBF\n" + - "\022pactus.transactionZ0github.com/pactus-p" + - "roject/pactus/www/grpc/pactusb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_pactus_GetTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_pactus_GetTransactionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetTransactionRequest_descriptor, - new java.lang.String[] { "Id", "Verbosity", }); - internal_static_pactus_GetTransactionResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_pactus_GetTransactionResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetTransactionResponse_descriptor, - new java.lang.String[] { "BlockHeight", "BlockTime", "Transaction", }); - internal_static_pactus_CalculateFeeRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_pactus_CalculateFeeRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_CalculateFeeRequest_descriptor, - new java.lang.String[] { "Amount", "PayloadType", "FixedAmount", }); - internal_static_pactus_CalculateFeeResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_pactus_CalculateFeeResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_CalculateFeeResponse_descriptor, - new java.lang.String[] { "Amount", "Fee", }); - internal_static_pactus_BroadcastTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_BroadcastTransactionRequest_descriptor, - new java.lang.String[] { "SignedRawTransaction", }); - internal_static_pactus_BroadcastTransactionResponse_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_BroadcastTransactionResponse_descriptor, - new java.lang.String[] { "Id", }); - internal_static_pactus_GetRawTransferTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetRawTransferTransactionRequest_descriptor, - new java.lang.String[] { "LockTime", "Sender", "Receiver", "Amount", "Fee", "Memo", }); - internal_static_pactus_GetRawBondTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetRawBondTransactionRequest_descriptor, - new java.lang.String[] { "LockTime", "Sender", "Receiver", "Stake", "PublicKey", "Fee", "Memo", }); - internal_static_pactus_GetRawUnbondTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetRawUnbondTransactionRequest_descriptor, - new java.lang.String[] { "LockTime", "ValidatorAddress", "Memo", }); - internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor, - new java.lang.String[] { "LockTime", "ValidatorAddress", "AccountAddress", "Amount", "Fee", "Memo", }); - internal_static_pactus_GetRawTransactionResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetRawTransactionResponse_descriptor, - new java.lang.String[] { "RawTransaction", }); - internal_static_pactus_PayloadTransfer_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_pactus_PayloadTransfer_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_PayloadTransfer_descriptor, - new java.lang.String[] { "Sender", "Receiver", "Amount", }); - internal_static_pactus_PayloadBond_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_pactus_PayloadBond_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_PayloadBond_descriptor, - new java.lang.String[] { "Sender", "Receiver", "Stake", }); - internal_static_pactus_PayloadSortition_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_pactus_PayloadSortition_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_PayloadSortition_descriptor, - new java.lang.String[] { "Address", "Proof", }); - internal_static_pactus_PayloadUnbond_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_pactus_PayloadUnbond_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_PayloadUnbond_descriptor, - new java.lang.String[] { "Validator", }); - internal_static_pactus_PayloadWithdraw_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_pactus_PayloadWithdraw_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_PayloadWithdraw_descriptor, - new java.lang.String[] { "From", "To", "Amount", }); - internal_static_pactus_TransactionInfo_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_pactus_TransactionInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_TransactionInfo_descriptor, - new java.lang.String[] { "Id", "Data", "Version", "LockTime", "Value", "Fee", "PayloadType", "Transfer", "Bond", "Sortition", "Unbond", "Withdraw", "Memo", "PublicKey", "Signature", "Payload", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/www/grpc/gen/java/pactus/utils/UtilsGrpc.java b/www/grpc/gen/java/pactus/utils/UtilsGrpc.java deleted file mode 100644 index 450a6db65..000000000 --- a/www/grpc/gen/java/pactus/utils/UtilsGrpc.java +++ /dev/null @@ -1,394 +0,0 @@ -package pactus.utils; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Utils service defines RPC methods for utility functions such as message
- * signing and verification.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.50.2)", - comments = "Source: utils.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class UtilsGrpc { - - private UtilsGrpc() {} - - public static final String SERVICE_NAME = "pactus.Utils"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getSignMessageWithPrivateKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SignMessageWithPrivateKey", - requestType = pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.class, - responseType = pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSignMessageWithPrivateKeyMethod() { - io.grpc.MethodDescriptor getSignMessageWithPrivateKeyMethod; - if ((getSignMessageWithPrivateKeyMethod = UtilsGrpc.getSignMessageWithPrivateKeyMethod) == null) { - synchronized (UtilsGrpc.class) { - if ((getSignMessageWithPrivateKeyMethod = UtilsGrpc.getSignMessageWithPrivateKeyMethod) == null) { - UtilsGrpc.getSignMessageWithPrivateKeyMethod = getSignMessageWithPrivateKeyMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SignMessageWithPrivateKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.getDefaultInstance())) - .setSchemaDescriptor(new UtilsMethodDescriptorSupplier("SignMessageWithPrivateKey")) - .build(); - } - } - } - return getSignMessageWithPrivateKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor getVerifyMessageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "VerifyMessage", - requestType = pactus.utils.UtilsOuterClass.VerifyMessageRequest.class, - responseType = pactus.utils.UtilsOuterClass.VerifyMessageResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getVerifyMessageMethod() { - io.grpc.MethodDescriptor getVerifyMessageMethod; - if ((getVerifyMessageMethod = UtilsGrpc.getVerifyMessageMethod) == null) { - synchronized (UtilsGrpc.class) { - if ((getVerifyMessageMethod = UtilsGrpc.getVerifyMessageMethod) == null) { - UtilsGrpc.getVerifyMessageMethod = getVerifyMessageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "VerifyMessage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.utils.UtilsOuterClass.VerifyMessageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.utils.UtilsOuterClass.VerifyMessageResponse.getDefaultInstance())) - .setSchemaDescriptor(new UtilsMethodDescriptorSupplier("VerifyMessage")) - .build(); - } - } - } - return getVerifyMessageMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static UtilsStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public UtilsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new UtilsStub(channel, callOptions); - } - }; - return UtilsStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static UtilsBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public UtilsBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new UtilsBlockingStub(channel, callOptions); - } - }; - return UtilsBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static UtilsFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public UtilsFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new UtilsFutureStub(channel, callOptions); - } - }; - return UtilsFutureStub.newStub(factory, channel); - } - - /** - *
-   * Utils service defines RPC methods for utility functions such as message
-   * signing and verification.
-   * 
- */ - public static abstract class UtilsImplBase implements io.grpc.BindableService { - - /** - *
-     * SignMessageWithPrivateKey sign message with provided private key.
-     * 
- */ - public void signMessageWithPrivateKey(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignMessageWithPrivateKeyMethod(), responseObserver); - } - - /** - *
-     * VerifyMessage verify signature with public key and message
-     * 
- */ - public void verifyMessage(pactus.utils.UtilsOuterClass.VerifyMessageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getVerifyMessageMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getSignMessageWithPrivateKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest, - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse>( - this, METHODID_SIGN_MESSAGE_WITH_PRIVATE_KEY))) - .addMethod( - getVerifyMessageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.utils.UtilsOuterClass.VerifyMessageRequest, - pactus.utils.UtilsOuterClass.VerifyMessageResponse>( - this, METHODID_VERIFY_MESSAGE))) - .build(); - } - } - - /** - *
-   * Utils service defines RPC methods for utility functions such as message
-   * signing and verification.
-   * 
- */ - public static final class UtilsStub extends io.grpc.stub.AbstractAsyncStub { - private UtilsStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected UtilsStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new UtilsStub(channel, callOptions); - } - - /** - *
-     * SignMessageWithPrivateKey sign message with provided private key.
-     * 
- */ - public void signMessageWithPrivateKey(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSignMessageWithPrivateKeyMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * VerifyMessage verify signature with public key and message
-     * 
- */ - public void verifyMessage(pactus.utils.UtilsOuterClass.VerifyMessageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getVerifyMessageMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Utils service defines RPC methods for utility functions such as message
-   * signing and verification.
-   * 
- */ - public static final class UtilsBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private UtilsBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected UtilsBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new UtilsBlockingStub(channel, callOptions); - } - - /** - *
-     * SignMessageWithPrivateKey sign message with provided private key.
-     * 
- */ - public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse signMessageWithPrivateKey(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSignMessageWithPrivateKeyMethod(), getCallOptions(), request); - } - - /** - *
-     * VerifyMessage verify signature with public key and message
-     * 
- */ - public pactus.utils.UtilsOuterClass.VerifyMessageResponse verifyMessage(pactus.utils.UtilsOuterClass.VerifyMessageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getVerifyMessageMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Utils service defines RPC methods for utility functions such as message
-   * signing and verification.
-   * 
- */ - public static final class UtilsFutureStub extends io.grpc.stub.AbstractFutureStub { - private UtilsFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected UtilsFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new UtilsFutureStub(channel, callOptions); - } - - /** - *
-     * SignMessageWithPrivateKey sign message with provided private key.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture signMessageWithPrivateKey( - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSignMessageWithPrivateKeyMethod(), getCallOptions()), request); - } - - /** - *
-     * VerifyMessage verify signature with public key and message
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture verifyMessage( - pactus.utils.UtilsOuterClass.VerifyMessageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getVerifyMessageMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_SIGN_MESSAGE_WITH_PRIVATE_KEY = 0; - private static final int METHODID_VERIFY_MESSAGE = 1; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final UtilsImplBase serviceImpl; - private final int methodId; - - MethodHandlers(UtilsImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_SIGN_MESSAGE_WITH_PRIVATE_KEY: - serviceImpl.signMessageWithPrivateKey((pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_VERIFY_MESSAGE: - serviceImpl.verifyMessage((pactus.utils.UtilsOuterClass.VerifyMessageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class UtilsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - UtilsBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return pactus.utils.UtilsOuterClass.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Utils"); - } - } - - private static final class UtilsFileDescriptorSupplier - extends UtilsBaseDescriptorSupplier { - UtilsFileDescriptorSupplier() {} - } - - private static final class UtilsMethodDescriptorSupplier - extends UtilsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - UtilsMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (UtilsGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new UtilsFileDescriptorSupplier()) - .addMethod(getSignMessageWithPrivateKeyMethod()) - .addMethod(getVerifyMessageMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/www/grpc/gen/java/pactus/utils/UtilsOuterClass.java b/www/grpc/gen/java/pactus/utils/UtilsOuterClass.java deleted file mode 100644 index 8d84758e5..000000000 --- a/www/grpc/gen/java/pactus/utils/UtilsOuterClass.java +++ /dev/null @@ -1,2927 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: utils.proto - -package pactus.utils; - -public final class UtilsOuterClass { - private UtilsOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface SignMessageWithPrivateKeyRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.SignMessageWithPrivateKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The private key to sign the message.
-     * 
- * - * string private_key = 1 [json_name = "privateKey"]; - * @return The privateKey. - */ - java.lang.String getPrivateKey(); - /** - *
-     * The private key to sign the message.
-     * 
- * - * string private_key = 1 [json_name = "privateKey"]; - * @return The bytes for privateKey. - */ - com.google.protobuf.ByteString - getPrivateKeyBytes(); - - /** - *
-     * The message to sign.
-     * 
- * - * string message = 2 [json_name = "message"]; - * @return The message. - */ - java.lang.String getMessage(); - /** - *
-     * The message to sign.
-     * 
- * - * string message = 2 [json_name = "message"]; - * @return The bytes for message. - */ - com.google.protobuf.ByteString - getMessageBytes(); - } - /** - *
-   * Request message for sign message with private key.
-   * 
- * - * Protobuf type {@code pactus.SignMessageWithPrivateKeyRequest} - */ - public static final class SignMessageWithPrivateKeyRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.SignMessageWithPrivateKeyRequest) - SignMessageWithPrivateKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use SignMessageWithPrivateKeyRequest.newBuilder() to construct. - private SignMessageWithPrivateKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SignMessageWithPrivateKeyRequest() { - privateKey_ = ""; - message_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SignMessageWithPrivateKeyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.class, pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.Builder.class); - } - - public static final int PRIVATE_KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object privateKey_; - /** - *
-     * The private key to sign the message.
-     * 
- * - * string private_key = 1 [json_name = "privateKey"]; - * @return The privateKey. - */ - @java.lang.Override - public java.lang.String getPrivateKey() { - java.lang.Object ref = privateKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - privateKey_ = s; - return s; - } - } - /** - *
-     * The private key to sign the message.
-     * 
- * - * string private_key = 1 [json_name = "privateKey"]; - * @return The bytes for privateKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPrivateKeyBytes() { - java.lang.Object ref = privateKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - privateKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MESSAGE_FIELD_NUMBER = 2; - private volatile java.lang.Object message_; - /** - *
-     * The message to sign.
-     * 
- * - * string message = 2 [json_name = "message"]; - * @return The message. - */ - @java.lang.Override - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - message_ = s; - return s; - } - } - /** - *
-     * The message to sign.
-     * 
- * - * string message = 2 [json_name = "message"]; - * @return The bytes for message. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(privateKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, privateKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(privateKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, privateKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest)) { - return super.equals(obj); - } - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest other = (pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest) obj; - - if (!getPrivateKey() - .equals(other.getPrivateKey())) return false; - if (!getMessage() - .equals(other.getMessage())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PRIVATE_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPrivateKey().hashCode(); - hash = (37 * hash) + MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getMessage().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for sign message with private key.
-     * 
- * - * Protobuf type {@code pactus.SignMessageWithPrivateKeyRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.SignMessageWithPrivateKeyRequest) - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.class, pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.Builder.class); - } - - // Construct using pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - privateKey_ = ""; - - message_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest getDefaultInstanceForType() { - return pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest build() { - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest buildPartial() { - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest result = new pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest(this); - result.privateKey_ = privateKey_; - result.message_ = message_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest) { - return mergeFrom((pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest other) { - if (other == pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.getDefaultInstance()) return this; - if (!other.getPrivateKey().isEmpty()) { - privateKey_ = other.privateKey_; - onChanged(); - } - if (!other.getMessage().isEmpty()) { - message_ = other.message_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - privateKey_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - message_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object privateKey_ = ""; - /** - *
-       * The private key to sign the message.
-       * 
- * - * string private_key = 1 [json_name = "privateKey"]; - * @return The privateKey. - */ - public java.lang.String getPrivateKey() { - java.lang.Object ref = privateKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - privateKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The private key to sign the message.
-       * 
- * - * string private_key = 1 [json_name = "privateKey"]; - * @return The bytes for privateKey. - */ - public com.google.protobuf.ByteString - getPrivateKeyBytes() { - java.lang.Object ref = privateKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - privateKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The private key to sign the message.
-       * 
- * - * string private_key = 1 [json_name = "privateKey"]; - * @param value The privateKey to set. - * @return This builder for chaining. - */ - public Builder setPrivateKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - privateKey_ = value; - onChanged(); - return this; - } - /** - *
-       * The private key to sign the message.
-       * 
- * - * string private_key = 1 [json_name = "privateKey"]; - * @return This builder for chaining. - */ - public Builder clearPrivateKey() { - - privateKey_ = getDefaultInstance().getPrivateKey(); - onChanged(); - return this; - } - /** - *
-       * The private key to sign the message.
-       * 
- * - * string private_key = 1 [json_name = "privateKey"]; - * @param value The bytes for privateKey to set. - * @return This builder for chaining. - */ - public Builder setPrivateKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - privateKey_ = value; - onChanged(); - return this; - } - - private java.lang.Object message_ = ""; - /** - *
-       * The message to sign.
-       * 
- * - * string message = 2 [json_name = "message"]; - * @return The message. - */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - message_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The message to sign.
-       * 
- * - * string message = 2 [json_name = "message"]; - * @return The bytes for message. - */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The message to sign.
-       * 
- * - * string message = 2 [json_name = "message"]; - * @param value The message to set. - * @return This builder for chaining. - */ - public Builder setMessage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - message_ = value; - onChanged(); - return this; - } - /** - *
-       * The message to sign.
-       * 
- * - * string message = 2 [json_name = "message"]; - * @return This builder for chaining. - */ - public Builder clearMessage() { - - message_ = getDefaultInstance().getMessage(); - onChanged(); - return this; - } - /** - *
-       * The message to sign.
-       * 
- * - * string message = 2 [json_name = "message"]; - * @param value The bytes for message to set. - * @return This builder for chaining. - */ - public Builder setMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - message_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.SignMessageWithPrivateKeyRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.SignMessageWithPrivateKeyRequest) - private static final pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest(); - } - - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SignMessageWithPrivateKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SignMessageWithPrivateKeyResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.SignMessageWithPrivateKeyResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The signature of the message.
-     * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The signature. - */ - java.lang.String getSignature(); - /** - *
-     * The signature of the message.
-     * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The bytes for signature. - */ - com.google.protobuf.ByteString - getSignatureBytes(); - } - /** - *
-   * Response message containing the generated signature.
-   * 
- * - * Protobuf type {@code pactus.SignMessageWithPrivateKeyResponse} - */ - public static final class SignMessageWithPrivateKeyResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.SignMessageWithPrivateKeyResponse) - SignMessageWithPrivateKeyResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use SignMessageWithPrivateKeyResponse.newBuilder() to construct. - private SignMessageWithPrivateKeyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SignMessageWithPrivateKeyResponse() { - signature_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SignMessageWithPrivateKeyResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.class, pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.Builder.class); - } - - public static final int SIGNATURE_FIELD_NUMBER = 1; - private volatile java.lang.Object signature_; - /** - *
-     * The signature of the message.
-     * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The signature. - */ - @java.lang.Override - public java.lang.String getSignature() { - java.lang.Object ref = signature_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signature_ = s; - return s; - } - } - /** - *
-     * The signature of the message.
-     * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The bytes for signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSignatureBytes() { - java.lang.Object ref = signature_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signature_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signature_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signature_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse)) { - return super.equals(obj); - } - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse other = (pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse) obj; - - if (!getSignature() - .equals(other.getSignature())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getSignature().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the generated signature.
-     * 
- * - * Protobuf type {@code pactus.SignMessageWithPrivateKeyResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.SignMessageWithPrivateKeyResponse) - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.class, pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.Builder.class); - } - - // Construct using pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - signature_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse getDefaultInstanceForType() { - return pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse build() { - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse buildPartial() { - pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse result = new pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse(this); - result.signature_ = signature_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse) { - return mergeFrom((pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse other) { - if (other == pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.getDefaultInstance()) return this; - if (!other.getSignature().isEmpty()) { - signature_ = other.signature_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - signature_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object signature_ = ""; - /** - *
-       * The signature of the message.
-       * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The signature. - */ - public java.lang.String getSignature() { - java.lang.Object ref = signature_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signature_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The signature of the message.
-       * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The bytes for signature. - */ - public com.google.protobuf.ByteString - getSignatureBytes() { - java.lang.Object ref = signature_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signature_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The signature of the message.
-       * 
- * - * string signature = 1 [json_name = "signature"]; - * @param value The signature to set. - * @return This builder for chaining. - */ - public Builder setSignature( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - signature_ = value; - onChanged(); - return this; - } - /** - *
-       * The signature of the message.
-       * 
- * - * string signature = 1 [json_name = "signature"]; - * @return This builder for chaining. - */ - public Builder clearSignature() { - - signature_ = getDefaultInstance().getSignature(); - onChanged(); - return this; - } - /** - *
-       * The signature of the message.
-       * 
- * - * string signature = 1 [json_name = "signature"]; - * @param value The bytes for signature to set. - * @return This builder for chaining. - */ - public Builder setSignatureBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - signature_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.SignMessageWithPrivateKeyResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.SignMessageWithPrivateKeyResponse) - private static final pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse(); - } - - public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SignMessageWithPrivateKeyResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface VerifyMessageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.VerifyMessageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The signed message.
-     * 
- * - * string message = 1 [json_name = "message"]; - * @return The message. - */ - java.lang.String getMessage(); - /** - *
-     * The signed message.
-     * 
- * - * string message = 1 [json_name = "message"]; - * @return The bytes for message. - */ - com.google.protobuf.ByteString - getMessageBytes(); - - /** - *
-     * The signature of the message.
-     * 
- * - * string signature = 2 [json_name = "signature"]; - * @return The signature. - */ - java.lang.String getSignature(); - /** - *
-     * The signature of the message.
-     * 
- * - * string signature = 2 [json_name = "signature"]; - * @return The bytes for signature. - */ - com.google.protobuf.ByteString - getSignatureBytes(); - - /** - *
-     * The public key of the signer.
-     * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The publicKey. - */ - java.lang.String getPublicKey(); - /** - *
-     * The public key of the signer.
-     * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - com.google.protobuf.ByteString - getPublicKeyBytes(); - } - /** - *
-   * Request message for verifying a message signature.
-   * 
- * - * Protobuf type {@code pactus.VerifyMessageRequest} - */ - public static final class VerifyMessageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.VerifyMessageRequest) - VerifyMessageRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use VerifyMessageRequest.newBuilder() to construct. - private VerifyMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private VerifyMessageRequest() { - message_ = ""; - signature_ = ""; - publicKey_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VerifyMessageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.utils.UtilsOuterClass.VerifyMessageRequest.class, pactus.utils.UtilsOuterClass.VerifyMessageRequest.Builder.class); - } - - public static final int MESSAGE_FIELD_NUMBER = 1; - private volatile java.lang.Object message_; - /** - *
-     * The signed message.
-     * 
- * - * string message = 1 [json_name = "message"]; - * @return The message. - */ - @java.lang.Override - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - message_ = s; - return s; - } - } - /** - *
-     * The signed message.
-     * 
- * - * string message = 1 [json_name = "message"]; - * @return The bytes for message. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIGNATURE_FIELD_NUMBER = 2; - private volatile java.lang.Object signature_; - /** - *
-     * The signature of the message.
-     * 
- * - * string signature = 2 [json_name = "signature"]; - * @return The signature. - */ - @java.lang.Override - public java.lang.String getSignature() { - java.lang.Object ref = signature_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signature_ = s; - return s; - } - } - /** - *
-     * The signature of the message.
-     * 
- * - * string signature = 2 [json_name = "signature"]; - * @return The bytes for signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSignatureBytes() { - java.lang.Object ref = signature_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signature_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 3; - private volatile java.lang.Object publicKey_; - /** - *
-     * The public key of the signer.
-     * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The publicKey. - */ - @java.lang.Override - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } - } - /** - *
-     * The public key of the signer.
-     * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, signature_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publicKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, signature_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publicKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.utils.UtilsOuterClass.VerifyMessageRequest)) { - return super.equals(obj); - } - pactus.utils.UtilsOuterClass.VerifyMessageRequest other = (pactus.utils.UtilsOuterClass.VerifyMessageRequest) obj; - - if (!getMessage() - .equals(other.getMessage())) return false; - if (!getSignature() - .equals(other.getSignature())) return false; - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getMessage().hashCode(); - hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getSignature().hashCode(); - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.utils.UtilsOuterClass.VerifyMessageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for verifying a message signature.
-     * 
- * - * Protobuf type {@code pactus.VerifyMessageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.VerifyMessageRequest) - pactus.utils.UtilsOuterClass.VerifyMessageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.utils.UtilsOuterClass.VerifyMessageRequest.class, pactus.utils.UtilsOuterClass.VerifyMessageRequest.Builder.class); - } - - // Construct using pactus.utils.UtilsOuterClass.VerifyMessageRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - message_ = ""; - - signature_ = ""; - - publicKey_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_descriptor; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.VerifyMessageRequest getDefaultInstanceForType() { - return pactus.utils.UtilsOuterClass.VerifyMessageRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.VerifyMessageRequest build() { - pactus.utils.UtilsOuterClass.VerifyMessageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.VerifyMessageRequest buildPartial() { - pactus.utils.UtilsOuterClass.VerifyMessageRequest result = new pactus.utils.UtilsOuterClass.VerifyMessageRequest(this); - result.message_ = message_; - result.signature_ = signature_; - result.publicKey_ = publicKey_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.utils.UtilsOuterClass.VerifyMessageRequest) { - return mergeFrom((pactus.utils.UtilsOuterClass.VerifyMessageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.utils.UtilsOuterClass.VerifyMessageRequest other) { - if (other == pactus.utils.UtilsOuterClass.VerifyMessageRequest.getDefaultInstance()) return this; - if (!other.getMessage().isEmpty()) { - message_ = other.message_; - onChanged(); - } - if (!other.getSignature().isEmpty()) { - signature_ = other.signature_; - onChanged(); - } - if (!other.getPublicKey().isEmpty()) { - publicKey_ = other.publicKey_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - message_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - signature_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - publicKey_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object message_ = ""; - /** - *
-       * The signed message.
-       * 
- * - * string message = 1 [json_name = "message"]; - * @return The message. - */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - message_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The signed message.
-       * 
- * - * string message = 1 [json_name = "message"]; - * @return The bytes for message. - */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The signed message.
-       * 
- * - * string message = 1 [json_name = "message"]; - * @param value The message to set. - * @return This builder for chaining. - */ - public Builder setMessage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - message_ = value; - onChanged(); - return this; - } - /** - *
-       * The signed message.
-       * 
- * - * string message = 1 [json_name = "message"]; - * @return This builder for chaining. - */ - public Builder clearMessage() { - - message_ = getDefaultInstance().getMessage(); - onChanged(); - return this; - } - /** - *
-       * The signed message.
-       * 
- * - * string message = 1 [json_name = "message"]; - * @param value The bytes for message to set. - * @return This builder for chaining. - */ - public Builder setMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - message_ = value; - onChanged(); - return this; - } - - private java.lang.Object signature_ = ""; - /** - *
-       * The signature of the message.
-       * 
- * - * string signature = 2 [json_name = "signature"]; - * @return The signature. - */ - public java.lang.String getSignature() { - java.lang.Object ref = signature_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signature_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The signature of the message.
-       * 
- * - * string signature = 2 [json_name = "signature"]; - * @return The bytes for signature. - */ - public com.google.protobuf.ByteString - getSignatureBytes() { - java.lang.Object ref = signature_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signature_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The signature of the message.
-       * 
- * - * string signature = 2 [json_name = "signature"]; - * @param value The signature to set. - * @return This builder for chaining. - */ - public Builder setSignature( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - signature_ = value; - onChanged(); - return this; - } - /** - *
-       * The signature of the message.
-       * 
- * - * string signature = 2 [json_name = "signature"]; - * @return This builder for chaining. - */ - public Builder clearSignature() { - - signature_ = getDefaultInstance().getSignature(); - onChanged(); - return this; - } - /** - *
-       * The signature of the message.
-       * 
- * - * string signature = 2 [json_name = "signature"]; - * @param value The bytes for signature to set. - * @return This builder for chaining. - */ - public Builder setSignatureBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - signature_ = value; - onChanged(); - return this; - } - - private java.lang.Object publicKey_ = ""; - /** - *
-       * The public key of the signer.
-       * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The publicKey. - */ - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The public key of the signer.
-       * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The public key of the signer.
-       * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @param value The publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - publicKey_ = value; - onChanged(); - return this; - } - /** - *
-       * The public key of the signer.
-       * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - - publicKey_ = getDefaultInstance().getPublicKey(); - onChanged(); - return this; - } - /** - *
-       * The public key of the signer.
-       * 
- * - * string public_key = 3 [json_name = "publicKey"]; - * @param value The bytes for publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - publicKey_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.VerifyMessageRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.VerifyMessageRequest) - private static final pactus.utils.UtilsOuterClass.VerifyMessageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.utils.UtilsOuterClass.VerifyMessageRequest(); - } - - public static pactus.utils.UtilsOuterClass.VerifyMessageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VerifyMessageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.VerifyMessageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface VerifyMessageResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.VerifyMessageResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Indicates if the signature is valid (true) or not (false).
-     * 
- * - * bool is_valid = 1 [json_name = "isValid"]; - * @return The isValid. - */ - boolean getIsValid(); - } - /** - *
-   * Response message containing the resualt of validation of signature and message.
-   * 
- * - * Protobuf type {@code pactus.VerifyMessageResponse} - */ - public static final class VerifyMessageResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.VerifyMessageResponse) - VerifyMessageResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use VerifyMessageResponse.newBuilder() to construct. - private VerifyMessageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private VerifyMessageResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new VerifyMessageResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.utils.UtilsOuterClass.VerifyMessageResponse.class, pactus.utils.UtilsOuterClass.VerifyMessageResponse.Builder.class); - } - - public static final int IS_VALID_FIELD_NUMBER = 1; - private boolean isValid_; - /** - *
-     * Indicates if the signature is valid (true) or not (false).
-     * 
- * - * bool is_valid = 1 [json_name = "isValid"]; - * @return The isValid. - */ - @java.lang.Override - public boolean getIsValid() { - return isValid_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (isValid_ != false) { - output.writeBool(1, isValid_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (isValid_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, isValid_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.utils.UtilsOuterClass.VerifyMessageResponse)) { - return super.equals(obj); - } - pactus.utils.UtilsOuterClass.VerifyMessageResponse other = (pactus.utils.UtilsOuterClass.VerifyMessageResponse) obj; - - if (getIsValid() - != other.getIsValid()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + IS_VALID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsValid()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.utils.UtilsOuterClass.VerifyMessageResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the resualt of validation of signature and message.
-     * 
- * - * Protobuf type {@code pactus.VerifyMessageResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.VerifyMessageResponse) - pactus.utils.UtilsOuterClass.VerifyMessageResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.utils.UtilsOuterClass.VerifyMessageResponse.class, pactus.utils.UtilsOuterClass.VerifyMessageResponse.Builder.class); - } - - // Construct using pactus.utils.UtilsOuterClass.VerifyMessageResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - isValid_ = false; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_descriptor; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.VerifyMessageResponse getDefaultInstanceForType() { - return pactus.utils.UtilsOuterClass.VerifyMessageResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.VerifyMessageResponse build() { - pactus.utils.UtilsOuterClass.VerifyMessageResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.VerifyMessageResponse buildPartial() { - pactus.utils.UtilsOuterClass.VerifyMessageResponse result = new pactus.utils.UtilsOuterClass.VerifyMessageResponse(this); - result.isValid_ = isValid_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.utils.UtilsOuterClass.VerifyMessageResponse) { - return mergeFrom((pactus.utils.UtilsOuterClass.VerifyMessageResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.utils.UtilsOuterClass.VerifyMessageResponse other) { - if (other == pactus.utils.UtilsOuterClass.VerifyMessageResponse.getDefaultInstance()) return this; - if (other.getIsValid() != false) { - setIsValid(other.getIsValid()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - isValid_ = input.readBool(); - - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private boolean isValid_ ; - /** - *
-       * Indicates if the signature is valid (true) or not (false).
-       * 
- * - * bool is_valid = 1 [json_name = "isValid"]; - * @return The isValid. - */ - @java.lang.Override - public boolean getIsValid() { - return isValid_; - } - /** - *
-       * Indicates if the signature is valid (true) or not (false).
-       * 
- * - * bool is_valid = 1 [json_name = "isValid"]; - * @param value The isValid to set. - * @return This builder for chaining. - */ - public Builder setIsValid(boolean value) { - - isValid_ = value; - onChanged(); - return this; - } - /** - *
-       * Indicates if the signature is valid (true) or not (false).
-       * 
- * - * bool is_valid = 1 [json_name = "isValid"]; - * @return This builder for chaining. - */ - public Builder clearIsValid() { - - isValid_ = false; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.VerifyMessageResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.VerifyMessageResponse) - private static final pactus.utils.UtilsOuterClass.VerifyMessageResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.utils.UtilsOuterClass.VerifyMessageResponse(); - } - - public static pactus.utils.UtilsOuterClass.VerifyMessageResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VerifyMessageResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.utils.UtilsOuterClass.VerifyMessageResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_VerifyMessageRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_VerifyMessageRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_VerifyMessageResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_VerifyMessageResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\013utils.proto\022\006pactus\"]\n SignMessageWith" + - "PrivateKeyRequest\022\037\n\013private_key\030\001 \001(\tR\n" + - "privateKey\022\030\n\007message\030\002 \001(\tR\007message\"A\n!" + - "SignMessageWithPrivateKeyResponse\022\034\n\tsig" + - "nature\030\001 \001(\tR\tsignature\"m\n\024VerifyMessage" + - "Request\022\030\n\007message\030\001 \001(\tR\007message\022\034\n\tsig" + - "nature\030\002 \001(\tR\tsignature\022\035\n\npublic_key\030\003 " + - "\001(\tR\tpublicKey\"2\n\025VerifyMessageResponse\022" + - "\031\n\010is_valid\030\001 \001(\010R\007isValid2\307\001\n\005Utils\022p\n\031" + - "SignMessageWithPrivateKey\022(.pactus.SignM" + - "essageWithPrivateKeyRequest\032).pactus.Sig" + - "nMessageWithPrivateKeyResponse\022L\n\rVerify" + - "Message\022\034.pactus.VerifyMessageRequest\032\035." + - "pactus.VerifyMessageResponseB@\n\014pactus.u" + - "tilsZ0github.com/pactus-project/pactus/w" + - "ww/grpc/pactusb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }); - internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor, - new java.lang.String[] { "PrivateKey", "Message", }); - internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor, - new java.lang.String[] { "Signature", }); - internal_static_pactus_VerifyMessageRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_pactus_VerifyMessageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_VerifyMessageRequest_descriptor, - new java.lang.String[] { "Message", "Signature", "PublicKey", }); - internal_static_pactus_VerifyMessageResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_pactus_VerifyMessageResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_VerifyMessageResponse_descriptor, - new java.lang.String[] { "IsValid", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/www/grpc/gen/java/pactus/wallet/WalletGrpc.java b/www/grpc/gen/java/pactus/wallet/WalletGrpc.java deleted file mode 100644 index 806e827e8..000000000 --- a/www/grpc/gen/java/pactus/wallet/WalletGrpc.java +++ /dev/null @@ -1,1081 +0,0 @@ -package pactus.wallet; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - *
- * Define the Wallet service with various RPC methods for wallet management.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.50.2)", - comments = "Source: wallet.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class WalletGrpc { - - private WalletGrpc() {} - - public static final String SERVICE_NAME = "pactus.Wallet"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getCreateWalletMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateWallet", - requestType = pactus.wallet.WalletOuterClass.CreateWalletRequest.class, - responseType = pactus.wallet.WalletOuterClass.CreateWalletResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateWalletMethod() { - io.grpc.MethodDescriptor getCreateWalletMethod; - if ((getCreateWalletMethod = WalletGrpc.getCreateWalletMethod) == null) { - synchronized (WalletGrpc.class) { - if ((getCreateWalletMethod = WalletGrpc.getCreateWalletMethod) == null) { - WalletGrpc.getCreateWalletMethod = getCreateWalletMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateWallet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.CreateWalletRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.CreateWalletResponse.getDefaultInstance())) - .setSchemaDescriptor(new WalletMethodDescriptorSupplier("CreateWallet")) - .build(); - } - } - } - return getCreateWalletMethod; - } - - private static volatile io.grpc.MethodDescriptor getRestoreWalletMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "RestoreWallet", - requestType = pactus.wallet.WalletOuterClass.RestoreWalletRequest.class, - responseType = pactus.wallet.WalletOuterClass.RestoreWalletResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRestoreWalletMethod() { - io.grpc.MethodDescriptor getRestoreWalletMethod; - if ((getRestoreWalletMethod = WalletGrpc.getRestoreWalletMethod) == null) { - synchronized (WalletGrpc.class) { - if ((getRestoreWalletMethod = WalletGrpc.getRestoreWalletMethod) == null) { - WalletGrpc.getRestoreWalletMethod = getRestoreWalletMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreWallet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.RestoreWalletRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.RestoreWalletResponse.getDefaultInstance())) - .setSchemaDescriptor(new WalletMethodDescriptorSupplier("RestoreWallet")) - .build(); - } - } - } - return getRestoreWalletMethod; - } - - private static volatile io.grpc.MethodDescriptor getLoadWalletMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "LoadWallet", - requestType = pactus.wallet.WalletOuterClass.LoadWalletRequest.class, - responseType = pactus.wallet.WalletOuterClass.LoadWalletResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getLoadWalletMethod() { - io.grpc.MethodDescriptor getLoadWalletMethod; - if ((getLoadWalletMethod = WalletGrpc.getLoadWalletMethod) == null) { - synchronized (WalletGrpc.class) { - if ((getLoadWalletMethod = WalletGrpc.getLoadWalletMethod) == null) { - WalletGrpc.getLoadWalletMethod = getLoadWalletMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LoadWallet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.LoadWalletRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.LoadWalletResponse.getDefaultInstance())) - .setSchemaDescriptor(new WalletMethodDescriptorSupplier("LoadWallet")) - .build(); - } - } - } - return getLoadWalletMethod; - } - - private static volatile io.grpc.MethodDescriptor getUnloadWalletMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UnloadWallet", - requestType = pactus.wallet.WalletOuterClass.UnloadWalletRequest.class, - responseType = pactus.wallet.WalletOuterClass.UnloadWalletResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUnloadWalletMethod() { - io.grpc.MethodDescriptor getUnloadWalletMethod; - if ((getUnloadWalletMethod = WalletGrpc.getUnloadWalletMethod) == null) { - synchronized (WalletGrpc.class) { - if ((getUnloadWalletMethod = WalletGrpc.getUnloadWalletMethod) == null) { - WalletGrpc.getUnloadWalletMethod = getUnloadWalletMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnloadWallet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.UnloadWalletRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.UnloadWalletResponse.getDefaultInstance())) - .setSchemaDescriptor(new WalletMethodDescriptorSupplier("UnloadWallet")) - .build(); - } - } - } - return getUnloadWalletMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetTotalBalanceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTotalBalance", - requestType = pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.class, - responseType = pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetTotalBalanceMethod() { - io.grpc.MethodDescriptor getGetTotalBalanceMethod; - if ((getGetTotalBalanceMethod = WalletGrpc.getGetTotalBalanceMethod) == null) { - synchronized (WalletGrpc.class) { - if ((getGetTotalBalanceMethod = WalletGrpc.getGetTotalBalanceMethod) == null) { - WalletGrpc.getGetTotalBalanceMethod = getGetTotalBalanceMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTotalBalance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.getDefaultInstance())) - .setSchemaDescriptor(new WalletMethodDescriptorSupplier("GetTotalBalance")) - .build(); - } - } - } - return getGetTotalBalanceMethod; - } - - private static volatile io.grpc.MethodDescriptor getSignRawTransactionMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SignRawTransaction", - requestType = pactus.wallet.WalletOuterClass.SignRawTransactionRequest.class, - responseType = pactus.wallet.WalletOuterClass.SignRawTransactionResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSignRawTransactionMethod() { - io.grpc.MethodDescriptor getSignRawTransactionMethod; - if ((getSignRawTransactionMethod = WalletGrpc.getSignRawTransactionMethod) == null) { - synchronized (WalletGrpc.class) { - if ((getSignRawTransactionMethod = WalletGrpc.getSignRawTransactionMethod) == null) { - WalletGrpc.getSignRawTransactionMethod = getSignRawTransactionMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SignRawTransaction")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.SignRawTransactionRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.SignRawTransactionResponse.getDefaultInstance())) - .setSchemaDescriptor(new WalletMethodDescriptorSupplier("SignRawTransaction")) - .build(); - } - } - } - return getSignRawTransactionMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetValidatorAddressMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetValidatorAddress", - requestType = pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.class, - responseType = pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetValidatorAddressMethod() { - io.grpc.MethodDescriptor getGetValidatorAddressMethod; - if ((getGetValidatorAddressMethod = WalletGrpc.getGetValidatorAddressMethod) == null) { - synchronized (WalletGrpc.class) { - if ((getGetValidatorAddressMethod = WalletGrpc.getGetValidatorAddressMethod) == null) { - WalletGrpc.getGetValidatorAddressMethod = getGetValidatorAddressMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetValidatorAddress")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.getDefaultInstance())) - .setSchemaDescriptor(new WalletMethodDescriptorSupplier("GetValidatorAddress")) - .build(); - } - } - } - return getGetValidatorAddressMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetNewAddressMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNewAddress", - requestType = pactus.wallet.WalletOuterClass.GetNewAddressRequest.class, - responseType = pactus.wallet.WalletOuterClass.GetNewAddressResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetNewAddressMethod() { - io.grpc.MethodDescriptor getGetNewAddressMethod; - if ((getGetNewAddressMethod = WalletGrpc.getGetNewAddressMethod) == null) { - synchronized (WalletGrpc.class) { - if ((getGetNewAddressMethod = WalletGrpc.getGetNewAddressMethod) == null) { - WalletGrpc.getGetNewAddressMethod = getGetNewAddressMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNewAddress")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.GetNewAddressRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.GetNewAddressResponse.getDefaultInstance())) - .setSchemaDescriptor(new WalletMethodDescriptorSupplier("GetNewAddress")) - .build(); - } - } - } - return getGetNewAddressMethod; - } - - private static volatile io.grpc.MethodDescriptor getGetAddressHistoryMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAddressHistory", - requestType = pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.class, - responseType = pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetAddressHistoryMethod() { - io.grpc.MethodDescriptor getGetAddressHistoryMethod; - if ((getGetAddressHistoryMethod = WalletGrpc.getGetAddressHistoryMethod) == null) { - synchronized (WalletGrpc.class) { - if ((getGetAddressHistoryMethod = WalletGrpc.getGetAddressHistoryMethod) == null) { - WalletGrpc.getGetAddressHistoryMethod = getGetAddressHistoryMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAddressHistory")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.getDefaultInstance())) - .setSchemaDescriptor(new WalletMethodDescriptorSupplier("GetAddressHistory")) - .build(); - } - } - } - return getGetAddressHistoryMethod; - } - - private static volatile io.grpc.MethodDescriptor getSignMessageMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SignMessage", - requestType = pactus.wallet.WalletOuterClass.SignMessageRequest.class, - responseType = pactus.wallet.WalletOuterClass.SignMessageResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getSignMessageMethod() { - io.grpc.MethodDescriptor getSignMessageMethod; - if ((getSignMessageMethod = WalletGrpc.getSignMessageMethod) == null) { - synchronized (WalletGrpc.class) { - if ((getSignMessageMethod = WalletGrpc.getSignMessageMethod) == null) { - WalletGrpc.getSignMessageMethod = getSignMessageMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SignMessage")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.SignMessageRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - pactus.wallet.WalletOuterClass.SignMessageResponse.getDefaultInstance())) - .setSchemaDescriptor(new WalletMethodDescriptorSupplier("SignMessage")) - .build(); - } - } - } - return getSignMessageMethod; - } - - /** - * Creates a new async stub that supports all call types for the service - */ - public static WalletStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WalletStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WalletStub(channel, callOptions); - } - }; - return WalletStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static WalletBlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WalletBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WalletBlockingStub(channel, callOptions); - } - }; - return WalletBlockingStub.newStub(factory, channel); - } - - /** - * Creates a new ListenableFuture-style stub that supports unary calls on the service - */ - public static WalletFutureStub newFutureStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WalletFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WalletFutureStub(channel, callOptions); - } - }; - return WalletFutureStub.newStub(factory, channel); - } - - /** - *
-   * Define the Wallet service with various RPC methods for wallet management.
-   * 
- */ - public static abstract class WalletImplBase implements io.grpc.BindableService { - - /** - *
-     * CreateWallet creates a new wallet with the specified parameters.
-     * 
- */ - public void createWallet(pactus.wallet.WalletOuterClass.CreateWalletRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateWalletMethod(), responseObserver); - } - - /** - *
-     * RestoreWallet restores an existing wallet with the given mnemonic.
-     * 
- */ - public void restoreWallet(pactus.wallet.WalletOuterClass.RestoreWalletRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRestoreWalletMethod(), responseObserver); - } - - /** - *
-     * LoadWallet loads an existing wallet with the given name.
-     * 
- */ - public void loadWallet(pactus.wallet.WalletOuterClass.LoadWalletRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLoadWalletMethod(), responseObserver); - } - - /** - *
-     * UnloadWallet unloads a currently loaded wallet with the specified name.
-     * 
- */ - public void unloadWallet(pactus.wallet.WalletOuterClass.UnloadWalletRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnloadWalletMethod(), responseObserver); - } - - /** - *
-     * GetTotalBalance returns the total available balance of the wallet.
-     * 
- */ - public void getTotalBalance(pactus.wallet.WalletOuterClass.GetTotalBalanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTotalBalanceMethod(), responseObserver); - } - - /** - *
-     * SignRawTransaction signs a raw transaction for a specified wallet.
-     * 
- */ - public void signRawTransaction(pactus.wallet.WalletOuterClass.SignRawTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignRawTransactionMethod(), responseObserver); - } - - /** - *
-     * GetValidatorAddress retrieves the validator address associated with a
-     * public key.
-     * 
- */ - public void getValidatorAddress(pactus.wallet.WalletOuterClass.GetValidatorAddressRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorAddressMethod(), responseObserver); - } - - /** - *
-     * GetNewAddress generates a new address for the specified wallet.
-     * 
- */ - public void getNewAddress(pactus.wallet.WalletOuterClass.GetNewAddressRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNewAddressMethod(), responseObserver); - } - - /** - *
-     * GetAddressHistory retrieves the transaction history of an address.
-     * 
- */ - public void getAddressHistory(pactus.wallet.WalletOuterClass.GetAddressHistoryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAddressHistoryMethod(), responseObserver); - } - - /** - *
-     * SignMessage signs an arbitrary message.
-     * 
- */ - public void signMessage(pactus.wallet.WalletOuterClass.SignMessageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignMessageMethod(), responseObserver); - } - - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateWalletMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.wallet.WalletOuterClass.CreateWalletRequest, - pactus.wallet.WalletOuterClass.CreateWalletResponse>( - this, METHODID_CREATE_WALLET))) - .addMethod( - getRestoreWalletMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.wallet.WalletOuterClass.RestoreWalletRequest, - pactus.wallet.WalletOuterClass.RestoreWalletResponse>( - this, METHODID_RESTORE_WALLET))) - .addMethod( - getLoadWalletMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.wallet.WalletOuterClass.LoadWalletRequest, - pactus.wallet.WalletOuterClass.LoadWalletResponse>( - this, METHODID_LOAD_WALLET))) - .addMethod( - getUnloadWalletMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.wallet.WalletOuterClass.UnloadWalletRequest, - pactus.wallet.WalletOuterClass.UnloadWalletResponse>( - this, METHODID_UNLOAD_WALLET))) - .addMethod( - getGetTotalBalanceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.wallet.WalletOuterClass.GetTotalBalanceRequest, - pactus.wallet.WalletOuterClass.GetTotalBalanceResponse>( - this, METHODID_GET_TOTAL_BALANCE))) - .addMethod( - getSignRawTransactionMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.wallet.WalletOuterClass.SignRawTransactionRequest, - pactus.wallet.WalletOuterClass.SignRawTransactionResponse>( - this, METHODID_SIGN_RAW_TRANSACTION))) - .addMethod( - getGetValidatorAddressMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.wallet.WalletOuterClass.GetValidatorAddressRequest, - pactus.wallet.WalletOuterClass.GetValidatorAddressResponse>( - this, METHODID_GET_VALIDATOR_ADDRESS))) - .addMethod( - getGetNewAddressMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.wallet.WalletOuterClass.GetNewAddressRequest, - pactus.wallet.WalletOuterClass.GetNewAddressResponse>( - this, METHODID_GET_NEW_ADDRESS))) - .addMethod( - getGetAddressHistoryMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.wallet.WalletOuterClass.GetAddressHistoryRequest, - pactus.wallet.WalletOuterClass.GetAddressHistoryResponse>( - this, METHODID_GET_ADDRESS_HISTORY))) - .addMethod( - getSignMessageMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - pactus.wallet.WalletOuterClass.SignMessageRequest, - pactus.wallet.WalletOuterClass.SignMessageResponse>( - this, METHODID_SIGN_MESSAGE))) - .build(); - } - } - - /** - *
-   * Define the Wallet service with various RPC methods for wallet management.
-   * 
- */ - public static final class WalletStub extends io.grpc.stub.AbstractAsyncStub { - private WalletStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WalletStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WalletStub(channel, callOptions); - } - - /** - *
-     * CreateWallet creates a new wallet with the specified parameters.
-     * 
- */ - public void createWallet(pactus.wallet.WalletOuterClass.CreateWalletRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateWalletMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * RestoreWallet restores an existing wallet with the given mnemonic.
-     * 
- */ - public void restoreWallet(pactus.wallet.WalletOuterClass.RestoreWalletRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRestoreWalletMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * LoadWallet loads an existing wallet with the given name.
-     * 
- */ - public void loadWallet(pactus.wallet.WalletOuterClass.LoadWalletRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getLoadWalletMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * UnloadWallet unloads a currently loaded wallet with the specified name.
-     * 
- */ - public void unloadWallet(pactus.wallet.WalletOuterClass.UnloadWalletRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUnloadWalletMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetTotalBalance returns the total available balance of the wallet.
-     * 
- */ - public void getTotalBalance(pactus.wallet.WalletOuterClass.GetTotalBalanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetTotalBalanceMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * SignRawTransaction signs a raw transaction for a specified wallet.
-     * 
- */ - public void signRawTransaction(pactus.wallet.WalletOuterClass.SignRawTransactionRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSignRawTransactionMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetValidatorAddress retrieves the validator address associated with a
-     * public key.
-     * 
- */ - public void getValidatorAddress(pactus.wallet.WalletOuterClass.GetValidatorAddressRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetValidatorAddressMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetNewAddress generates a new address for the specified wallet.
-     * 
- */ - public void getNewAddress(pactus.wallet.WalletOuterClass.GetNewAddressRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNewAddressMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * GetAddressHistory retrieves the transaction history of an address.
-     * 
- */ - public void getAddressHistory(pactus.wallet.WalletOuterClass.GetAddressHistoryRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAddressHistoryMethod(), getCallOptions()), request, responseObserver); - } - - /** - *
-     * SignMessage signs an arbitrary message.
-     * 
- */ - public void signMessage(pactus.wallet.WalletOuterClass.SignMessageRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getSignMessageMethod(), getCallOptions()), request, responseObserver); - } - } - - /** - *
-   * Define the Wallet service with various RPC methods for wallet management.
-   * 
- */ - public static final class WalletBlockingStub extends io.grpc.stub.AbstractBlockingStub { - private WalletBlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WalletBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WalletBlockingStub(channel, callOptions); - } - - /** - *
-     * CreateWallet creates a new wallet with the specified parameters.
-     * 
- */ - public pactus.wallet.WalletOuterClass.CreateWalletResponse createWallet(pactus.wallet.WalletOuterClass.CreateWalletRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateWalletMethod(), getCallOptions(), request); - } - - /** - *
-     * RestoreWallet restores an existing wallet with the given mnemonic.
-     * 
- */ - public pactus.wallet.WalletOuterClass.RestoreWalletResponse restoreWallet(pactus.wallet.WalletOuterClass.RestoreWalletRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRestoreWalletMethod(), getCallOptions(), request); - } - - /** - *
-     * LoadWallet loads an existing wallet with the given name.
-     * 
- */ - public pactus.wallet.WalletOuterClass.LoadWalletResponse loadWallet(pactus.wallet.WalletOuterClass.LoadWalletRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getLoadWalletMethod(), getCallOptions(), request); - } - - /** - *
-     * UnloadWallet unloads a currently loaded wallet with the specified name.
-     * 
- */ - public pactus.wallet.WalletOuterClass.UnloadWalletResponse unloadWallet(pactus.wallet.WalletOuterClass.UnloadWalletRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUnloadWalletMethod(), getCallOptions(), request); - } - - /** - *
-     * GetTotalBalance returns the total available balance of the wallet.
-     * 
- */ - public pactus.wallet.WalletOuterClass.GetTotalBalanceResponse getTotalBalance(pactus.wallet.WalletOuterClass.GetTotalBalanceRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetTotalBalanceMethod(), getCallOptions(), request); - } - - /** - *
-     * SignRawTransaction signs a raw transaction for a specified wallet.
-     * 
- */ - public pactus.wallet.WalletOuterClass.SignRawTransactionResponse signRawTransaction(pactus.wallet.WalletOuterClass.SignRawTransactionRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSignRawTransactionMethod(), getCallOptions(), request); - } - - /** - *
-     * GetValidatorAddress retrieves the validator address associated with a
-     * public key.
-     * 
- */ - public pactus.wallet.WalletOuterClass.GetValidatorAddressResponse getValidatorAddress(pactus.wallet.WalletOuterClass.GetValidatorAddressRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetValidatorAddressMethod(), getCallOptions(), request); - } - - /** - *
-     * GetNewAddress generates a new address for the specified wallet.
-     * 
- */ - public pactus.wallet.WalletOuterClass.GetNewAddressResponse getNewAddress(pactus.wallet.WalletOuterClass.GetNewAddressRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNewAddressMethod(), getCallOptions(), request); - } - - /** - *
-     * GetAddressHistory retrieves the transaction history of an address.
-     * 
- */ - public pactus.wallet.WalletOuterClass.GetAddressHistoryResponse getAddressHistory(pactus.wallet.WalletOuterClass.GetAddressHistoryRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAddressHistoryMethod(), getCallOptions(), request); - } - - /** - *
-     * SignMessage signs an arbitrary message.
-     * 
- */ - public pactus.wallet.WalletOuterClass.SignMessageResponse signMessage(pactus.wallet.WalletOuterClass.SignMessageRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getSignMessageMethod(), getCallOptions(), request); - } - } - - /** - *
-   * Define the Wallet service with various RPC methods for wallet management.
-   * 
- */ - public static final class WalletFutureStub extends io.grpc.stub.AbstractFutureStub { - private WalletFutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WalletFutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WalletFutureStub(channel, callOptions); - } - - /** - *
-     * CreateWallet creates a new wallet with the specified parameters.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture createWallet( - pactus.wallet.WalletOuterClass.CreateWalletRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateWalletMethod(), getCallOptions()), request); - } - - /** - *
-     * RestoreWallet restores an existing wallet with the given mnemonic.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture restoreWallet( - pactus.wallet.WalletOuterClass.RestoreWalletRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getRestoreWalletMethod(), getCallOptions()), request); - } - - /** - *
-     * LoadWallet loads an existing wallet with the given name.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture loadWallet( - pactus.wallet.WalletOuterClass.LoadWalletRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getLoadWalletMethod(), getCallOptions()), request); - } - - /** - *
-     * UnloadWallet unloads a currently loaded wallet with the specified name.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture unloadWallet( - pactus.wallet.WalletOuterClass.UnloadWalletRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUnloadWalletMethod(), getCallOptions()), request); - } - - /** - *
-     * GetTotalBalance returns the total available balance of the wallet.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getTotalBalance( - pactus.wallet.WalletOuterClass.GetTotalBalanceRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetTotalBalanceMethod(), getCallOptions()), request); - } - - /** - *
-     * SignRawTransaction signs a raw transaction for a specified wallet.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture signRawTransaction( - pactus.wallet.WalletOuterClass.SignRawTransactionRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSignRawTransactionMethod(), getCallOptions()), request); - } - - /** - *
-     * GetValidatorAddress retrieves the validator address associated with a
-     * public key.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getValidatorAddress( - pactus.wallet.WalletOuterClass.GetValidatorAddressRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetValidatorAddressMethod(), getCallOptions()), request); - } - - /** - *
-     * GetNewAddress generates a new address for the specified wallet.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getNewAddress( - pactus.wallet.WalletOuterClass.GetNewAddressRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNewAddressMethod(), getCallOptions()), request); - } - - /** - *
-     * GetAddressHistory retrieves the transaction history of an address.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture getAddressHistory( - pactus.wallet.WalletOuterClass.GetAddressHistoryRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAddressHistoryMethod(), getCallOptions()), request); - } - - /** - *
-     * SignMessage signs an arbitrary message.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture signMessage( - pactus.wallet.WalletOuterClass.SignMessageRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getSignMessageMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_WALLET = 0; - private static final int METHODID_RESTORE_WALLET = 1; - private static final int METHODID_LOAD_WALLET = 2; - private static final int METHODID_UNLOAD_WALLET = 3; - private static final int METHODID_GET_TOTAL_BALANCE = 4; - private static final int METHODID_SIGN_RAW_TRANSACTION = 5; - private static final int METHODID_GET_VALIDATOR_ADDRESS = 6; - private static final int METHODID_GET_NEW_ADDRESS = 7; - private static final int METHODID_GET_ADDRESS_HISTORY = 8; - private static final int METHODID_SIGN_MESSAGE = 9; - - private static final class MethodHandlers implements - io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final WalletImplBase serviceImpl; - private final int methodId; - - MethodHandlers(WalletImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_CREATE_WALLET: - serviceImpl.createWallet((pactus.wallet.WalletOuterClass.CreateWalletRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_RESTORE_WALLET: - serviceImpl.restoreWallet((pactus.wallet.WalletOuterClass.RestoreWalletRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_LOAD_WALLET: - serviceImpl.loadWallet((pactus.wallet.WalletOuterClass.LoadWalletRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UNLOAD_WALLET: - serviceImpl.unloadWallet((pactus.wallet.WalletOuterClass.UnloadWalletRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_TOTAL_BALANCE: - serviceImpl.getTotalBalance((pactus.wallet.WalletOuterClass.GetTotalBalanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SIGN_RAW_TRANSACTION: - serviceImpl.signRawTransaction((pactus.wallet.WalletOuterClass.SignRawTransactionRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_VALIDATOR_ADDRESS: - serviceImpl.getValidatorAddress((pactus.wallet.WalletOuterClass.GetValidatorAddressRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_NEW_ADDRESS: - serviceImpl.getNewAddress((pactus.wallet.WalletOuterClass.GetNewAddressRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ADDRESS_HISTORY: - serviceImpl.getAddressHistory((pactus.wallet.WalletOuterClass.GetAddressHistoryRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_SIGN_MESSAGE: - serviceImpl.signMessage((pactus.wallet.WalletOuterClass.SignMessageRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private static abstract class WalletBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { - WalletBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return pactus.wallet.WalletOuterClass.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Wallet"); - } - } - - private static final class WalletFileDescriptorSupplier - extends WalletBaseDescriptorSupplier { - WalletFileDescriptorSupplier() {} - } - - private static final class WalletMethodDescriptorSupplier - extends WalletBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - WalletMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (WalletGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new WalletFileDescriptorSupplier()) - .addMethod(getCreateWalletMethod()) - .addMethod(getRestoreWalletMethod()) - .addMethod(getLoadWalletMethod()) - .addMethod(getUnloadWalletMethod()) - .addMethod(getGetTotalBalanceMethod()) - .addMethod(getSignRawTransactionMethod()) - .addMethod(getGetValidatorAddressMethod()) - .addMethod(getGetNewAddressMethod()) - .addMethod(getGetAddressHistoryMethod()) - .addMethod(getSignMessageMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/www/grpc/gen/java/pactus/wallet/WalletOuterClass.java b/www/grpc/gen/java/pactus/wallet/WalletOuterClass.java deleted file mode 100644 index 6e9fad838..000000000 --- a/www/grpc/gen/java/pactus/wallet/WalletOuterClass.java +++ /dev/null @@ -1,17689 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: wallet.proto - -package pactus.wallet; - -public final class WalletOuterClass { - private WalletOuterClass() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - *
-   * Enum for the address type.
-   * 
- * - * Protobuf enum {@code pactus.AddressType} - */ - public enum AddressType - implements com.google.protobuf.ProtocolMessageEnum { - /** - *
-     * Treasury address type.
-     * Should not be used to generate new addresses.
-     * 
- * - * ADDRESS_TYPE_TREASURY = 0; - */ - ADDRESS_TYPE_TREASURY(0), - /** - *
-     * Validator address type.
-     * 
- * - * ADDRESS_TYPE_VALIDATOR = 1; - */ - ADDRESS_TYPE_VALIDATOR(1), - /** - *
-     * Account address type with BLS signature scheme.
-     * 
- * - * ADDRESS_TYPE_BLS_ACCOUNT = 2; - */ - ADDRESS_TYPE_BLS_ACCOUNT(2), - /** - *
-     * Account address type with Ed25519 signature scheme.
-     * Note: Generating a new Ed25519 address requires the wallet password.
-     * 
- * - * ADDRESS_TYPE_ED25519_ACCOUNT = 3; - */ - ADDRESS_TYPE_ED25519_ACCOUNT(3), - UNRECOGNIZED(-1), - ; - - /** - *
-     * Treasury address type.
-     * Should not be used to generate new addresses.
-     * 
- * - * ADDRESS_TYPE_TREASURY = 0; - */ - public static final int ADDRESS_TYPE_TREASURY_VALUE = 0; - /** - *
-     * Validator address type.
-     * 
- * - * ADDRESS_TYPE_VALIDATOR = 1; - */ - public static final int ADDRESS_TYPE_VALIDATOR_VALUE = 1; - /** - *
-     * Account address type with BLS signature scheme.
-     * 
- * - * ADDRESS_TYPE_BLS_ACCOUNT = 2; - */ - public static final int ADDRESS_TYPE_BLS_ACCOUNT_VALUE = 2; - /** - *
-     * Account address type with Ed25519 signature scheme.
-     * Note: Generating a new Ed25519 address requires the wallet password.
-     * 
- * - * ADDRESS_TYPE_ED25519_ACCOUNT = 3; - */ - public static final int ADDRESS_TYPE_ED25519_ACCOUNT_VALUE = 3; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AddressType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static AddressType forNumber(int value) { - switch (value) { - case 0: return ADDRESS_TYPE_TREASURY; - case 1: return ADDRESS_TYPE_VALIDATOR; - case 2: return ADDRESS_TYPE_BLS_ACCOUNT; - case 3: return ADDRESS_TYPE_ED25519_ACCOUNT; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - AddressType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public AddressType findValueByNumber(int number) { - return AddressType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.getDescriptor().getEnumTypes().get(0); - } - - private static final AddressType[] VALUES = values(); - - public static AddressType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private AddressType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:pactus.AddressType) - } - - public interface AddressInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.AddressInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The address string.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The address string.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - - /** - *
-     * The public key associated with the address.
-     * 
- * - * string public_key = 2 [json_name = "publicKey"]; - * @return The publicKey. - */ - java.lang.String getPublicKey(); - /** - *
-     * The public key associated with the address.
-     * 
- * - * string public_key = 2 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - com.google.protobuf.ByteString - getPublicKeyBytes(); - - /** - *
-     * A label associated with the address.
-     * 
- * - * string label = 3 [json_name = "label"]; - * @return The label. - */ - java.lang.String getLabel(); - /** - *
-     * A label associated with the address.
-     * 
- * - * string label = 3 [json_name = "label"]; - * @return The bytes for label. - */ - com.google.protobuf.ByteString - getLabelBytes(); - - /** - *
-     * The Hierarchical Deterministic path of the address within the wallet.
-     * 
- * - * string path = 4 [json_name = "path"]; - * @return The path. - */ - java.lang.String getPath(); - /** - *
-     * The Hierarchical Deterministic path of the address within the wallet.
-     * 
- * - * string path = 4 [json_name = "path"]; - * @return The bytes for path. - */ - com.google.protobuf.ByteString - getPathBytes(); - } - /** - *
-   * Message containing address information.
-   * 
- * - * Protobuf type {@code pactus.AddressInfo} - */ - public static final class AddressInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.AddressInfo) - AddressInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use AddressInfo.newBuilder() to construct. - private AddressInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private AddressInfo() { - address_ = ""; - publicKey_ = ""; - label_ = ""; - path_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new AddressInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_AddressInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_AddressInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.AddressInfo.class, pactus.wallet.WalletOuterClass.AddressInfo.Builder.class); - } - - public static final int ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object address_; - /** - *
-     * The address string.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The address string.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 2; - private volatile java.lang.Object publicKey_; - /** - *
-     * The public key associated with the address.
-     * 
- * - * string public_key = 2 [json_name = "publicKey"]; - * @return The publicKey. - */ - @java.lang.Override - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } - } - /** - *
-     * The public key associated with the address.
-     * 
- * - * string public_key = 2 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int LABEL_FIELD_NUMBER = 3; - private volatile java.lang.Object label_; - /** - *
-     * A label associated with the address.
-     * 
- * - * string label = 3 [json_name = "label"]; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } - } - /** - *
-     * A label associated with the address.
-     * 
- * - * string label = 3 [json_name = "label"]; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PATH_FIELD_NUMBER = 4; - private volatile java.lang.Object path_; - /** - *
-     * The Hierarchical Deterministic path of the address within the wallet.
-     * 
- * - * string path = 4 [json_name = "path"]; - * @return The path. - */ - @java.lang.Override - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } - } - /** - *
-     * The Hierarchical Deterministic path of the address within the wallet.
-     * 
- * - * string path = 4 [json_name = "path"]; - * @return The bytes for path. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, publicKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, path_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, publicKey_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, path_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.AddressInfo)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.AddressInfo other = (pactus.wallet.WalletOuterClass.AddressInfo) obj; - - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - if (!getLabel() - .equals(other.getLabel())) return false; - if (!getPath() - .equals(other.getPath())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + getLabel().hashCode(); - hash = (37 * hash) + PATH_FIELD_NUMBER; - hash = (53 * hash) + getPath().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.AddressInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing address information.
-     * 
- * - * Protobuf type {@code pactus.AddressInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.AddressInfo) - pactus.wallet.WalletOuterClass.AddressInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_AddressInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_AddressInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.AddressInfo.class, pactus.wallet.WalletOuterClass.AddressInfo.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.AddressInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - address_ = ""; - - publicKey_ = ""; - - label_ = ""; - - path_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_AddressInfo_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.AddressInfo getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.AddressInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.AddressInfo build() { - pactus.wallet.WalletOuterClass.AddressInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.AddressInfo buildPartial() { - pactus.wallet.WalletOuterClass.AddressInfo result = new pactus.wallet.WalletOuterClass.AddressInfo(this); - result.address_ = address_; - result.publicKey_ = publicKey_; - result.label_ = label_; - result.path_ = path_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.AddressInfo) { - return mergeFrom((pactus.wallet.WalletOuterClass.AddressInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.AddressInfo other) { - if (other == pactus.wallet.WalletOuterClass.AddressInfo.getDefaultInstance()) return this; - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - if (!other.getPublicKey().isEmpty()) { - publicKey_ = other.publicKey_; - onChanged(); - } - if (!other.getLabel().isEmpty()) { - label_ = other.label_; - onChanged(); - } - if (!other.getPath().isEmpty()) { - path_ = other.path_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - publicKey_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - label_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: { - path_ = input.readStringRequireUtf8(); - - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * The address string.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address string.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address string.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The address string.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The address string.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - - private java.lang.Object publicKey_ = ""; - /** - *
-       * The public key associated with the address.
-       * 
- * - * string public_key = 2 [json_name = "publicKey"]; - * @return The publicKey. - */ - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The public key associated with the address.
-       * 
- * - * string public_key = 2 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The public key associated with the address.
-       * 
- * - * string public_key = 2 [json_name = "publicKey"]; - * @param value The publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - publicKey_ = value; - onChanged(); - return this; - } - /** - *
-       * The public key associated with the address.
-       * 
- * - * string public_key = 2 [json_name = "publicKey"]; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - - publicKey_ = getDefaultInstance().getPublicKey(); - onChanged(); - return this; - } - /** - *
-       * The public key associated with the address.
-       * 
- * - * string public_key = 2 [json_name = "publicKey"]; - * @param value The bytes for publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - publicKey_ = value; - onChanged(); - return this; - } - - private java.lang.Object label_ = ""; - /** - *
-       * A label associated with the address.
-       * 
- * - * string label = 3 [json_name = "label"]; - * @return The label. - */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A label associated with the address.
-       * 
- * - * string label = 3 [json_name = "label"]; - * @return The bytes for label. - */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A label associated with the address.
-       * 
- * - * string label = 3 [json_name = "label"]; - * @param value The label to set. - * @return This builder for chaining. - */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - label_ = value; - onChanged(); - return this; - } - /** - *
-       * A label associated with the address.
-       * 
- * - * string label = 3 [json_name = "label"]; - * @return This builder for chaining. - */ - public Builder clearLabel() { - - label_ = getDefaultInstance().getLabel(); - onChanged(); - return this; - } - /** - *
-       * A label associated with the address.
-       * 
- * - * string label = 3 [json_name = "label"]; - * @param value The bytes for label to set. - * @return This builder for chaining. - */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - label_ = value; - onChanged(); - return this; - } - - private java.lang.Object path_ = ""; - /** - *
-       * The Hierarchical Deterministic path of the address within the wallet.
-       * 
- * - * string path = 4 [json_name = "path"]; - * @return The path. - */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - path_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The Hierarchical Deterministic path of the address within the wallet.
-       * 
- * - * string path = 4 [json_name = "path"]; - * @return The bytes for path. - */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The Hierarchical Deterministic path of the address within the wallet.
-       * 
- * - * string path = 4 [json_name = "path"]; - * @param value The path to set. - * @return This builder for chaining. - */ - public Builder setPath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - path_ = value; - onChanged(); - return this; - } - /** - *
-       * The Hierarchical Deterministic path of the address within the wallet.
-       * 
- * - * string path = 4 [json_name = "path"]; - * @return This builder for chaining. - */ - public Builder clearPath() { - - path_ = getDefaultInstance().getPath(); - onChanged(); - return this; - } - /** - *
-       * The Hierarchical Deterministic path of the address within the wallet.
-       * 
- * - * string path = 4 [json_name = "path"]; - * @param value The bytes for path to set. - * @return This builder for chaining. - */ - public Builder setPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - path_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.AddressInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.AddressInfo) - private static final pactus.wallet.WalletOuterClass.AddressInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.AddressInfo(); - } - - public static pactus.wallet.WalletOuterClass.AddressInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AddressInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.AddressInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface HistoryInfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.HistoryInfo) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The transaction ID hash.
-     * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The transactionId. - */ - java.lang.String getTransactionId(); - /** - *
-     * The transaction ID hash.
-     * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The bytes for transactionId. - */ - com.google.protobuf.ByteString - getTransactionIdBytes(); - - /** - *
-     * The timestamp of the transaction.
-     * 
- * - * uint32 time = 2 [json_name = "time"]; - * @return The time. - */ - int getTime(); - - /** - *
-     * The payload type of the transaction.
-     * 
- * - * string payload_type = 3 [json_name = "payloadType"]; - * @return The payloadType. - */ - java.lang.String getPayloadType(); - /** - *
-     * The payload type of the transaction.
-     * 
- * - * string payload_type = 3 [json_name = "payloadType"]; - * @return The bytes for payloadType. - */ - com.google.protobuf.ByteString - getPayloadTypeBytes(); - - /** - *
-     * A description of the transaction.
-     * 
- * - * string description = 4 [json_name = "description"]; - * @return The description. - */ - java.lang.String getDescription(); - /** - *
-     * A description of the transaction.
-     * 
- * - * string description = 4 [json_name = "description"]; - * @return The bytes for description. - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - *
-     * The amount involved in the transaction.
-     * 
- * - * int64 amount = 5 [json_name = "amount"]; - * @return The amount. - */ - long getAmount(); - } - /** - *
-   * Message containing transaction history information for an address.
-   * 
- * - * Protobuf type {@code pactus.HistoryInfo} - */ - public static final class HistoryInfo extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.HistoryInfo) - HistoryInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use HistoryInfo.newBuilder() to construct. - private HistoryInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private HistoryInfo() { - transactionId_ = ""; - payloadType_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new HistoryInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_HistoryInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_HistoryInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.HistoryInfo.class, pactus.wallet.WalletOuterClass.HistoryInfo.Builder.class); - } - - public static final int TRANSACTION_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object transactionId_; - /** - *
-     * The transaction ID hash.
-     * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The transactionId. - */ - @java.lang.Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transactionId_ = s; - return s; - } - } - /** - *
-     * The transaction ID hash.
-     * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The bytes for transactionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TIME_FIELD_NUMBER = 2; - private int time_; - /** - *
-     * The timestamp of the transaction.
-     * 
- * - * uint32 time = 2 [json_name = "time"]; - * @return The time. - */ - @java.lang.Override - public int getTime() { - return time_; - } - - public static final int PAYLOAD_TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object payloadType_; - /** - *
-     * The payload type of the transaction.
-     * 
- * - * string payload_type = 3 [json_name = "payloadType"]; - * @return The payloadType. - */ - @java.lang.Override - public java.lang.String getPayloadType() { - java.lang.Object ref = payloadType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - payloadType_ = s; - return s; - } - } - /** - *
-     * The payload type of the transaction.
-     * 
- * - * string payload_type = 3 [json_name = "payloadType"]; - * @return The bytes for payloadType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPayloadTypeBytes() { - java.lang.Object ref = payloadType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - payloadType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 4; - private volatile java.lang.Object description_; - /** - *
-     * A description of the transaction.
-     * 
- * - * string description = 4 [json_name = "description"]; - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - *
-     * A description of the transaction.
-     * 
- * - * string description = 4 [json_name = "description"]; - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AMOUNT_FIELD_NUMBER = 5; - private long amount_; - /** - *
-     * The amount involved in the transaction.
-     * 
- * - * int64 amount = 5 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, transactionId_); - } - if (time_ != 0) { - output.writeUInt32(2, time_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, payloadType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); - } - if (amount_ != 0L) { - output.writeInt64(5, amount_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, transactionId_); - } - if (time_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, time_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, payloadType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); - } - if (amount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, amount_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.HistoryInfo)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.HistoryInfo other = (pactus.wallet.WalletOuterClass.HistoryInfo) obj; - - if (!getTransactionId() - .equals(other.getTransactionId())) return false; - if (getTime() - != other.getTime()) return false; - if (!getPayloadType() - .equals(other.getPayloadType())) return false; - if (!getDescription() - .equals(other.getDescription())) return false; - if (getAmount() - != other.getAmount()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; - hash = (53 * hash) + getTransactionId().hashCode(); - hash = (37 * hash) + TIME_FIELD_NUMBER; - hash = (53 * hash) + getTime(); - hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getPayloadType().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAmount()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.HistoryInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Message containing transaction history information for an address.
-     * 
- * - * Protobuf type {@code pactus.HistoryInfo} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.HistoryInfo) - pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_HistoryInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_HistoryInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.HistoryInfo.class, pactus.wallet.WalletOuterClass.HistoryInfo.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.HistoryInfo.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - transactionId_ = ""; - - time_ = 0; - - payloadType_ = ""; - - description_ = ""; - - amount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_HistoryInfo_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.HistoryInfo getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.HistoryInfo.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.HistoryInfo build() { - pactus.wallet.WalletOuterClass.HistoryInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.HistoryInfo buildPartial() { - pactus.wallet.WalletOuterClass.HistoryInfo result = new pactus.wallet.WalletOuterClass.HistoryInfo(this); - result.transactionId_ = transactionId_; - result.time_ = time_; - result.payloadType_ = payloadType_; - result.description_ = description_; - result.amount_ = amount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.HistoryInfo) { - return mergeFrom((pactus.wallet.WalletOuterClass.HistoryInfo)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.HistoryInfo other) { - if (other == pactus.wallet.WalletOuterClass.HistoryInfo.getDefaultInstance()) return this; - if (!other.getTransactionId().isEmpty()) { - transactionId_ = other.transactionId_; - onChanged(); - } - if (other.getTime() != 0) { - setTime(other.getTime()); - } - if (!other.getPayloadType().isEmpty()) { - payloadType_ = other.payloadType_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.getAmount() != 0L) { - setAmount(other.getAmount()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - transactionId_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: { - time_ = input.readUInt32(); - - break; - } // case 16 - case 26: { - payloadType_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: { - description_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 40: { - amount_ = input.readInt64(); - - break; - } // case 40 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object transactionId_ = ""; - /** - *
-       * The transaction ID hash.
-       * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The transactionId. - */ - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transactionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The transaction ID hash.
-       * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The bytes for transactionId. - */ - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The transaction ID hash.
-       * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @param value The transactionId to set. - * @return This builder for chaining. - */ - public Builder setTransactionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - transactionId_ = value; - onChanged(); - return this; - } - /** - *
-       * The transaction ID hash.
-       * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return This builder for chaining. - */ - public Builder clearTransactionId() { - - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; - } - /** - *
-       * The transaction ID hash.
-       * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @param value The bytes for transactionId to set. - * @return This builder for chaining. - */ - public Builder setTransactionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - transactionId_ = value; - onChanged(); - return this; - } - - private int time_ ; - /** - *
-       * The timestamp of the transaction.
-       * 
- * - * uint32 time = 2 [json_name = "time"]; - * @return The time. - */ - @java.lang.Override - public int getTime() { - return time_; - } - /** - *
-       * The timestamp of the transaction.
-       * 
- * - * uint32 time = 2 [json_name = "time"]; - * @param value The time to set. - * @return This builder for chaining. - */ - public Builder setTime(int value) { - - time_ = value; - onChanged(); - return this; - } - /** - *
-       * The timestamp of the transaction.
-       * 
- * - * uint32 time = 2 [json_name = "time"]; - * @return This builder for chaining. - */ - public Builder clearTime() { - - time_ = 0; - onChanged(); - return this; - } - - private java.lang.Object payloadType_ = ""; - /** - *
-       * The payload type of the transaction.
-       * 
- * - * string payload_type = 3 [json_name = "payloadType"]; - * @return The payloadType. - */ - public java.lang.String getPayloadType() { - java.lang.Object ref = payloadType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - payloadType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The payload type of the transaction.
-       * 
- * - * string payload_type = 3 [json_name = "payloadType"]; - * @return The bytes for payloadType. - */ - public com.google.protobuf.ByteString - getPayloadTypeBytes() { - java.lang.Object ref = payloadType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - payloadType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The payload type of the transaction.
-       * 
- * - * string payload_type = 3 [json_name = "payloadType"]; - * @param value The payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadType( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - payloadType_ = value; - onChanged(); - return this; - } - /** - *
-       * The payload type of the transaction.
-       * 
- * - * string payload_type = 3 [json_name = "payloadType"]; - * @return This builder for chaining. - */ - public Builder clearPayloadType() { - - payloadType_ = getDefaultInstance().getPayloadType(); - onChanged(); - return this; - } - /** - *
-       * The payload type of the transaction.
-       * 
- * - * string payload_type = 3 [json_name = "payloadType"]; - * @param value The bytes for payloadType to set. - * @return This builder for chaining. - */ - public Builder setPayloadTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - payloadType_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - *
-       * A description of the transaction.
-       * 
- * - * string description = 4 [json_name = "description"]; - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A description of the transaction.
-       * 
- * - * string description = 4 [json_name = "description"]; - * @return The bytes for description. - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A description of the transaction.
-       * 
- * - * string description = 4 [json_name = "description"]; - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - *
-       * A description of the transaction.
-       * 
- * - * string description = 4 [json_name = "description"]; - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - *
-       * A description of the transaction.
-       * 
- * - * string description = 4 [json_name = "description"]; - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private long amount_ ; - /** - *
-       * The amount involved in the transaction.
-       * 
- * - * int64 amount = 5 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - /** - *
-       * The amount involved in the transaction.
-       * 
- * - * int64 amount = 5 [json_name = "amount"]; - * @param value The amount to set. - * @return This builder for chaining. - */ - public Builder setAmount(long value) { - - amount_ = value; - onChanged(); - return this; - } - /** - *
-       * The amount involved in the transaction.
-       * 
- * - * int64 amount = 5 [json_name = "amount"]; - * @return This builder for chaining. - */ - public Builder clearAmount() { - - amount_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.HistoryInfo) - } - - // @@protoc_insertion_point(class_scope:pactus.HistoryInfo) - private static final pactus.wallet.WalletOuterClass.HistoryInfo DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.HistoryInfo(); - } - - public static pactus.wallet.WalletOuterClass.HistoryInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HistoryInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.HistoryInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetAddressHistoryRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetAddressHistoryRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - - /** - *
-     * The address to retrieve the transaction history for.
-     * 
- * - * string address = 2 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The address to retrieve the transaction history for.
-     * 
- * - * string address = 2 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - } - /** - *
-   * Request message to get an address transaction history.
-   * 
- * - * Protobuf type {@code pactus.GetAddressHistoryRequest} - */ - public static final class GetAddressHistoryRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetAddressHistoryRequest) - GetAddressHistoryRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetAddressHistoryRequest.newBuilder() to construct. - private GetAddressHistoryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetAddressHistoryRequest() { - walletName_ = ""; - address_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetAddressHistoryRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.class, pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object address_; - /** - *
-     * The address to retrieve the transaction history for.
-     * 
- * - * string address = 2 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The address to retrieve the transaction history for.
-     * 
- * - * string address = 2 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, address_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, address_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.GetAddressHistoryRequest)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.GetAddressHistoryRequest other = (pactus.wallet.WalletOuterClass.GetAddressHistoryRequest) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetAddressHistoryRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message to get an address transaction history.
-     * 
- * - * Protobuf type {@code pactus.GetAddressHistoryRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetAddressHistoryRequest) - pactus.wallet.WalletOuterClass.GetAddressHistoryRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.class, pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - address_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryRequest_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetAddressHistoryRequest getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetAddressHistoryRequest build() { - pactus.wallet.WalletOuterClass.GetAddressHistoryRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetAddressHistoryRequest buildPartial() { - pactus.wallet.WalletOuterClass.GetAddressHistoryRequest result = new pactus.wallet.WalletOuterClass.GetAddressHistoryRequest(this); - result.walletName_ = walletName_; - result.address_ = address_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.GetAddressHistoryRequest) { - return mergeFrom((pactus.wallet.WalletOuterClass.GetAddressHistoryRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetAddressHistoryRequest other) { - if (other == pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * The address to retrieve the transaction history for.
-       * 
- * - * string address = 2 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The address to retrieve the transaction history for.
-       * 
- * - * string address = 2 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The address to retrieve the transaction history for.
-       * 
- * - * string address = 2 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The address to retrieve the transaction history for.
-       * 
- * - * string address = 2 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The address to retrieve the transaction history for.
-       * 
- * - * string address = 2 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetAddressHistoryRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetAddressHistoryRequest) - private static final pactus.wallet.WalletOuterClass.GetAddressHistoryRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetAddressHistoryRequest(); - } - - public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAddressHistoryRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetAddressHistoryRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetAddressHistoryResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetAddressHistoryResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Array of history information for the address.
-     * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - java.util.List - getHistoryInfoList(); - /** - *
-     * Array of history information for the address.
-     * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - pactus.wallet.WalletOuterClass.HistoryInfo getHistoryInfo(int index); - /** - *
-     * Array of history information for the address.
-     * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - int getHistoryInfoCount(); - /** - *
-     * Array of history information for the address.
-     * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - java.util.List - getHistoryInfoOrBuilderList(); - /** - *
-     * Array of history information for the address.
-     * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder getHistoryInfoOrBuilder( - int index); - } - /** - *
-   * Response message containing the address transaction history.
-   * 
- * - * Protobuf type {@code pactus.GetAddressHistoryResponse} - */ - public static final class GetAddressHistoryResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetAddressHistoryResponse) - GetAddressHistoryResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetAddressHistoryResponse.newBuilder() to construct. - private GetAddressHistoryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetAddressHistoryResponse() { - historyInfo_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetAddressHistoryResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.class, pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.Builder.class); - } - - public static final int HISTORY_INFO_FIELD_NUMBER = 1; - private java.util.List historyInfo_; - /** - *
-     * Array of history information for the address.
-     * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - @java.lang.Override - public java.util.List getHistoryInfoList() { - return historyInfo_; - } - /** - *
-     * Array of history information for the address.
-     * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - @java.lang.Override - public java.util.List - getHistoryInfoOrBuilderList() { - return historyInfo_; - } - /** - *
-     * Array of history information for the address.
-     * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - @java.lang.Override - public int getHistoryInfoCount() { - return historyInfo_.size(); - } - /** - *
-     * Array of history information for the address.
-     * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - @java.lang.Override - public pactus.wallet.WalletOuterClass.HistoryInfo getHistoryInfo(int index) { - return historyInfo_.get(index); - } - /** - *
-     * Array of history information for the address.
-     * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - @java.lang.Override - public pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder getHistoryInfoOrBuilder( - int index) { - return historyInfo_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < historyInfo_.size(); i++) { - output.writeMessage(1, historyInfo_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < historyInfo_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, historyInfo_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.GetAddressHistoryResponse)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.GetAddressHistoryResponse other = (pactus.wallet.WalletOuterClass.GetAddressHistoryResponse) obj; - - if (!getHistoryInfoList() - .equals(other.getHistoryInfoList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getHistoryInfoCount() > 0) { - hash = (37 * hash) + HISTORY_INFO_FIELD_NUMBER; - hash = (53 * hash) + getHistoryInfoList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetAddressHistoryResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the address transaction history.
-     * 
- * - * Protobuf type {@code pactus.GetAddressHistoryResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetAddressHistoryResponse) - pactus.wallet.WalletOuterClass.GetAddressHistoryResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.class, pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - if (historyInfoBuilder_ == null) { - historyInfo_ = java.util.Collections.emptyList(); - } else { - historyInfo_ = null; - historyInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryResponse_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetAddressHistoryResponse getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetAddressHistoryResponse build() { - pactus.wallet.WalletOuterClass.GetAddressHistoryResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetAddressHistoryResponse buildPartial() { - pactus.wallet.WalletOuterClass.GetAddressHistoryResponse result = new pactus.wallet.WalletOuterClass.GetAddressHistoryResponse(this); - int from_bitField0_ = bitField0_; - if (historyInfoBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - historyInfo_ = java.util.Collections.unmodifiableList(historyInfo_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.historyInfo_ = historyInfo_; - } else { - result.historyInfo_ = historyInfoBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.GetAddressHistoryResponse) { - return mergeFrom((pactus.wallet.WalletOuterClass.GetAddressHistoryResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetAddressHistoryResponse other) { - if (other == pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.getDefaultInstance()) return this; - if (historyInfoBuilder_ == null) { - if (!other.historyInfo_.isEmpty()) { - if (historyInfo_.isEmpty()) { - historyInfo_ = other.historyInfo_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureHistoryInfoIsMutable(); - historyInfo_.addAll(other.historyInfo_); - } - onChanged(); - } - } else { - if (!other.historyInfo_.isEmpty()) { - if (historyInfoBuilder_.isEmpty()) { - historyInfoBuilder_.dispose(); - historyInfoBuilder_ = null; - historyInfo_ = other.historyInfo_; - bitField0_ = (bitField0_ & ~0x00000001); - historyInfoBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getHistoryInfoFieldBuilder() : null; - } else { - historyInfoBuilder_.addAllMessages(other.historyInfo_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - pactus.wallet.WalletOuterClass.HistoryInfo m = - input.readMessage( - pactus.wallet.WalletOuterClass.HistoryInfo.parser(), - extensionRegistry); - if (historyInfoBuilder_ == null) { - ensureHistoryInfoIsMutable(); - historyInfo_.add(m); - } else { - historyInfoBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List historyInfo_ = - java.util.Collections.emptyList(); - private void ensureHistoryInfoIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - historyInfo_ = new java.util.ArrayList(historyInfo_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.wallet.WalletOuterClass.HistoryInfo, pactus.wallet.WalletOuterClass.HistoryInfo.Builder, pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder> historyInfoBuilder_; - - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public java.util.List getHistoryInfoList() { - if (historyInfoBuilder_ == null) { - return java.util.Collections.unmodifiableList(historyInfo_); - } else { - return historyInfoBuilder_.getMessageList(); - } - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public int getHistoryInfoCount() { - if (historyInfoBuilder_ == null) { - return historyInfo_.size(); - } else { - return historyInfoBuilder_.getCount(); - } - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public pactus.wallet.WalletOuterClass.HistoryInfo getHistoryInfo(int index) { - if (historyInfoBuilder_ == null) { - return historyInfo_.get(index); - } else { - return historyInfoBuilder_.getMessage(index); - } - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public Builder setHistoryInfo( - int index, pactus.wallet.WalletOuterClass.HistoryInfo value) { - if (historyInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHistoryInfoIsMutable(); - historyInfo_.set(index, value); - onChanged(); - } else { - historyInfoBuilder_.setMessage(index, value); - } - return this; - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public Builder setHistoryInfo( - int index, pactus.wallet.WalletOuterClass.HistoryInfo.Builder builderForValue) { - if (historyInfoBuilder_ == null) { - ensureHistoryInfoIsMutable(); - historyInfo_.set(index, builderForValue.build()); - onChanged(); - } else { - historyInfoBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public Builder addHistoryInfo(pactus.wallet.WalletOuterClass.HistoryInfo value) { - if (historyInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHistoryInfoIsMutable(); - historyInfo_.add(value); - onChanged(); - } else { - historyInfoBuilder_.addMessage(value); - } - return this; - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public Builder addHistoryInfo( - int index, pactus.wallet.WalletOuterClass.HistoryInfo value) { - if (historyInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHistoryInfoIsMutable(); - historyInfo_.add(index, value); - onChanged(); - } else { - historyInfoBuilder_.addMessage(index, value); - } - return this; - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public Builder addHistoryInfo( - pactus.wallet.WalletOuterClass.HistoryInfo.Builder builderForValue) { - if (historyInfoBuilder_ == null) { - ensureHistoryInfoIsMutable(); - historyInfo_.add(builderForValue.build()); - onChanged(); - } else { - historyInfoBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public Builder addHistoryInfo( - int index, pactus.wallet.WalletOuterClass.HistoryInfo.Builder builderForValue) { - if (historyInfoBuilder_ == null) { - ensureHistoryInfoIsMutable(); - historyInfo_.add(index, builderForValue.build()); - onChanged(); - } else { - historyInfoBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public Builder addAllHistoryInfo( - java.lang.Iterable values) { - if (historyInfoBuilder_ == null) { - ensureHistoryInfoIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, historyInfo_); - onChanged(); - } else { - historyInfoBuilder_.addAllMessages(values); - } - return this; - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public Builder clearHistoryInfo() { - if (historyInfoBuilder_ == null) { - historyInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - historyInfoBuilder_.clear(); - } - return this; - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public Builder removeHistoryInfo(int index) { - if (historyInfoBuilder_ == null) { - ensureHistoryInfoIsMutable(); - historyInfo_.remove(index); - onChanged(); - } else { - historyInfoBuilder_.remove(index); - } - return this; - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public pactus.wallet.WalletOuterClass.HistoryInfo.Builder getHistoryInfoBuilder( - int index) { - return getHistoryInfoFieldBuilder().getBuilder(index); - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder getHistoryInfoOrBuilder( - int index) { - if (historyInfoBuilder_ == null) { - return historyInfo_.get(index); } else { - return historyInfoBuilder_.getMessageOrBuilder(index); - } - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public java.util.List - getHistoryInfoOrBuilderList() { - if (historyInfoBuilder_ != null) { - return historyInfoBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(historyInfo_); - } - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public pactus.wallet.WalletOuterClass.HistoryInfo.Builder addHistoryInfoBuilder() { - return getHistoryInfoFieldBuilder().addBuilder( - pactus.wallet.WalletOuterClass.HistoryInfo.getDefaultInstance()); - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public pactus.wallet.WalletOuterClass.HistoryInfo.Builder addHistoryInfoBuilder( - int index) { - return getHistoryInfoFieldBuilder().addBuilder( - index, pactus.wallet.WalletOuterClass.HistoryInfo.getDefaultInstance()); - } - /** - *
-       * Array of history information for the address.
-       * 
- * - * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; - */ - public java.util.List - getHistoryInfoBuilderList() { - return getHistoryInfoFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - pactus.wallet.WalletOuterClass.HistoryInfo, pactus.wallet.WalletOuterClass.HistoryInfo.Builder, pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder> - getHistoryInfoFieldBuilder() { - if (historyInfoBuilder_ == null) { - historyInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - pactus.wallet.WalletOuterClass.HistoryInfo, pactus.wallet.WalletOuterClass.HistoryInfo.Builder, pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder>( - historyInfo_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - historyInfo_ = null; - } - return historyInfoBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetAddressHistoryResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetAddressHistoryResponse) - private static final pactus.wallet.WalletOuterClass.GetAddressHistoryResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetAddressHistoryResponse(); - } - - public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAddressHistoryResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetAddressHistoryResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetNewAddressRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetNewAddressRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the wallet to generate a new address.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the wallet to generate a new address.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - - /** - *
-     * The type of address to generate.
-     * 
- * - * .pactus.AddressType address_type = 2 [json_name = "addressType"]; - * @return The enum numeric value on the wire for addressType. - */ - int getAddressTypeValue(); - /** - *
-     * The type of address to generate.
-     * 
- * - * .pactus.AddressType address_type = 2 [json_name = "addressType"]; - * @return The addressType. - */ - pactus.wallet.WalletOuterClass.AddressType getAddressType(); - - /** - *
-     * A label for the new address.
-     * 
- * - * string label = 3 [json_name = "label"]; - * @return The label. - */ - java.lang.String getLabel(); - /** - *
-     * A label for the new address.
-     * 
- * - * string label = 3 [json_name = "label"]; - * @return The bytes for label. - */ - com.google.protobuf.ByteString - getLabelBytes(); - - /** - *
-     * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
-     * 
- * - * string password = 4 [json_name = "password"]; - * @return The password. - */ - java.lang.String getPassword(); - /** - *
-     * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
-     * 
- * - * string password = 4 [json_name = "password"]; - * @return The bytes for password. - */ - com.google.protobuf.ByteString - getPasswordBytes(); - } - /** - *
-   * Request message for generating a new address.
-   * 
- * - * Protobuf type {@code pactus.GetNewAddressRequest} - */ - public static final class GetNewAddressRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetNewAddressRequest) - GetNewAddressRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetNewAddressRequest.newBuilder() to construct. - private GetNewAddressRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNewAddressRequest() { - walletName_ = ""; - addressType_ = 0; - label_ = ""; - password_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNewAddressRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetNewAddressRequest.class, pactus.wallet.WalletOuterClass.GetNewAddressRequest.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the wallet to generate a new address.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the wallet to generate a new address.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ADDRESS_TYPE_FIELD_NUMBER = 2; - private int addressType_; - /** - *
-     * The type of address to generate.
-     * 
- * - * .pactus.AddressType address_type = 2 [json_name = "addressType"]; - * @return The enum numeric value on the wire for addressType. - */ - @java.lang.Override public int getAddressTypeValue() { - return addressType_; - } - /** - *
-     * The type of address to generate.
-     * 
- * - * .pactus.AddressType address_type = 2 [json_name = "addressType"]; - * @return The addressType. - */ - @java.lang.Override public pactus.wallet.WalletOuterClass.AddressType getAddressType() { - @SuppressWarnings("deprecation") - pactus.wallet.WalletOuterClass.AddressType result = pactus.wallet.WalletOuterClass.AddressType.valueOf(addressType_); - return result == null ? pactus.wallet.WalletOuterClass.AddressType.UNRECOGNIZED : result; - } - - public static final int LABEL_FIELD_NUMBER = 3; - private volatile java.lang.Object label_; - /** - *
-     * A label for the new address.
-     * 
- * - * string label = 3 [json_name = "label"]; - * @return The label. - */ - @java.lang.Override - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } - } - /** - *
-     * A label for the new address.
-     * 
- * - * string label = 3 [json_name = "label"]; - * @return The bytes for label. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PASSWORD_FIELD_NUMBER = 4; - private volatile java.lang.Object password_; - /** - *
-     * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
-     * 
- * - * string password = 4 [json_name = "password"]; - * @return The password. - */ - @java.lang.Override - public java.lang.String getPassword() { - java.lang.Object ref = password_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - password_ = s; - return s; - } - } - /** - *
-     * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
-     * 
- * - * string password = 4 [json_name = "password"]; - * @return The bytes for password. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPasswordBytes() { - java.lang.Object ref = password_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - password_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - if (addressType_ != pactus.wallet.WalletOuterClass.AddressType.ADDRESS_TYPE_TREASURY.getNumber()) { - output.writeEnum(2, addressType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, password_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - if (addressType_ != pactus.wallet.WalletOuterClass.AddressType.ADDRESS_TYPE_TREASURY.getNumber()) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, addressType_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, label_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, password_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.GetNewAddressRequest)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.GetNewAddressRequest other = (pactus.wallet.WalletOuterClass.GetNewAddressRequest) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (addressType_ != other.addressType_) return false; - if (!getLabel() - .equals(other.getLabel())) return false; - if (!getPassword() - .equals(other.getPassword())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (37 * hash) + ADDRESS_TYPE_FIELD_NUMBER; - hash = (53 * hash) + addressType_; - hash = (37 * hash) + LABEL_FIELD_NUMBER; - hash = (53 * hash) + getLabel().hashCode(); - hash = (37 * hash) + PASSWORD_FIELD_NUMBER; - hash = (53 * hash) + getPassword().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetNewAddressRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for generating a new address.
-     * 
- * - * Protobuf type {@code pactus.GetNewAddressRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetNewAddressRequest) - pactus.wallet.WalletOuterClass.GetNewAddressRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetNewAddressRequest.class, pactus.wallet.WalletOuterClass.GetNewAddressRequest.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.GetNewAddressRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - addressType_ = 0; - - label_ = ""; - - password_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetNewAddressRequest getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.GetNewAddressRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetNewAddressRequest build() { - pactus.wallet.WalletOuterClass.GetNewAddressRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetNewAddressRequest buildPartial() { - pactus.wallet.WalletOuterClass.GetNewAddressRequest result = new pactus.wallet.WalletOuterClass.GetNewAddressRequest(this); - result.walletName_ = walletName_; - result.addressType_ = addressType_; - result.label_ = label_; - result.password_ = password_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.GetNewAddressRequest) { - return mergeFrom((pactus.wallet.WalletOuterClass.GetNewAddressRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetNewAddressRequest other) { - if (other == pactus.wallet.WalletOuterClass.GetNewAddressRequest.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - if (other.addressType_ != 0) { - setAddressTypeValue(other.getAddressTypeValue()); - } - if (!other.getLabel().isEmpty()) { - label_ = other.label_; - onChanged(); - } - if (!other.getPassword().isEmpty()) { - password_ = other.password_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: { - addressType_ = input.readEnum(); - - break; - } // case 16 - case 26: { - label_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: { - password_ = input.readStringRequireUtf8(); - - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the wallet to generate a new address.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the wallet to generate a new address.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the wallet to generate a new address.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the wallet to generate a new address.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the wallet to generate a new address.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - - private int addressType_ = 0; - /** - *
-       * The type of address to generate.
-       * 
- * - * .pactus.AddressType address_type = 2 [json_name = "addressType"]; - * @return The enum numeric value on the wire for addressType. - */ - @java.lang.Override public int getAddressTypeValue() { - return addressType_; - } - /** - *
-       * The type of address to generate.
-       * 
- * - * .pactus.AddressType address_type = 2 [json_name = "addressType"]; - * @param value The enum numeric value on the wire for addressType to set. - * @return This builder for chaining. - */ - public Builder setAddressTypeValue(int value) { - - addressType_ = value; - onChanged(); - return this; - } - /** - *
-       * The type of address to generate.
-       * 
- * - * .pactus.AddressType address_type = 2 [json_name = "addressType"]; - * @return The addressType. - */ - @java.lang.Override - public pactus.wallet.WalletOuterClass.AddressType getAddressType() { - @SuppressWarnings("deprecation") - pactus.wallet.WalletOuterClass.AddressType result = pactus.wallet.WalletOuterClass.AddressType.valueOf(addressType_); - return result == null ? pactus.wallet.WalletOuterClass.AddressType.UNRECOGNIZED : result; - } - /** - *
-       * The type of address to generate.
-       * 
- * - * .pactus.AddressType address_type = 2 [json_name = "addressType"]; - * @param value The addressType to set. - * @return This builder for chaining. - */ - public Builder setAddressType(pactus.wallet.WalletOuterClass.AddressType value) { - if (value == null) { - throw new NullPointerException(); - } - - addressType_ = value.getNumber(); - onChanged(); - return this; - } - /** - *
-       * The type of address to generate.
-       * 
- * - * .pactus.AddressType address_type = 2 [json_name = "addressType"]; - * @return This builder for chaining. - */ - public Builder clearAddressType() { - - addressType_ = 0; - onChanged(); - return this; - } - - private java.lang.Object label_ = ""; - /** - *
-       * A label for the new address.
-       * 
- * - * string label = 3 [json_name = "label"]; - * @return The label. - */ - public java.lang.String getLabel() { - java.lang.Object ref = label_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - label_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * A label for the new address.
-       * 
- * - * string label = 3 [json_name = "label"]; - * @return The bytes for label. - */ - public com.google.protobuf.ByteString - getLabelBytes() { - java.lang.Object ref = label_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - label_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * A label for the new address.
-       * 
- * - * string label = 3 [json_name = "label"]; - * @param value The label to set. - * @return This builder for chaining. - */ - public Builder setLabel( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - label_ = value; - onChanged(); - return this; - } - /** - *
-       * A label for the new address.
-       * 
- * - * string label = 3 [json_name = "label"]; - * @return This builder for chaining. - */ - public Builder clearLabel() { - - label_ = getDefaultInstance().getLabel(); - onChanged(); - return this; - } - /** - *
-       * A label for the new address.
-       * 
- * - * string label = 3 [json_name = "label"]; - * @param value The bytes for label to set. - * @return This builder for chaining. - */ - public Builder setLabelBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - label_ = value; - onChanged(); - return this; - } - - private java.lang.Object password_ = ""; - /** - *
-       * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
-       * 
- * - * string password = 4 [json_name = "password"]; - * @return The password. - */ - public java.lang.String getPassword() { - java.lang.Object ref = password_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - password_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
-       * 
- * - * string password = 4 [json_name = "password"]; - * @return The bytes for password. - */ - public com.google.protobuf.ByteString - getPasswordBytes() { - java.lang.Object ref = password_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - password_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
-       * 
- * - * string password = 4 [json_name = "password"]; - * @param value The password to set. - * @return This builder for chaining. - */ - public Builder setPassword( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - password_ = value; - onChanged(); - return this; - } - /** - *
-       * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
-       * 
- * - * string password = 4 [json_name = "password"]; - * @return This builder for chaining. - */ - public Builder clearPassword() { - - password_ = getDefaultInstance().getPassword(); - onChanged(); - return this; - } - /** - *
-       * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
-       * 
- * - * string password = 4 [json_name = "password"]; - * @param value The bytes for password to set. - * @return This builder for chaining. - */ - public Builder setPasswordBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - password_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetNewAddressRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetNewAddressRequest) - private static final pactus.wallet.WalletOuterClass.GetNewAddressRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetNewAddressRequest(); - } - - public static pactus.wallet.WalletOuterClass.GetNewAddressRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNewAddressRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetNewAddressRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetNewAddressResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetNewAddressResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the wallet from which the address is generated.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the wallet from which the address is generated.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - - /** - *
-     * Information about the newly generated address.
-     * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - * @return Whether the addressInfo field is set. - */ - boolean hasAddressInfo(); - /** - *
-     * Information about the newly generated address.
-     * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - * @return The addressInfo. - */ - pactus.wallet.WalletOuterClass.AddressInfo getAddressInfo(); - /** - *
-     * Information about the newly generated address.
-     * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - */ - pactus.wallet.WalletOuterClass.AddressInfoOrBuilder getAddressInfoOrBuilder(); - } - /** - *
-   * Response message containing the newly generated address.
-   * 
- * - * Protobuf type {@code pactus.GetNewAddressResponse} - */ - public static final class GetNewAddressResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetNewAddressResponse) - GetNewAddressResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetNewAddressResponse.newBuilder() to construct. - private GetNewAddressResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetNewAddressResponse() { - walletName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetNewAddressResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetNewAddressResponse.class, pactus.wallet.WalletOuterClass.GetNewAddressResponse.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the wallet from which the address is generated.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the wallet from which the address is generated.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ADDRESS_INFO_FIELD_NUMBER = 2; - private pactus.wallet.WalletOuterClass.AddressInfo addressInfo_; - /** - *
-     * Information about the newly generated address.
-     * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - * @return Whether the addressInfo field is set. - */ - @java.lang.Override - public boolean hasAddressInfo() { - return addressInfo_ != null; - } - /** - *
-     * Information about the newly generated address.
-     * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - * @return The addressInfo. - */ - @java.lang.Override - public pactus.wallet.WalletOuterClass.AddressInfo getAddressInfo() { - return addressInfo_ == null ? pactus.wallet.WalletOuterClass.AddressInfo.getDefaultInstance() : addressInfo_; - } - /** - *
-     * Information about the newly generated address.
-     * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - */ - @java.lang.Override - public pactus.wallet.WalletOuterClass.AddressInfoOrBuilder getAddressInfoOrBuilder() { - return getAddressInfo(); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - if (addressInfo_ != null) { - output.writeMessage(2, getAddressInfo()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - if (addressInfo_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getAddressInfo()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.GetNewAddressResponse)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.GetNewAddressResponse other = (pactus.wallet.WalletOuterClass.GetNewAddressResponse) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (hasAddressInfo() != other.hasAddressInfo()) return false; - if (hasAddressInfo()) { - if (!getAddressInfo() - .equals(other.getAddressInfo())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - if (hasAddressInfo()) { - hash = (37 * hash) + ADDRESS_INFO_FIELD_NUMBER; - hash = (53 * hash) + getAddressInfo().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetNewAddressResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the newly generated address.
-     * 
- * - * Protobuf type {@code pactus.GetNewAddressResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetNewAddressResponse) - pactus.wallet.WalletOuterClass.GetNewAddressResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetNewAddressResponse.class, pactus.wallet.WalletOuterClass.GetNewAddressResponse.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.GetNewAddressResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - if (addressInfoBuilder_ == null) { - addressInfo_ = null; - } else { - addressInfo_ = null; - addressInfoBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetNewAddressResponse getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.GetNewAddressResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetNewAddressResponse build() { - pactus.wallet.WalletOuterClass.GetNewAddressResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetNewAddressResponse buildPartial() { - pactus.wallet.WalletOuterClass.GetNewAddressResponse result = new pactus.wallet.WalletOuterClass.GetNewAddressResponse(this); - result.walletName_ = walletName_; - if (addressInfoBuilder_ == null) { - result.addressInfo_ = addressInfo_; - } else { - result.addressInfo_ = addressInfoBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.GetNewAddressResponse) { - return mergeFrom((pactus.wallet.WalletOuterClass.GetNewAddressResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetNewAddressResponse other) { - if (other == pactus.wallet.WalletOuterClass.GetNewAddressResponse.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - if (other.hasAddressInfo()) { - mergeAddressInfo(other.getAddressInfo()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - input.readMessage( - getAddressInfoFieldBuilder().getBuilder(), - extensionRegistry); - - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the wallet from which the address is generated.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the wallet from which the address is generated.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the wallet from which the address is generated.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the wallet from which the address is generated.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the wallet from which the address is generated.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - - private pactus.wallet.WalletOuterClass.AddressInfo addressInfo_; - private com.google.protobuf.SingleFieldBuilderV3< - pactus.wallet.WalletOuterClass.AddressInfo, pactus.wallet.WalletOuterClass.AddressInfo.Builder, pactus.wallet.WalletOuterClass.AddressInfoOrBuilder> addressInfoBuilder_; - /** - *
-       * Information about the newly generated address.
-       * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - * @return Whether the addressInfo field is set. - */ - public boolean hasAddressInfo() { - return addressInfoBuilder_ != null || addressInfo_ != null; - } - /** - *
-       * Information about the newly generated address.
-       * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - * @return The addressInfo. - */ - public pactus.wallet.WalletOuterClass.AddressInfo getAddressInfo() { - if (addressInfoBuilder_ == null) { - return addressInfo_ == null ? pactus.wallet.WalletOuterClass.AddressInfo.getDefaultInstance() : addressInfo_; - } else { - return addressInfoBuilder_.getMessage(); - } - } - /** - *
-       * Information about the newly generated address.
-       * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - */ - public Builder setAddressInfo(pactus.wallet.WalletOuterClass.AddressInfo value) { - if (addressInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - addressInfo_ = value; - onChanged(); - } else { - addressInfoBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Information about the newly generated address.
-       * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - */ - public Builder setAddressInfo( - pactus.wallet.WalletOuterClass.AddressInfo.Builder builderForValue) { - if (addressInfoBuilder_ == null) { - addressInfo_ = builderForValue.build(); - onChanged(); - } else { - addressInfoBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Information about the newly generated address.
-       * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - */ - public Builder mergeAddressInfo(pactus.wallet.WalletOuterClass.AddressInfo value) { - if (addressInfoBuilder_ == null) { - if (addressInfo_ != null) { - addressInfo_ = - pactus.wallet.WalletOuterClass.AddressInfo.newBuilder(addressInfo_).mergeFrom(value).buildPartial(); - } else { - addressInfo_ = value; - } - onChanged(); - } else { - addressInfoBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Information about the newly generated address.
-       * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - */ - public Builder clearAddressInfo() { - if (addressInfoBuilder_ == null) { - addressInfo_ = null; - onChanged(); - } else { - addressInfo_ = null; - addressInfoBuilder_ = null; - } - - return this; - } - /** - *
-       * Information about the newly generated address.
-       * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - */ - public pactus.wallet.WalletOuterClass.AddressInfo.Builder getAddressInfoBuilder() { - - onChanged(); - return getAddressInfoFieldBuilder().getBuilder(); - } - /** - *
-       * Information about the newly generated address.
-       * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - */ - public pactus.wallet.WalletOuterClass.AddressInfoOrBuilder getAddressInfoOrBuilder() { - if (addressInfoBuilder_ != null) { - return addressInfoBuilder_.getMessageOrBuilder(); - } else { - return addressInfo_ == null ? - pactus.wallet.WalletOuterClass.AddressInfo.getDefaultInstance() : addressInfo_; - } - } - /** - *
-       * Information about the newly generated address.
-       * 
- * - * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - pactus.wallet.WalletOuterClass.AddressInfo, pactus.wallet.WalletOuterClass.AddressInfo.Builder, pactus.wallet.WalletOuterClass.AddressInfoOrBuilder> - getAddressInfoFieldBuilder() { - if (addressInfoBuilder_ == null) { - addressInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.wallet.WalletOuterClass.AddressInfo, pactus.wallet.WalletOuterClass.AddressInfo.Builder, pactus.wallet.WalletOuterClass.AddressInfoOrBuilder>( - getAddressInfo(), - getParentForChildren(), - isClean()); - addressInfo_ = null; - } - return addressInfoBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetNewAddressResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetNewAddressResponse) - private static final pactus.wallet.WalletOuterClass.GetNewAddressResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetNewAddressResponse(); - } - - public static pactus.wallet.WalletOuterClass.GetNewAddressResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNewAddressResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetNewAddressResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface RestoreWalletRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.RestoreWalletRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the wallet to restore.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the wallet to restore.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - - /** - *
-     * The mnemonic for wallet recovery.
-     * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The mnemonic. - */ - java.lang.String getMnemonic(); - /** - *
-     * The mnemonic for wallet recovery.
-     * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The bytes for mnemonic. - */ - com.google.protobuf.ByteString - getMnemonicBytes(); - - /** - *
-     * The password for securing the wallet.
-     * 
- * - * string password = 3 [json_name = "password"]; - * @return The password. - */ - java.lang.String getPassword(); - /** - *
-     * The password for securing the wallet.
-     * 
- * - * string password = 3 [json_name = "password"]; - * @return The bytes for password. - */ - com.google.protobuf.ByteString - getPasswordBytes(); - } - /** - *
-   * Request message for restoring an existing wallet.
-   * 
- * - * Protobuf type {@code pactus.RestoreWalletRequest} - */ - public static final class RestoreWalletRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.RestoreWalletRequest) - RestoreWalletRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use RestoreWalletRequest.newBuilder() to construct. - private RestoreWalletRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RestoreWalletRequest() { - walletName_ = ""; - mnemonic_ = ""; - password_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RestoreWalletRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.RestoreWalletRequest.class, pactus.wallet.WalletOuterClass.RestoreWalletRequest.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the wallet to restore.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the wallet to restore.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MNEMONIC_FIELD_NUMBER = 2; - private volatile java.lang.Object mnemonic_; - /** - *
-     * The mnemonic for wallet recovery.
-     * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The mnemonic. - */ - @java.lang.Override - public java.lang.String getMnemonic() { - java.lang.Object ref = mnemonic_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mnemonic_ = s; - return s; - } - } - /** - *
-     * The mnemonic for wallet recovery.
-     * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The bytes for mnemonic. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMnemonicBytes() { - java.lang.Object ref = mnemonic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mnemonic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PASSWORD_FIELD_NUMBER = 3; - private volatile java.lang.Object password_; - /** - *
-     * The password for securing the wallet.
-     * 
- * - * string password = 3 [json_name = "password"]; - * @return The password. - */ - @java.lang.Override - public java.lang.String getPassword() { - java.lang.Object ref = password_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - password_ = s; - return s; - } - } - /** - *
-     * The password for securing the wallet.
-     * 
- * - * string password = 3 [json_name = "password"]; - * @return The bytes for password. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPasswordBytes() { - java.lang.Object ref = password_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - password_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mnemonic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mnemonic_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, password_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mnemonic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mnemonic_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, password_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.RestoreWalletRequest)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.RestoreWalletRequest other = (pactus.wallet.WalletOuterClass.RestoreWalletRequest) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getMnemonic() - .equals(other.getMnemonic())) return false; - if (!getPassword() - .equals(other.getPassword())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (37 * hash) + MNEMONIC_FIELD_NUMBER; - hash = (53 * hash) + getMnemonic().hashCode(); - hash = (37 * hash) + PASSWORD_FIELD_NUMBER; - hash = (53 * hash) + getPassword().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.RestoreWalletRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for restoring an existing wallet.
-     * 
- * - * Protobuf type {@code pactus.RestoreWalletRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.RestoreWalletRequest) - pactus.wallet.WalletOuterClass.RestoreWalletRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.RestoreWalletRequest.class, pactus.wallet.WalletOuterClass.RestoreWalletRequest.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.RestoreWalletRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - mnemonic_ = ""; - - password_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.RestoreWalletRequest getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.RestoreWalletRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.RestoreWalletRequest build() { - pactus.wallet.WalletOuterClass.RestoreWalletRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.RestoreWalletRequest buildPartial() { - pactus.wallet.WalletOuterClass.RestoreWalletRequest result = new pactus.wallet.WalletOuterClass.RestoreWalletRequest(this); - result.walletName_ = walletName_; - result.mnemonic_ = mnemonic_; - result.password_ = password_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.RestoreWalletRequest) { - return mergeFrom((pactus.wallet.WalletOuterClass.RestoreWalletRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.RestoreWalletRequest other) { - if (other == pactus.wallet.WalletOuterClass.RestoreWalletRequest.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - if (!other.getMnemonic().isEmpty()) { - mnemonic_ = other.mnemonic_; - onChanged(); - } - if (!other.getPassword().isEmpty()) { - password_ = other.password_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - mnemonic_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - password_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the wallet to restore.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the wallet to restore.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the wallet to restore.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the wallet to restore.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the wallet to restore.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - - private java.lang.Object mnemonic_ = ""; - /** - *
-       * The mnemonic for wallet recovery.
-       * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The mnemonic. - */ - public java.lang.String getMnemonic() { - java.lang.Object ref = mnemonic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mnemonic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The mnemonic for wallet recovery.
-       * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The bytes for mnemonic. - */ - public com.google.protobuf.ByteString - getMnemonicBytes() { - java.lang.Object ref = mnemonic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mnemonic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The mnemonic for wallet recovery.
-       * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @param value The mnemonic to set. - * @return This builder for chaining. - */ - public Builder setMnemonic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mnemonic_ = value; - onChanged(); - return this; - } - /** - *
-       * The mnemonic for wallet recovery.
-       * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return This builder for chaining. - */ - public Builder clearMnemonic() { - - mnemonic_ = getDefaultInstance().getMnemonic(); - onChanged(); - return this; - } - /** - *
-       * The mnemonic for wallet recovery.
-       * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @param value The bytes for mnemonic to set. - * @return This builder for chaining. - */ - public Builder setMnemonicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mnemonic_ = value; - onChanged(); - return this; - } - - private java.lang.Object password_ = ""; - /** - *
-       * The password for securing the wallet.
-       * 
- * - * string password = 3 [json_name = "password"]; - * @return The password. - */ - public java.lang.String getPassword() { - java.lang.Object ref = password_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - password_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The password for securing the wallet.
-       * 
- * - * string password = 3 [json_name = "password"]; - * @return The bytes for password. - */ - public com.google.protobuf.ByteString - getPasswordBytes() { - java.lang.Object ref = password_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - password_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The password for securing the wallet.
-       * 
- * - * string password = 3 [json_name = "password"]; - * @param value The password to set. - * @return This builder for chaining. - */ - public Builder setPassword( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - password_ = value; - onChanged(); - return this; - } - /** - *
-       * The password for securing the wallet.
-       * 
- * - * string password = 3 [json_name = "password"]; - * @return This builder for chaining. - */ - public Builder clearPassword() { - - password_ = getDefaultInstance().getPassword(); - onChanged(); - return this; - } - /** - *
-       * The password for securing the wallet.
-       * 
- * - * string password = 3 [json_name = "password"]; - * @param value The bytes for password to set. - * @return This builder for chaining. - */ - public Builder setPasswordBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - password_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.RestoreWalletRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.RestoreWalletRequest) - private static final pactus.wallet.WalletOuterClass.RestoreWalletRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.RestoreWalletRequest(); - } - - public static pactus.wallet.WalletOuterClass.RestoreWalletRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RestoreWalletRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.RestoreWalletRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface RestoreWalletResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.RestoreWalletResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the restored wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the restored wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - } - /** - *
-   * Response message containing the name of the restored wallet.
-   * 
- * - * Protobuf type {@code pactus.RestoreWalletResponse} - */ - public static final class RestoreWalletResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.RestoreWalletResponse) - RestoreWalletResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use RestoreWalletResponse.newBuilder() to construct. - private RestoreWalletResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private RestoreWalletResponse() { - walletName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new RestoreWalletResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.RestoreWalletResponse.class, pactus.wallet.WalletOuterClass.RestoreWalletResponse.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the restored wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the restored wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.RestoreWalletResponse)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.RestoreWalletResponse other = (pactus.wallet.WalletOuterClass.RestoreWalletResponse) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.RestoreWalletResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the name of the restored wallet.
-     * 
- * - * Protobuf type {@code pactus.RestoreWalletResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.RestoreWalletResponse) - pactus.wallet.WalletOuterClass.RestoreWalletResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.RestoreWalletResponse.class, pactus.wallet.WalletOuterClass.RestoreWalletResponse.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.RestoreWalletResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.RestoreWalletResponse getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.RestoreWalletResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.RestoreWalletResponse build() { - pactus.wallet.WalletOuterClass.RestoreWalletResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.RestoreWalletResponse buildPartial() { - pactus.wallet.WalletOuterClass.RestoreWalletResponse result = new pactus.wallet.WalletOuterClass.RestoreWalletResponse(this); - result.walletName_ = walletName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.RestoreWalletResponse) { - return mergeFrom((pactus.wallet.WalletOuterClass.RestoreWalletResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.RestoreWalletResponse other) { - if (other == pactus.wallet.WalletOuterClass.RestoreWalletResponse.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the restored wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the restored wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the restored wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the restored wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the restored wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.RestoreWalletResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.RestoreWalletResponse) - private static final pactus.wallet.WalletOuterClass.RestoreWalletResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.RestoreWalletResponse(); - } - - public static pactus.wallet.WalletOuterClass.RestoreWalletResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RestoreWalletResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.RestoreWalletResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface CreateWalletRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.CreateWalletRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the new wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the new wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - - /** - *
-     * The password for securing the wallet.
-     * 
- * - * string password = 4 [json_name = "password"]; - * @return The password. - */ - java.lang.String getPassword(); - /** - *
-     * The password for securing the wallet.
-     * 
- * - * string password = 4 [json_name = "password"]; - * @return The bytes for password. - */ - com.google.protobuf.ByteString - getPasswordBytes(); - } - /** - *
-   * Request message for creating a new wallet.
-   * 
- * - * Protobuf type {@code pactus.CreateWalletRequest} - */ - public static final class CreateWalletRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.CreateWalletRequest) - CreateWalletRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateWalletRequest.newBuilder() to construct. - private CreateWalletRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateWalletRequest() { - walletName_ = ""; - password_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateWalletRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.CreateWalletRequest.class, pactus.wallet.WalletOuterClass.CreateWalletRequest.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the new wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the new wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PASSWORD_FIELD_NUMBER = 4; - private volatile java.lang.Object password_; - /** - *
-     * The password for securing the wallet.
-     * 
- * - * string password = 4 [json_name = "password"]; - * @return The password. - */ - @java.lang.Override - public java.lang.String getPassword() { - java.lang.Object ref = password_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - password_ = s; - return s; - } - } - /** - *
-     * The password for securing the wallet.
-     * 
- * - * string password = 4 [json_name = "password"]; - * @return The bytes for password. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPasswordBytes() { - java.lang.Object ref = password_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - password_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, password_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, password_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.CreateWalletRequest)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.CreateWalletRequest other = (pactus.wallet.WalletOuterClass.CreateWalletRequest) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getPassword() - .equals(other.getPassword())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (37 * hash) + PASSWORD_FIELD_NUMBER; - hash = (53 * hash) + getPassword().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.CreateWalletRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for creating a new wallet.
-     * 
- * - * Protobuf type {@code pactus.CreateWalletRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.CreateWalletRequest) - pactus.wallet.WalletOuterClass.CreateWalletRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.CreateWalletRequest.class, pactus.wallet.WalletOuterClass.CreateWalletRequest.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.CreateWalletRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - password_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletRequest_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.CreateWalletRequest getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.CreateWalletRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.CreateWalletRequest build() { - pactus.wallet.WalletOuterClass.CreateWalletRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.CreateWalletRequest buildPartial() { - pactus.wallet.WalletOuterClass.CreateWalletRequest result = new pactus.wallet.WalletOuterClass.CreateWalletRequest(this); - result.walletName_ = walletName_; - result.password_ = password_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.CreateWalletRequest) { - return mergeFrom((pactus.wallet.WalletOuterClass.CreateWalletRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.CreateWalletRequest other) { - if (other == pactus.wallet.WalletOuterClass.CreateWalletRequest.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - if (!other.getPassword().isEmpty()) { - password_ = other.password_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 34: { - password_ = input.readStringRequireUtf8(); - - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the new wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the new wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the new wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the new wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the new wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - - private java.lang.Object password_ = ""; - /** - *
-       * The password for securing the wallet.
-       * 
- * - * string password = 4 [json_name = "password"]; - * @return The password. - */ - public java.lang.String getPassword() { - java.lang.Object ref = password_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - password_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The password for securing the wallet.
-       * 
- * - * string password = 4 [json_name = "password"]; - * @return The bytes for password. - */ - public com.google.protobuf.ByteString - getPasswordBytes() { - java.lang.Object ref = password_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - password_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The password for securing the wallet.
-       * 
- * - * string password = 4 [json_name = "password"]; - * @param value The password to set. - * @return This builder for chaining. - */ - public Builder setPassword( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - password_ = value; - onChanged(); - return this; - } - /** - *
-       * The password for securing the wallet.
-       * 
- * - * string password = 4 [json_name = "password"]; - * @return This builder for chaining. - */ - public Builder clearPassword() { - - password_ = getDefaultInstance().getPassword(); - onChanged(); - return this; - } - /** - *
-       * The password for securing the wallet.
-       * 
- * - * string password = 4 [json_name = "password"]; - * @param value The bytes for password to set. - * @return This builder for chaining. - */ - public Builder setPasswordBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - password_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.CreateWalletRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.CreateWalletRequest) - private static final pactus.wallet.WalletOuterClass.CreateWalletRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.CreateWalletRequest(); - } - - public static pactus.wallet.WalletOuterClass.CreateWalletRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateWalletRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.CreateWalletRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface CreateWalletResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.CreateWalletResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The mnemonic for wallet recovery.
-     * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The mnemonic. - */ - java.lang.String getMnemonic(); - /** - *
-     * The mnemonic for wallet recovery.
-     * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The bytes for mnemonic. - */ - com.google.protobuf.ByteString - getMnemonicBytes(); - } - /** - *
-   * Response message containing the mnemonic for wallet recovery.
-   * 
- * - * Protobuf type {@code pactus.CreateWalletResponse} - */ - public static final class CreateWalletResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.CreateWalletResponse) - CreateWalletResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateWalletResponse.newBuilder() to construct. - private CreateWalletResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateWalletResponse() { - mnemonic_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateWalletResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.CreateWalletResponse.class, pactus.wallet.WalletOuterClass.CreateWalletResponse.Builder.class); - } - - public static final int MNEMONIC_FIELD_NUMBER = 2; - private volatile java.lang.Object mnemonic_; - /** - *
-     * The mnemonic for wallet recovery.
-     * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The mnemonic. - */ - @java.lang.Override - public java.lang.String getMnemonic() { - java.lang.Object ref = mnemonic_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mnemonic_ = s; - return s; - } - } - /** - *
-     * The mnemonic for wallet recovery.
-     * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The bytes for mnemonic. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMnemonicBytes() { - java.lang.Object ref = mnemonic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mnemonic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mnemonic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mnemonic_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mnemonic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mnemonic_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.CreateWalletResponse)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.CreateWalletResponse other = (pactus.wallet.WalletOuterClass.CreateWalletResponse) obj; - - if (!getMnemonic() - .equals(other.getMnemonic())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MNEMONIC_FIELD_NUMBER; - hash = (53 * hash) + getMnemonic().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.CreateWalletResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the mnemonic for wallet recovery.
-     * 
- * - * Protobuf type {@code pactus.CreateWalletResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.CreateWalletResponse) - pactus.wallet.WalletOuterClass.CreateWalletResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.CreateWalletResponse.class, pactus.wallet.WalletOuterClass.CreateWalletResponse.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.CreateWalletResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - mnemonic_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletResponse_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.CreateWalletResponse getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.CreateWalletResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.CreateWalletResponse build() { - pactus.wallet.WalletOuterClass.CreateWalletResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.CreateWalletResponse buildPartial() { - pactus.wallet.WalletOuterClass.CreateWalletResponse result = new pactus.wallet.WalletOuterClass.CreateWalletResponse(this); - result.mnemonic_ = mnemonic_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.CreateWalletResponse) { - return mergeFrom((pactus.wallet.WalletOuterClass.CreateWalletResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.CreateWalletResponse other) { - if (other == pactus.wallet.WalletOuterClass.CreateWalletResponse.getDefaultInstance()) return this; - if (!other.getMnemonic().isEmpty()) { - mnemonic_ = other.mnemonic_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: { - mnemonic_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object mnemonic_ = ""; - /** - *
-       * The mnemonic for wallet recovery.
-       * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The mnemonic. - */ - public java.lang.String getMnemonic() { - java.lang.Object ref = mnemonic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mnemonic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The mnemonic for wallet recovery.
-       * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return The bytes for mnemonic. - */ - public com.google.protobuf.ByteString - getMnemonicBytes() { - java.lang.Object ref = mnemonic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mnemonic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The mnemonic for wallet recovery.
-       * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @param value The mnemonic to set. - * @return This builder for chaining. - */ - public Builder setMnemonic( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mnemonic_ = value; - onChanged(); - return this; - } - /** - *
-       * The mnemonic for wallet recovery.
-       * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @return This builder for chaining. - */ - public Builder clearMnemonic() { - - mnemonic_ = getDefaultInstance().getMnemonic(); - onChanged(); - return this; - } - /** - *
-       * The mnemonic for wallet recovery.
-       * 
- * - * string mnemonic = 2 [json_name = "mnemonic"]; - * @param value The bytes for mnemonic to set. - * @return This builder for chaining. - */ - public Builder setMnemonicBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mnemonic_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.CreateWalletResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.CreateWalletResponse) - private static final pactus.wallet.WalletOuterClass.CreateWalletResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.CreateWalletResponse(); - } - - public static pactus.wallet.WalletOuterClass.CreateWalletResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateWalletResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.CreateWalletResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LoadWalletRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.LoadWalletRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the wallet to load.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the wallet to load.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - } - /** - *
-   * Request message for loading an existing wallet.
-   * 
- * - * Protobuf type {@code pactus.LoadWalletRequest} - */ - public static final class LoadWalletRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.LoadWalletRequest) - LoadWalletRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use LoadWalletRequest.newBuilder() to construct. - private LoadWalletRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LoadWalletRequest() { - walletName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LoadWalletRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.LoadWalletRequest.class, pactus.wallet.WalletOuterClass.LoadWalletRequest.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the wallet to load.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the wallet to load.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.LoadWalletRequest)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.LoadWalletRequest other = (pactus.wallet.WalletOuterClass.LoadWalletRequest) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.LoadWalletRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for loading an existing wallet.
-     * 
- * - * Protobuf type {@code pactus.LoadWalletRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.LoadWalletRequest) - pactus.wallet.WalletOuterClass.LoadWalletRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.LoadWalletRequest.class, pactus.wallet.WalletOuterClass.LoadWalletRequest.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.LoadWalletRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletRequest_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.LoadWalletRequest getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.LoadWalletRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.LoadWalletRequest build() { - pactus.wallet.WalletOuterClass.LoadWalletRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.LoadWalletRequest buildPartial() { - pactus.wallet.WalletOuterClass.LoadWalletRequest result = new pactus.wallet.WalletOuterClass.LoadWalletRequest(this); - result.walletName_ = walletName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.LoadWalletRequest) { - return mergeFrom((pactus.wallet.WalletOuterClass.LoadWalletRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.LoadWalletRequest other) { - if (other == pactus.wallet.WalletOuterClass.LoadWalletRequest.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the wallet to load.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the wallet to load.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the wallet to load.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the wallet to load.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the wallet to load.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.LoadWalletRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.LoadWalletRequest) - private static final pactus.wallet.WalletOuterClass.LoadWalletRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.LoadWalletRequest(); - } - - public static pactus.wallet.WalletOuterClass.LoadWalletRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LoadWalletRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.LoadWalletRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface LoadWalletResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.LoadWalletResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the loaded wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the loaded wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - } - /** - *
-   * Response message containing the name of the loaded wallet.
-   * 
- * - * Protobuf type {@code pactus.LoadWalletResponse} - */ - public static final class LoadWalletResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.LoadWalletResponse) - LoadWalletResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use LoadWalletResponse.newBuilder() to construct. - private LoadWalletResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private LoadWalletResponse() { - walletName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new LoadWalletResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.LoadWalletResponse.class, pactus.wallet.WalletOuterClass.LoadWalletResponse.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the loaded wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the loaded wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.LoadWalletResponse)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.LoadWalletResponse other = (pactus.wallet.WalletOuterClass.LoadWalletResponse) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.LoadWalletResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the name of the loaded wallet.
-     * 
- * - * Protobuf type {@code pactus.LoadWalletResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.LoadWalletResponse) - pactus.wallet.WalletOuterClass.LoadWalletResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.LoadWalletResponse.class, pactus.wallet.WalletOuterClass.LoadWalletResponse.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.LoadWalletResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletResponse_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.LoadWalletResponse getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.LoadWalletResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.LoadWalletResponse build() { - pactus.wallet.WalletOuterClass.LoadWalletResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.LoadWalletResponse buildPartial() { - pactus.wallet.WalletOuterClass.LoadWalletResponse result = new pactus.wallet.WalletOuterClass.LoadWalletResponse(this); - result.walletName_ = walletName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.LoadWalletResponse) { - return mergeFrom((pactus.wallet.WalletOuterClass.LoadWalletResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.LoadWalletResponse other) { - if (other == pactus.wallet.WalletOuterClass.LoadWalletResponse.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the loaded wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the loaded wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the loaded wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the loaded wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the loaded wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.LoadWalletResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.LoadWalletResponse) - private static final pactus.wallet.WalletOuterClass.LoadWalletResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.LoadWalletResponse(); - } - - public static pactus.wallet.WalletOuterClass.LoadWalletResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public LoadWalletResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.LoadWalletResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface UnloadWalletRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.UnloadWalletRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the wallet to unload.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the wallet to unload.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - } - /** - *
-   * Request message for unloading a currently loaded wallet.
-   * 
- * - * Protobuf type {@code pactus.UnloadWalletRequest} - */ - public static final class UnloadWalletRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.UnloadWalletRequest) - UnloadWalletRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UnloadWalletRequest.newBuilder() to construct. - private UnloadWalletRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UnloadWalletRequest() { - walletName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UnloadWalletRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.UnloadWalletRequest.class, pactus.wallet.WalletOuterClass.UnloadWalletRequest.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the wallet to unload.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the wallet to unload.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.UnloadWalletRequest)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.UnloadWalletRequest other = (pactus.wallet.WalletOuterClass.UnloadWalletRequest) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.UnloadWalletRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for unloading a currently loaded wallet.
-     * 
- * - * Protobuf type {@code pactus.UnloadWalletRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.UnloadWalletRequest) - pactus.wallet.WalletOuterClass.UnloadWalletRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.UnloadWalletRequest.class, pactus.wallet.WalletOuterClass.UnloadWalletRequest.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.UnloadWalletRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.UnloadWalletRequest getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.UnloadWalletRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.UnloadWalletRequest build() { - pactus.wallet.WalletOuterClass.UnloadWalletRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.UnloadWalletRequest buildPartial() { - pactus.wallet.WalletOuterClass.UnloadWalletRequest result = new pactus.wallet.WalletOuterClass.UnloadWalletRequest(this); - result.walletName_ = walletName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.UnloadWalletRequest) { - return mergeFrom((pactus.wallet.WalletOuterClass.UnloadWalletRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.UnloadWalletRequest other) { - if (other == pactus.wallet.WalletOuterClass.UnloadWalletRequest.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the wallet to unload.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the wallet to unload.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the wallet to unload.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the wallet to unload.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the wallet to unload.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.UnloadWalletRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.UnloadWalletRequest) - private static final pactus.wallet.WalletOuterClass.UnloadWalletRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.UnloadWalletRequest(); - } - - public static pactus.wallet.WalletOuterClass.UnloadWalletRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UnloadWalletRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.UnloadWalletRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface UnloadWalletResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.UnloadWalletResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the unloaded wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the unloaded wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - } - /** - *
-   * Response message containing the name of the unloaded wallet.
-   * 
- * - * Protobuf type {@code pactus.UnloadWalletResponse} - */ - public static final class UnloadWalletResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.UnloadWalletResponse) - UnloadWalletResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use UnloadWalletResponse.newBuilder() to construct. - private UnloadWalletResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UnloadWalletResponse() { - walletName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UnloadWalletResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.UnloadWalletResponse.class, pactus.wallet.WalletOuterClass.UnloadWalletResponse.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the unloaded wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the unloaded wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.UnloadWalletResponse)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.UnloadWalletResponse other = (pactus.wallet.WalletOuterClass.UnloadWalletResponse) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.UnloadWalletResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the name of the unloaded wallet.
-     * 
- * - * Protobuf type {@code pactus.UnloadWalletResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.UnloadWalletResponse) - pactus.wallet.WalletOuterClass.UnloadWalletResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.UnloadWalletResponse.class, pactus.wallet.WalletOuterClass.UnloadWalletResponse.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.UnloadWalletResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.UnloadWalletResponse getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.UnloadWalletResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.UnloadWalletResponse build() { - pactus.wallet.WalletOuterClass.UnloadWalletResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.UnloadWalletResponse buildPartial() { - pactus.wallet.WalletOuterClass.UnloadWalletResponse result = new pactus.wallet.WalletOuterClass.UnloadWalletResponse(this); - result.walletName_ = walletName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.UnloadWalletResponse) { - return mergeFrom((pactus.wallet.WalletOuterClass.UnloadWalletResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.UnloadWalletResponse other) { - if (other == pactus.wallet.WalletOuterClass.UnloadWalletResponse.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the unloaded wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the unloaded wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the unloaded wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the unloaded wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the unloaded wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.UnloadWalletResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.UnloadWalletResponse) - private static final pactus.wallet.WalletOuterClass.UnloadWalletResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.UnloadWalletResponse(); - } - - public static pactus.wallet.WalletOuterClass.UnloadWalletResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UnloadWalletResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.UnloadWalletResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetValidatorAddressRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The public key for which the validator address is requested.
-     * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The publicKey. - */ - java.lang.String getPublicKey(); - /** - *
-     * The public key for which the validator address is requested.
-     * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - com.google.protobuf.ByteString - getPublicKeyBytes(); - } - /** - *
-   * Request message for obtaining the validator address associated with a public
-   * key.
-   * 
- * - * Protobuf type {@code pactus.GetValidatorAddressRequest} - */ - public static final class GetValidatorAddressRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressRequest) - GetValidatorAddressRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetValidatorAddressRequest.newBuilder() to construct. - private GetValidatorAddressRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetValidatorAddressRequest() { - publicKey_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetValidatorAddressRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.class, pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.Builder.class); - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object publicKey_; - /** - *
-     * The public key for which the validator address is requested.
-     * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The publicKey. - */ - @java.lang.Override - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } - } - /** - *
-     * The public key for which the validator address is requested.
-     * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.GetValidatorAddressRequest)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.GetValidatorAddressRequest other = (pactus.wallet.WalletOuterClass.GetValidatorAddressRequest) obj; - - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetValidatorAddressRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for obtaining the validator address associated with a public
-     * key.
-     * 
- * - * Protobuf type {@code pactus.GetValidatorAddressRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressRequest) - pactus.wallet.WalletOuterClass.GetValidatorAddressRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.class, pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - publicKey_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetValidatorAddressRequest getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetValidatorAddressRequest build() { - pactus.wallet.WalletOuterClass.GetValidatorAddressRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetValidatorAddressRequest buildPartial() { - pactus.wallet.WalletOuterClass.GetValidatorAddressRequest result = new pactus.wallet.WalletOuterClass.GetValidatorAddressRequest(this); - result.publicKey_ = publicKey_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.GetValidatorAddressRequest) { - return mergeFrom((pactus.wallet.WalletOuterClass.GetValidatorAddressRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetValidatorAddressRequest other) { - if (other == pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.getDefaultInstance()) return this; - if (!other.getPublicKey().isEmpty()) { - publicKey_ = other.publicKey_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - publicKey_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object publicKey_ = ""; - /** - *
-       * The public key for which the validator address is requested.
-       * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The publicKey. - */ - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The public key for which the validator address is requested.
-       * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The public key for which the validator address is requested.
-       * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @param value The publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - publicKey_ = value; - onChanged(); - return this; - } - /** - *
-       * The public key for which the validator address is requested.
-       * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - - publicKey_ = getDefaultInstance().getPublicKey(); - onChanged(); - return this; - } - /** - *
-       * The public key for which the validator address is requested.
-       * 
- * - * string public_key = 1 [json_name = "publicKey"]; - * @param value The bytes for publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - publicKey_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressRequest) - private static final pactus.wallet.WalletOuterClass.GetValidatorAddressRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetValidatorAddressRequest(); - } - - public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetValidatorAddressRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetValidatorAddressRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetValidatorAddressResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The validator address associated with the public key.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The validator address associated with the public key.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - } - /** - *
-   * Response message containing the validator address corresponding to a public
-   * key.
-   * 
- * - * Protobuf type {@code pactus.GetValidatorAddressResponse} - */ - public static final class GetValidatorAddressResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressResponse) - GetValidatorAddressResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetValidatorAddressResponse.newBuilder() to construct. - private GetValidatorAddressResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetValidatorAddressResponse() { - address_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetValidatorAddressResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.class, pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.Builder.class); - } - - public static final int ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object address_; - /** - *
-     * The validator address associated with the public key.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The validator address associated with the public key.
-     * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.GetValidatorAddressResponse)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.GetValidatorAddressResponse other = (pactus.wallet.WalletOuterClass.GetValidatorAddressResponse) obj; - - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetValidatorAddressResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the validator address corresponding to a public
-     * key.
-     * 
- * - * Protobuf type {@code pactus.GetValidatorAddressResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressResponse) - pactus.wallet.WalletOuterClass.GetValidatorAddressResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.class, pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - address_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetValidatorAddressResponse getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetValidatorAddressResponse build() { - pactus.wallet.WalletOuterClass.GetValidatorAddressResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetValidatorAddressResponse buildPartial() { - pactus.wallet.WalletOuterClass.GetValidatorAddressResponse result = new pactus.wallet.WalletOuterClass.GetValidatorAddressResponse(this); - result.address_ = address_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.GetValidatorAddressResponse) { - return mergeFrom((pactus.wallet.WalletOuterClass.GetValidatorAddressResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetValidatorAddressResponse other) { - if (other == pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.getDefaultInstance()) return this; - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * The validator address associated with the public key.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The validator address associated with the public key.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The validator address associated with the public key.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The validator address associated with the public key.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The validator address associated with the public key.
-       * 
- * - * string address = 1 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressResponse) - private static final pactus.wallet.WalletOuterClass.GetValidatorAddressResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetValidatorAddressResponse(); - } - - public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetValidatorAddressResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetValidatorAddressResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SignRawTransactionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.SignRawTransactionRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the wallet used for signing.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the wallet used for signing.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - - /** - *
-     * The raw transaction data to be signed.
-     * 
- * - * string raw_transaction = 2 [json_name = "rawTransaction"]; - * @return The rawTransaction. - */ - java.lang.String getRawTransaction(); - /** - *
-     * The raw transaction data to be signed.
-     * 
- * - * string raw_transaction = 2 [json_name = "rawTransaction"]; - * @return The bytes for rawTransaction. - */ - com.google.protobuf.ByteString - getRawTransactionBytes(); - - /** - *
-     * The password for unlocking the wallet for signing.
-     * 
- * - * string password = 3 [json_name = "password"]; - * @return The password. - */ - java.lang.String getPassword(); - /** - *
-     * The password for unlocking the wallet for signing.
-     * 
- * - * string password = 3 [json_name = "password"]; - * @return The bytes for password. - */ - com.google.protobuf.ByteString - getPasswordBytes(); - } - /** - *
-   * Request message for signing a raw transaction.
-   * 
- * - * Protobuf type {@code pactus.SignRawTransactionRequest} - */ - public static final class SignRawTransactionRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.SignRawTransactionRequest) - SignRawTransactionRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use SignRawTransactionRequest.newBuilder() to construct. - private SignRawTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SignRawTransactionRequest() { - walletName_ = ""; - rawTransaction_ = ""; - password_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SignRawTransactionRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.SignRawTransactionRequest.class, pactus.wallet.WalletOuterClass.SignRawTransactionRequest.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the wallet used for signing.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the wallet used for signing.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RAW_TRANSACTION_FIELD_NUMBER = 2; - private volatile java.lang.Object rawTransaction_; - /** - *
-     * The raw transaction data to be signed.
-     * 
- * - * string raw_transaction = 2 [json_name = "rawTransaction"]; - * @return The rawTransaction. - */ - @java.lang.Override - public java.lang.String getRawTransaction() { - java.lang.Object ref = rawTransaction_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rawTransaction_ = s; - return s; - } - } - /** - *
-     * The raw transaction data to be signed.
-     * 
- * - * string raw_transaction = 2 [json_name = "rawTransaction"]; - * @return The bytes for rawTransaction. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRawTransactionBytes() { - java.lang.Object ref = rawTransaction_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rawTransaction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PASSWORD_FIELD_NUMBER = 3; - private volatile java.lang.Object password_; - /** - *
-     * The password for unlocking the wallet for signing.
-     * 
- * - * string password = 3 [json_name = "password"]; - * @return The password. - */ - @java.lang.Override - public java.lang.String getPassword() { - java.lang.Object ref = password_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - password_ = s; - return s; - } - } - /** - *
-     * The password for unlocking the wallet for signing.
-     * 
- * - * string password = 3 [json_name = "password"]; - * @return The bytes for password. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPasswordBytes() { - java.lang.Object ref = password_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - password_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rawTransaction_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, password_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rawTransaction_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, password_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.SignRawTransactionRequest)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.SignRawTransactionRequest other = (pactus.wallet.WalletOuterClass.SignRawTransactionRequest) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getRawTransaction() - .equals(other.getRawTransaction())) return false; - if (!getPassword() - .equals(other.getPassword())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (37 * hash) + RAW_TRANSACTION_FIELD_NUMBER; - hash = (53 * hash) + getRawTransaction().hashCode(); - hash = (37 * hash) + PASSWORD_FIELD_NUMBER; - hash = (53 * hash) + getPassword().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.SignRawTransactionRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for signing a raw transaction.
-     * 
- * - * Protobuf type {@code pactus.SignRawTransactionRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.SignRawTransactionRequest) - pactus.wallet.WalletOuterClass.SignRawTransactionRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.SignRawTransactionRequest.class, pactus.wallet.WalletOuterClass.SignRawTransactionRequest.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.SignRawTransactionRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - rawTransaction_ = ""; - - password_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignRawTransactionRequest getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.SignRawTransactionRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignRawTransactionRequest build() { - pactus.wallet.WalletOuterClass.SignRawTransactionRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignRawTransactionRequest buildPartial() { - pactus.wallet.WalletOuterClass.SignRawTransactionRequest result = new pactus.wallet.WalletOuterClass.SignRawTransactionRequest(this); - result.walletName_ = walletName_; - result.rawTransaction_ = rawTransaction_; - result.password_ = password_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.SignRawTransactionRequest) { - return mergeFrom((pactus.wallet.WalletOuterClass.SignRawTransactionRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.SignRawTransactionRequest other) { - if (other == pactus.wallet.WalletOuterClass.SignRawTransactionRequest.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - if (!other.getRawTransaction().isEmpty()) { - rawTransaction_ = other.rawTransaction_; - onChanged(); - } - if (!other.getPassword().isEmpty()) { - password_ = other.password_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - rawTransaction_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - password_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the wallet used for signing.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the wallet used for signing.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the wallet used for signing.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the wallet used for signing.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the wallet used for signing.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - - private java.lang.Object rawTransaction_ = ""; - /** - *
-       * The raw transaction data to be signed.
-       * 
- * - * string raw_transaction = 2 [json_name = "rawTransaction"]; - * @return The rawTransaction. - */ - public java.lang.String getRawTransaction() { - java.lang.Object ref = rawTransaction_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rawTransaction_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The raw transaction data to be signed.
-       * 
- * - * string raw_transaction = 2 [json_name = "rawTransaction"]; - * @return The bytes for rawTransaction. - */ - public com.google.protobuf.ByteString - getRawTransactionBytes() { - java.lang.Object ref = rawTransaction_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rawTransaction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The raw transaction data to be signed.
-       * 
- * - * string raw_transaction = 2 [json_name = "rawTransaction"]; - * @param value The rawTransaction to set. - * @return This builder for chaining. - */ - public Builder setRawTransaction( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - rawTransaction_ = value; - onChanged(); - return this; - } - /** - *
-       * The raw transaction data to be signed.
-       * 
- * - * string raw_transaction = 2 [json_name = "rawTransaction"]; - * @return This builder for chaining. - */ - public Builder clearRawTransaction() { - - rawTransaction_ = getDefaultInstance().getRawTransaction(); - onChanged(); - return this; - } - /** - *
-       * The raw transaction data to be signed.
-       * 
- * - * string raw_transaction = 2 [json_name = "rawTransaction"]; - * @param value The bytes for rawTransaction to set. - * @return This builder for chaining. - */ - public Builder setRawTransactionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - rawTransaction_ = value; - onChanged(); - return this; - } - - private java.lang.Object password_ = ""; - /** - *
-       * The password for unlocking the wallet for signing.
-       * 
- * - * string password = 3 [json_name = "password"]; - * @return The password. - */ - public java.lang.String getPassword() { - java.lang.Object ref = password_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - password_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The password for unlocking the wallet for signing.
-       * 
- * - * string password = 3 [json_name = "password"]; - * @return The bytes for password. - */ - public com.google.protobuf.ByteString - getPasswordBytes() { - java.lang.Object ref = password_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - password_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The password for unlocking the wallet for signing.
-       * 
- * - * string password = 3 [json_name = "password"]; - * @param value The password to set. - * @return This builder for chaining. - */ - public Builder setPassword( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - password_ = value; - onChanged(); - return this; - } - /** - *
-       * The password for unlocking the wallet for signing.
-       * 
- * - * string password = 3 [json_name = "password"]; - * @return This builder for chaining. - */ - public Builder clearPassword() { - - password_ = getDefaultInstance().getPassword(); - onChanged(); - return this; - } - /** - *
-       * The password for unlocking the wallet for signing.
-       * 
- * - * string password = 3 [json_name = "password"]; - * @param value The bytes for password to set. - * @return This builder for chaining. - */ - public Builder setPasswordBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - password_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.SignRawTransactionRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.SignRawTransactionRequest) - private static final pactus.wallet.WalletOuterClass.SignRawTransactionRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.SignRawTransactionRequest(); - } - - public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SignRawTransactionRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignRawTransactionRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SignRawTransactionResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.SignRawTransactionResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The ID of the signed transaction.
-     * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The transactionId. - */ - java.lang.String getTransactionId(); - /** - *
-     * The ID of the signed transaction.
-     * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The bytes for transactionId. - */ - com.google.protobuf.ByteString - getTransactionIdBytes(); - - /** - *
-     * The signed raw transaction data.
-     * 
- * - * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; - * @return The signedRawTransaction. - */ - java.lang.String getSignedRawTransaction(); - /** - *
-     * The signed raw transaction data.
-     * 
- * - * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; - * @return The bytes for signedRawTransaction. - */ - com.google.protobuf.ByteString - getSignedRawTransactionBytes(); - } - /** - *
-   * Response message containing the transaction ID and signed raw transaction.
-   * 
- * - * Protobuf type {@code pactus.SignRawTransactionResponse} - */ - public static final class SignRawTransactionResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.SignRawTransactionResponse) - SignRawTransactionResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use SignRawTransactionResponse.newBuilder() to construct. - private SignRawTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SignRawTransactionResponse() { - transactionId_ = ""; - signedRawTransaction_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SignRawTransactionResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.SignRawTransactionResponse.class, pactus.wallet.WalletOuterClass.SignRawTransactionResponse.Builder.class); - } - - public static final int TRANSACTION_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object transactionId_; - /** - *
-     * The ID of the signed transaction.
-     * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The transactionId. - */ - @java.lang.Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transactionId_ = s; - return s; - } - } - /** - *
-     * The ID of the signed transaction.
-     * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The bytes for transactionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIGNED_RAW_TRANSACTION_FIELD_NUMBER = 2; - private volatile java.lang.Object signedRawTransaction_; - /** - *
-     * The signed raw transaction data.
-     * 
- * - * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; - * @return The signedRawTransaction. - */ - @java.lang.Override - public java.lang.String getSignedRawTransaction() { - java.lang.Object ref = signedRawTransaction_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signedRawTransaction_ = s; - return s; - } - } - /** - *
-     * The signed raw transaction data.
-     * 
- * - * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; - * @return The bytes for signedRawTransaction. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSignedRawTransactionBytes() { - java.lang.Object ref = signedRawTransaction_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signedRawTransaction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, transactionId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRawTransaction_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, signedRawTransaction_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, transactionId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRawTransaction_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, signedRawTransaction_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.SignRawTransactionResponse)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.SignRawTransactionResponse other = (pactus.wallet.WalletOuterClass.SignRawTransactionResponse) obj; - - if (!getTransactionId() - .equals(other.getTransactionId())) return false; - if (!getSignedRawTransaction() - .equals(other.getSignedRawTransaction())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; - hash = (53 * hash) + getTransactionId().hashCode(); - hash = (37 * hash) + SIGNED_RAW_TRANSACTION_FIELD_NUMBER; - hash = (53 * hash) + getSignedRawTransaction().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.SignRawTransactionResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the transaction ID and signed raw transaction.
-     * 
- * - * Protobuf type {@code pactus.SignRawTransactionResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.SignRawTransactionResponse) - pactus.wallet.WalletOuterClass.SignRawTransactionResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.SignRawTransactionResponse.class, pactus.wallet.WalletOuterClass.SignRawTransactionResponse.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.SignRawTransactionResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - transactionId_ = ""; - - signedRawTransaction_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignRawTransactionResponse getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.SignRawTransactionResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignRawTransactionResponse build() { - pactus.wallet.WalletOuterClass.SignRawTransactionResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignRawTransactionResponse buildPartial() { - pactus.wallet.WalletOuterClass.SignRawTransactionResponse result = new pactus.wallet.WalletOuterClass.SignRawTransactionResponse(this); - result.transactionId_ = transactionId_; - result.signedRawTransaction_ = signedRawTransaction_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.SignRawTransactionResponse) { - return mergeFrom((pactus.wallet.WalletOuterClass.SignRawTransactionResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.SignRawTransactionResponse other) { - if (other == pactus.wallet.WalletOuterClass.SignRawTransactionResponse.getDefaultInstance()) return this; - if (!other.getTransactionId().isEmpty()) { - transactionId_ = other.transactionId_; - onChanged(); - } - if (!other.getSignedRawTransaction().isEmpty()) { - signedRawTransaction_ = other.signedRawTransaction_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - transactionId_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - signedRawTransaction_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object transactionId_ = ""; - /** - *
-       * The ID of the signed transaction.
-       * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The transactionId. - */ - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - transactionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The ID of the signed transaction.
-       * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return The bytes for transactionId. - */ - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The ID of the signed transaction.
-       * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @param value The transactionId to set. - * @return This builder for chaining. - */ - public Builder setTransactionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - transactionId_ = value; - onChanged(); - return this; - } - /** - *
-       * The ID of the signed transaction.
-       * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @return This builder for chaining. - */ - public Builder clearTransactionId() { - - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; - } - /** - *
-       * The ID of the signed transaction.
-       * 
- * - * string transaction_id = 1 [json_name = "transactionId"]; - * @param value The bytes for transactionId to set. - * @return This builder for chaining. - */ - public Builder setTransactionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - transactionId_ = value; - onChanged(); - return this; - } - - private java.lang.Object signedRawTransaction_ = ""; - /** - *
-       * The signed raw transaction data.
-       * 
- * - * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; - * @return The signedRawTransaction. - */ - public java.lang.String getSignedRawTransaction() { - java.lang.Object ref = signedRawTransaction_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signedRawTransaction_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The signed raw transaction data.
-       * 
- * - * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; - * @return The bytes for signedRawTransaction. - */ - public com.google.protobuf.ByteString - getSignedRawTransactionBytes() { - java.lang.Object ref = signedRawTransaction_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signedRawTransaction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The signed raw transaction data.
-       * 
- * - * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; - * @param value The signedRawTransaction to set. - * @return This builder for chaining. - */ - public Builder setSignedRawTransaction( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - signedRawTransaction_ = value; - onChanged(); - return this; - } - /** - *
-       * The signed raw transaction data.
-       * 
- * - * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; - * @return This builder for chaining. - */ - public Builder clearSignedRawTransaction() { - - signedRawTransaction_ = getDefaultInstance().getSignedRawTransaction(); - onChanged(); - return this; - } - /** - *
-       * The signed raw transaction data.
-       * 
- * - * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; - * @param value The bytes for signedRawTransaction to set. - * @return This builder for chaining. - */ - public Builder setSignedRawTransactionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - signedRawTransaction_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.SignRawTransactionResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.SignRawTransactionResponse) - private static final pactus.wallet.WalletOuterClass.SignRawTransactionResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.SignRawTransactionResponse(); - } - - public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SignRawTransactionResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignRawTransactionResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetTotalBalanceRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetTotalBalanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the wallet to get the total balance.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the wallet to get the total balance.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - } - /** - *
-   * Request message for obtaining the available balance of a wallet.
-   * 
- * - * Protobuf type {@code pactus.GetTotalBalanceRequest} - */ - public static final class GetTotalBalanceRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetTotalBalanceRequest) - GetTotalBalanceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetTotalBalanceRequest.newBuilder() to construct. - private GetTotalBalanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetTotalBalanceRequest() { - walletName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetTotalBalanceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.class, pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the wallet to get the total balance.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the wallet to get the total balance.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.GetTotalBalanceRequest)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.GetTotalBalanceRequest other = (pactus.wallet.WalletOuterClass.GetTotalBalanceRequest) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetTotalBalanceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message for obtaining the available balance of a wallet.
-     * 
- * - * Protobuf type {@code pactus.GetTotalBalanceRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetTotalBalanceRequest) - pactus.wallet.WalletOuterClass.GetTotalBalanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.class, pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetTotalBalanceRequest getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetTotalBalanceRequest build() { - pactus.wallet.WalletOuterClass.GetTotalBalanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetTotalBalanceRequest buildPartial() { - pactus.wallet.WalletOuterClass.GetTotalBalanceRequest result = new pactus.wallet.WalletOuterClass.GetTotalBalanceRequest(this); - result.walletName_ = walletName_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.GetTotalBalanceRequest) { - return mergeFrom((pactus.wallet.WalletOuterClass.GetTotalBalanceRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetTotalBalanceRequest other) { - if (other == pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the wallet to get the total balance.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the wallet to get the total balance.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the wallet to get the total balance.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the wallet to get the total balance.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the wallet to get the total balance.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetTotalBalanceRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.GetTotalBalanceRequest) - private static final pactus.wallet.WalletOuterClass.GetTotalBalanceRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetTotalBalanceRequest(); - } - - public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetTotalBalanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetTotalBalanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetTotalBalanceResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetTotalBalanceResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - - /** - *
-     * The total balance of the wallet in NanoPAC.
-     * 
- * - * int64 total_balance = 2 [json_name = "totalBalance"]; - * @return The totalBalance. - */ - long getTotalBalance(); - } - /** - *
-   * Response message containing the available balance of the wallet.
-   * 
- * - * Protobuf type {@code pactus.GetTotalBalanceResponse} - */ - public static final class GetTotalBalanceResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetTotalBalanceResponse) - GetTotalBalanceResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetTotalBalanceResponse.newBuilder() to construct. - private GetTotalBalanceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetTotalBalanceResponse() { - walletName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetTotalBalanceResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.class, pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TOTAL_BALANCE_FIELD_NUMBER = 2; - private long totalBalance_; - /** - *
-     * The total balance of the wallet in NanoPAC.
-     * 
- * - * int64 total_balance = 2 [json_name = "totalBalance"]; - * @return The totalBalance. - */ - @java.lang.Override - public long getTotalBalance() { - return totalBalance_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - if (totalBalance_ != 0L) { - output.writeInt64(2, totalBalance_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - if (totalBalance_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, totalBalance_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.GetTotalBalanceResponse)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.GetTotalBalanceResponse other = (pactus.wallet.WalletOuterClass.GetTotalBalanceResponse) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (getTotalBalance() - != other.getTotalBalance()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (37 * hash) + TOTAL_BALANCE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTotalBalance()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetTotalBalanceResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the available balance of the wallet.
-     * 
- * - * Protobuf type {@code pactus.GetTotalBalanceResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetTotalBalanceResponse) - pactus.wallet.WalletOuterClass.GetTotalBalanceResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.class, pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - totalBalance_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetTotalBalanceResponse getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetTotalBalanceResponse build() { - pactus.wallet.WalletOuterClass.GetTotalBalanceResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetTotalBalanceResponse buildPartial() { - pactus.wallet.WalletOuterClass.GetTotalBalanceResponse result = new pactus.wallet.WalletOuterClass.GetTotalBalanceResponse(this); - result.walletName_ = walletName_; - result.totalBalance_ = totalBalance_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.GetTotalBalanceResponse) { - return mergeFrom((pactus.wallet.WalletOuterClass.GetTotalBalanceResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetTotalBalanceResponse other) { - if (other == pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - if (other.getTotalBalance() != 0L) { - setTotalBalance(other.getTotalBalance()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: { - totalBalance_ = input.readInt64(); - - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - - private long totalBalance_ ; - /** - *
-       * The total balance of the wallet in NanoPAC.
-       * 
- * - * int64 total_balance = 2 [json_name = "totalBalance"]; - * @return The totalBalance. - */ - @java.lang.Override - public long getTotalBalance() { - return totalBalance_; - } - /** - *
-       * The total balance of the wallet in NanoPAC.
-       * 
- * - * int64 total_balance = 2 [json_name = "totalBalance"]; - * @param value The totalBalance to set. - * @return This builder for chaining. - */ - public Builder setTotalBalance(long value) { - - totalBalance_ = value; - onChanged(); - return this; - } - /** - *
-       * The total balance of the wallet in NanoPAC.
-       * 
- * - * int64 total_balance = 2 [json_name = "totalBalance"]; - * @return This builder for chaining. - */ - public Builder clearTotalBalance() { - - totalBalance_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.GetTotalBalanceResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.GetTotalBalanceResponse) - private static final pactus.wallet.WalletOuterClass.GetTotalBalanceResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetTotalBalanceResponse(); - } - - public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetTotalBalanceResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.GetTotalBalanceResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SignMessageRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.SignMessageRequest) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - java.lang.String getWalletName(); - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - com.google.protobuf.ByteString - getWalletNameBytes(); - - /** - *
-     * The password for unlocking the wallet for signing.
-     * 
- * - * string password = 2 [json_name = "password"]; - * @return The password. - */ - java.lang.String getPassword(); - /** - *
-     * The password for unlocking the wallet for signing.
-     * 
- * - * string password = 2 [json_name = "password"]; - * @return The bytes for password. - */ - com.google.protobuf.ByteString - getPasswordBytes(); - - /** - *
-     * The account address associated with the private key.
-     * 
- * - * string address = 3 [json_name = "address"]; - * @return The address. - */ - java.lang.String getAddress(); - /** - *
-     * The account address associated with the private key.
-     * 
- * - * string address = 3 [json_name = "address"]; - * @return The bytes for address. - */ - com.google.protobuf.ByteString - getAddressBytes(); - - /** - *
-     * The arbitrary message to be signed.
-     * 
- * - * string message = 4 [json_name = "message"]; - * @return The message. - */ - java.lang.String getMessage(); - /** - *
-     * The arbitrary message to be signed.
-     * 
- * - * string message = 4 [json_name = "message"]; - * @return The bytes for message. - */ - com.google.protobuf.ByteString - getMessageBytes(); - } - /** - *
-   * Request message to sign an arbitrary message.
-   * 
- * - * Protobuf type {@code pactus.SignMessageRequest} - */ - public static final class SignMessageRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.SignMessageRequest) - SignMessageRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use SignMessageRequest.newBuilder() to construct. - private SignMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SignMessageRequest() { - walletName_ = ""; - password_ = ""; - address_ = ""; - message_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SignMessageRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.SignMessageRequest.class, pactus.wallet.WalletOuterClass.SignMessageRequest.Builder.class); - } - - public static final int WALLET_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object walletName_; - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - @java.lang.Override - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } - } - /** - *
-     * The name of the wallet.
-     * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PASSWORD_FIELD_NUMBER = 2; - private volatile java.lang.Object password_; - /** - *
-     * The password for unlocking the wallet for signing.
-     * 
- * - * string password = 2 [json_name = "password"]; - * @return The password. - */ - @java.lang.Override - public java.lang.String getPassword() { - java.lang.Object ref = password_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - password_ = s; - return s; - } - } - /** - *
-     * The password for unlocking the wallet for signing.
-     * 
- * - * string password = 2 [json_name = "password"]; - * @return The bytes for password. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPasswordBytes() { - java.lang.Object ref = password_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - password_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ADDRESS_FIELD_NUMBER = 3; - private volatile java.lang.Object address_; - /** - *
-     * The account address associated with the private key.
-     * 
- * - * string address = 3 [json_name = "address"]; - * @return The address. - */ - @java.lang.Override - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } - } - /** - *
-     * The account address associated with the private key.
-     * 
- * - * string address = 3 [json_name = "address"]; - * @return The bytes for address. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MESSAGE_FIELD_NUMBER = 4; - private volatile java.lang.Object message_; - /** - *
-     * The arbitrary message to be signed.
-     * 
- * - * string message = 4 [json_name = "message"]; - * @return The message. - */ - @java.lang.Override - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - message_ = s; - return s; - } - } - /** - *
-     * The arbitrary message to be signed.
-     * 
- * - * string message = 4 [json_name = "message"]; - * @return The bytes for message. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, password_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, address_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, message_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, password_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, address_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, message_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.SignMessageRequest)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.SignMessageRequest other = (pactus.wallet.WalletOuterClass.SignMessageRequest) obj; - - if (!getWalletName() - .equals(other.getWalletName())) return false; - if (!getPassword() - .equals(other.getPassword())) return false; - if (!getAddress() - .equals(other.getAddress())) return false; - if (!getMessage() - .equals(other.getMessage())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; - hash = (53 * hash) + getWalletName().hashCode(); - hash = (37 * hash) + PASSWORD_FIELD_NUMBER; - hash = (53 * hash) + getPassword().hashCode(); - hash = (37 * hash) + ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAddress().hashCode(); - hash = (37 * hash) + MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getMessage().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.SignMessageRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Request message to sign an arbitrary message.
-     * 
- * - * Protobuf type {@code pactus.SignMessageRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.SignMessageRequest) - pactus.wallet.WalletOuterClass.SignMessageRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.SignMessageRequest.class, pactus.wallet.WalletOuterClass.SignMessageRequest.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.SignMessageRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - walletName_ = ""; - - password_ = ""; - - address_ = ""; - - message_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageRequest_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignMessageRequest getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.SignMessageRequest.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignMessageRequest build() { - pactus.wallet.WalletOuterClass.SignMessageRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignMessageRequest buildPartial() { - pactus.wallet.WalletOuterClass.SignMessageRequest result = new pactus.wallet.WalletOuterClass.SignMessageRequest(this); - result.walletName_ = walletName_; - result.password_ = password_; - result.address_ = address_; - result.message_ = message_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.SignMessageRequest) { - return mergeFrom((pactus.wallet.WalletOuterClass.SignMessageRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.SignMessageRequest other) { - if (other == pactus.wallet.WalletOuterClass.SignMessageRequest.getDefaultInstance()) return this; - if (!other.getWalletName().isEmpty()) { - walletName_ = other.walletName_; - onChanged(); - } - if (!other.getPassword().isEmpty()) { - password_ = other.password_; - onChanged(); - } - if (!other.getAddress().isEmpty()) { - address_ = other.address_; - onChanged(); - } - if (!other.getMessage().isEmpty()) { - message_ = other.message_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - walletName_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - password_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: { - address_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: { - message_ = input.readStringRequireUtf8(); - - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object walletName_ = ""; - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The walletName. - */ - public java.lang.String getWalletName() { - java.lang.Object ref = walletName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - walletName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return The bytes for walletName. - */ - public com.google.protobuf.ByteString - getWalletNameBytes() { - java.lang.Object ref = walletName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - walletName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - walletName_ = value; - onChanged(); - return this; - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @return This builder for chaining. - */ - public Builder clearWalletName() { - - walletName_ = getDefaultInstance().getWalletName(); - onChanged(); - return this; - } - /** - *
-       * The name of the wallet.
-       * 
- * - * string wallet_name = 1 [json_name = "walletName"]; - * @param value The bytes for walletName to set. - * @return This builder for chaining. - */ - public Builder setWalletNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - walletName_ = value; - onChanged(); - return this; - } - - private java.lang.Object password_ = ""; - /** - *
-       * The password for unlocking the wallet for signing.
-       * 
- * - * string password = 2 [json_name = "password"]; - * @return The password. - */ - public java.lang.String getPassword() { - java.lang.Object ref = password_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - password_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The password for unlocking the wallet for signing.
-       * 
- * - * string password = 2 [json_name = "password"]; - * @return The bytes for password. - */ - public com.google.protobuf.ByteString - getPasswordBytes() { - java.lang.Object ref = password_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - password_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The password for unlocking the wallet for signing.
-       * 
- * - * string password = 2 [json_name = "password"]; - * @param value The password to set. - * @return This builder for chaining. - */ - public Builder setPassword( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - password_ = value; - onChanged(); - return this; - } - /** - *
-       * The password for unlocking the wallet for signing.
-       * 
- * - * string password = 2 [json_name = "password"]; - * @return This builder for chaining. - */ - public Builder clearPassword() { - - password_ = getDefaultInstance().getPassword(); - onChanged(); - return this; - } - /** - *
-       * The password for unlocking the wallet for signing.
-       * 
- * - * string password = 2 [json_name = "password"]; - * @param value The bytes for password to set. - * @return This builder for chaining. - */ - public Builder setPasswordBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - password_ = value; - onChanged(); - return this; - } - - private java.lang.Object address_ = ""; - /** - *
-       * The account address associated with the private key.
-       * 
- * - * string address = 3 [json_name = "address"]; - * @return The address. - */ - public java.lang.String getAddress() { - java.lang.Object ref = address_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - address_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The account address associated with the private key.
-       * 
- * - * string address = 3 [json_name = "address"]; - * @return The bytes for address. - */ - public com.google.protobuf.ByteString - getAddressBytes() { - java.lang.Object ref = address_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - address_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The account address associated with the private key.
-       * 
- * - * string address = 3 [json_name = "address"]; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - address_ = value; - onChanged(); - return this; - } - /** - *
-       * The account address associated with the private key.
-       * 
- * - * string address = 3 [json_name = "address"]; - * @return This builder for chaining. - */ - public Builder clearAddress() { - - address_ = getDefaultInstance().getAddress(); - onChanged(); - return this; - } - /** - *
-       * The account address associated with the private key.
-       * 
- * - * string address = 3 [json_name = "address"]; - * @param value The bytes for address to set. - * @return This builder for chaining. - */ - public Builder setAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - address_ = value; - onChanged(); - return this; - } - - private java.lang.Object message_ = ""; - /** - *
-       * The arbitrary message to be signed.
-       * 
- * - * string message = 4 [json_name = "message"]; - * @return The message. - */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - message_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * The arbitrary message to be signed.
-       * 
- * - * string message = 4 [json_name = "message"]; - * @return The bytes for message. - */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * The arbitrary message to be signed.
-       * 
- * - * string message = 4 [json_name = "message"]; - * @param value The message to set. - * @return This builder for chaining. - */ - public Builder setMessage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - message_ = value; - onChanged(); - return this; - } - /** - *
-       * The arbitrary message to be signed.
-       * 
- * - * string message = 4 [json_name = "message"]; - * @return This builder for chaining. - */ - public Builder clearMessage() { - - message_ = getDefaultInstance().getMessage(); - onChanged(); - return this; - } - /** - *
-       * The arbitrary message to be signed.
-       * 
- * - * string message = 4 [json_name = "message"]; - * @param value The bytes for message to set. - * @return This builder for chaining. - */ - public Builder setMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - message_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.SignMessageRequest) - } - - // @@protoc_insertion_point(class_scope:pactus.SignMessageRequest) - private static final pactus.wallet.WalletOuterClass.SignMessageRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.SignMessageRequest(); - } - - public static pactus.wallet.WalletOuterClass.SignMessageRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SignMessageRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignMessageRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface SignMessageResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.SignMessageResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * Signature of the message.
-     * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The signature. - */ - java.lang.String getSignature(); - /** - *
-     * Signature of the message.
-     * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The bytes for signature. - */ - com.google.protobuf.ByteString - getSignatureBytes(); - } - /** - *
-   * Response message containing the available balance of the wallet.
-   * 
- * - * Protobuf type {@code pactus.SignMessageResponse} - */ - public static final class SignMessageResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.SignMessageResponse) - SignMessageResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use SignMessageResponse.newBuilder() to construct. - private SignMessageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SignMessageResponse() { - signature_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SignMessageResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.SignMessageResponse.class, pactus.wallet.WalletOuterClass.SignMessageResponse.Builder.class); - } - - public static final int SIGNATURE_FIELD_NUMBER = 1; - private volatile java.lang.Object signature_; - /** - *
-     * Signature of the message.
-     * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The signature. - */ - @java.lang.Override - public java.lang.String getSignature() { - java.lang.Object ref = signature_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signature_ = s; - return s; - } - } - /** - *
-     * Signature of the message.
-     * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The bytes for signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSignatureBytes() { - java.lang.Object ref = signature_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signature_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signature_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signature_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.wallet.WalletOuterClass.SignMessageResponse)) { - return super.equals(obj); - } - pactus.wallet.WalletOuterClass.SignMessageResponse other = (pactus.wallet.WalletOuterClass.SignMessageResponse) obj; - - if (!getSignature() - .equals(other.getSignature())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; - hash = (53 * hash) + getSignature().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.wallet.WalletOuterClass.SignMessageResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-     * Response message containing the available balance of the wallet.
-     * 
- * - * Protobuf type {@code pactus.SignMessageResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.SignMessageResponse) - pactus.wallet.WalletOuterClass.SignMessageResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.wallet.WalletOuterClass.SignMessageResponse.class, pactus.wallet.WalletOuterClass.SignMessageResponse.Builder.class); - } - - // Construct using pactus.wallet.WalletOuterClass.SignMessageResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - signature_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageResponse_descriptor; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignMessageResponse getDefaultInstanceForType() { - return pactus.wallet.WalletOuterClass.SignMessageResponse.getDefaultInstance(); - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignMessageResponse build() { - pactus.wallet.WalletOuterClass.SignMessageResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignMessageResponse buildPartial() { - pactus.wallet.WalletOuterClass.SignMessageResponse result = new pactus.wallet.WalletOuterClass.SignMessageResponse(this); - result.signature_ = signature_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.wallet.WalletOuterClass.SignMessageResponse) { - return mergeFrom((pactus.wallet.WalletOuterClass.SignMessageResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.wallet.WalletOuterClass.SignMessageResponse other) { - if (other == pactus.wallet.WalletOuterClass.SignMessageResponse.getDefaultInstance()) return this; - if (!other.getSignature().isEmpty()) { - signature_ = other.signature_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - signature_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object signature_ = ""; - /** - *
-       * Signature of the message.
-       * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The signature. - */ - public java.lang.String getSignature() { - java.lang.Object ref = signature_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - signature_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-       * Signature of the message.
-       * 
- * - * string signature = 1 [json_name = "signature"]; - * @return The bytes for signature. - */ - public com.google.protobuf.ByteString - getSignatureBytes() { - java.lang.Object ref = signature_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - signature_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-       * Signature of the message.
-       * 
- * - * string signature = 1 [json_name = "signature"]; - * @param value The signature to set. - * @return This builder for chaining. - */ - public Builder setSignature( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - signature_ = value; - onChanged(); - return this; - } - /** - *
-       * Signature of the message.
-       * 
- * - * string signature = 1 [json_name = "signature"]; - * @return This builder for chaining. - */ - public Builder clearSignature() { - - signature_ = getDefaultInstance().getSignature(); - onChanged(); - return this; - } - /** - *
-       * Signature of the message.
-       * 
- * - * string signature = 1 [json_name = "signature"]; - * @param value The bytes for signature to set. - * @return This builder for chaining. - */ - public Builder setSignatureBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - signature_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.SignMessageResponse) - } - - // @@protoc_insertion_point(class_scope:pactus.SignMessageResponse) - private static final pactus.wallet.WalletOuterClass.SignMessageResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.SignMessageResponse(); - } - - public static pactus.wallet.WalletOuterClass.SignMessageResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SignMessageResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.wallet.WalletOuterClass.SignMessageResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_AddressInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_AddressInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_HistoryInfo_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_HistoryInfo_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetAddressHistoryRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetAddressHistoryRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetAddressHistoryResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetAddressHistoryResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetNewAddressRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetNewAddressRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetNewAddressResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetNewAddressResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_RestoreWalletRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_RestoreWalletRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_RestoreWalletResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_RestoreWalletResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_CreateWalletRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_CreateWalletRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_CreateWalletResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_CreateWalletResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_LoadWalletRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_LoadWalletRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_LoadWalletResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_LoadWalletResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_UnloadWalletRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_UnloadWalletRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_UnloadWalletResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_UnloadWalletResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorAddressRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetValidatorAddressResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_SignRawTransactionRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_SignRawTransactionResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetTotalBalanceRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_GetTotalBalanceResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_SignMessageRequest_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_SignMessageRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_SignMessageResponse_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_SignMessageResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\014wallet.proto\022\006pactus\032\021transaction.prot" + - "o\"p\n\013AddressInfo\022\030\n\007address\030\001 \001(\tR\007addre" + - "ss\022\035\n\npublic_key\030\002 \001(\tR\tpublicKey\022\024\n\005lab" + - "el\030\003 \001(\tR\005label\022\022\n\004path\030\004 \001(\tR\004path\"\245\001\n\013" + - "HistoryInfo\022%\n\016transaction_id\030\001 \001(\tR\rtra" + - "nsactionId\022\022\n\004time\030\002 \001(\rR\004time\022!\n\014payloa" + - "d_type\030\003 \001(\tR\013payloadType\022 \n\013description" + - "\030\004 \001(\tR\013description\022\026\n\006amount\030\005 \001(\003R\006amo" + - "unt\"U\n\030GetAddressHistoryRequest\022\037\n\013walle" + - "t_name\030\001 \001(\tR\nwalletName\022\030\n\007address\030\002 \001(" + - "\tR\007address\"S\n\031GetAddressHistoryResponse\022" + - "6\n\014history_info\030\001 \003(\0132\023.pactus.HistoryIn" + - "foR\013historyInfo\"\241\001\n\024GetNewAddressRequest" + - "\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\0226\n\014add" + - "ress_type\030\002 \001(\0162\023.pactus.AddressTypeR\013ad" + - "dressType\022\024\n\005label\030\003 \001(\tR\005label\022\032\n\010passw" + - "ord\030\004 \001(\tR\010password\"p\n\025GetNewAddressResp" + - "onse\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\0226\n" + - "\014address_info\030\002 \001(\0132\023.pactus.AddressInfo" + - "R\013addressInfo\"o\n\024RestoreWalletRequest\022\037\n" + - "\013wallet_name\030\001 \001(\tR\nwalletName\022\032\n\010mnemon" + - "ic\030\002 \001(\tR\010mnemonic\022\032\n\010password\030\003 \001(\tR\010pa" + - "ssword\"8\n\025RestoreWalletResponse\022\037\n\013walle" + - "t_name\030\001 \001(\tR\nwalletName\"R\n\023CreateWallet" + - "Request\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName" + - "\022\032\n\010password\030\004 \001(\tR\010password\"2\n\024CreateWa" + - "lletResponse\022\032\n\010mnemonic\030\002 \001(\tR\010mnemonic" + - "\"4\n\021LoadWalletRequest\022\037\n\013wallet_name\030\001 \001" + - "(\tR\nwalletName\"5\n\022LoadWalletResponse\022\037\n\013" + - "wallet_name\030\001 \001(\tR\nwalletName\"6\n\023UnloadW" + - "alletRequest\022\037\n\013wallet_name\030\001 \001(\tR\nwalle" + - "tName\"7\n\024UnloadWalletResponse\022\037\n\013wallet_" + - "name\030\001 \001(\tR\nwalletName\";\n\032GetValidatorAd" + - "dressRequest\022\035\n\npublic_key\030\001 \001(\tR\tpublic" + - "Key\"7\n\033GetValidatorAddressResponse\022\030\n\007ad" + - "dress\030\001 \001(\tR\007address\"\201\001\n\031SignRawTransact" + - "ionRequest\022\037\n\013wallet_name\030\001 \001(\tR\nwalletN" + - "ame\022\'\n\017raw_transaction\030\002 \001(\tR\016rawTransac" + - "tion\022\032\n\010password\030\003 \001(\tR\010password\"y\n\032Sign" + - "RawTransactionResponse\022%\n\016transaction_id" + - "\030\001 \001(\tR\rtransactionId\0224\n\026signed_raw_tran" + - "saction\030\002 \001(\tR\024signedRawTransaction\"9\n\026G" + - "etTotalBalanceRequest\022\037\n\013wallet_name\030\001 \001" + - "(\tR\nwalletName\"_\n\027GetTotalBalanceRespons" + - "e\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\022#\n\rto" + - "tal_balance\030\002 \001(\003R\014totalBalance\"\205\001\n\022Sign" + - "MessageRequest\022\037\n\013wallet_name\030\001 \001(\tR\nwal" + - "letName\022\032\n\010password\030\002 \001(\tR\010password\022\030\n\007a" + - "ddress\030\003 \001(\tR\007address\022\030\n\007message\030\004 \001(\tR\007" + - "message\"3\n\023SignMessageResponse\022\034\n\tsignat" + - "ure\030\001 \001(\tR\tsignature*\204\001\n\013AddressType\022\031\n\025" + - "ADDRESS_TYPE_TREASURY\020\000\022\032\n\026ADDRESS_TYPE_" + - "VALIDATOR\020\001\022\034\n\030ADDRESS_TYPE_BLS_ACCOUNT\020" + - "\002\022 \n\034ADDRESS_TYPE_ED25519_ACCOUNT\020\0032\262\006\n\006" + - "Wallet\022I\n\014CreateWallet\022\033.pactus.CreateWa" + - "lletRequest\032\034.pactus.CreateWalletRespons" + - "e\022L\n\rRestoreWallet\022\034.pactus.RestoreWalle" + - "tRequest\032\035.pactus.RestoreWalletResponse\022" + - "C\n\nLoadWallet\022\031.pactus.LoadWalletRequest" + - "\032\032.pactus.LoadWalletResponse\022I\n\014UnloadWa" + - "llet\022\033.pactus.UnloadWalletRequest\032\034.pact" + - "us.UnloadWalletResponse\022R\n\017GetTotalBalan" + - "ce\022\036.pactus.GetTotalBalanceRequest\032\037.pac" + - "tus.GetTotalBalanceResponse\022[\n\022SignRawTr" + - "ansaction\022!.pactus.SignRawTransactionReq" + - "uest\032\".pactus.SignRawTransactionResponse" + - "\022^\n\023GetValidatorAddress\022\".pactus.GetVali" + - "datorAddressRequest\032#.pactus.GetValidato" + - "rAddressResponse\022L\n\rGetNewAddress\022\034.pact" + - "us.GetNewAddressRequest\032\035.pactus.GetNewA" + - "ddressResponse\022X\n\021GetAddressHistory\022 .pa" + - "ctus.GetAddressHistoryRequest\032!.pactus.G" + - "etAddressHistoryResponse\022F\n\013SignMessage\022" + - "\032.pactus.SignMessageRequest\032\033.pactus.Sig" + - "nMessageResponseBA\n\rpactus.walletZ0githu" + - "b.com/pactus-project/pactus/www/grpc/pac" + - "tusb\006proto3" - }; - descriptor = com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - pactus.transaction.TransactionOuterClass.getDescriptor(), - }); - internal_static_pactus_AddressInfo_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_pactus_AddressInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_AddressInfo_descriptor, - new java.lang.String[] { "Address", "PublicKey", "Label", "Path", }); - internal_static_pactus_HistoryInfo_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_pactus_HistoryInfo_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_HistoryInfo_descriptor, - new java.lang.String[] { "TransactionId", "Time", "PayloadType", "Description", "Amount", }); - internal_static_pactus_GetAddressHistoryRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_pactus_GetAddressHistoryRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetAddressHistoryRequest_descriptor, - new java.lang.String[] { "WalletName", "Address", }); - internal_static_pactus_GetAddressHistoryResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_pactus_GetAddressHistoryResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetAddressHistoryResponse_descriptor, - new java.lang.String[] { "HistoryInfo", }); - internal_static_pactus_GetNewAddressRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_pactus_GetNewAddressRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetNewAddressRequest_descriptor, - new java.lang.String[] { "WalletName", "AddressType", "Label", "Password", }); - internal_static_pactus_GetNewAddressResponse_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_pactus_GetNewAddressResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetNewAddressResponse_descriptor, - new java.lang.String[] { "WalletName", "AddressInfo", }); - internal_static_pactus_RestoreWalletRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_pactus_RestoreWalletRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_RestoreWalletRequest_descriptor, - new java.lang.String[] { "WalletName", "Mnemonic", "Password", }); - internal_static_pactus_RestoreWalletResponse_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_pactus_RestoreWalletResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_RestoreWalletResponse_descriptor, - new java.lang.String[] { "WalletName", }); - internal_static_pactus_CreateWalletRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_pactus_CreateWalletRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_CreateWalletRequest_descriptor, - new java.lang.String[] { "WalletName", "Password", }); - internal_static_pactus_CreateWalletResponse_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_pactus_CreateWalletResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_CreateWalletResponse_descriptor, - new java.lang.String[] { "Mnemonic", }); - internal_static_pactus_LoadWalletRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_pactus_LoadWalletRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_LoadWalletRequest_descriptor, - new java.lang.String[] { "WalletName", }); - internal_static_pactus_LoadWalletResponse_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_pactus_LoadWalletResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_LoadWalletResponse_descriptor, - new java.lang.String[] { "WalletName", }); - internal_static_pactus_UnloadWalletRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_pactus_UnloadWalletRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_UnloadWalletRequest_descriptor, - new java.lang.String[] { "WalletName", }); - internal_static_pactus_UnloadWalletResponse_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_pactus_UnloadWalletResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_UnloadWalletResponse_descriptor, - new java.lang.String[] { "WalletName", }); - internal_static_pactus_GetValidatorAddressRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetValidatorAddressRequest_descriptor, - new java.lang.String[] { "PublicKey", }); - internal_static_pactus_GetValidatorAddressResponse_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetValidatorAddressResponse_descriptor, - new java.lang.String[] { "Address", }); - internal_static_pactus_SignRawTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_SignRawTransactionRequest_descriptor, - new java.lang.String[] { "WalletName", "RawTransaction", "Password", }); - internal_static_pactus_SignRawTransactionResponse_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_SignRawTransactionResponse_descriptor, - new java.lang.String[] { "TransactionId", "SignedRawTransaction", }); - internal_static_pactus_GetTotalBalanceRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetTotalBalanceRequest_descriptor, - new java.lang.String[] { "WalletName", }); - internal_static_pactus_GetTotalBalanceResponse_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_GetTotalBalanceResponse_descriptor, - new java.lang.String[] { "WalletName", "TotalBalance", }); - internal_static_pactus_SignMessageRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_pactus_SignMessageRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_SignMessageRequest_descriptor, - new java.lang.String[] { "WalletName", "Password", "Address", "Message", }); - internal_static_pactus_SignMessageResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_pactus_SignMessageResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_SignMessageResponse_descriptor, - new java.lang.String[] { "Signature", }); - pactus.transaction.TransactionOuterClass.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/www/grpc/gen/js/blockchain_grpc_pb.js b/www/grpc/gen/js/blockchain_grpc_pb.js deleted file mode 100644 index aea040786..000000000 --- a/www/grpc/gen/js/blockchain_grpc_pb.js +++ /dev/null @@ -1,381 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('grpc'); -var blockchain_pb = require('./blockchain_pb.js'); -var transaction_pb = require('./transaction_pb.js'); - -function serialize_pactus_GetAccountRequest(arg) { - if (!(arg instanceof blockchain_pb.GetAccountRequest)) { - throw new Error('Expected argument of type pactus.GetAccountRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetAccountRequest(buffer_arg) { - return blockchain_pb.GetAccountRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetAccountResponse(arg) { - if (!(arg instanceof blockchain_pb.GetAccountResponse)) { - throw new Error('Expected argument of type pactus.GetAccountResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetAccountResponse(buffer_arg) { - return blockchain_pb.GetAccountResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetBlockHashRequest(arg) { - if (!(arg instanceof blockchain_pb.GetBlockHashRequest)) { - throw new Error('Expected argument of type pactus.GetBlockHashRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetBlockHashRequest(buffer_arg) { - return blockchain_pb.GetBlockHashRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetBlockHashResponse(arg) { - if (!(arg instanceof blockchain_pb.GetBlockHashResponse)) { - throw new Error('Expected argument of type pactus.GetBlockHashResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetBlockHashResponse(buffer_arg) { - return blockchain_pb.GetBlockHashResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetBlockHeightRequest(arg) { - if (!(arg instanceof blockchain_pb.GetBlockHeightRequest)) { - throw new Error('Expected argument of type pactus.GetBlockHeightRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetBlockHeightRequest(buffer_arg) { - return blockchain_pb.GetBlockHeightRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetBlockHeightResponse(arg) { - if (!(arg instanceof blockchain_pb.GetBlockHeightResponse)) { - throw new Error('Expected argument of type pactus.GetBlockHeightResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetBlockHeightResponse(buffer_arg) { - return blockchain_pb.GetBlockHeightResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetBlockRequest(arg) { - if (!(arg instanceof blockchain_pb.GetBlockRequest)) { - throw new Error('Expected argument of type pactus.GetBlockRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetBlockRequest(buffer_arg) { - return blockchain_pb.GetBlockRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetBlockResponse(arg) { - if (!(arg instanceof blockchain_pb.GetBlockResponse)) { - throw new Error('Expected argument of type pactus.GetBlockResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetBlockResponse(buffer_arg) { - return blockchain_pb.GetBlockResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetBlockchainInfoRequest(arg) { - if (!(arg instanceof blockchain_pb.GetBlockchainInfoRequest)) { - throw new Error('Expected argument of type pactus.GetBlockchainInfoRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetBlockchainInfoRequest(buffer_arg) { - return blockchain_pb.GetBlockchainInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetBlockchainInfoResponse(arg) { - if (!(arg instanceof blockchain_pb.GetBlockchainInfoResponse)) { - throw new Error('Expected argument of type pactus.GetBlockchainInfoResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetBlockchainInfoResponse(buffer_arg) { - return blockchain_pb.GetBlockchainInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetConsensusInfoRequest(arg) { - if (!(arg instanceof blockchain_pb.GetConsensusInfoRequest)) { - throw new Error('Expected argument of type pactus.GetConsensusInfoRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetConsensusInfoRequest(buffer_arg) { - return blockchain_pb.GetConsensusInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetConsensusInfoResponse(arg) { - if (!(arg instanceof blockchain_pb.GetConsensusInfoResponse)) { - throw new Error('Expected argument of type pactus.GetConsensusInfoResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetConsensusInfoResponse(buffer_arg) { - return blockchain_pb.GetConsensusInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetPublicKeyRequest(arg) { - if (!(arg instanceof blockchain_pb.GetPublicKeyRequest)) { - throw new Error('Expected argument of type pactus.GetPublicKeyRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetPublicKeyRequest(buffer_arg) { - return blockchain_pb.GetPublicKeyRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetPublicKeyResponse(arg) { - if (!(arg instanceof blockchain_pb.GetPublicKeyResponse)) { - throw new Error('Expected argument of type pactus.GetPublicKeyResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetPublicKeyResponse(buffer_arg) { - return blockchain_pb.GetPublicKeyResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetTxPoolContentRequest(arg) { - if (!(arg instanceof blockchain_pb.GetTxPoolContentRequest)) { - throw new Error('Expected argument of type pactus.GetTxPoolContentRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetTxPoolContentRequest(buffer_arg) { - return blockchain_pb.GetTxPoolContentRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetTxPoolContentResponse(arg) { - if (!(arg instanceof blockchain_pb.GetTxPoolContentResponse)) { - throw new Error('Expected argument of type pactus.GetTxPoolContentResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetTxPoolContentResponse(buffer_arg) { - return blockchain_pb.GetTxPoolContentResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetValidatorAddressesRequest(arg) { - if (!(arg instanceof blockchain_pb.GetValidatorAddressesRequest)) { - throw new Error('Expected argument of type pactus.GetValidatorAddressesRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetValidatorAddressesRequest(buffer_arg) { - return blockchain_pb.GetValidatorAddressesRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetValidatorAddressesResponse(arg) { - if (!(arg instanceof blockchain_pb.GetValidatorAddressesResponse)) { - throw new Error('Expected argument of type pactus.GetValidatorAddressesResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetValidatorAddressesResponse(buffer_arg) { - return blockchain_pb.GetValidatorAddressesResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetValidatorByNumberRequest(arg) { - if (!(arg instanceof blockchain_pb.GetValidatorByNumberRequest)) { - throw new Error('Expected argument of type pactus.GetValidatorByNumberRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetValidatorByNumberRequest(buffer_arg) { - return blockchain_pb.GetValidatorByNumberRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetValidatorRequest(arg) { - if (!(arg instanceof blockchain_pb.GetValidatorRequest)) { - throw new Error('Expected argument of type pactus.GetValidatorRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetValidatorRequest(buffer_arg) { - return blockchain_pb.GetValidatorRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetValidatorResponse(arg) { - if (!(arg instanceof blockchain_pb.GetValidatorResponse)) { - throw new Error('Expected argument of type pactus.GetValidatorResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetValidatorResponse(buffer_arg) { - return blockchain_pb.GetValidatorResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Blockchain service defines RPC methods for interacting with the blockchain. -var BlockchainService = exports.BlockchainService = { - // GetBlock retrieves information about a block based on the provided request -// parameters. -getBlock: { - path: '/pactus.Blockchain/GetBlock', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetBlockRequest, - responseType: blockchain_pb.GetBlockResponse, - requestSerialize: serialize_pactus_GetBlockRequest, - requestDeserialize: deserialize_pactus_GetBlockRequest, - responseSerialize: serialize_pactus_GetBlockResponse, - responseDeserialize: deserialize_pactus_GetBlockResponse, - }, - // GetBlockHash retrieves the hash of a block at the specified height. -getBlockHash: { - path: '/pactus.Blockchain/GetBlockHash', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetBlockHashRequest, - responseType: blockchain_pb.GetBlockHashResponse, - requestSerialize: serialize_pactus_GetBlockHashRequest, - requestDeserialize: deserialize_pactus_GetBlockHashRequest, - responseSerialize: serialize_pactus_GetBlockHashResponse, - responseDeserialize: deserialize_pactus_GetBlockHashResponse, - }, - // GetBlockHeight retrieves the height of a block with the specified hash. -getBlockHeight: { - path: '/pactus.Blockchain/GetBlockHeight', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetBlockHeightRequest, - responseType: blockchain_pb.GetBlockHeightResponse, - requestSerialize: serialize_pactus_GetBlockHeightRequest, - requestDeserialize: deserialize_pactus_GetBlockHeightRequest, - responseSerialize: serialize_pactus_GetBlockHeightResponse, - responseDeserialize: deserialize_pactus_GetBlockHeightResponse, - }, - // GetBlockchainInfo retrieves general information about the blockchain. -getBlockchainInfo: { - path: '/pactus.Blockchain/GetBlockchainInfo', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetBlockchainInfoRequest, - responseType: blockchain_pb.GetBlockchainInfoResponse, - requestSerialize: serialize_pactus_GetBlockchainInfoRequest, - requestDeserialize: deserialize_pactus_GetBlockchainInfoRequest, - responseSerialize: serialize_pactus_GetBlockchainInfoResponse, - responseDeserialize: deserialize_pactus_GetBlockchainInfoResponse, - }, - // GetConsensusInfo retrieves information about the consensus instances. -getConsensusInfo: { - path: '/pactus.Blockchain/GetConsensusInfo', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetConsensusInfoRequest, - responseType: blockchain_pb.GetConsensusInfoResponse, - requestSerialize: serialize_pactus_GetConsensusInfoRequest, - requestDeserialize: deserialize_pactus_GetConsensusInfoRequest, - responseSerialize: serialize_pactus_GetConsensusInfoResponse, - responseDeserialize: deserialize_pactus_GetConsensusInfoResponse, - }, - // GetAccount retrieves information about an account based on the provided -// address. -getAccount: { - path: '/pactus.Blockchain/GetAccount', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetAccountRequest, - responseType: blockchain_pb.GetAccountResponse, - requestSerialize: serialize_pactus_GetAccountRequest, - requestDeserialize: deserialize_pactus_GetAccountRequest, - responseSerialize: serialize_pactus_GetAccountResponse, - responseDeserialize: deserialize_pactus_GetAccountResponse, - }, - // GetValidator retrieves information about a validator based on the provided -// address. -getValidator: { - path: '/pactus.Blockchain/GetValidator', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetValidatorRequest, - responseType: blockchain_pb.GetValidatorResponse, - requestSerialize: serialize_pactus_GetValidatorRequest, - requestDeserialize: deserialize_pactus_GetValidatorRequest, - responseSerialize: serialize_pactus_GetValidatorResponse, - responseDeserialize: deserialize_pactus_GetValidatorResponse, - }, - // GetValidatorByNumber retrieves information about a validator based on the -// provided number. -getValidatorByNumber: { - path: '/pactus.Blockchain/GetValidatorByNumber', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetValidatorByNumberRequest, - responseType: blockchain_pb.GetValidatorResponse, - requestSerialize: serialize_pactus_GetValidatorByNumberRequest, - requestDeserialize: deserialize_pactus_GetValidatorByNumberRequest, - responseSerialize: serialize_pactus_GetValidatorResponse, - responseDeserialize: deserialize_pactus_GetValidatorResponse, - }, - // GetValidatorAddresses retrieves a list of all validator addresses. -getValidatorAddresses: { - path: '/pactus.Blockchain/GetValidatorAddresses', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetValidatorAddressesRequest, - responseType: blockchain_pb.GetValidatorAddressesResponse, - requestSerialize: serialize_pactus_GetValidatorAddressesRequest, - requestDeserialize: deserialize_pactus_GetValidatorAddressesRequest, - responseSerialize: serialize_pactus_GetValidatorAddressesResponse, - responseDeserialize: deserialize_pactus_GetValidatorAddressesResponse, - }, - // GetPublicKey retrieves the public key of an account based on the provided -// address. -getPublicKey: { - path: '/pactus.Blockchain/GetPublicKey', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetPublicKeyRequest, - responseType: blockchain_pb.GetPublicKeyResponse, - requestSerialize: serialize_pactus_GetPublicKeyRequest, - requestDeserialize: deserialize_pactus_GetPublicKeyRequest, - responseSerialize: serialize_pactus_GetPublicKeyResponse, - responseDeserialize: deserialize_pactus_GetPublicKeyResponse, - }, - // GetTxPoolContent retrieves current transactions in the transaction pool. -getTxPoolContent: { - path: '/pactus.Blockchain/GetTxPoolContent', - requestStream: false, - responseStream: false, - requestType: blockchain_pb.GetTxPoolContentRequest, - responseType: blockchain_pb.GetTxPoolContentResponse, - requestSerialize: serialize_pactus_GetTxPoolContentRequest, - requestDeserialize: deserialize_pactus_GetTxPoolContentRequest, - responseSerialize: serialize_pactus_GetTxPoolContentResponse, - responseDeserialize: deserialize_pactus_GetTxPoolContentResponse, - }, -}; - -exports.BlockchainClient = grpc.makeGenericClientConstructor(BlockchainService); diff --git a/www/grpc/gen/js/blockchain_pb.js b/www/grpc/gen/js/blockchain_pb.js deleted file mode 100644 index 4a3457f9b..000000000 --- a/www/grpc/gen/js/blockchain_pb.js +++ /dev/null @@ -1,6046 +0,0 @@ -// source: blockchain.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var transaction_pb = require('./transaction_pb.js'); -goog.object.extend(proto, transaction_pb); -goog.exportSymbol('proto.pactus.AccountInfo', null, global); -goog.exportSymbol('proto.pactus.BlockHeaderInfo', null, global); -goog.exportSymbol('proto.pactus.BlockVerbosity', null, global); -goog.exportSymbol('proto.pactus.CertificateInfo', null, global); -goog.exportSymbol('proto.pactus.ConsensusInfo', null, global); -goog.exportSymbol('proto.pactus.GetAccountRequest', null, global); -goog.exportSymbol('proto.pactus.GetAccountResponse', null, global); -goog.exportSymbol('proto.pactus.GetBlockHashRequest', null, global); -goog.exportSymbol('proto.pactus.GetBlockHashResponse', null, global); -goog.exportSymbol('proto.pactus.GetBlockHeightRequest', null, global); -goog.exportSymbol('proto.pactus.GetBlockHeightResponse', null, global); -goog.exportSymbol('proto.pactus.GetBlockRequest', null, global); -goog.exportSymbol('proto.pactus.GetBlockResponse', null, global); -goog.exportSymbol('proto.pactus.GetBlockchainInfoRequest', null, global); -goog.exportSymbol('proto.pactus.GetBlockchainInfoResponse', null, global); -goog.exportSymbol('proto.pactus.GetConsensusInfoRequest', null, global); -goog.exportSymbol('proto.pactus.GetConsensusInfoResponse', null, global); -goog.exportSymbol('proto.pactus.GetPublicKeyRequest', null, global); -goog.exportSymbol('proto.pactus.GetPublicKeyResponse', null, global); -goog.exportSymbol('proto.pactus.GetTxPoolContentRequest', null, global); -goog.exportSymbol('proto.pactus.GetTxPoolContentResponse', null, global); -goog.exportSymbol('proto.pactus.GetValidatorAddressesRequest', null, global); -goog.exportSymbol('proto.pactus.GetValidatorAddressesResponse', null, global); -goog.exportSymbol('proto.pactus.GetValidatorByNumberRequest', null, global); -goog.exportSymbol('proto.pactus.GetValidatorRequest', null, global); -goog.exportSymbol('proto.pactus.GetValidatorResponse', null, global); -goog.exportSymbol('proto.pactus.Proposal', null, global); -goog.exportSymbol('proto.pactus.ValidatorInfo', null, global); -goog.exportSymbol('proto.pactus.VoteInfo', null, global); -goog.exportSymbol('proto.pactus.VoteType', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetAccountRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetAccountRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetAccountRequest.displayName = 'proto.pactus.GetAccountRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetAccountResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetAccountResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetAccountResponse.displayName = 'proto.pactus.GetAccountResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetValidatorAddressesRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetValidatorAddressesRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetValidatorAddressesRequest.displayName = 'proto.pactus.GetValidatorAddressesRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetValidatorAddressesResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetValidatorAddressesResponse.repeatedFields_, null); -}; -goog.inherits(proto.pactus.GetValidatorAddressesResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetValidatorAddressesResponse.displayName = 'proto.pactus.GetValidatorAddressesResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetValidatorRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetValidatorRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetValidatorRequest.displayName = 'proto.pactus.GetValidatorRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetValidatorByNumberRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetValidatorByNumberRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetValidatorByNumberRequest.displayName = 'proto.pactus.GetValidatorByNumberRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetValidatorResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetValidatorResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetValidatorResponse.displayName = 'proto.pactus.GetValidatorResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetPublicKeyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetPublicKeyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetPublicKeyRequest.displayName = 'proto.pactus.GetPublicKeyRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetPublicKeyResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetPublicKeyResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetPublicKeyResponse.displayName = 'proto.pactus.GetPublicKeyResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetBlockRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetBlockRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetBlockRequest.displayName = 'proto.pactus.GetBlockRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetBlockResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetBlockResponse.repeatedFields_, null); -}; -goog.inherits(proto.pactus.GetBlockResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetBlockResponse.displayName = 'proto.pactus.GetBlockResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetBlockHashRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetBlockHashRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetBlockHashRequest.displayName = 'proto.pactus.GetBlockHashRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetBlockHashResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetBlockHashResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetBlockHashResponse.displayName = 'proto.pactus.GetBlockHashResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetBlockHeightRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetBlockHeightRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetBlockHeightRequest.displayName = 'proto.pactus.GetBlockHeightRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetBlockHeightResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetBlockHeightResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetBlockHeightResponse.displayName = 'proto.pactus.GetBlockHeightResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetBlockchainInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetBlockchainInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetBlockchainInfoRequest.displayName = 'proto.pactus.GetBlockchainInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetBlockchainInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetBlockchainInfoResponse.repeatedFields_, null); -}; -goog.inherits(proto.pactus.GetBlockchainInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetBlockchainInfoResponse.displayName = 'proto.pactus.GetBlockchainInfoResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetConsensusInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetConsensusInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetConsensusInfoRequest.displayName = 'proto.pactus.GetConsensusInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetConsensusInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetConsensusInfoResponse.repeatedFields_, null); -}; -goog.inherits(proto.pactus.GetConsensusInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetConsensusInfoResponse.displayName = 'proto.pactus.GetConsensusInfoResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetTxPoolContentRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetTxPoolContentRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetTxPoolContentRequest.displayName = 'proto.pactus.GetTxPoolContentRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetTxPoolContentResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetTxPoolContentResponse.repeatedFields_, null); -}; -goog.inherits(proto.pactus.GetTxPoolContentResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetTxPoolContentResponse.displayName = 'proto.pactus.GetTxPoolContentResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.ValidatorInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.ValidatorInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.ValidatorInfo.displayName = 'proto.pactus.ValidatorInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.AccountInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.AccountInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.AccountInfo.displayName = 'proto.pactus.AccountInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.BlockHeaderInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.BlockHeaderInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.BlockHeaderInfo.displayName = 'proto.pactus.BlockHeaderInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.CertificateInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.CertificateInfo.repeatedFields_, null); -}; -goog.inherits(proto.pactus.CertificateInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.CertificateInfo.displayName = 'proto.pactus.CertificateInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.VoteInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.VoteInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.VoteInfo.displayName = 'proto.pactus.VoteInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.ConsensusInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.ConsensusInfo.repeatedFields_, null); -}; -goog.inherits(proto.pactus.ConsensusInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.ConsensusInfo.displayName = 'proto.pactus.ConsensusInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.Proposal = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.Proposal, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.Proposal.displayName = 'proto.pactus.Proposal'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetAccountRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetAccountRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetAccountRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetAccountRequest.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetAccountRequest} - */ -proto.pactus.GetAccountRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetAccountRequest; - return proto.pactus.GetAccountRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetAccountRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetAccountRequest} - */ -proto.pactus.GetAccountRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetAccountRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetAccountRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetAccountRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetAccountRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.pactus.GetAccountRequest.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetAccountRequest} returns this - */ -proto.pactus.GetAccountRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetAccountResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetAccountResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetAccountResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetAccountResponse.toObject = function(includeInstance, msg) { - var f, obj = { - account: (f = msg.getAccount()) && proto.pactus.AccountInfo.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetAccountResponse} - */ -proto.pactus.GetAccountResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetAccountResponse; - return proto.pactus.GetAccountResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetAccountResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetAccountResponse} - */ -proto.pactus.GetAccountResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.pactus.AccountInfo; - reader.readMessage(value,proto.pactus.AccountInfo.deserializeBinaryFromReader); - msg.setAccount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetAccountResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetAccountResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetAccountResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetAccountResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.pactus.AccountInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * optional AccountInfo account = 1; - * @return {?proto.pactus.AccountInfo} - */ -proto.pactus.GetAccountResponse.prototype.getAccount = function() { - return /** @type{?proto.pactus.AccountInfo} */ ( - jspb.Message.getWrapperField(this, proto.pactus.AccountInfo, 1)); -}; - - -/** - * @param {?proto.pactus.AccountInfo|undefined} value - * @return {!proto.pactus.GetAccountResponse} returns this -*/ -proto.pactus.GetAccountResponse.prototype.setAccount = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.GetAccountResponse} returns this - */ -proto.pactus.GetAccountResponse.prototype.clearAccount = function() { - return this.setAccount(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.GetAccountResponse.prototype.hasAccount = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetValidatorAddressesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetValidatorAddressesRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetValidatorAddressesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorAddressesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetValidatorAddressesRequest} - */ -proto.pactus.GetValidatorAddressesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetValidatorAddressesRequest; - return proto.pactus.GetValidatorAddressesRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetValidatorAddressesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetValidatorAddressesRequest} - */ -proto.pactus.GetValidatorAddressesRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetValidatorAddressesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetValidatorAddressesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetValidatorAddressesRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorAddressesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.GetValidatorAddressesResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetValidatorAddressesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetValidatorAddressesResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetValidatorAddressesResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorAddressesResponse.toObject = function(includeInstance, msg) { - var f, obj = { - addressesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetValidatorAddressesResponse} - */ -proto.pactus.GetValidatorAddressesResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetValidatorAddressesResponse; - return proto.pactus.GetValidatorAddressesResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetValidatorAddressesResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetValidatorAddressesResponse} - */ -proto.pactus.GetValidatorAddressesResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.addAddresses(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetValidatorAddressesResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetValidatorAddressesResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetValidatorAddressesResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorAddressesResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddressesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string addresses = 1; - * @return {!Array} - */ -proto.pactus.GetValidatorAddressesResponse.prototype.getAddressesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.GetValidatorAddressesResponse} returns this - */ -proto.pactus.GetValidatorAddressesResponse.prototype.setAddressesList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.pactus.GetValidatorAddressesResponse} returns this - */ -proto.pactus.GetValidatorAddressesResponse.prototype.addAddresses = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.GetValidatorAddressesResponse} returns this - */ -proto.pactus.GetValidatorAddressesResponse.prototype.clearAddressesList = function() { - return this.setAddressesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetValidatorRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetValidatorRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetValidatorRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorRequest.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetValidatorRequest} - */ -proto.pactus.GetValidatorRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetValidatorRequest; - return proto.pactus.GetValidatorRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetValidatorRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetValidatorRequest} - */ -proto.pactus.GetValidatorRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetValidatorRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetValidatorRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetValidatorRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.pactus.GetValidatorRequest.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetValidatorRequest} returns this - */ -proto.pactus.GetValidatorRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetValidatorByNumberRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetValidatorByNumberRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetValidatorByNumberRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorByNumberRequest.toObject = function(includeInstance, msg) { - var f, obj = { - number: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetValidatorByNumberRequest} - */ -proto.pactus.GetValidatorByNumberRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetValidatorByNumberRequest; - return proto.pactus.GetValidatorByNumberRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetValidatorByNumberRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetValidatorByNumberRequest} - */ -proto.pactus.GetValidatorByNumberRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumber(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetValidatorByNumberRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetValidatorByNumberRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetValidatorByNumberRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorByNumberRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNumber(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } -}; - - -/** - * optional int32 number = 1; - * @return {number} - */ -proto.pactus.GetValidatorByNumberRequest.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetValidatorByNumberRequest} returns this - */ -proto.pactus.GetValidatorByNumberRequest.prototype.setNumber = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetValidatorResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetValidatorResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetValidatorResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorResponse.toObject = function(includeInstance, msg) { - var f, obj = { - validator: (f = msg.getValidator()) && proto.pactus.ValidatorInfo.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetValidatorResponse} - */ -proto.pactus.GetValidatorResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetValidatorResponse; - return proto.pactus.GetValidatorResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetValidatorResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetValidatorResponse} - */ -proto.pactus.GetValidatorResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.pactus.ValidatorInfo; - reader.readMessage(value,proto.pactus.ValidatorInfo.deserializeBinaryFromReader); - msg.setValidator(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetValidatorResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetValidatorResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetValidatorResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValidator(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.pactus.ValidatorInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * optional ValidatorInfo validator = 1; - * @return {?proto.pactus.ValidatorInfo} - */ -proto.pactus.GetValidatorResponse.prototype.getValidator = function() { - return /** @type{?proto.pactus.ValidatorInfo} */ ( - jspb.Message.getWrapperField(this, proto.pactus.ValidatorInfo, 1)); -}; - - -/** - * @param {?proto.pactus.ValidatorInfo|undefined} value - * @return {!proto.pactus.GetValidatorResponse} returns this -*/ -proto.pactus.GetValidatorResponse.prototype.setValidator = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.GetValidatorResponse} returns this - */ -proto.pactus.GetValidatorResponse.prototype.clearValidator = function() { - return this.setValidator(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.GetValidatorResponse.prototype.hasValidator = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetPublicKeyRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetPublicKeyRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetPublicKeyRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetPublicKeyRequest.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetPublicKeyRequest} - */ -proto.pactus.GetPublicKeyRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetPublicKeyRequest; - return proto.pactus.GetPublicKeyRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetPublicKeyRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetPublicKeyRequest} - */ -proto.pactus.GetPublicKeyRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetPublicKeyRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetPublicKeyRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetPublicKeyRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetPublicKeyRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.pactus.GetPublicKeyRequest.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetPublicKeyRequest} returns this - */ -proto.pactus.GetPublicKeyRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetPublicKeyResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetPublicKeyResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetPublicKeyResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetPublicKeyResponse.toObject = function(includeInstance, msg) { - var f, obj = { - publicKey: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetPublicKeyResponse} - */ -proto.pactus.GetPublicKeyResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetPublicKeyResponse; - return proto.pactus.GetPublicKeyResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetPublicKeyResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetPublicKeyResponse} - */ -proto.pactus.GetPublicKeyResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetPublicKeyResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetPublicKeyResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetPublicKeyResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetPublicKeyResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPublicKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string public_key = 1; - * @return {string} - */ -proto.pactus.GetPublicKeyResponse.prototype.getPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetPublicKeyResponse} returns this - */ -proto.pactus.GetPublicKeyResponse.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetBlockRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetBlockRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetBlockRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockRequest.toObject = function(includeInstance, msg) { - var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - verbosity: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetBlockRequest} - */ -proto.pactus.GetBlockRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetBlockRequest; - return proto.pactus.GetBlockRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetBlockRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetBlockRequest} - */ -proto.pactus.GetBlockRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeight(value); - break; - case 2: - var value = /** @type {!proto.pactus.BlockVerbosity} */ (reader.readEnum()); - msg.setVerbosity(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetBlockRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetBlockRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetBlockRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getVerbosity(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * optional uint32 height = 1; - * @return {number} - */ -proto.pactus.GetBlockRequest.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockRequest} returns this - */ -proto.pactus.GetBlockRequest.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional BlockVerbosity verbosity = 2; - * @return {!proto.pactus.BlockVerbosity} - */ -proto.pactus.GetBlockRequest.prototype.getVerbosity = function() { - return /** @type {!proto.pactus.BlockVerbosity} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.pactus.BlockVerbosity} value - * @return {!proto.pactus.GetBlockRequest} returns this - */ -proto.pactus.GetBlockRequest.prototype.setVerbosity = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.GetBlockResponse.repeatedFields_ = [7]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetBlockResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetBlockResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetBlockResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockResponse.toObject = function(includeInstance, msg) { - var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - hash: jspb.Message.getFieldWithDefault(msg, 2, ""), - data: jspb.Message.getFieldWithDefault(msg, 3, ""), - blockTime: jspb.Message.getFieldWithDefault(msg, 4, 0), - header: (f = msg.getHeader()) && proto.pactus.BlockHeaderInfo.toObject(includeInstance, f), - prevCert: (f = msg.getPrevCert()) && proto.pactus.CertificateInfo.toObject(includeInstance, f), - txsList: jspb.Message.toObjectList(msg.getTxsList(), - transaction_pb.TransactionInfo.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetBlockResponse} - */ -proto.pactus.GetBlockResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetBlockResponse; - return proto.pactus.GetBlockResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetBlockResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetBlockResponse} - */ -proto.pactus.GetBlockResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeight(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setData(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBlockTime(value); - break; - case 5: - var value = new proto.pactus.BlockHeaderInfo; - reader.readMessage(value,proto.pactus.BlockHeaderInfo.deserializeBinaryFromReader); - msg.setHeader(value); - break; - case 6: - var value = new proto.pactus.CertificateInfo; - reader.readMessage(value,proto.pactus.CertificateInfo.deserializeBinaryFromReader); - msg.setPrevCert(value); - break; - case 7: - var value = new transaction_pb.TransactionInfo; - reader.readMessage(value,transaction_pb.TransactionInfo.deserializeBinaryFromReader); - msg.addTxs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetBlockResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetBlockResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetBlockResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getData(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getBlockTime(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getHeader(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.pactus.BlockHeaderInfo.serializeBinaryToWriter - ); - } - f = message.getPrevCert(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.pactus.CertificateInfo.serializeBinaryToWriter - ); - } - f = message.getTxsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - transaction_pb.TransactionInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint32 height = 1; - * @return {number} - */ -proto.pactus.GetBlockResponse.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockResponse} returns this - */ -proto.pactus.GetBlockResponse.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string hash = 2; - * @return {string} - */ -proto.pactus.GetBlockResponse.prototype.getHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetBlockResponse} returns this - */ -proto.pactus.GetBlockResponse.prototype.setHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string data = 3; - * @return {string} - */ -proto.pactus.GetBlockResponse.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetBlockResponse} returns this - */ -proto.pactus.GetBlockResponse.prototype.setData = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint32 block_time = 4; - * @return {number} - */ -proto.pactus.GetBlockResponse.prototype.getBlockTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockResponse} returns this - */ -proto.pactus.GetBlockResponse.prototype.setBlockTime = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional BlockHeaderInfo header = 5; - * @return {?proto.pactus.BlockHeaderInfo} - */ -proto.pactus.GetBlockResponse.prototype.getHeader = function() { - return /** @type{?proto.pactus.BlockHeaderInfo} */ ( - jspb.Message.getWrapperField(this, proto.pactus.BlockHeaderInfo, 5)); -}; - - -/** - * @param {?proto.pactus.BlockHeaderInfo|undefined} value - * @return {!proto.pactus.GetBlockResponse} returns this -*/ -proto.pactus.GetBlockResponse.prototype.setHeader = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.GetBlockResponse} returns this - */ -proto.pactus.GetBlockResponse.prototype.clearHeader = function() { - return this.setHeader(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.GetBlockResponse.prototype.hasHeader = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional CertificateInfo prev_cert = 6; - * @return {?proto.pactus.CertificateInfo} - */ -proto.pactus.GetBlockResponse.prototype.getPrevCert = function() { - return /** @type{?proto.pactus.CertificateInfo} */ ( - jspb.Message.getWrapperField(this, proto.pactus.CertificateInfo, 6)); -}; - - -/** - * @param {?proto.pactus.CertificateInfo|undefined} value - * @return {!proto.pactus.GetBlockResponse} returns this -*/ -proto.pactus.GetBlockResponse.prototype.setPrevCert = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.GetBlockResponse} returns this - */ -proto.pactus.GetBlockResponse.prototype.clearPrevCert = function() { - return this.setPrevCert(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.GetBlockResponse.prototype.hasPrevCert = function() { - return jspb.Message.getField(this, 6) != null; -}; - - -/** - * repeated TransactionInfo txs = 7; - * @return {!Array} - */ -proto.pactus.GetBlockResponse.prototype.getTxsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, transaction_pb.TransactionInfo, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.GetBlockResponse} returns this -*/ -proto.pactus.GetBlockResponse.prototype.setTxsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.pactus.TransactionInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.pactus.TransactionInfo} - */ -proto.pactus.GetBlockResponse.prototype.addTxs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.pactus.TransactionInfo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.GetBlockResponse} returns this - */ -proto.pactus.GetBlockResponse.prototype.clearTxsList = function() { - return this.setTxsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetBlockHashRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetBlockHashRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetBlockHashRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockHashRequest.toObject = function(includeInstance, msg) { - var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetBlockHashRequest} - */ -proto.pactus.GetBlockHashRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetBlockHashRequest; - return proto.pactus.GetBlockHashRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetBlockHashRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetBlockHashRequest} - */ -proto.pactus.GetBlockHashRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetBlockHashRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetBlockHashRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetBlockHashRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockHashRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } -}; - - -/** - * optional uint32 height = 1; - * @return {number} - */ -proto.pactus.GetBlockHashRequest.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockHashRequest} returns this - */ -proto.pactus.GetBlockHashRequest.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetBlockHashResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetBlockHashResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetBlockHashResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockHashResponse.toObject = function(includeInstance, msg) { - var f, obj = { - hash: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetBlockHashResponse} - */ -proto.pactus.GetBlockHashResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetBlockHashResponse; - return proto.pactus.GetBlockHashResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetBlockHashResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetBlockHashResponse} - */ -proto.pactus.GetBlockHashResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetBlockHashResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetBlockHashResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetBlockHashResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockHashResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string hash = 1; - * @return {string} - */ -proto.pactus.GetBlockHashResponse.prototype.getHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetBlockHashResponse} returns this - */ -proto.pactus.GetBlockHashResponse.prototype.setHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetBlockHeightRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetBlockHeightRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetBlockHeightRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockHeightRequest.toObject = function(includeInstance, msg) { - var f, obj = { - hash: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetBlockHeightRequest} - */ -proto.pactus.GetBlockHeightRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetBlockHeightRequest; - return proto.pactus.GetBlockHeightRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetBlockHeightRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetBlockHeightRequest} - */ -proto.pactus.GetBlockHeightRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setHash(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetBlockHeightRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetBlockHeightRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetBlockHeightRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockHeightRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string hash = 1; - * @return {string} - */ -proto.pactus.GetBlockHeightRequest.prototype.getHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetBlockHeightRequest} returns this - */ -proto.pactus.GetBlockHeightRequest.prototype.setHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetBlockHeightResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetBlockHeightResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetBlockHeightResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockHeightResponse.toObject = function(includeInstance, msg) { - var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetBlockHeightResponse} - */ -proto.pactus.GetBlockHeightResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetBlockHeightResponse; - return proto.pactus.GetBlockHeightResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetBlockHeightResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetBlockHeightResponse} - */ -proto.pactus.GetBlockHeightResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeight(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetBlockHeightResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetBlockHeightResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetBlockHeightResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockHeightResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } -}; - - -/** - * optional uint32 height = 1; - * @return {number} - */ -proto.pactus.GetBlockHeightResponse.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockHeightResponse} returns this - */ -proto.pactus.GetBlockHeightResponse.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetBlockchainInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetBlockchainInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetBlockchainInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockchainInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetBlockchainInfoRequest} - */ -proto.pactus.GetBlockchainInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetBlockchainInfoRequest; - return proto.pactus.GetBlockchainInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetBlockchainInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetBlockchainInfoRequest} - */ -proto.pactus.GetBlockchainInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetBlockchainInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetBlockchainInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetBlockchainInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockchainInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.GetBlockchainInfoResponse.repeatedFields_ = [7]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetBlockchainInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetBlockchainInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockchainInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - lastBlockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), - lastBlockHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - totalAccounts: jspb.Message.getFieldWithDefault(msg, 3, 0), - totalValidators: jspb.Message.getFieldWithDefault(msg, 4, 0), - totalPower: jspb.Message.getFieldWithDefault(msg, 5, 0), - committeePower: jspb.Message.getFieldWithDefault(msg, 6, 0), - committeeValidatorsList: jspb.Message.toObjectList(msg.getCommitteeValidatorsList(), - proto.pactus.ValidatorInfo.toObject, includeInstance), - isPruned: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - pruningHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), - lastBlockTime: jspb.Message.getFieldWithDefault(msg, 10, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetBlockchainInfoResponse} - */ -proto.pactus.GetBlockchainInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetBlockchainInfoResponse; - return proto.pactus.GetBlockchainInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetBlockchainInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetBlockchainInfoResponse} - */ -proto.pactus.GetBlockchainInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastBlockHeight(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setLastBlockHash(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTotalAccounts(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTotalValidators(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalPower(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCommitteePower(value); - break; - case 7: - var value = new proto.pactus.ValidatorInfo; - reader.readMessage(value,proto.pactus.ValidatorInfo.deserializeBinaryFromReader); - msg.addCommitteeValidators(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsPruned(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint32()); - msg.setPruningHeight(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLastBlockTime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetBlockchainInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetBlockchainInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetBlockchainInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLastBlockHeight(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getLastBlockHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTotalAccounts(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getTotalValidators(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getTotalPower(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getCommitteePower(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getCommitteeValidatorsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.pactus.ValidatorInfo.serializeBinaryToWriter - ); - } - f = message.getIsPruned(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getPruningHeight(); - if (f !== 0) { - writer.writeUint32( - 9, - f - ); - } - f = message.getLastBlockTime(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } -}; - - -/** - * optional uint32 last_block_height = 1; - * @return {number} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.getLastBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this - */ -proto.pactus.GetBlockchainInfoResponse.prototype.setLastBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string last_block_hash = 2; - * @return {string} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.getLastBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this - */ -proto.pactus.GetBlockchainInfoResponse.prototype.setLastBlockHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int32 total_accounts = 3; - * @return {number} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.getTotalAccounts = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this - */ -proto.pactus.GetBlockchainInfoResponse.prototype.setTotalAccounts = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 total_validators = 4; - * @return {number} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.getTotalValidators = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this - */ -proto.pactus.GetBlockchainInfoResponse.prototype.setTotalValidators = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 total_power = 5; - * @return {number} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.getTotalPower = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this - */ -proto.pactus.GetBlockchainInfoResponse.prototype.setTotalPower = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 committee_power = 6; - * @return {number} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.getCommitteePower = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this - */ -proto.pactus.GetBlockchainInfoResponse.prototype.setCommitteePower = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * repeated ValidatorInfo committee_validators = 7; - * @return {!Array} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.getCommitteeValidatorsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.pactus.ValidatorInfo, 7)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this -*/ -proto.pactus.GetBlockchainInfoResponse.prototype.setCommitteeValidatorsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); -}; - - -/** - * @param {!proto.pactus.ValidatorInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.pactus.ValidatorInfo} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.addCommitteeValidators = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.pactus.ValidatorInfo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this - */ -proto.pactus.GetBlockchainInfoResponse.prototype.clearCommitteeValidatorsList = function() { - return this.setCommitteeValidatorsList([]); -}; - - -/** - * optional bool is_pruned = 8; - * @return {boolean} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.getIsPruned = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this - */ -proto.pactus.GetBlockchainInfoResponse.prototype.setIsPruned = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - -/** - * optional uint32 pruning_height = 9; - * @return {number} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.getPruningHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this - */ -proto.pactus.GetBlockchainInfoResponse.prototype.setPruningHeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 last_block_time = 10; - * @return {number} - */ -proto.pactus.GetBlockchainInfoResponse.prototype.getLastBlockTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetBlockchainInfoResponse} returns this - */ -proto.pactus.GetBlockchainInfoResponse.prototype.setLastBlockTime = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetConsensusInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetConsensusInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetConsensusInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetConsensusInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetConsensusInfoRequest} - */ -proto.pactus.GetConsensusInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetConsensusInfoRequest; - return proto.pactus.GetConsensusInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetConsensusInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetConsensusInfoRequest} - */ -proto.pactus.GetConsensusInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetConsensusInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetConsensusInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetConsensusInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetConsensusInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.GetConsensusInfoResponse.repeatedFields_ = [2]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetConsensusInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetConsensusInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetConsensusInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetConsensusInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - proposal: (f = msg.getProposal()) && proto.pactus.Proposal.toObject(includeInstance, f), - instancesList: jspb.Message.toObjectList(msg.getInstancesList(), - proto.pactus.ConsensusInfo.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetConsensusInfoResponse} - */ -proto.pactus.GetConsensusInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetConsensusInfoResponse; - return proto.pactus.GetConsensusInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetConsensusInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetConsensusInfoResponse} - */ -proto.pactus.GetConsensusInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.pactus.Proposal; - reader.readMessage(value,proto.pactus.Proposal.deserializeBinaryFromReader); - msg.setProposal(value); - break; - case 2: - var value = new proto.pactus.ConsensusInfo; - reader.readMessage(value,proto.pactus.ConsensusInfo.deserializeBinaryFromReader); - msg.addInstances(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetConsensusInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetConsensusInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetConsensusInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetConsensusInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getProposal(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.pactus.Proposal.serializeBinaryToWriter - ); - } - f = message.getInstancesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.pactus.ConsensusInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Proposal proposal = 1; - * @return {?proto.pactus.Proposal} - */ -proto.pactus.GetConsensusInfoResponse.prototype.getProposal = function() { - return /** @type{?proto.pactus.Proposal} */ ( - jspb.Message.getWrapperField(this, proto.pactus.Proposal, 1)); -}; - - -/** - * @param {?proto.pactus.Proposal|undefined} value - * @return {!proto.pactus.GetConsensusInfoResponse} returns this -*/ -proto.pactus.GetConsensusInfoResponse.prototype.setProposal = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.GetConsensusInfoResponse} returns this - */ -proto.pactus.GetConsensusInfoResponse.prototype.clearProposal = function() { - return this.setProposal(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.GetConsensusInfoResponse.prototype.hasProposal = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated ConsensusInfo instances = 2; - * @return {!Array} - */ -proto.pactus.GetConsensusInfoResponse.prototype.getInstancesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.pactus.ConsensusInfo, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.GetConsensusInfoResponse} returns this -*/ -proto.pactus.GetConsensusInfoResponse.prototype.setInstancesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.pactus.ConsensusInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.pactus.ConsensusInfo} - */ -proto.pactus.GetConsensusInfoResponse.prototype.addInstances = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.pactus.ConsensusInfo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.GetConsensusInfoResponse} returns this - */ -proto.pactus.GetConsensusInfoResponse.prototype.clearInstancesList = function() { - return this.setInstancesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetTxPoolContentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetTxPoolContentRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetTxPoolContentRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTxPoolContentRequest.toObject = function(includeInstance, msg) { - var f, obj = { - payloadType: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetTxPoolContentRequest} - */ -proto.pactus.GetTxPoolContentRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetTxPoolContentRequest; - return proto.pactus.GetTxPoolContentRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetTxPoolContentRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetTxPoolContentRequest} - */ -proto.pactus.GetTxPoolContentRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.pactus.PayloadType} */ (reader.readEnum()); - msg.setPayloadType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetTxPoolContentRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetTxPoolContentRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetTxPoolContentRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTxPoolContentRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPayloadType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } -}; - - -/** - * optional PayloadType payload_type = 1; - * @return {!proto.pactus.PayloadType} - */ -proto.pactus.GetTxPoolContentRequest.prototype.getPayloadType = function() { - return /** @type {!proto.pactus.PayloadType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.pactus.PayloadType} value - * @return {!proto.pactus.GetTxPoolContentRequest} returns this - */ -proto.pactus.GetTxPoolContentRequest.prototype.setPayloadType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.GetTxPoolContentResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetTxPoolContentResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetTxPoolContentResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetTxPoolContentResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTxPoolContentResponse.toObject = function(includeInstance, msg) { - var f, obj = { - txsList: jspb.Message.toObjectList(msg.getTxsList(), - transaction_pb.TransactionInfo.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetTxPoolContentResponse} - */ -proto.pactus.GetTxPoolContentResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetTxPoolContentResponse; - return proto.pactus.GetTxPoolContentResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetTxPoolContentResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetTxPoolContentResponse} - */ -proto.pactus.GetTxPoolContentResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new transaction_pb.TransactionInfo; - reader.readMessage(value,transaction_pb.TransactionInfo.deserializeBinaryFromReader); - msg.addTxs(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetTxPoolContentResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetTxPoolContentResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetTxPoolContentResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTxPoolContentResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTxsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - transaction_pb.TransactionInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated TransactionInfo txs = 1; - * @return {!Array} - */ -proto.pactus.GetTxPoolContentResponse.prototype.getTxsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, transaction_pb.TransactionInfo, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.GetTxPoolContentResponse} returns this -*/ -proto.pactus.GetTxPoolContentResponse.prototype.setTxsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.pactus.TransactionInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.pactus.TransactionInfo} - */ -proto.pactus.GetTxPoolContentResponse.prototype.addTxs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pactus.TransactionInfo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.GetTxPoolContentResponse} returns this - */ -proto.pactus.GetTxPoolContentResponse.prototype.clearTxsList = function() { - return this.setTxsList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.ValidatorInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.ValidatorInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.ValidatorInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.ValidatorInfo.toObject = function(includeInstance, msg) { - var f, obj = { - hash: jspb.Message.getFieldWithDefault(msg, 1, ""), - data: jspb.Message.getFieldWithDefault(msg, 2, ""), - publicKey: jspb.Message.getFieldWithDefault(msg, 3, ""), - number: jspb.Message.getFieldWithDefault(msg, 4, 0), - stake: jspb.Message.getFieldWithDefault(msg, 5, 0), - lastBondingHeight: jspb.Message.getFieldWithDefault(msg, 6, 0), - lastSortitionHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), - unbondingHeight: jspb.Message.getFieldWithDefault(msg, 8, 0), - address: jspb.Message.getFieldWithDefault(msg, 9, ""), - availabilityScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.ValidatorInfo} - */ -proto.pactus.ValidatorInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.ValidatorInfo; - return proto.pactus.ValidatorInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.ValidatorInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.ValidatorInfo} - */ -proto.pactus.ValidatorInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setData(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumber(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStake(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastBondingHeight(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLastSortitionHeight(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setUnbondingHeight(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 10: - var value = /** @type {number} */ (reader.readDouble()); - msg.setAvailabilityScore(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.ValidatorInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.ValidatorInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.ValidatorInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.ValidatorInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPublicKey(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getNumber(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getStake(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getLastBondingHeight(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } - f = message.getLastSortitionHeight(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getUnbondingHeight(); - if (f !== 0) { - writer.writeUint32( - 8, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getAvailabilityScore(); - if (f !== 0.0) { - writer.writeDouble( - 10, - f - ); - } -}; - - -/** - * optional string hash = 1; - * @return {string} - */ -proto.pactus.ValidatorInfo.prototype.getHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.ValidatorInfo} returns this - */ -proto.pactus.ValidatorInfo.prototype.setHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string data = 2; - * @return {string} - */ -proto.pactus.ValidatorInfo.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.ValidatorInfo} returns this - */ -proto.pactus.ValidatorInfo.prototype.setData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string public_key = 3; - * @return {string} - */ -proto.pactus.ValidatorInfo.prototype.getPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.ValidatorInfo} returns this - */ -proto.pactus.ValidatorInfo.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int32 number = 4; - * @return {number} - */ -proto.pactus.ValidatorInfo.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ValidatorInfo} returns this - */ -proto.pactus.ValidatorInfo.prototype.setNumber = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 stake = 5; - * @return {number} - */ -proto.pactus.ValidatorInfo.prototype.getStake = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ValidatorInfo} returns this - */ -proto.pactus.ValidatorInfo.prototype.setStake = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint32 last_bonding_height = 6; - * @return {number} - */ -proto.pactus.ValidatorInfo.prototype.getLastBondingHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ValidatorInfo} returns this - */ -proto.pactus.ValidatorInfo.prototype.setLastBondingHeight = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional uint32 last_sortition_height = 7; - * @return {number} - */ -proto.pactus.ValidatorInfo.prototype.getLastSortitionHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ValidatorInfo} returns this - */ -proto.pactus.ValidatorInfo.prototype.setLastSortitionHeight = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional uint32 unbonding_height = 8; - * @return {number} - */ -proto.pactus.ValidatorInfo.prototype.getUnbondingHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ValidatorInfo} returns this - */ -proto.pactus.ValidatorInfo.prototype.setUnbondingHeight = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); -}; - - -/** - * optional string address = 9; - * @return {string} - */ -proto.pactus.ValidatorInfo.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.ValidatorInfo} returns this - */ -proto.pactus.ValidatorInfo.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - -/** - * optional double availability_score = 10; - * @return {number} - */ -proto.pactus.ValidatorInfo.prototype.getAvailabilityScore = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ValidatorInfo} returns this - */ -proto.pactus.ValidatorInfo.prototype.setAvailabilityScore = function(value) { - return jspb.Message.setProto3FloatField(this, 10, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.AccountInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.AccountInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.AccountInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.AccountInfo.toObject = function(includeInstance, msg) { - var f, obj = { - hash: jspb.Message.getFieldWithDefault(msg, 1, ""), - data: jspb.Message.getFieldWithDefault(msg, 2, ""), - number: jspb.Message.getFieldWithDefault(msg, 3, 0), - balance: jspb.Message.getFieldWithDefault(msg, 4, 0), - address: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.AccountInfo} - */ -proto.pactus.AccountInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.AccountInfo; - return proto.pactus.AccountInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.AccountInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.AccountInfo} - */ -proto.pactus.AccountInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setData(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNumber(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setBalance(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.AccountInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.AccountInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.AccountInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.AccountInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getNumber(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getBalance(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional string hash = 1; - * @return {string} - */ -proto.pactus.AccountInfo.prototype.getHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.AccountInfo} returns this - */ -proto.pactus.AccountInfo.prototype.setHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string data = 2; - * @return {string} - */ -proto.pactus.AccountInfo.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.AccountInfo} returns this - */ -proto.pactus.AccountInfo.prototype.setData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int32 number = 3; - * @return {number} - */ -proto.pactus.AccountInfo.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.AccountInfo} returns this - */ -proto.pactus.AccountInfo.prototype.setNumber = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 balance = 4; - * @return {number} - */ -proto.pactus.AccountInfo.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.AccountInfo} returns this - */ -proto.pactus.AccountInfo.prototype.setBalance = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string address = 5; - * @return {string} - */ -proto.pactus.AccountInfo.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.AccountInfo} returns this - */ -proto.pactus.AccountInfo.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.BlockHeaderInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.BlockHeaderInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.BlockHeaderInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.BlockHeaderInfo.toObject = function(includeInstance, msg) { - var f, obj = { - version: jspb.Message.getFieldWithDefault(msg, 1, 0), - prevBlockHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - stateRoot: jspb.Message.getFieldWithDefault(msg, 3, ""), - sortitionSeed: jspb.Message.getFieldWithDefault(msg, 4, ""), - proposerAddress: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.BlockHeaderInfo} - */ -proto.pactus.BlockHeaderInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.BlockHeaderInfo; - return proto.pactus.BlockHeaderInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.BlockHeaderInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.BlockHeaderInfo} - */ -proto.pactus.BlockHeaderInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setVersion(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPrevBlockHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setStateRoot(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSortitionSeed(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setProposerAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.BlockHeaderInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.BlockHeaderInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.BlockHeaderInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.BlockHeaderInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersion(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getPrevBlockHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getStateRoot(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSortitionSeed(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getProposerAddress(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional int32 version = 1; - * @return {number} - */ -proto.pactus.BlockHeaderInfo.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.BlockHeaderInfo} returns this - */ -proto.pactus.BlockHeaderInfo.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string prev_block_hash = 2; - * @return {string} - */ -proto.pactus.BlockHeaderInfo.prototype.getPrevBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.BlockHeaderInfo} returns this - */ -proto.pactus.BlockHeaderInfo.prototype.setPrevBlockHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string state_root = 3; - * @return {string} - */ -proto.pactus.BlockHeaderInfo.prototype.getStateRoot = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.BlockHeaderInfo} returns this - */ -proto.pactus.BlockHeaderInfo.prototype.setStateRoot = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string sortition_seed = 4; - * @return {string} - */ -proto.pactus.BlockHeaderInfo.prototype.getSortitionSeed = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.BlockHeaderInfo} returns this - */ -proto.pactus.BlockHeaderInfo.prototype.setSortitionSeed = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string proposer_address = 5; - * @return {string} - */ -proto.pactus.BlockHeaderInfo.prototype.getProposerAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.BlockHeaderInfo} returns this - */ -proto.pactus.BlockHeaderInfo.prototype.setProposerAddress = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.CertificateInfo.repeatedFields_ = [3,4]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.CertificateInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.CertificateInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.CertificateInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.CertificateInfo.toObject = function(includeInstance, msg) { - var f, obj = { - hash: jspb.Message.getFieldWithDefault(msg, 1, ""), - round: jspb.Message.getFieldWithDefault(msg, 2, 0), - committersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, - absenteesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, - signature: jspb.Message.getFieldWithDefault(msg, 5, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.CertificateInfo} - */ -proto.pactus.CertificateInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.CertificateInfo; - return proto.pactus.CertificateInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.CertificateInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.CertificateInfo} - */ -proto.pactus.CertificateInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRound(value); - break; - case 3: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); - for (var i = 0; i < values.length; i++) { - msg.addCommitters(values[i]); - } - break; - case 4: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); - for (var i = 0; i < values.length; i++) { - msg.addAbsentees(values[i]); - } - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.CertificateInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.CertificateInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.CertificateInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.CertificateInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRound(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getCommittersList(); - if (f.length > 0) { - writer.writePackedInt32( - 3, - f - ); - } - f = message.getAbsenteesList(); - if (f.length > 0) { - writer.writePackedInt32( - 4, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional string hash = 1; - * @return {string} - */ -proto.pactus.CertificateInfo.prototype.getHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.CertificateInfo} returns this - */ -proto.pactus.CertificateInfo.prototype.setHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int32 round = 2; - * @return {number} - */ -proto.pactus.CertificateInfo.prototype.getRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.CertificateInfo} returns this - */ -proto.pactus.CertificateInfo.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * repeated int32 committers = 3; - * @return {!Array} - */ -proto.pactus.CertificateInfo.prototype.getCommittersList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.CertificateInfo} returns this - */ -proto.pactus.CertificateInfo.prototype.setCommittersList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.pactus.CertificateInfo} returns this - */ -proto.pactus.CertificateInfo.prototype.addCommitters = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.CertificateInfo} returns this - */ -proto.pactus.CertificateInfo.prototype.clearCommittersList = function() { - return this.setCommittersList([]); -}; - - -/** - * repeated int32 absentees = 4; - * @return {!Array} - */ -proto.pactus.CertificateInfo.prototype.getAbsenteesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.CertificateInfo} returns this - */ -proto.pactus.CertificateInfo.prototype.setAbsenteesList = function(value) { - return jspb.Message.setField(this, 4, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.pactus.CertificateInfo} returns this - */ -proto.pactus.CertificateInfo.prototype.addAbsentees = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.CertificateInfo} returns this - */ -proto.pactus.CertificateInfo.prototype.clearAbsenteesList = function() { - return this.setAbsenteesList([]); -}; - - -/** - * optional string signature = 5; - * @return {string} - */ -proto.pactus.CertificateInfo.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.CertificateInfo} returns this - */ -proto.pactus.CertificateInfo.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.VoteInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.VoteInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.VoteInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.VoteInfo.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - voter: jspb.Message.getFieldWithDefault(msg, 2, ""), - blockHash: jspb.Message.getFieldWithDefault(msg, 3, ""), - round: jspb.Message.getFieldWithDefault(msg, 4, 0), - cpRound: jspb.Message.getFieldWithDefault(msg, 5, 0), - cpValue: jspb.Message.getFieldWithDefault(msg, 6, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.VoteInfo} - */ -proto.pactus.VoteInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.VoteInfo; - return proto.pactus.VoteInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.VoteInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.VoteInfo} - */ -proto.pactus.VoteInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.pactus.VoteType} */ (reader.readEnum()); - msg.setType(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setVoter(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setBlockHash(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRound(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCpRound(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCpValue(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.VoteInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.VoteInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.VoteInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.VoteInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getVoter(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getBlockHash(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getRound(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getCpRound(); - if (f !== 0) { - writer.writeInt32( - 5, - f - ); - } - f = message.getCpValue(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } -}; - - -/** - * optional VoteType type = 1; - * @return {!proto.pactus.VoteType} - */ -proto.pactus.VoteInfo.prototype.getType = function() { - return /** @type {!proto.pactus.VoteType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.pactus.VoteType} value - * @return {!proto.pactus.VoteInfo} returns this - */ -proto.pactus.VoteInfo.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string voter = 2; - * @return {string} - */ -proto.pactus.VoteInfo.prototype.getVoter = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.VoteInfo} returns this - */ -proto.pactus.VoteInfo.prototype.setVoter = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string block_hash = 3; - * @return {string} - */ -proto.pactus.VoteInfo.prototype.getBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.VoteInfo} returns this - */ -proto.pactus.VoteInfo.prototype.setBlockHash = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int32 round = 4; - * @return {number} - */ -proto.pactus.VoteInfo.prototype.getRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.VoteInfo} returns this - */ -proto.pactus.VoteInfo.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int32 cp_round = 5; - * @return {number} - */ -proto.pactus.VoteInfo.prototype.getCpRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.VoteInfo} returns this - */ -proto.pactus.VoteInfo.prototype.setCpRound = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int32 cp_value = 6; - * @return {number} - */ -proto.pactus.VoteInfo.prototype.getCpValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.VoteInfo} returns this - */ -proto.pactus.VoteInfo.prototype.setCpValue = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.ConsensusInfo.repeatedFields_ = [5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.ConsensusInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.ConsensusInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.ConsensusInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.ConsensusInfo.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - active: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - height: jspb.Message.getFieldWithDefault(msg, 3, 0), - round: jspb.Message.getFieldWithDefault(msg, 4, 0), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - proto.pactus.VoteInfo.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.ConsensusInfo} - */ -proto.pactus.ConsensusInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.ConsensusInfo; - return proto.pactus.ConsensusInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.ConsensusInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.ConsensusInfo} - */ -proto.pactus.ConsensusInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setActive(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeight(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRound(value); - break; - case 5: - var value = new proto.pactus.VoteInfo; - reader.readMessage(value,proto.pactus.VoteInfo.deserializeBinaryFromReader); - msg.addVotes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.ConsensusInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.ConsensusInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.ConsensusInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.ConsensusInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getActive(); - if (f) { - writer.writeBool( - 2, - f - ); - } - f = message.getHeight(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } - f = message.getRound(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.pactus.VoteInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.pactus.ConsensusInfo.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.ConsensusInfo} returns this - */ -proto.pactus.ConsensusInfo.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bool active = 2; - * @return {boolean} - */ -proto.pactus.ConsensusInfo.prototype.getActive = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.pactus.ConsensusInfo} returns this - */ -proto.pactus.ConsensusInfo.prototype.setActive = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional uint32 height = 3; - * @return {number} - */ -proto.pactus.ConsensusInfo.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ConsensusInfo} returns this - */ -proto.pactus.ConsensusInfo.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 round = 4; - * @return {number} - */ -proto.pactus.ConsensusInfo.prototype.getRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ConsensusInfo} returns this - */ -proto.pactus.ConsensusInfo.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated VoteInfo votes = 5; - * @return {!Array} - */ -proto.pactus.ConsensusInfo.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.pactus.VoteInfo, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.ConsensusInfo} returns this -*/ -proto.pactus.ConsensusInfo.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.pactus.VoteInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.pactus.VoteInfo} - */ -proto.pactus.ConsensusInfo.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.pactus.VoteInfo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.ConsensusInfo} returns this - */ -proto.pactus.ConsensusInfo.prototype.clearVotesList = function() { - return this.setVotesList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.Proposal.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.Proposal.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.Proposal} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.Proposal.toObject = function(includeInstance, msg) { - var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - round: jspb.Message.getFieldWithDefault(msg, 2, 0), - blockData: jspb.Message.getFieldWithDefault(msg, 3, ""), - signatureData: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.Proposal} - */ -proto.pactus.Proposal.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.Proposal; - return proto.pactus.Proposal.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.Proposal} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.Proposal} - */ -proto.pactus.Proposal.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeight(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setRound(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setBlockData(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSignatureData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.Proposal.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.Proposal.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.Proposal} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.Proposal.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getRound(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getBlockData(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getSignatureData(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional uint32 height = 1; - * @return {number} - */ -proto.pactus.Proposal.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.Proposal} returns this - */ -proto.pactus.Proposal.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 round = 2; - * @return {number} - */ -proto.pactus.Proposal.prototype.getRound = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.Proposal} returns this - */ -proto.pactus.Proposal.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string block_data = 3; - * @return {string} - */ -proto.pactus.Proposal.prototype.getBlockData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.Proposal} returns this - */ -proto.pactus.Proposal.prototype.setBlockData = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string signature_data = 4; - * @return {string} - */ -proto.pactus.Proposal.prototype.getSignatureData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.Proposal} returns this - */ -proto.pactus.Proposal.prototype.setSignatureData = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * @enum {number} - */ -proto.pactus.BlockVerbosity = { - BLOCK_DATA: 0, - BLOCK_INFO: 1, - BLOCK_TRANSACTIONS: 2 -}; - -/** - * @enum {number} - */ -proto.pactus.VoteType = { - VOTE_UNKNOWN: 0, - VOTE_PREPARE: 1, - VOTE_PRECOMMIT: 2, - VOTE_CHANGE_PROPOSER: 3 -}; - -goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/js/network_grpc_pb.js b/www/grpc/gen/js/network_grpc_pb.js deleted file mode 100644 index 79757a3cf..000000000 --- a/www/grpc/gen/js/network_grpc_pb.js +++ /dev/null @@ -1,80 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('grpc'); -var network_pb = require('./network_pb.js'); - -function serialize_pactus_GetNetworkInfoRequest(arg) { - if (!(arg instanceof network_pb.GetNetworkInfoRequest)) { - throw new Error('Expected argument of type pactus.GetNetworkInfoRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetNetworkInfoRequest(buffer_arg) { - return network_pb.GetNetworkInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetNetworkInfoResponse(arg) { - if (!(arg instanceof network_pb.GetNetworkInfoResponse)) { - throw new Error('Expected argument of type pactus.GetNetworkInfoResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetNetworkInfoResponse(buffer_arg) { - return network_pb.GetNetworkInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetNodeInfoRequest(arg) { - if (!(arg instanceof network_pb.GetNodeInfoRequest)) { - throw new Error('Expected argument of type pactus.GetNodeInfoRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetNodeInfoRequest(buffer_arg) { - return network_pb.GetNodeInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetNodeInfoResponse(arg) { - if (!(arg instanceof network_pb.GetNodeInfoResponse)) { - throw new Error('Expected argument of type pactus.GetNodeInfoResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetNodeInfoResponse(buffer_arg) { - return network_pb.GetNodeInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Network service provides RPCs for retrieving information about the network. -var NetworkService = exports.NetworkService = { - // GetNetworkInfo retrieves information about the overall network. -getNetworkInfo: { - path: '/pactus.Network/GetNetworkInfo', - requestStream: false, - responseStream: false, - requestType: network_pb.GetNetworkInfoRequest, - responseType: network_pb.GetNetworkInfoResponse, - requestSerialize: serialize_pactus_GetNetworkInfoRequest, - requestDeserialize: deserialize_pactus_GetNetworkInfoRequest, - responseSerialize: serialize_pactus_GetNetworkInfoResponse, - responseDeserialize: deserialize_pactus_GetNetworkInfoResponse, - }, - // GetNodeInfo retrieves information about a specific node in the network. -getNodeInfo: { - path: '/pactus.Network/GetNodeInfo', - requestStream: false, - responseStream: false, - requestType: network_pb.GetNodeInfoRequest, - responseType: network_pb.GetNodeInfoResponse, - requestSerialize: serialize_pactus_GetNodeInfoRequest, - requestDeserialize: deserialize_pactus_GetNodeInfoRequest, - responseSerialize: serialize_pactus_GetNodeInfoResponse, - responseDeserialize: deserialize_pactus_GetNodeInfoResponse, - }, -}; - -exports.NetworkClient = grpc.makeGenericClientConstructor(NetworkService); diff --git a/www/grpc/gen/js/network_pb.js b/www/grpc/gen/js/network_pb.js deleted file mode 100644 index b761863d4..000000000 --- a/www/grpc/gen/js/network_pb.js +++ /dev/null @@ -1,2193 +0,0 @@ -// source: network.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.pactus.ConnectionInfo', null, global); -goog.exportSymbol('proto.pactus.GetNetworkInfoRequest', null, global); -goog.exportSymbol('proto.pactus.GetNetworkInfoResponse', null, global); -goog.exportSymbol('proto.pactus.GetNodeInfoRequest', null, global); -goog.exportSymbol('proto.pactus.GetNodeInfoResponse', null, global); -goog.exportSymbol('proto.pactus.PeerInfo', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetNetworkInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetNetworkInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetNetworkInfoRequest.displayName = 'proto.pactus.GetNetworkInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetNetworkInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetNetworkInfoResponse.repeatedFields_, null); -}; -goog.inherits(proto.pactus.GetNetworkInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetNetworkInfoResponse.displayName = 'proto.pactus.GetNetworkInfoResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetNodeInfoRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetNodeInfoRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetNodeInfoRequest.displayName = 'proto.pactus.GetNodeInfoRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetNodeInfoResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetNodeInfoResponse.repeatedFields_, null); -}; -goog.inherits(proto.pactus.GetNodeInfoResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetNodeInfoResponse.displayName = 'proto.pactus.GetNodeInfoResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.PeerInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.PeerInfo.repeatedFields_, null); -}; -goog.inherits(proto.pactus.PeerInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.PeerInfo.displayName = 'proto.pactus.PeerInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.ConnectionInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.ConnectionInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.ConnectionInfo.displayName = 'proto.pactus.ConnectionInfo'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetNetworkInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetNetworkInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetNetworkInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNetworkInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - onlyConnected: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetNetworkInfoRequest} - */ -proto.pactus.GetNetworkInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetNetworkInfoRequest; - return proto.pactus.GetNetworkInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetNetworkInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetNetworkInfoRequest} - */ -proto.pactus.GetNetworkInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOnlyConnected(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetNetworkInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetNetworkInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetNetworkInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNetworkInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getOnlyConnected(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool only_connected = 1; - * @return {boolean} - */ -proto.pactus.GetNetworkInfoRequest.prototype.getOnlyConnected = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.pactus.GetNetworkInfoRequest} returns this - */ -proto.pactus.GetNetworkInfoRequest.prototype.setOnlyConnected = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.GetNetworkInfoResponse.repeatedFields_ = [5]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetNetworkInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetNetworkInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetNetworkInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNetworkInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - networkName: jspb.Message.getFieldWithDefault(msg, 1, ""), - totalSentBytes: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalReceivedBytes: jspb.Message.getFieldWithDefault(msg, 3, 0), - connectedPeersCount: jspb.Message.getFieldWithDefault(msg, 4, 0), - connectedPeersList: jspb.Message.toObjectList(msg.getConnectedPeersList(), - proto.pactus.PeerInfo.toObject, includeInstance), - sentBytesMap: (f = msg.getSentBytesMap()) ? f.toObject(includeInstance, undefined) : [], - receivedBytesMap: (f = msg.getReceivedBytesMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetNetworkInfoResponse} - */ -proto.pactus.GetNetworkInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetNetworkInfoResponse; - return proto.pactus.GetNetworkInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetNetworkInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetNetworkInfoResponse} - */ -proto.pactus.GetNetworkInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNetworkName(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalSentBytes(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalReceivedBytes(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setConnectedPeersCount(value); - break; - case 5: - var value = new proto.pactus.PeerInfo; - reader.readMessage(value,proto.pactus.PeerInfo.deserializeBinaryFromReader); - msg.addConnectedPeers(value); - break; - case 6: - var value = msg.getSentBytesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readInt64, null, 0, 0); - }); - break; - case 7: - var value = msg.getReceivedBytesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readInt64, null, 0, 0); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetNetworkInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetNetworkInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetNetworkInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNetworkInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNetworkName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getTotalSentBytes(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getTotalReceivedBytes(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getConnectedPeersCount(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getConnectedPeersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.pactus.PeerInfo.serializeBinaryToWriter - ); - } - f = message.getSentBytesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getReceivedBytesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeInt64); - } -}; - - -/** - * optional string network_name = 1; - * @return {string} - */ -proto.pactus.GetNetworkInfoResponse.prototype.getNetworkName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetNetworkInfoResponse} returns this - */ -proto.pactus.GetNetworkInfoResponse.prototype.setNetworkName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 total_sent_bytes = 2; - * @return {number} - */ -proto.pactus.GetNetworkInfoResponse.prototype.getTotalSentBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetNetworkInfoResponse} returns this - */ -proto.pactus.GetNetworkInfoResponse.prototype.setTotalSentBytes = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional int64 total_received_bytes = 3; - * @return {number} - */ -proto.pactus.GetNetworkInfoResponse.prototype.getTotalReceivedBytes = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetNetworkInfoResponse} returns this - */ -proto.pactus.GetNetworkInfoResponse.prototype.setTotalReceivedBytes = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 connected_peers_count = 4; - * @return {number} - */ -proto.pactus.GetNetworkInfoResponse.prototype.getConnectedPeersCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetNetworkInfoResponse} returns this - */ -proto.pactus.GetNetworkInfoResponse.prototype.setConnectedPeersCount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * repeated PeerInfo connected_peers = 5; - * @return {!Array} - */ -proto.pactus.GetNetworkInfoResponse.prototype.getConnectedPeersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.pactus.PeerInfo, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.GetNetworkInfoResponse} returns this -*/ -proto.pactus.GetNetworkInfoResponse.prototype.setConnectedPeersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); -}; - - -/** - * @param {!proto.pactus.PeerInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.pactus.PeerInfo} - */ -proto.pactus.GetNetworkInfoResponse.prototype.addConnectedPeers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.pactus.PeerInfo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.GetNetworkInfoResponse} returns this - */ -proto.pactus.GetNetworkInfoResponse.prototype.clearConnectedPeersList = function() { - return this.setConnectedPeersList([]); -}; - - -/** - * map sent_bytes = 6; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.pactus.GetNetworkInfoResponse.prototype.getSentBytesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 6, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.pactus.GetNetworkInfoResponse} returns this - */ -proto.pactus.GetNetworkInfoResponse.prototype.clearSentBytesMap = function() { - this.getSentBytesMap().clear(); - return this; -}; - - -/** - * map received_bytes = 7; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.pactus.GetNetworkInfoResponse.prototype.getReceivedBytesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 7, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.pactus.GetNetworkInfoResponse} returns this - */ -proto.pactus.GetNetworkInfoResponse.prototype.clearReceivedBytesMap = function() { - this.getReceivedBytesMap().clear(); - return this; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetNodeInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetNodeInfoRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetNodeInfoRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNodeInfoRequest.toObject = function(includeInstance, msg) { - var f, obj = { - - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetNodeInfoRequest} - */ -proto.pactus.GetNodeInfoRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetNodeInfoRequest; - return proto.pactus.GetNodeInfoRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetNodeInfoRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetNodeInfoRequest} - */ -proto.pactus.GetNodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetNodeInfoRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetNodeInfoRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetNodeInfoRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNodeInfoRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.GetNodeInfoResponse.repeatedFields_ = [8,9]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetNodeInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetNodeInfoResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetNodeInfoResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNodeInfoResponse.toObject = function(includeInstance, msg) { - var f, obj = { - moniker: jspb.Message.getFieldWithDefault(msg, 1, ""), - agent: jspb.Message.getFieldWithDefault(msg, 2, ""), - peerId: jspb.Message.getFieldWithDefault(msg, 3, ""), - startedAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - reachability: jspb.Message.getFieldWithDefault(msg, 5, ""), - services: jspb.Message.getFieldWithDefault(msg, 6, 0), - servicesNames: jspb.Message.getFieldWithDefault(msg, 7, ""), - localAddrsList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, - protocolsList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f, - clockOffset: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0), - connectionInfo: (f = msg.getConnectionInfo()) && proto.pactus.ConnectionInfo.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetNodeInfoResponse} - */ -proto.pactus.GetNodeInfoResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetNodeInfoResponse; - return proto.pactus.GetNodeInfoResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetNodeInfoResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetNodeInfoResponse} - */ -proto.pactus.GetNodeInfoResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMoniker(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAgent(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPeerId(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartedAt(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setReachability(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setServices(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setServicesNames(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.addLocalAddrs(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.addProtocols(value); - break; - case 13: - var value = /** @type {number} */ (reader.readDouble()); - msg.setClockOffset(value); - break; - case 14: - var value = new proto.pactus.ConnectionInfo; - reader.readMessage(value,proto.pactus.ConnectionInfo.deserializeBinaryFromReader); - msg.setConnectionInfo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetNodeInfoResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetNodeInfoResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetNodeInfoResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNodeInfoResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMoniker(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAgent(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPeerId(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStartedAt(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getReachability(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getServices(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getServicesNames(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getLocalAddrsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 8, - f - ); - } - f = message.getProtocolsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 9, - f - ); - } - f = message.getClockOffset(); - if (f !== 0.0) { - writer.writeDouble( - 13, - f - ); - } - f = message.getConnectionInfo(); - if (f != null) { - writer.writeMessage( - 14, - f, - proto.pactus.ConnectionInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string moniker = 1; - * @return {string} - */ -proto.pactus.GetNodeInfoResponse.prototype.getMoniker = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.setMoniker = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string agent = 2; - * @return {string} - */ -proto.pactus.GetNodeInfoResponse.prototype.getAgent = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.setAgent = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string peer_id = 3; - * @return {string} - */ -proto.pactus.GetNodeInfoResponse.prototype.getPeerId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.setPeerId = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional uint64 started_at = 4; - * @return {number} - */ -proto.pactus.GetNodeInfoResponse.prototype.getStartedAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.setStartedAt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string reachability = 5; - * @return {string} - */ -proto.pactus.GetNodeInfoResponse.prototype.getReachability = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.setReachability = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional int32 services = 6; - * @return {number} - */ -proto.pactus.GetNodeInfoResponse.prototype.getServices = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.setServices = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional string services_names = 7; - * @return {string} - */ -proto.pactus.GetNodeInfoResponse.prototype.getServicesNames = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.setServicesNames = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * repeated string local_addrs = 8; - * @return {!Array} - */ -proto.pactus.GetNodeInfoResponse.prototype.getLocalAddrsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.setLocalAddrsList = function(value) { - return jspb.Message.setField(this, 8, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.addLocalAddrs = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 8, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.clearLocalAddrsList = function() { - return this.setLocalAddrsList([]); -}; - - -/** - * repeated string protocols = 9; - * @return {!Array} - */ -proto.pactus.GetNodeInfoResponse.prototype.getProtocolsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.setProtocolsList = function(value) { - return jspb.Message.setField(this, 9, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.addProtocols = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 9, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.clearProtocolsList = function() { - return this.setProtocolsList([]); -}; - - -/** - * optional double clock_offset = 13; - * @return {number} - */ -proto.pactus.GetNodeInfoResponse.prototype.getClockOffset = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.setClockOffset = function(value) { - return jspb.Message.setProto3FloatField(this, 13, value); -}; - - -/** - * optional ConnectionInfo connection_info = 14; - * @return {?proto.pactus.ConnectionInfo} - */ -proto.pactus.GetNodeInfoResponse.prototype.getConnectionInfo = function() { - return /** @type{?proto.pactus.ConnectionInfo} */ ( - jspb.Message.getWrapperField(this, proto.pactus.ConnectionInfo, 14)); -}; - - -/** - * @param {?proto.pactus.ConnectionInfo|undefined} value - * @return {!proto.pactus.GetNodeInfoResponse} returns this -*/ -proto.pactus.GetNodeInfoResponse.prototype.setConnectionInfo = function(value) { - return jspb.Message.setWrapperField(this, 14, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.GetNodeInfoResponse} returns this - */ -proto.pactus.GetNodeInfoResponse.prototype.clearConnectionInfo = function() { - return this.setConnectionInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.GetNodeInfoResponse.prototype.hasConnectionInfo = function() { - return jspb.Message.getField(this, 14) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.PeerInfo.repeatedFields_ = [5,6,18]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.PeerInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.PeerInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.PeerInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PeerInfo.toObject = function(includeInstance, msg) { - var f, obj = { - status: jspb.Message.getFieldWithDefault(msg, 1, 0), - moniker: jspb.Message.getFieldWithDefault(msg, 2, ""), - agent: jspb.Message.getFieldWithDefault(msg, 3, ""), - peerId: jspb.Message.getFieldWithDefault(msg, 4, ""), - consensusKeysList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, - consensusAddressesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, - services: jspb.Message.getFieldWithDefault(msg, 7, 0), - lastBlockHash: jspb.Message.getFieldWithDefault(msg, 8, ""), - height: jspb.Message.getFieldWithDefault(msg, 9, 0), - receivedBundles: jspb.Message.getFieldWithDefault(msg, 10, 0), - invalidBundles: jspb.Message.getFieldWithDefault(msg, 11, 0), - lastSent: jspb.Message.getFieldWithDefault(msg, 12, 0), - lastReceived: jspb.Message.getFieldWithDefault(msg, 13, 0), - sentBytesMap: (f = msg.getSentBytesMap()) ? f.toObject(includeInstance, undefined) : [], - receivedBytesMap: (f = msg.getReceivedBytesMap()) ? f.toObject(includeInstance, undefined) : [], - address: jspb.Message.getFieldWithDefault(msg, 16, ""), - direction: jspb.Message.getFieldWithDefault(msg, 17, ""), - protocolsList: (f = jspb.Message.getRepeatedField(msg, 18)) == null ? undefined : f, - totalSessions: jspb.Message.getFieldWithDefault(msg, 19, 0), - completedSessions: jspb.Message.getFieldWithDefault(msg, 20, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.PeerInfo} - */ -proto.pactus.PeerInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.PeerInfo; - return proto.pactus.PeerInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.PeerInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.PeerInfo} - */ -proto.pactus.PeerInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setStatus(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMoniker(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAgent(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPeerId(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.addConsensusKeys(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.addConsensusAddresses(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setServices(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setLastBlockHash(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint32()); - msg.setHeight(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt32()); - msg.setReceivedBundles(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt32()); - msg.setInvalidBundles(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLastSent(value); - break; - case 13: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLastReceived(value); - break; - case 14: - var value = msg.getSentBytesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readInt64, null, 0, 0); - }); - break; - case 15: - var value = msg.getReceivedBytesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readInt64, null, 0, 0); - }); - break; - case 16: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 17: - var value = /** @type {string} */ (reader.readString()); - msg.setDirection(value); - break; - case 18: - var value = /** @type {string} */ (reader.readString()); - msg.addProtocols(value); - break; - case 19: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTotalSessions(value); - break; - case 20: - var value = /** @type {number} */ (reader.readInt32()); - msg.setCompletedSessions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.PeerInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.PeerInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.PeerInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PeerInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStatus(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getMoniker(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAgent(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getPeerId(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getConsensusKeysList(); - if (f.length > 0) { - writer.writeRepeatedString( - 5, - f - ); - } - f = message.getConsensusAddressesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 6, - f - ); - } - f = message.getServices(); - if (f !== 0) { - writer.writeUint32( - 7, - f - ); - } - f = message.getLastBlockHash(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getHeight(); - if (f !== 0) { - writer.writeUint32( - 9, - f - ); - } - f = message.getReceivedBundles(); - if (f !== 0) { - writer.writeInt32( - 10, - f - ); - } - f = message.getInvalidBundles(); - if (f !== 0) { - writer.writeInt32( - 11, - f - ); - } - f = message.getLastSent(); - if (f !== 0) { - writer.writeInt64( - 12, - f - ); - } - f = message.getLastReceived(); - if (f !== 0) { - writer.writeInt64( - 13, - f - ); - } - f = message.getSentBytesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(14, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getReceivedBytesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(15, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeInt64); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 16, - f - ); - } - f = message.getDirection(); - if (f.length > 0) { - writer.writeString( - 17, - f - ); - } - f = message.getProtocolsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 18, - f - ); - } - f = message.getTotalSessions(); - if (f !== 0) { - writer.writeInt32( - 19, - f - ); - } - f = message.getCompletedSessions(); - if (f !== 0) { - writer.writeInt32( - 20, - f - ); - } -}; - - -/** - * optional int32 status = 1; - * @return {number} - */ -proto.pactus.PeerInfo.prototype.getStatus = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setStatus = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string moniker = 2; - * @return {string} - */ -proto.pactus.PeerInfo.prototype.getMoniker = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setMoniker = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string agent = 3; - * @return {string} - */ -proto.pactus.PeerInfo.prototype.getAgent = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setAgent = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string peer_id = 4; - * @return {string} - */ -proto.pactus.PeerInfo.prototype.getPeerId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setPeerId = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * repeated string consensus_keys = 5; - * @return {!Array} - */ -proto.pactus.PeerInfo.prototype.getConsensusKeysList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setConsensusKeysList = function(value) { - return jspb.Message.setField(this, 5, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.addConsensusKeys = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 5, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.clearConsensusKeysList = function() { - return this.setConsensusKeysList([]); -}; - - -/** - * repeated string consensus_addresses = 6; - * @return {!Array} - */ -proto.pactus.PeerInfo.prototype.getConsensusAddressesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setConsensusAddressesList = function(value) { - return jspb.Message.setField(this, 6, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.addConsensusAddresses = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 6, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.clearConsensusAddressesList = function() { - return this.setConsensusAddressesList([]); -}; - - -/** - * optional uint32 services = 7; - * @return {number} - */ -proto.pactus.PeerInfo.prototype.getServices = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setServices = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional string last_block_hash = 8; - * @return {string} - */ -proto.pactus.PeerInfo.prototype.getLastBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setLastBlockHash = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional uint32 height = 9; - * @return {number} - */ -proto.pactus.PeerInfo.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int32 received_bundles = 10; - * @return {number} - */ -proto.pactus.PeerInfo.prototype.getReceivedBundles = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setReceivedBundles = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional int32 invalid_bundles = 11; - * @return {number} - */ -proto.pactus.PeerInfo.prototype.getInvalidBundles = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setInvalidBundles = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional int64 last_sent = 12; - * @return {number} - */ -proto.pactus.PeerInfo.prototype.getLastSent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setLastSent = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -/** - * optional int64 last_received = 13; - * @return {number} - */ -proto.pactus.PeerInfo.prototype.getLastReceived = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setLastReceived = function(value) { - return jspb.Message.setProto3IntField(this, 13, value); -}; - - -/** - * map sent_bytes = 14; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.pactus.PeerInfo.prototype.getSentBytesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 14, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.clearSentBytesMap = function() { - this.getSentBytesMap().clear(); - return this; -}; - - -/** - * map received_bytes = 15; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.pactus.PeerInfo.prototype.getReceivedBytesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 15, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.clearReceivedBytesMap = function() { - this.getReceivedBytesMap().clear(); - return this; -}; - - -/** - * optional string address = 16; - * @return {string} - */ -proto.pactus.PeerInfo.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 16, value); -}; - - -/** - * optional string direction = 17; - * @return {string} - */ -proto.pactus.PeerInfo.prototype.getDirection = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setDirection = function(value) { - return jspb.Message.setProto3StringField(this, 17, value); -}; - - -/** - * repeated string protocols = 18; - * @return {!Array} - */ -proto.pactus.PeerInfo.prototype.getProtocolsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 18)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setProtocolsList = function(value) { - return jspb.Message.setField(this, 18, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.addProtocols = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 18, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.clearProtocolsList = function() { - return this.setProtocolsList([]); -}; - - -/** - * optional int32 total_sessions = 19; - * @return {number} - */ -proto.pactus.PeerInfo.prototype.getTotalSessions = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setTotalSessions = function(value) { - return jspb.Message.setProto3IntField(this, 19, value); -}; - - -/** - * optional int32 completed_sessions = 20; - * @return {number} - */ -proto.pactus.PeerInfo.prototype.getCompletedSessions = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PeerInfo} returns this - */ -proto.pactus.PeerInfo.prototype.setCompletedSessions = function(value) { - return jspb.Message.setProto3IntField(this, 20, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.ConnectionInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.ConnectionInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.ConnectionInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.ConnectionInfo.toObject = function(includeInstance, msg) { - var f, obj = { - connections: jspb.Message.getFieldWithDefault(msg, 1, 0), - inboundConnections: jspb.Message.getFieldWithDefault(msg, 2, 0), - outboundConnections: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.ConnectionInfo} - */ -proto.pactus.ConnectionInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.ConnectionInfo; - return proto.pactus.ConnectionInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.ConnectionInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.ConnectionInfo} - */ -proto.pactus.ConnectionInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setConnections(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setInboundConnections(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setOutboundConnections(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.ConnectionInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.ConnectionInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.ConnectionInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.ConnectionInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getConnections(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getInboundConnections(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } - f = message.getOutboundConnections(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } -}; - - -/** - * optional uint64 connections = 1; - * @return {number} - */ -proto.pactus.ConnectionInfo.prototype.getConnections = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ConnectionInfo} returns this - */ -proto.pactus.ConnectionInfo.prototype.setConnections = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 inbound_connections = 2; - * @return {number} - */ -proto.pactus.ConnectionInfo.prototype.getInboundConnections = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ConnectionInfo} returns this - */ -proto.pactus.ConnectionInfo.prototype.setInboundConnections = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint64 outbound_connections = 3; - * @return {number} - */ -proto.pactus.ConnectionInfo.prototype.getOutboundConnections = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.ConnectionInfo} returns this - */ -proto.pactus.ConnectionInfo.prototype.setOutboundConnections = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/js/transaction_grpc_pb.js b/www/grpc/gen/js/transaction_grpc_pb.js deleted file mode 100644 index b77ed0899..000000000 --- a/www/grpc/gen/js/transaction_grpc_pb.js +++ /dev/null @@ -1,220 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('grpc'); -var transaction_pb = require('./transaction_pb.js'); - -function serialize_pactus_BroadcastTransactionRequest(arg) { - if (!(arg instanceof transaction_pb.BroadcastTransactionRequest)) { - throw new Error('Expected argument of type pactus.BroadcastTransactionRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_BroadcastTransactionRequest(buffer_arg) { - return transaction_pb.BroadcastTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_BroadcastTransactionResponse(arg) { - if (!(arg instanceof transaction_pb.BroadcastTransactionResponse)) { - throw new Error('Expected argument of type pactus.BroadcastTransactionResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_BroadcastTransactionResponse(buffer_arg) { - return transaction_pb.BroadcastTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_CalculateFeeRequest(arg) { - if (!(arg instanceof transaction_pb.CalculateFeeRequest)) { - throw new Error('Expected argument of type pactus.CalculateFeeRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_CalculateFeeRequest(buffer_arg) { - return transaction_pb.CalculateFeeRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_CalculateFeeResponse(arg) { - if (!(arg instanceof transaction_pb.CalculateFeeResponse)) { - throw new Error('Expected argument of type pactus.CalculateFeeResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_CalculateFeeResponse(buffer_arg) { - return transaction_pb.CalculateFeeResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetRawBondTransactionRequest(arg) { - if (!(arg instanceof transaction_pb.GetRawBondTransactionRequest)) { - throw new Error('Expected argument of type pactus.GetRawBondTransactionRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetRawBondTransactionRequest(buffer_arg) { - return transaction_pb.GetRawBondTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetRawTransactionResponse(arg) { - if (!(arg instanceof transaction_pb.GetRawTransactionResponse)) { - throw new Error('Expected argument of type pactus.GetRawTransactionResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetRawTransactionResponse(buffer_arg) { - return transaction_pb.GetRawTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetRawTransferTransactionRequest(arg) { - if (!(arg instanceof transaction_pb.GetRawTransferTransactionRequest)) { - throw new Error('Expected argument of type pactus.GetRawTransferTransactionRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetRawTransferTransactionRequest(buffer_arg) { - return transaction_pb.GetRawTransferTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetRawUnbondTransactionRequest(arg) { - if (!(arg instanceof transaction_pb.GetRawUnbondTransactionRequest)) { - throw new Error('Expected argument of type pactus.GetRawUnbondTransactionRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetRawUnbondTransactionRequest(buffer_arg) { - return transaction_pb.GetRawUnbondTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetRawWithdrawTransactionRequest(arg) { - if (!(arg instanceof transaction_pb.GetRawWithdrawTransactionRequest)) { - throw new Error('Expected argument of type pactus.GetRawWithdrawTransactionRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetRawWithdrawTransactionRequest(buffer_arg) { - return transaction_pb.GetRawWithdrawTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetTransactionRequest(arg) { - if (!(arg instanceof transaction_pb.GetTransactionRequest)) { - throw new Error('Expected argument of type pactus.GetTransactionRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetTransactionRequest(buffer_arg) { - return transaction_pb.GetTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetTransactionResponse(arg) { - if (!(arg instanceof transaction_pb.GetTransactionResponse)) { - throw new Error('Expected argument of type pactus.GetTransactionResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetTransactionResponse(buffer_arg) { - return transaction_pb.GetTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Transaction service defines various RPC methods for interacting with -// transactions. -var TransactionService = exports.TransactionService = { - // GetTransaction retrieves transaction details based on the provided request -// parameters. -getTransaction: { - path: '/pactus.Transaction/GetTransaction', - requestStream: false, - responseStream: false, - requestType: transaction_pb.GetTransactionRequest, - responseType: transaction_pb.GetTransactionResponse, - requestSerialize: serialize_pactus_GetTransactionRequest, - requestDeserialize: deserialize_pactus_GetTransactionRequest, - responseSerialize: serialize_pactus_GetTransactionResponse, - responseDeserialize: deserialize_pactus_GetTransactionResponse, - }, - // CalculateFee calculates the transaction fee based on the specified amount -// and payload type. -calculateFee: { - path: '/pactus.Transaction/CalculateFee', - requestStream: false, - responseStream: false, - requestType: transaction_pb.CalculateFeeRequest, - responseType: transaction_pb.CalculateFeeResponse, - requestSerialize: serialize_pactus_CalculateFeeRequest, - requestDeserialize: deserialize_pactus_CalculateFeeRequest, - responseSerialize: serialize_pactus_CalculateFeeResponse, - responseDeserialize: deserialize_pactus_CalculateFeeResponse, - }, - // BroadcastTransaction broadcasts a signed transaction to the network. -broadcastTransaction: { - path: '/pactus.Transaction/BroadcastTransaction', - requestStream: false, - responseStream: false, - requestType: transaction_pb.BroadcastTransactionRequest, - responseType: transaction_pb.BroadcastTransactionResponse, - requestSerialize: serialize_pactus_BroadcastTransactionRequest, - requestDeserialize: deserialize_pactus_BroadcastTransactionRequest, - responseSerialize: serialize_pactus_BroadcastTransactionResponse, - responseDeserialize: deserialize_pactus_BroadcastTransactionResponse, - }, - // GetRawTransferTransaction retrieves raw details of a transfer transaction. -getRawTransferTransaction: { - path: '/pactus.Transaction/GetRawTransferTransaction', - requestStream: false, - responseStream: false, - requestType: transaction_pb.GetRawTransferTransactionRequest, - responseType: transaction_pb.GetRawTransactionResponse, - requestSerialize: serialize_pactus_GetRawTransferTransactionRequest, - requestDeserialize: deserialize_pactus_GetRawTransferTransactionRequest, - responseSerialize: serialize_pactus_GetRawTransactionResponse, - responseDeserialize: deserialize_pactus_GetRawTransactionResponse, - }, - // GetRawBondTransaction retrieves raw details of a bond transaction. -getRawBondTransaction: { - path: '/pactus.Transaction/GetRawBondTransaction', - requestStream: false, - responseStream: false, - requestType: transaction_pb.GetRawBondTransactionRequest, - responseType: transaction_pb.GetRawTransactionResponse, - requestSerialize: serialize_pactus_GetRawBondTransactionRequest, - requestDeserialize: deserialize_pactus_GetRawBondTransactionRequest, - responseSerialize: serialize_pactus_GetRawTransactionResponse, - responseDeserialize: deserialize_pactus_GetRawTransactionResponse, - }, - // GetRawUnbondTransaction retrieves raw details of an unbond transaction. -getRawUnbondTransaction: { - path: '/pactus.Transaction/GetRawUnbondTransaction', - requestStream: false, - responseStream: false, - requestType: transaction_pb.GetRawUnbondTransactionRequest, - responseType: transaction_pb.GetRawTransactionResponse, - requestSerialize: serialize_pactus_GetRawUnbondTransactionRequest, - requestDeserialize: deserialize_pactus_GetRawUnbondTransactionRequest, - responseSerialize: serialize_pactus_GetRawTransactionResponse, - responseDeserialize: deserialize_pactus_GetRawTransactionResponse, - }, - // GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. -getRawWithdrawTransaction: { - path: '/pactus.Transaction/GetRawWithdrawTransaction', - requestStream: false, - responseStream: false, - requestType: transaction_pb.GetRawWithdrawTransactionRequest, - responseType: transaction_pb.GetRawTransactionResponse, - requestSerialize: serialize_pactus_GetRawWithdrawTransactionRequest, - requestDeserialize: deserialize_pactus_GetRawWithdrawTransactionRequest, - responseSerialize: serialize_pactus_GetRawTransactionResponse, - responseDeserialize: deserialize_pactus_GetRawTransactionResponse, - }, -}; - -exports.TransactionClient = grpc.makeGenericClientConstructor(TransactionService); diff --git a/www/grpc/gen/js/transaction_pb.js b/www/grpc/gen/js/transaction_pb.js deleted file mode 100644 index ed62ad1a9..000000000 --- a/www/grpc/gen/js/transaction_pb.js +++ /dev/null @@ -1,4136 +0,0 @@ -// source: transaction.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.pactus.BroadcastTransactionRequest', null, global); -goog.exportSymbol('proto.pactus.BroadcastTransactionResponse', null, global); -goog.exportSymbol('proto.pactus.CalculateFeeRequest', null, global); -goog.exportSymbol('proto.pactus.CalculateFeeResponse', null, global); -goog.exportSymbol('proto.pactus.GetRawBondTransactionRequest', null, global); -goog.exportSymbol('proto.pactus.GetRawTransactionResponse', null, global); -goog.exportSymbol('proto.pactus.GetRawTransferTransactionRequest', null, global); -goog.exportSymbol('proto.pactus.GetRawUnbondTransactionRequest', null, global); -goog.exportSymbol('proto.pactus.GetRawWithdrawTransactionRequest', null, global); -goog.exportSymbol('proto.pactus.GetTransactionRequest', null, global); -goog.exportSymbol('proto.pactus.GetTransactionResponse', null, global); -goog.exportSymbol('proto.pactus.PayloadBond', null, global); -goog.exportSymbol('proto.pactus.PayloadSortition', null, global); -goog.exportSymbol('proto.pactus.PayloadTransfer', null, global); -goog.exportSymbol('proto.pactus.PayloadType', null, global); -goog.exportSymbol('proto.pactus.PayloadUnbond', null, global); -goog.exportSymbol('proto.pactus.PayloadWithdraw', null, global); -goog.exportSymbol('proto.pactus.TransactionInfo', null, global); -goog.exportSymbol('proto.pactus.TransactionInfo.PayloadCase', null, global); -goog.exportSymbol('proto.pactus.TransactionVerbosity', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetTransactionRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetTransactionRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetTransactionRequest.displayName = 'proto.pactus.GetTransactionRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetTransactionResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetTransactionResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetTransactionResponse.displayName = 'proto.pactus.GetTransactionResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.CalculateFeeRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.CalculateFeeRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.CalculateFeeRequest.displayName = 'proto.pactus.CalculateFeeRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.CalculateFeeResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.CalculateFeeResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.CalculateFeeResponse.displayName = 'proto.pactus.CalculateFeeResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.BroadcastTransactionRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.BroadcastTransactionRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.BroadcastTransactionRequest.displayName = 'proto.pactus.BroadcastTransactionRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.BroadcastTransactionResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.BroadcastTransactionResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.BroadcastTransactionResponse.displayName = 'proto.pactus.BroadcastTransactionResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetRawTransferTransactionRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetRawTransferTransactionRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetRawTransferTransactionRequest.displayName = 'proto.pactus.GetRawTransferTransactionRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetRawBondTransactionRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetRawBondTransactionRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetRawBondTransactionRequest.displayName = 'proto.pactus.GetRawBondTransactionRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetRawUnbondTransactionRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetRawUnbondTransactionRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetRawUnbondTransactionRequest.displayName = 'proto.pactus.GetRawUnbondTransactionRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetRawWithdrawTransactionRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetRawWithdrawTransactionRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetRawWithdrawTransactionRequest.displayName = 'proto.pactus.GetRawWithdrawTransactionRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetRawTransactionResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetRawTransactionResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetRawTransactionResponse.displayName = 'proto.pactus.GetRawTransactionResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.PayloadTransfer = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.PayloadTransfer, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.PayloadTransfer.displayName = 'proto.pactus.PayloadTransfer'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.PayloadBond = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.PayloadBond, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.PayloadBond.displayName = 'proto.pactus.PayloadBond'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.PayloadSortition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.PayloadSortition, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.PayloadSortition.displayName = 'proto.pactus.PayloadSortition'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.PayloadUnbond = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.PayloadUnbond, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.PayloadUnbond.displayName = 'proto.pactus.PayloadUnbond'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.PayloadWithdraw = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.PayloadWithdraw, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.PayloadWithdraw.displayName = 'proto.pactus.PayloadWithdraw'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.TransactionInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.pactus.TransactionInfo.oneofGroups_); -}; -goog.inherits(proto.pactus.TransactionInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.TransactionInfo.displayName = 'proto.pactus.TransactionInfo'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetTransactionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetTransactionRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetTransactionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTransactionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - verbosity: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetTransactionRequest} - */ -proto.pactus.GetTransactionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetTransactionRequest; - return proto.pactus.GetTransactionRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetTransactionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetTransactionRequest} - */ -proto.pactus.GetTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {!proto.pactus.TransactionVerbosity} */ (reader.readEnum()); - msg.setVerbosity(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetTransactionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetTransactionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetTransactionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTransactionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getVerbosity(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.pactus.GetTransactionRequest.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetTransactionRequest} returns this - */ -proto.pactus.GetTransactionRequest.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional TransactionVerbosity verbosity = 2; - * @return {!proto.pactus.TransactionVerbosity} - */ -proto.pactus.GetTransactionRequest.prototype.getVerbosity = function() { - return /** @type {!proto.pactus.TransactionVerbosity} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.pactus.TransactionVerbosity} value - * @return {!proto.pactus.GetTransactionRequest} returns this - */ -proto.pactus.GetTransactionRequest.prototype.setVerbosity = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetTransactionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetTransactionResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetTransactionResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTransactionResponse.toObject = function(includeInstance, msg) { - var f, obj = { - blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), - blockTime: jspb.Message.getFieldWithDefault(msg, 2, 0), - transaction: (f = msg.getTransaction()) && proto.pactus.TransactionInfo.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetTransactionResponse} - */ -proto.pactus.GetTransactionResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetTransactionResponse; - return proto.pactus.GetTransactionResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetTransactionResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetTransactionResponse} - */ -proto.pactus.GetTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBlockHeight(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setBlockTime(value); - break; - case 3: - var value = new proto.pactus.TransactionInfo; - reader.readMessage(value,proto.pactus.TransactionInfo.deserializeBinaryFromReader); - msg.setTransaction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetTransactionResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetTransactionResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetTransactionResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTransactionResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getBlockHeight(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getBlockTime(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getTransaction(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.pactus.TransactionInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint32 block_height = 1; - * @return {number} - */ -proto.pactus.GetTransactionResponse.prototype.getBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetTransactionResponse} returns this - */ -proto.pactus.GetTransactionResponse.prototype.setBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 block_time = 2; - * @return {number} - */ -proto.pactus.GetTransactionResponse.prototype.getBlockTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetTransactionResponse} returns this - */ -proto.pactus.GetTransactionResponse.prototype.setBlockTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional TransactionInfo transaction = 3; - * @return {?proto.pactus.TransactionInfo} - */ -proto.pactus.GetTransactionResponse.prototype.getTransaction = function() { - return /** @type{?proto.pactus.TransactionInfo} */ ( - jspb.Message.getWrapperField(this, proto.pactus.TransactionInfo, 3)); -}; - - -/** - * @param {?proto.pactus.TransactionInfo|undefined} value - * @return {!proto.pactus.GetTransactionResponse} returns this -*/ -proto.pactus.GetTransactionResponse.prototype.setTransaction = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.GetTransactionResponse} returns this - */ -proto.pactus.GetTransactionResponse.prototype.clearTransaction = function() { - return this.setTransaction(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.GetTransactionResponse.prototype.hasTransaction = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.CalculateFeeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.CalculateFeeRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.CalculateFeeRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.CalculateFeeRequest.toObject = function(includeInstance, msg) { - var f, obj = { - amount: jspb.Message.getFieldWithDefault(msg, 1, 0), - payloadType: jspb.Message.getFieldWithDefault(msg, 2, 0), - fixedAmount: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.CalculateFeeRequest} - */ -proto.pactus.CalculateFeeRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.CalculateFeeRequest; - return proto.pactus.CalculateFeeRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.CalculateFeeRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.CalculateFeeRequest} - */ -proto.pactus.CalculateFeeRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 2: - var value = /** @type {!proto.pactus.PayloadType} */ (reader.readEnum()); - msg.setPayloadType(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFixedAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.CalculateFeeRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.CalculateFeeRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.CalculateFeeRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.CalculateFeeRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getPayloadType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getFixedAmount(); - if (f) { - writer.writeBool( - 3, - f - ); - } -}; - - -/** - * optional int64 amount = 1; - * @return {number} - */ -proto.pactus.CalculateFeeRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.CalculateFeeRequest} returns this - */ -proto.pactus.CalculateFeeRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional PayloadType payload_type = 2; - * @return {!proto.pactus.PayloadType} - */ -proto.pactus.CalculateFeeRequest.prototype.getPayloadType = function() { - return /** @type {!proto.pactus.PayloadType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.pactus.PayloadType} value - * @return {!proto.pactus.CalculateFeeRequest} returns this - */ -proto.pactus.CalculateFeeRequest.prototype.setPayloadType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional bool fixed_amount = 3; - * @return {boolean} - */ -proto.pactus.CalculateFeeRequest.prototype.getFixedAmount = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.pactus.CalculateFeeRequest} returns this - */ -proto.pactus.CalculateFeeRequest.prototype.setFixedAmount = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.CalculateFeeResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.CalculateFeeResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.CalculateFeeResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.CalculateFeeResponse.toObject = function(includeInstance, msg) { - var f, obj = { - amount: jspb.Message.getFieldWithDefault(msg, 1, 0), - fee: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.CalculateFeeResponse} - */ -proto.pactus.CalculateFeeResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.CalculateFeeResponse; - return proto.pactus.CalculateFeeResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.CalculateFeeResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.CalculateFeeResponse} - */ -proto.pactus.CalculateFeeResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.CalculateFeeResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.CalculateFeeResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.CalculateFeeResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.CalculateFeeResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional int64 amount = 1; - * @return {number} - */ -proto.pactus.CalculateFeeResponse.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.CalculateFeeResponse} returns this - */ -proto.pactus.CalculateFeeResponse.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int64 fee = 2; - * @return {number} - */ -proto.pactus.CalculateFeeResponse.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.CalculateFeeResponse} returns this - */ -proto.pactus.CalculateFeeResponse.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.BroadcastTransactionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.BroadcastTransactionRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.BroadcastTransactionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.BroadcastTransactionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - signedRawTransaction: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.BroadcastTransactionRequest} - */ -proto.pactus.BroadcastTransactionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.BroadcastTransactionRequest; - return proto.pactus.BroadcastTransactionRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.BroadcastTransactionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.BroadcastTransactionRequest} - */ -proto.pactus.BroadcastTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSignedRawTransaction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.BroadcastTransactionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.BroadcastTransactionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.BroadcastTransactionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.BroadcastTransactionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignedRawTransaction(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string signed_raw_transaction = 1; - * @return {string} - */ -proto.pactus.BroadcastTransactionRequest.prototype.getSignedRawTransaction = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.BroadcastTransactionRequest} returns this - */ -proto.pactus.BroadcastTransactionRequest.prototype.setSignedRawTransaction = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.BroadcastTransactionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.BroadcastTransactionResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.BroadcastTransactionResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.BroadcastTransactionResponse.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.BroadcastTransactionResponse} - */ -proto.pactus.BroadcastTransactionResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.BroadcastTransactionResponse; - return proto.pactus.BroadcastTransactionResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.BroadcastTransactionResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.BroadcastTransactionResponse} - */ -proto.pactus.BroadcastTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.BroadcastTransactionResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.BroadcastTransactionResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.BroadcastTransactionResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.BroadcastTransactionResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.pactus.BroadcastTransactionResponse.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.BroadcastTransactionResponse} returns this - */ -proto.pactus.BroadcastTransactionResponse.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetRawTransferTransactionRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetRawTransferTransactionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawTransferTransactionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - sender: jspb.Message.getFieldWithDefault(msg, 2, ""), - receiver: jspb.Message.getFieldWithDefault(msg, 3, ""), - amount: jspb.Message.getFieldWithDefault(msg, 4, 0), - fee: jspb.Message.getFieldWithDefault(msg, 5, 0), - memo: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetRawTransferTransactionRequest} - */ -proto.pactus.GetRawTransferTransactionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetRawTransferTransactionRequest; - return proto.pactus.GetRawTransferTransactionRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetRawTransferTransactionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetRawTransferTransactionRequest} - */ -proto.pactus.GetRawTransferTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLockTime(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSender(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setReceiver(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetRawTransferTransactionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetRawTransferTransactionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawTransferTransactionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLockTime(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getSender(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getReceiver(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional uint32 lock_time = 1; - * @return {number} - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.getLockTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.setLockTime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string sender = 2; - * @return {string} - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string receiver = 3; - * @return {string} - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.getReceiver = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.setReceiver = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int64 amount = 4; - * @return {number} - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 fee = 5; - * @return {number} - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string memo = 6; - * @return {string} - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this - */ -proto.pactus.GetRawTransferTransactionRequest.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetRawBondTransactionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetRawBondTransactionRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetRawBondTransactionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawBondTransactionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - sender: jspb.Message.getFieldWithDefault(msg, 2, ""), - receiver: jspb.Message.getFieldWithDefault(msg, 3, ""), - stake: jspb.Message.getFieldWithDefault(msg, 4, 0), - publicKey: jspb.Message.getFieldWithDefault(msg, 5, ""), - fee: jspb.Message.getFieldWithDefault(msg, 6, 0), - memo: jspb.Message.getFieldWithDefault(msg, 7, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetRawBondTransactionRequest} - */ -proto.pactus.GetRawBondTransactionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetRawBondTransactionRequest; - return proto.pactus.GetRawBondTransactionRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetRawBondTransactionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetRawBondTransactionRequest} - */ -proto.pactus.GetRawBondTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLockTime(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSender(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setReceiver(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStake(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetRawBondTransactionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetRawBondTransactionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetRawBondTransactionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawBondTransactionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLockTime(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getSender(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getReceiver(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStake(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getPublicKey(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } -}; - - -/** - * optional uint32 lock_time = 1; - * @return {number} - */ -proto.pactus.GetRawBondTransactionRequest.prototype.getLockTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetRawBondTransactionRequest} returns this - */ -proto.pactus.GetRawBondTransactionRequest.prototype.setLockTime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string sender = 2; - * @return {string} - */ -proto.pactus.GetRawBondTransactionRequest.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawBondTransactionRequest} returns this - */ -proto.pactus.GetRawBondTransactionRequest.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string receiver = 3; - * @return {string} - */ -proto.pactus.GetRawBondTransactionRequest.prototype.getReceiver = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawBondTransactionRequest} returns this - */ -proto.pactus.GetRawBondTransactionRequest.prototype.setReceiver = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int64 stake = 4; - * @return {number} - */ -proto.pactus.GetRawBondTransactionRequest.prototype.getStake = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetRawBondTransactionRequest} returns this - */ -proto.pactus.GetRawBondTransactionRequest.prototype.setStake = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional string public_key = 5; - * @return {string} - */ -proto.pactus.GetRawBondTransactionRequest.prototype.getPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawBondTransactionRequest} returns this - */ -proto.pactus.GetRawBondTransactionRequest.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional int64 fee = 6; - * @return {number} - */ -proto.pactus.GetRawBondTransactionRequest.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetRawBondTransactionRequest} returns this - */ -proto.pactus.GetRawBondTransactionRequest.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional string memo = 7; - * @return {string} - */ -proto.pactus.GetRawBondTransactionRequest.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawBondTransactionRequest} returns this - */ -proto.pactus.GetRawBondTransactionRequest.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetRawUnbondTransactionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetRawUnbondTransactionRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetRawUnbondTransactionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawUnbondTransactionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - validatorAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - memo: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetRawUnbondTransactionRequest} - */ -proto.pactus.GetRawUnbondTransactionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetRawUnbondTransactionRequest; - return proto.pactus.GetRawUnbondTransactionRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetRawUnbondTransactionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetRawUnbondTransactionRequest} - */ -proto.pactus.GetRawUnbondTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLockTime(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setValidatorAddress(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetRawUnbondTransactionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetRawUnbondTransactionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetRawUnbondTransactionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawUnbondTransactionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLockTime(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getValidatorAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional uint32 lock_time = 1; - * @return {number} - */ -proto.pactus.GetRawUnbondTransactionRequest.prototype.getLockTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this - */ -proto.pactus.GetRawUnbondTransactionRequest.prototype.setLockTime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string validator_address = 3; - * @return {string} - */ -proto.pactus.GetRawUnbondTransactionRequest.prototype.getValidatorAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this - */ -proto.pactus.GetRawUnbondTransactionRequest.prototype.setValidatorAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string memo = 4; - * @return {string} - */ -proto.pactus.GetRawUnbondTransactionRequest.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this - */ -proto.pactus.GetRawUnbondTransactionRequest.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetRawWithdrawTransactionRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetRawWithdrawTransactionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawWithdrawTransactionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), - accountAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - amount: jspb.Message.getFieldWithDefault(msg, 4, 0), - fee: jspb.Message.getFieldWithDefault(msg, 5, 0), - memo: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetRawWithdrawTransactionRequest} - */ -proto.pactus.GetRawWithdrawTransactionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetRawWithdrawTransactionRequest; - return proto.pactus.GetRawWithdrawTransactionRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetRawWithdrawTransactionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetRawWithdrawTransactionRequest} - */ -proto.pactus.GetRawWithdrawTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLockTime(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setValidatorAddress(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAccountAddress(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetRawWithdrawTransactionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetRawWithdrawTransactionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawWithdrawTransactionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getLockTime(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getValidatorAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAccountAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional uint32 lock_time = 1; - * @return {number} - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.getLockTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.setLockTime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional string validator_address = 2; - * @return {string} - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.getValidatorAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.setValidatorAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string account_address = 3; - * @return {string} - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.getAccountAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.setAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional int64 amount = 4; - * @return {number} - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 fee = 5; - * @return {number} - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional string memo = 6; - * @return {string} - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this - */ -proto.pactus.GetRawWithdrawTransactionRequest.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetRawTransactionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetRawTransactionResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetRawTransactionResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawTransactionResponse.toObject = function(includeInstance, msg) { - var f, obj = { - rawTransaction: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetRawTransactionResponse} - */ -proto.pactus.GetRawTransactionResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetRawTransactionResponse; - return proto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetRawTransactionResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetRawTransactionResponse} - */ -proto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setRawTransaction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetRawTransactionResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetRawTransactionResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawTransaction(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string raw_transaction = 1; - * @return {string} - */ -proto.pactus.GetRawTransactionResponse.prototype.getRawTransaction = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawTransactionResponse} returns this - */ -proto.pactus.GetRawTransactionResponse.prototype.setRawTransaction = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.PayloadTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.PayloadTransfer.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.PayloadTransfer} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadTransfer.toObject = function(includeInstance, msg) { - var f, obj = { - sender: jspb.Message.getFieldWithDefault(msg, 1, ""), - receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.PayloadTransfer} - */ -proto.pactus.PayloadTransfer.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.PayloadTransfer; - return proto.pactus.PayloadTransfer.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.PayloadTransfer} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.PayloadTransfer} - */ -proto.pactus.PayloadTransfer.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSender(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setReceiver(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.PayloadTransfer.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.PayloadTransfer.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.PayloadTransfer} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadTransfer.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSender(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getReceiver(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional string sender = 1; - * @return {string} - */ -proto.pactus.PayloadTransfer.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadTransfer} returns this - */ -proto.pactus.PayloadTransfer.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string receiver = 2; - * @return {string} - */ -proto.pactus.PayloadTransfer.prototype.getReceiver = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadTransfer} returns this - */ -proto.pactus.PayloadTransfer.prototype.setReceiver = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.pactus.PayloadTransfer.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PayloadTransfer} returns this - */ -proto.pactus.PayloadTransfer.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.PayloadBond.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.PayloadBond.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.PayloadBond} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadBond.toObject = function(includeInstance, msg) { - var f, obj = { - sender: jspb.Message.getFieldWithDefault(msg, 1, ""), - receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), - stake: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.PayloadBond} - */ -proto.pactus.PayloadBond.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.PayloadBond; - return proto.pactus.PayloadBond.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.PayloadBond} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.PayloadBond} - */ -proto.pactus.PayloadBond.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSender(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setReceiver(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStake(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.PayloadBond.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.PayloadBond.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.PayloadBond} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadBond.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSender(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getReceiver(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getStake(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional string sender = 1; - * @return {string} - */ -proto.pactus.PayloadBond.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadBond} returns this - */ -proto.pactus.PayloadBond.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string receiver = 2; - * @return {string} - */ -proto.pactus.PayloadBond.prototype.getReceiver = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadBond} returns this - */ -proto.pactus.PayloadBond.prototype.setReceiver = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 stake = 3; - * @return {number} - */ -proto.pactus.PayloadBond.prototype.getStake = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PayloadBond} returns this - */ -proto.pactus.PayloadBond.prototype.setStake = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.PayloadSortition.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.PayloadSortition.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.PayloadSortition} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadSortition.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - proof: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.PayloadSortition} - */ -proto.pactus.PayloadSortition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.PayloadSortition; - return proto.pactus.PayloadSortition.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.PayloadSortition} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.PayloadSortition} - */ -proto.pactus.PayloadSortition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setProof(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.PayloadSortition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.PayloadSortition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.PayloadSortition} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadSortition.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getProof(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.pactus.PayloadSortition.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadSortition} returns this - */ -proto.pactus.PayloadSortition.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string proof = 2; - * @return {string} - */ -proto.pactus.PayloadSortition.prototype.getProof = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadSortition} returns this - */ -proto.pactus.PayloadSortition.prototype.setProof = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.PayloadUnbond.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.PayloadUnbond.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.PayloadUnbond} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadUnbond.toObject = function(includeInstance, msg) { - var f, obj = { - validator: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.PayloadUnbond} - */ -proto.pactus.PayloadUnbond.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.PayloadUnbond; - return proto.pactus.PayloadUnbond.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.PayloadUnbond} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.PayloadUnbond} - */ -proto.pactus.PayloadUnbond.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setValidator(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.PayloadUnbond.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.PayloadUnbond.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.PayloadUnbond} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadUnbond.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValidator(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string validator = 1; - * @return {string} - */ -proto.pactus.PayloadUnbond.prototype.getValidator = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadUnbond} returns this - */ -proto.pactus.PayloadUnbond.prototype.setValidator = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.PayloadWithdraw.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.PayloadWithdraw.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.PayloadWithdraw} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadWithdraw.toObject = function(includeInstance, msg) { - var f, obj = { - from: jspb.Message.getFieldWithDefault(msg, 1, ""), - to: jspb.Message.getFieldWithDefault(msg, 2, ""), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.PayloadWithdraw} - */ -proto.pactus.PayloadWithdraw.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.PayloadWithdraw; - return proto.pactus.PayloadWithdraw.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.PayloadWithdraw} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.PayloadWithdraw} - */ -proto.pactus.PayloadWithdraw.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setFrom(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setTo(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.PayloadWithdraw.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.PayloadWithdraw.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.PayloadWithdraw} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadWithdraw.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFrom(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getTo(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional string from = 1; - * @return {string} - */ -proto.pactus.PayloadWithdraw.prototype.getFrom = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadWithdraw} returns this - */ -proto.pactus.PayloadWithdraw.prototype.setFrom = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string to = 2; - * @return {string} - */ -proto.pactus.PayloadWithdraw.prototype.getTo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadWithdraw} returns this - */ -proto.pactus.PayloadWithdraw.prototype.setTo = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.pactus.PayloadWithdraw.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PayloadWithdraw} returns this - */ -proto.pactus.PayloadWithdraw.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - - -/** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const - */ -proto.pactus.TransactionInfo.oneofGroups_ = [[30,31,32,33,34]]; - -/** - * @enum {number} - */ -proto.pactus.TransactionInfo.PayloadCase = { - PAYLOAD_NOT_SET: 0, - TRANSFER: 30, - BOND: 31, - SORTITION: 32, - UNBOND: 33, - WITHDRAW: 34 -}; - -/** - * @return {proto.pactus.TransactionInfo.PayloadCase} - */ -proto.pactus.TransactionInfo.prototype.getPayloadCase = function() { - return /** @type {proto.pactus.TransactionInfo.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.pactus.TransactionInfo.oneofGroups_[0])); -}; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.TransactionInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.TransactionInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.TransactionInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.TransactionInfo.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - data: jspb.Message.getFieldWithDefault(msg, 2, ""), - version: jspb.Message.getFieldWithDefault(msg, 3, 0), - lockTime: jspb.Message.getFieldWithDefault(msg, 4, 0), - value: jspb.Message.getFieldWithDefault(msg, 5, 0), - fee: jspb.Message.getFieldWithDefault(msg, 6, 0), - payloadType: jspb.Message.getFieldWithDefault(msg, 7, 0), - transfer: (f = msg.getTransfer()) && proto.pactus.PayloadTransfer.toObject(includeInstance, f), - bond: (f = msg.getBond()) && proto.pactus.PayloadBond.toObject(includeInstance, f), - sortition: (f = msg.getSortition()) && proto.pactus.PayloadSortition.toObject(includeInstance, f), - unbond: (f = msg.getUnbond()) && proto.pactus.PayloadUnbond.toObject(includeInstance, f), - withdraw: (f = msg.getWithdraw()) && proto.pactus.PayloadWithdraw.toObject(includeInstance, f), - memo: jspb.Message.getFieldWithDefault(msg, 8, ""), - publicKey: jspb.Message.getFieldWithDefault(msg, 9, ""), - signature: jspb.Message.getFieldWithDefault(msg, 10, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.TransactionInfo} - */ -proto.pactus.TransactionInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.TransactionInfo; - return proto.pactus.TransactionInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.TransactionInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.TransactionInfo} - */ -proto.pactus.TransactionInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setData(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setVersion(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLockTime(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setValue(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; - case 7: - var value = /** @type {!proto.pactus.PayloadType} */ (reader.readEnum()); - msg.setPayloadType(value); - break; - case 30: - var value = new proto.pactus.PayloadTransfer; - reader.readMessage(value,proto.pactus.PayloadTransfer.deserializeBinaryFromReader); - msg.setTransfer(value); - break; - case 31: - var value = new proto.pactus.PayloadBond; - reader.readMessage(value,proto.pactus.PayloadBond.deserializeBinaryFromReader); - msg.setBond(value); - break; - case 32: - var value = new proto.pactus.PayloadSortition; - reader.readMessage(value,proto.pactus.PayloadSortition.deserializeBinaryFromReader); - msg.setSortition(value); - break; - case 33: - var value = new proto.pactus.PayloadUnbond; - reader.readMessage(value,proto.pactus.PayloadUnbond.deserializeBinaryFromReader); - msg.setUnbond(value); - break; - case 34: - var value = new proto.pactus.PayloadWithdraw; - reader.readMessage(value,proto.pactus.PayloadWithdraw.deserializeBinaryFromReader); - msg.setWithdraw(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - case 9: - var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); - break; - case 10: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.TransactionInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.TransactionInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.TransactionInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.TransactionInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getVersion(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getLockTime(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getValue(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getPayloadType(); - if (f !== 0.0) { - writer.writeEnum( - 7, - f - ); - } - f = message.getTransfer(); - if (f != null) { - writer.writeMessage( - 30, - f, - proto.pactus.PayloadTransfer.serializeBinaryToWriter - ); - } - f = message.getBond(); - if (f != null) { - writer.writeMessage( - 31, - f, - proto.pactus.PayloadBond.serializeBinaryToWriter - ); - } - f = message.getSortition(); - if (f != null) { - writer.writeMessage( - 32, - f, - proto.pactus.PayloadSortition.serializeBinaryToWriter - ); - } - f = message.getUnbond(); - if (f != null) { - writer.writeMessage( - 33, - f, - proto.pactus.PayloadUnbond.serializeBinaryToWriter - ); - } - f = message.getWithdraw(); - if (f != null) { - writer.writeMessage( - 34, - f, - proto.pactus.PayloadWithdraw.serializeBinaryToWriter - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getPublicKey(); - if (f.length > 0) { - writer.writeString( - 9, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 10, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.pactus.TransactionInfo.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string data = 2; - * @return {string} - */ -proto.pactus.TransactionInfo.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.setData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int32 version = 3; - * @return {number} - */ -proto.pactus.TransactionInfo.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint32 lock_time = 4; - * @return {number} - */ -proto.pactus.TransactionInfo.prototype.getLockTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.setLockTime = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 value = 5; - * @return {number} - */ -proto.pactus.TransactionInfo.prototype.getValue = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.setValue = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 fee = 6; - * @return {number} - */ -proto.pactus.TransactionInfo.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional PayloadType payload_type = 7; - * @return {!proto.pactus.PayloadType} - */ -proto.pactus.TransactionInfo.prototype.getPayloadType = function() { - return /** @type {!proto.pactus.PayloadType} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {!proto.pactus.PayloadType} value - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.setPayloadType = function(value) { - return jspb.Message.setProto3EnumField(this, 7, value); -}; - - -/** - * optional PayloadTransfer transfer = 30; - * @return {?proto.pactus.PayloadTransfer} - */ -proto.pactus.TransactionInfo.prototype.getTransfer = function() { - return /** @type{?proto.pactus.PayloadTransfer} */ ( - jspb.Message.getWrapperField(this, proto.pactus.PayloadTransfer, 30)); -}; - - -/** - * @param {?proto.pactus.PayloadTransfer|undefined} value - * @return {!proto.pactus.TransactionInfo} returns this -*/ -proto.pactus.TransactionInfo.prototype.setTransfer = function(value) { - return jspb.Message.setOneofWrapperField(this, 30, proto.pactus.TransactionInfo.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.clearTransfer = function() { - return this.setTransfer(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.TransactionInfo.prototype.hasTransfer = function() { - return jspb.Message.getField(this, 30) != null; -}; - - -/** - * optional PayloadBond bond = 31; - * @return {?proto.pactus.PayloadBond} - */ -proto.pactus.TransactionInfo.prototype.getBond = function() { - return /** @type{?proto.pactus.PayloadBond} */ ( - jspb.Message.getWrapperField(this, proto.pactus.PayloadBond, 31)); -}; - - -/** - * @param {?proto.pactus.PayloadBond|undefined} value - * @return {!proto.pactus.TransactionInfo} returns this -*/ -proto.pactus.TransactionInfo.prototype.setBond = function(value) { - return jspb.Message.setOneofWrapperField(this, 31, proto.pactus.TransactionInfo.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.clearBond = function() { - return this.setBond(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.TransactionInfo.prototype.hasBond = function() { - return jspb.Message.getField(this, 31) != null; -}; - - -/** - * optional PayloadSortition sortition = 32; - * @return {?proto.pactus.PayloadSortition} - */ -proto.pactus.TransactionInfo.prototype.getSortition = function() { - return /** @type{?proto.pactus.PayloadSortition} */ ( - jspb.Message.getWrapperField(this, proto.pactus.PayloadSortition, 32)); -}; - - -/** - * @param {?proto.pactus.PayloadSortition|undefined} value - * @return {!proto.pactus.TransactionInfo} returns this -*/ -proto.pactus.TransactionInfo.prototype.setSortition = function(value) { - return jspb.Message.setOneofWrapperField(this, 32, proto.pactus.TransactionInfo.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.clearSortition = function() { - return this.setSortition(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.TransactionInfo.prototype.hasSortition = function() { - return jspb.Message.getField(this, 32) != null; -}; - - -/** - * optional PayloadUnbond unbond = 33; - * @return {?proto.pactus.PayloadUnbond} - */ -proto.pactus.TransactionInfo.prototype.getUnbond = function() { - return /** @type{?proto.pactus.PayloadUnbond} */ ( - jspb.Message.getWrapperField(this, proto.pactus.PayloadUnbond, 33)); -}; - - -/** - * @param {?proto.pactus.PayloadUnbond|undefined} value - * @return {!proto.pactus.TransactionInfo} returns this -*/ -proto.pactus.TransactionInfo.prototype.setUnbond = function(value) { - return jspb.Message.setOneofWrapperField(this, 33, proto.pactus.TransactionInfo.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.clearUnbond = function() { - return this.setUnbond(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.TransactionInfo.prototype.hasUnbond = function() { - return jspb.Message.getField(this, 33) != null; -}; - - -/** - * optional PayloadWithdraw withdraw = 34; - * @return {?proto.pactus.PayloadWithdraw} - */ -proto.pactus.TransactionInfo.prototype.getWithdraw = function() { - return /** @type{?proto.pactus.PayloadWithdraw} */ ( - jspb.Message.getWrapperField(this, proto.pactus.PayloadWithdraw, 34)); -}; - - -/** - * @param {?proto.pactus.PayloadWithdraw|undefined} value - * @return {!proto.pactus.TransactionInfo} returns this -*/ -proto.pactus.TransactionInfo.prototype.setWithdraw = function(value) { - return jspb.Message.setOneofWrapperField(this, 34, proto.pactus.TransactionInfo.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.clearWithdraw = function() { - return this.setWithdraw(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.TransactionInfo.prototype.hasWithdraw = function() { - return jspb.Message.getField(this, 34) != null; -}; - - -/** - * optional string memo = 8; - * @return {string} - */ -proto.pactus.TransactionInfo.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional string public_key = 9; - * @return {string} - */ -proto.pactus.TransactionInfo.prototype.getPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); -}; - - -/** - * optional string signature = 10; - * @return {string} - */ -proto.pactus.TransactionInfo.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.TransactionInfo} returns this - */ -proto.pactus.TransactionInfo.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); -}; - - -/** - * @enum {number} - */ -proto.pactus.PayloadType = { - UNKNOWN: 0, - TRANSFER_PAYLOAD: 1, - BOND_PAYLOAD: 2, - SORTITION_PAYLOAD: 3, - UNBOND_PAYLOAD: 4, - WITHDRAW_PAYLOAD: 5 -}; - -/** - * @enum {number} - */ -proto.pactus.TransactionVerbosity = { - TRANSACTION_DATA: 0, - TRANSACTION_INFO: 1 -}; - -goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/js/utils_grpc_pb.js b/www/grpc/gen/js/utils_grpc_pb.js deleted file mode 100644 index e0b645230..000000000 --- a/www/grpc/gen/js/utils_grpc_pb.js +++ /dev/null @@ -1,81 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('grpc'); -var utils_pb = require('./utils_pb.js'); - -function serialize_pactus_SignMessageWithPrivateKeyRequest(arg) { - if (!(arg instanceof utils_pb.SignMessageWithPrivateKeyRequest)) { - throw new Error('Expected argument of type pactus.SignMessageWithPrivateKeyRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_SignMessageWithPrivateKeyRequest(buffer_arg) { - return utils_pb.SignMessageWithPrivateKeyRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_SignMessageWithPrivateKeyResponse(arg) { - if (!(arg instanceof utils_pb.SignMessageWithPrivateKeyResponse)) { - throw new Error('Expected argument of type pactus.SignMessageWithPrivateKeyResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_SignMessageWithPrivateKeyResponse(buffer_arg) { - return utils_pb.SignMessageWithPrivateKeyResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_VerifyMessageRequest(arg) { - if (!(arg instanceof utils_pb.VerifyMessageRequest)) { - throw new Error('Expected argument of type pactus.VerifyMessageRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_VerifyMessageRequest(buffer_arg) { - return utils_pb.VerifyMessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_VerifyMessageResponse(arg) { - if (!(arg instanceof utils_pb.VerifyMessageResponse)) { - throw new Error('Expected argument of type pactus.VerifyMessageResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_VerifyMessageResponse(buffer_arg) { - return utils_pb.VerifyMessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Utils service defines RPC methods for utility functions such as message -// signing and verification. -var UtilsService = exports.UtilsService = { - // SignMessageWithPrivateKey sign message with provided private key. -signMessageWithPrivateKey: { - path: '/pactus.Utils/SignMessageWithPrivateKey', - requestStream: false, - responseStream: false, - requestType: utils_pb.SignMessageWithPrivateKeyRequest, - responseType: utils_pb.SignMessageWithPrivateKeyResponse, - requestSerialize: serialize_pactus_SignMessageWithPrivateKeyRequest, - requestDeserialize: deserialize_pactus_SignMessageWithPrivateKeyRequest, - responseSerialize: serialize_pactus_SignMessageWithPrivateKeyResponse, - responseDeserialize: deserialize_pactus_SignMessageWithPrivateKeyResponse, - }, - // VerifyMessage verify signature with public key and message -verifyMessage: { - path: '/pactus.Utils/VerifyMessage', - requestStream: false, - responseStream: false, - requestType: utils_pb.VerifyMessageRequest, - responseType: utils_pb.VerifyMessageResponse, - requestSerialize: serialize_pactus_VerifyMessageRequest, - requestDeserialize: deserialize_pactus_VerifyMessageRequest, - responseSerialize: serialize_pactus_VerifyMessageResponse, - responseDeserialize: deserialize_pactus_VerifyMessageResponse, - }, -}; - -exports.UtilsClient = grpc.makeGenericClientConstructor(UtilsService); diff --git a/www/grpc/gen/js/utils_pb.js b/www/grpc/gen/js/utils_pb.js deleted file mode 100644 index 6384f3614..000000000 --- a/www/grpc/gen/js/utils_pb.js +++ /dev/null @@ -1,722 +0,0 @@ -// source: utils.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -goog.exportSymbol('proto.pactus.SignMessageWithPrivateKeyRequest', null, global); -goog.exportSymbol('proto.pactus.SignMessageWithPrivateKeyResponse', null, global); -goog.exportSymbol('proto.pactus.VerifyMessageRequest', null, global); -goog.exportSymbol('proto.pactus.VerifyMessageResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.SignMessageWithPrivateKeyRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.SignMessageWithPrivateKeyRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.SignMessageWithPrivateKeyRequest.displayName = 'proto.pactus.SignMessageWithPrivateKeyRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.SignMessageWithPrivateKeyResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.SignMessageWithPrivateKeyResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.SignMessageWithPrivateKeyResponse.displayName = 'proto.pactus.SignMessageWithPrivateKeyResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.VerifyMessageRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.VerifyMessageRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.VerifyMessageRequest.displayName = 'proto.pactus.VerifyMessageRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.VerifyMessageResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.VerifyMessageResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.VerifyMessageResponse.displayName = 'proto.pactus.VerifyMessageResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.SignMessageWithPrivateKeyRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.SignMessageWithPrivateKeyRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignMessageWithPrivateKeyRequest.toObject = function(includeInstance, msg) { - var f, obj = { - privateKey: jspb.Message.getFieldWithDefault(msg, 1, ""), - message: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.SignMessageWithPrivateKeyRequest} - */ -proto.pactus.SignMessageWithPrivateKeyRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.SignMessageWithPrivateKeyRequest; - return proto.pactus.SignMessageWithPrivateKeyRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.SignMessageWithPrivateKeyRequest} - */ -proto.pactus.SignMessageWithPrivateKeyRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPrivateKey(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.SignMessageWithPrivateKeyRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.SignMessageWithPrivateKeyRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignMessageWithPrivateKeyRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPrivateKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string private_key = 1; - * @return {string} - */ -proto.pactus.SignMessageWithPrivateKeyRequest.prototype.getPrivateKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignMessageWithPrivateKeyRequest} returns this - */ -proto.pactus.SignMessageWithPrivateKeyRequest.prototype.setPrivateKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string message = 2; - * @return {string} - */ -proto.pactus.SignMessageWithPrivateKeyRequest.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignMessageWithPrivateKeyRequest} returns this - */ -proto.pactus.SignMessageWithPrivateKeyRequest.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.SignMessageWithPrivateKeyResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.SignMessageWithPrivateKeyResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.SignMessageWithPrivateKeyResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignMessageWithPrivateKeyResponse.toObject = function(includeInstance, msg) { - var f, obj = { - signature: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.SignMessageWithPrivateKeyResponse} - */ -proto.pactus.SignMessageWithPrivateKeyResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.SignMessageWithPrivateKeyResponse; - return proto.pactus.SignMessageWithPrivateKeyResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.SignMessageWithPrivateKeyResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.SignMessageWithPrivateKeyResponse} - */ -proto.pactus.SignMessageWithPrivateKeyResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.SignMessageWithPrivateKeyResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.SignMessageWithPrivateKeyResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.SignMessageWithPrivateKeyResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignMessageWithPrivateKeyResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string signature = 1; - * @return {string} - */ -proto.pactus.SignMessageWithPrivateKeyResponse.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignMessageWithPrivateKeyResponse} returns this - */ -proto.pactus.SignMessageWithPrivateKeyResponse.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.VerifyMessageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.VerifyMessageRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.VerifyMessageRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.VerifyMessageRequest.toObject = function(includeInstance, msg) { - var f, obj = { - message: jspb.Message.getFieldWithDefault(msg, 1, ""), - signature: jspb.Message.getFieldWithDefault(msg, 2, ""), - publicKey: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.VerifyMessageRequest} - */ -proto.pactus.VerifyMessageRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.VerifyMessageRequest; - return proto.pactus.VerifyMessageRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.VerifyMessageRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.VerifyMessageRequest} - */ -proto.pactus.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.VerifyMessageRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.VerifyMessageRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.VerifyMessageRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.VerifyMessageRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPublicKey(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string message = 1; - * @return {string} - */ -proto.pactus.VerifyMessageRequest.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.VerifyMessageRequest} returns this - */ -proto.pactus.VerifyMessageRequest.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string signature = 2; - * @return {string} - */ -proto.pactus.VerifyMessageRequest.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.VerifyMessageRequest} returns this - */ -proto.pactus.VerifyMessageRequest.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string public_key = 3; - * @return {string} - */ -proto.pactus.VerifyMessageRequest.prototype.getPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.VerifyMessageRequest} returns this - */ -proto.pactus.VerifyMessageRequest.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.VerifyMessageResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.VerifyMessageResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.VerifyMessageResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.VerifyMessageResponse.toObject = function(includeInstance, msg) { - var f, obj = { - isValid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.VerifyMessageResponse} - */ -proto.pactus.VerifyMessageResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.VerifyMessageResponse; - return proto.pactus.VerifyMessageResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.VerifyMessageResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.VerifyMessageResponse} - */ -proto.pactus.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsValid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.VerifyMessageResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.VerifyMessageResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.VerifyMessageResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.VerifyMessageResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIsValid(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - - -/** - * optional bool is_valid = 1; - * @return {boolean} - */ -proto.pactus.VerifyMessageResponse.prototype.getIsValid = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.pactus.VerifyMessageResponse} returns this - */ -proto.pactus.VerifyMessageResponse.prototype.setIsValid = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - - -goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/js/wallet_grpc_pb.js b/www/grpc/gen/js/wallet_grpc_pb.js deleted file mode 100644 index fc67ea02e..000000000 --- a/www/grpc/gen/js/wallet_grpc_pb.js +++ /dev/null @@ -1,354 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -'use strict'; -var grpc = require('grpc'); -var wallet_pb = require('./wallet_pb.js'); -var transaction_pb = require('./transaction_pb.js'); - -function serialize_pactus_CreateWalletRequest(arg) { - if (!(arg instanceof wallet_pb.CreateWalletRequest)) { - throw new Error('Expected argument of type pactus.CreateWalletRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_CreateWalletRequest(buffer_arg) { - return wallet_pb.CreateWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_CreateWalletResponse(arg) { - if (!(arg instanceof wallet_pb.CreateWalletResponse)) { - throw new Error('Expected argument of type pactus.CreateWalletResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_CreateWalletResponse(buffer_arg) { - return wallet_pb.CreateWalletResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetAddressHistoryRequest(arg) { - if (!(arg instanceof wallet_pb.GetAddressHistoryRequest)) { - throw new Error('Expected argument of type pactus.GetAddressHistoryRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetAddressHistoryRequest(buffer_arg) { - return wallet_pb.GetAddressHistoryRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetAddressHistoryResponse(arg) { - if (!(arg instanceof wallet_pb.GetAddressHistoryResponse)) { - throw new Error('Expected argument of type pactus.GetAddressHistoryResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetAddressHistoryResponse(buffer_arg) { - return wallet_pb.GetAddressHistoryResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetNewAddressRequest(arg) { - if (!(arg instanceof wallet_pb.GetNewAddressRequest)) { - throw new Error('Expected argument of type pactus.GetNewAddressRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetNewAddressRequest(buffer_arg) { - return wallet_pb.GetNewAddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetNewAddressResponse(arg) { - if (!(arg instanceof wallet_pb.GetNewAddressResponse)) { - throw new Error('Expected argument of type pactus.GetNewAddressResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetNewAddressResponse(buffer_arg) { - return wallet_pb.GetNewAddressResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetTotalBalanceRequest(arg) { - if (!(arg instanceof wallet_pb.GetTotalBalanceRequest)) { - throw new Error('Expected argument of type pactus.GetTotalBalanceRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetTotalBalanceRequest(buffer_arg) { - return wallet_pb.GetTotalBalanceRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetTotalBalanceResponse(arg) { - if (!(arg instanceof wallet_pb.GetTotalBalanceResponse)) { - throw new Error('Expected argument of type pactus.GetTotalBalanceResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetTotalBalanceResponse(buffer_arg) { - return wallet_pb.GetTotalBalanceResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetValidatorAddressRequest(arg) { - if (!(arg instanceof wallet_pb.GetValidatorAddressRequest)) { - throw new Error('Expected argument of type pactus.GetValidatorAddressRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetValidatorAddressRequest(buffer_arg) { - return wallet_pb.GetValidatorAddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_GetValidatorAddressResponse(arg) { - if (!(arg instanceof wallet_pb.GetValidatorAddressResponse)) { - throw new Error('Expected argument of type pactus.GetValidatorAddressResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_GetValidatorAddressResponse(buffer_arg) { - return wallet_pb.GetValidatorAddressResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_LoadWalletRequest(arg) { - if (!(arg instanceof wallet_pb.LoadWalletRequest)) { - throw new Error('Expected argument of type pactus.LoadWalletRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_LoadWalletRequest(buffer_arg) { - return wallet_pb.LoadWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_LoadWalletResponse(arg) { - if (!(arg instanceof wallet_pb.LoadWalletResponse)) { - throw new Error('Expected argument of type pactus.LoadWalletResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_LoadWalletResponse(buffer_arg) { - return wallet_pb.LoadWalletResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_RestoreWalletRequest(arg) { - if (!(arg instanceof wallet_pb.RestoreWalletRequest)) { - throw new Error('Expected argument of type pactus.RestoreWalletRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_RestoreWalletRequest(buffer_arg) { - return wallet_pb.RestoreWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_RestoreWalletResponse(arg) { - if (!(arg instanceof wallet_pb.RestoreWalletResponse)) { - throw new Error('Expected argument of type pactus.RestoreWalletResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_RestoreWalletResponse(buffer_arg) { - return wallet_pb.RestoreWalletResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_SignMessageRequest(arg) { - if (!(arg instanceof wallet_pb.SignMessageRequest)) { - throw new Error('Expected argument of type pactus.SignMessageRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_SignMessageRequest(buffer_arg) { - return wallet_pb.SignMessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_SignMessageResponse(arg) { - if (!(arg instanceof wallet_pb.SignMessageResponse)) { - throw new Error('Expected argument of type pactus.SignMessageResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_SignMessageResponse(buffer_arg) { - return wallet_pb.SignMessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_SignRawTransactionRequest(arg) { - if (!(arg instanceof wallet_pb.SignRawTransactionRequest)) { - throw new Error('Expected argument of type pactus.SignRawTransactionRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_SignRawTransactionRequest(buffer_arg) { - return wallet_pb.SignRawTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_SignRawTransactionResponse(arg) { - if (!(arg instanceof wallet_pb.SignRawTransactionResponse)) { - throw new Error('Expected argument of type pactus.SignRawTransactionResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_SignRawTransactionResponse(buffer_arg) { - return wallet_pb.SignRawTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_UnloadWalletRequest(arg) { - if (!(arg instanceof wallet_pb.UnloadWalletRequest)) { - throw new Error('Expected argument of type pactus.UnloadWalletRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_UnloadWalletRequest(buffer_arg) { - return wallet_pb.UnloadWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_pactus_UnloadWalletResponse(arg) { - if (!(arg instanceof wallet_pb.UnloadWalletResponse)) { - throw new Error('Expected argument of type pactus.UnloadWalletResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_pactus_UnloadWalletResponse(buffer_arg) { - return wallet_pb.UnloadWalletResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - - -// Define the Wallet service with various RPC methods for wallet management. -var WalletService = exports.WalletService = { - // CreateWallet creates a new wallet with the specified parameters. -createWallet: { - path: '/pactus.Wallet/CreateWallet', - requestStream: false, - responseStream: false, - requestType: wallet_pb.CreateWalletRequest, - responseType: wallet_pb.CreateWalletResponse, - requestSerialize: serialize_pactus_CreateWalletRequest, - requestDeserialize: deserialize_pactus_CreateWalletRequest, - responseSerialize: serialize_pactus_CreateWalletResponse, - responseDeserialize: deserialize_pactus_CreateWalletResponse, - }, - // RestoreWallet restores an existing wallet with the given mnemonic. -restoreWallet: { - path: '/pactus.Wallet/RestoreWallet', - requestStream: false, - responseStream: false, - requestType: wallet_pb.RestoreWalletRequest, - responseType: wallet_pb.RestoreWalletResponse, - requestSerialize: serialize_pactus_RestoreWalletRequest, - requestDeserialize: deserialize_pactus_RestoreWalletRequest, - responseSerialize: serialize_pactus_RestoreWalletResponse, - responseDeserialize: deserialize_pactus_RestoreWalletResponse, - }, - // LoadWallet loads an existing wallet with the given name. -loadWallet: { - path: '/pactus.Wallet/LoadWallet', - requestStream: false, - responseStream: false, - requestType: wallet_pb.LoadWalletRequest, - responseType: wallet_pb.LoadWalletResponse, - requestSerialize: serialize_pactus_LoadWalletRequest, - requestDeserialize: deserialize_pactus_LoadWalletRequest, - responseSerialize: serialize_pactus_LoadWalletResponse, - responseDeserialize: deserialize_pactus_LoadWalletResponse, - }, - // UnloadWallet unloads a currently loaded wallet with the specified name. -unloadWallet: { - path: '/pactus.Wallet/UnloadWallet', - requestStream: false, - responseStream: false, - requestType: wallet_pb.UnloadWalletRequest, - responseType: wallet_pb.UnloadWalletResponse, - requestSerialize: serialize_pactus_UnloadWalletRequest, - requestDeserialize: deserialize_pactus_UnloadWalletRequest, - responseSerialize: serialize_pactus_UnloadWalletResponse, - responseDeserialize: deserialize_pactus_UnloadWalletResponse, - }, - // GetTotalBalance returns the total available balance of the wallet. -getTotalBalance: { - path: '/pactus.Wallet/GetTotalBalance', - requestStream: false, - responseStream: false, - requestType: wallet_pb.GetTotalBalanceRequest, - responseType: wallet_pb.GetTotalBalanceResponse, - requestSerialize: serialize_pactus_GetTotalBalanceRequest, - requestDeserialize: deserialize_pactus_GetTotalBalanceRequest, - responseSerialize: serialize_pactus_GetTotalBalanceResponse, - responseDeserialize: deserialize_pactus_GetTotalBalanceResponse, - }, - // SignRawTransaction signs a raw transaction for a specified wallet. -signRawTransaction: { - path: '/pactus.Wallet/SignRawTransaction', - requestStream: false, - responseStream: false, - requestType: wallet_pb.SignRawTransactionRequest, - responseType: wallet_pb.SignRawTransactionResponse, - requestSerialize: serialize_pactus_SignRawTransactionRequest, - requestDeserialize: deserialize_pactus_SignRawTransactionRequest, - responseSerialize: serialize_pactus_SignRawTransactionResponse, - responseDeserialize: deserialize_pactus_SignRawTransactionResponse, - }, - // GetValidatorAddress retrieves the validator address associated with a -// public key. -getValidatorAddress: { - path: '/pactus.Wallet/GetValidatorAddress', - requestStream: false, - responseStream: false, - requestType: wallet_pb.GetValidatorAddressRequest, - responseType: wallet_pb.GetValidatorAddressResponse, - requestSerialize: serialize_pactus_GetValidatorAddressRequest, - requestDeserialize: deserialize_pactus_GetValidatorAddressRequest, - responseSerialize: serialize_pactus_GetValidatorAddressResponse, - responseDeserialize: deserialize_pactus_GetValidatorAddressResponse, - }, - // GetNewAddress generates a new address for the specified wallet. -getNewAddress: { - path: '/pactus.Wallet/GetNewAddress', - requestStream: false, - responseStream: false, - requestType: wallet_pb.GetNewAddressRequest, - responseType: wallet_pb.GetNewAddressResponse, - requestSerialize: serialize_pactus_GetNewAddressRequest, - requestDeserialize: deserialize_pactus_GetNewAddressRequest, - responseSerialize: serialize_pactus_GetNewAddressResponse, - responseDeserialize: deserialize_pactus_GetNewAddressResponse, - }, - // GetAddressHistory retrieves the transaction history of an address. -getAddressHistory: { - path: '/pactus.Wallet/GetAddressHistory', - requestStream: false, - responseStream: false, - requestType: wallet_pb.GetAddressHistoryRequest, - responseType: wallet_pb.GetAddressHistoryResponse, - requestSerialize: serialize_pactus_GetAddressHistoryRequest, - requestDeserialize: deserialize_pactus_GetAddressHistoryRequest, - responseSerialize: serialize_pactus_GetAddressHistoryResponse, - responseDeserialize: deserialize_pactus_GetAddressHistoryResponse, - }, - // SignMessage signs an arbitrary message. -signMessage: { - path: '/pactus.Wallet/SignMessage', - requestStream: false, - responseStream: false, - requestType: wallet_pb.SignMessageRequest, - responseType: wallet_pb.SignMessageResponse, - requestSerialize: serialize_pactus_SignMessageRequest, - requestDeserialize: deserialize_pactus_SignMessageRequest, - responseSerialize: serialize_pactus_SignMessageResponse, - responseDeserialize: deserialize_pactus_SignMessageResponse, - }, -}; - -exports.WalletClient = grpc.makeGenericClientConstructor(WalletService); diff --git a/www/grpc/gen/js/wallet_pb.js b/www/grpc/gen/js/wallet_pb.js deleted file mode 100644 index af1e74bb4..000000000 --- a/www/grpc/gen/js/wallet_pb.js +++ /dev/null @@ -1,4092 +0,0 @@ -// source: wallet.proto -/** - * @fileoverview - * @enhanceable - * @suppress {missingRequire} reports error on implicit type usages. - * @suppress {messageConventions} JS Compiler reports an error if a variable or - * field starts with 'MSG_' and isn't a translatable message. - * @public - */ -// GENERATED CODE -- DO NOT EDIT! -/* eslint-disable */ -// @ts-nocheck - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = - (typeof globalThis !== 'undefined' && globalThis) || - (typeof window !== 'undefined' && window) || - (typeof global !== 'undefined' && global) || - (typeof self !== 'undefined' && self) || - (function () { return this; }).call(null) || - Function('return this')(); - -var transaction_pb = require('./transaction_pb.js'); -goog.object.extend(proto, transaction_pb); -goog.exportSymbol('proto.pactus.AddressInfo', null, global); -goog.exportSymbol('proto.pactus.AddressType', null, global); -goog.exportSymbol('proto.pactus.CreateWalletRequest', null, global); -goog.exportSymbol('proto.pactus.CreateWalletResponse', null, global); -goog.exportSymbol('proto.pactus.GetAddressHistoryRequest', null, global); -goog.exportSymbol('proto.pactus.GetAddressHistoryResponse', null, global); -goog.exportSymbol('proto.pactus.GetNewAddressRequest', null, global); -goog.exportSymbol('proto.pactus.GetNewAddressResponse', null, global); -goog.exportSymbol('proto.pactus.GetTotalBalanceRequest', null, global); -goog.exportSymbol('proto.pactus.GetTotalBalanceResponse', null, global); -goog.exportSymbol('proto.pactus.GetValidatorAddressRequest', null, global); -goog.exportSymbol('proto.pactus.GetValidatorAddressResponse', null, global); -goog.exportSymbol('proto.pactus.HistoryInfo', null, global); -goog.exportSymbol('proto.pactus.LoadWalletRequest', null, global); -goog.exportSymbol('proto.pactus.LoadWalletResponse', null, global); -goog.exportSymbol('proto.pactus.RestoreWalletRequest', null, global); -goog.exportSymbol('proto.pactus.RestoreWalletResponse', null, global); -goog.exportSymbol('proto.pactus.SignMessageRequest', null, global); -goog.exportSymbol('proto.pactus.SignMessageResponse', null, global); -goog.exportSymbol('proto.pactus.SignRawTransactionRequest', null, global); -goog.exportSymbol('proto.pactus.SignRawTransactionResponse', null, global); -goog.exportSymbol('proto.pactus.UnloadWalletRequest', null, global); -goog.exportSymbol('proto.pactus.UnloadWalletResponse', null, global); -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.AddressInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.AddressInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.AddressInfo.displayName = 'proto.pactus.AddressInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.HistoryInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.HistoryInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.HistoryInfo.displayName = 'proto.pactus.HistoryInfo'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetAddressHistoryRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetAddressHistoryRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetAddressHistoryRequest.displayName = 'proto.pactus.GetAddressHistoryRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetAddressHistoryResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetAddressHistoryResponse.repeatedFields_, null); -}; -goog.inherits(proto.pactus.GetAddressHistoryResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetAddressHistoryResponse.displayName = 'proto.pactus.GetAddressHistoryResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetNewAddressRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetNewAddressRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetNewAddressRequest.displayName = 'proto.pactus.GetNewAddressRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetNewAddressResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetNewAddressResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetNewAddressResponse.displayName = 'proto.pactus.GetNewAddressResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.RestoreWalletRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.RestoreWalletRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.RestoreWalletRequest.displayName = 'proto.pactus.RestoreWalletRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.RestoreWalletResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.RestoreWalletResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.RestoreWalletResponse.displayName = 'proto.pactus.RestoreWalletResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.CreateWalletRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.CreateWalletRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.CreateWalletRequest.displayName = 'proto.pactus.CreateWalletRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.CreateWalletResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.CreateWalletResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.CreateWalletResponse.displayName = 'proto.pactus.CreateWalletResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.LoadWalletRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.LoadWalletRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.LoadWalletRequest.displayName = 'proto.pactus.LoadWalletRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.LoadWalletResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.LoadWalletResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.LoadWalletResponse.displayName = 'proto.pactus.LoadWalletResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.UnloadWalletRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.UnloadWalletRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.UnloadWalletRequest.displayName = 'proto.pactus.UnloadWalletRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.UnloadWalletResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.UnloadWalletResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.UnloadWalletResponse.displayName = 'proto.pactus.UnloadWalletResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetValidatorAddressRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetValidatorAddressRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetValidatorAddressRequest.displayName = 'proto.pactus.GetValidatorAddressRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetValidatorAddressResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetValidatorAddressResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetValidatorAddressResponse.displayName = 'proto.pactus.GetValidatorAddressResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.SignRawTransactionRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.SignRawTransactionRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.SignRawTransactionRequest.displayName = 'proto.pactus.SignRawTransactionRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.SignRawTransactionResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.SignRawTransactionResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.SignRawTransactionResponse.displayName = 'proto.pactus.SignRawTransactionResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetTotalBalanceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetTotalBalanceRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetTotalBalanceRequest.displayName = 'proto.pactus.GetTotalBalanceRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.GetTotalBalanceResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.GetTotalBalanceResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.GetTotalBalanceResponse.displayName = 'proto.pactus.GetTotalBalanceResponse'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.SignMessageRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.SignMessageRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.SignMessageRequest.displayName = 'proto.pactus.SignMessageRequest'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.SignMessageResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.SignMessageResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.SignMessageResponse.displayName = 'proto.pactus.SignMessageResponse'; -} - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.AddressInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.AddressInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.AddressInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.AddressInfo.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - publicKey: jspb.Message.getFieldWithDefault(msg, 2, ""), - label: jspb.Message.getFieldWithDefault(msg, 3, ""), - path: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.AddressInfo} - */ -proto.pactus.AddressInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.AddressInfo; - return proto.pactus.AddressInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.AddressInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.AddressInfo} - */ -proto.pactus.AddressInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPath(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.AddressInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.AddressInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.AddressInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.AddressInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPublicKey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getPath(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.pactus.AddressInfo.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.AddressInfo} returns this - */ -proto.pactus.AddressInfo.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string public_key = 2; - * @return {string} - */ -proto.pactus.AddressInfo.prototype.getPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.AddressInfo} returns this - */ -proto.pactus.AddressInfo.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string label = 3; - * @return {string} - */ -proto.pactus.AddressInfo.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.AddressInfo} returns this - */ -proto.pactus.AddressInfo.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string path = 4; - * @return {string} - */ -proto.pactus.AddressInfo.prototype.getPath = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.AddressInfo} returns this - */ -proto.pactus.AddressInfo.prototype.setPath = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.HistoryInfo.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.HistoryInfo.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.HistoryInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.HistoryInfo.toObject = function(includeInstance, msg) { - var f, obj = { - transactionId: jspb.Message.getFieldWithDefault(msg, 1, ""), - time: jspb.Message.getFieldWithDefault(msg, 2, 0), - payloadType: jspb.Message.getFieldWithDefault(msg, 3, ""), - description: jspb.Message.getFieldWithDefault(msg, 4, ""), - amount: jspb.Message.getFieldWithDefault(msg, 5, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.HistoryInfo} - */ -proto.pactus.HistoryInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.HistoryInfo; - return proto.pactus.HistoryInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.HistoryInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.HistoryInfo} - */ -proto.pactus.HistoryInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTransactionId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTime(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPayloadType(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setDescription(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.HistoryInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.HistoryInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.HistoryInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.HistoryInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransactionId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getTime(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getPayloadType(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getDescription(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } -}; - - -/** - * optional string transaction_id = 1; - * @return {string} - */ -proto.pactus.HistoryInfo.prototype.getTransactionId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.HistoryInfo} returns this - */ -proto.pactus.HistoryInfo.prototype.setTransactionId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional uint32 time = 2; - * @return {number} - */ -proto.pactus.HistoryInfo.prototype.getTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.HistoryInfo} returns this - */ -proto.pactus.HistoryInfo.prototype.setTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional string payload_type = 3; - * @return {string} - */ -proto.pactus.HistoryInfo.prototype.getPayloadType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.HistoryInfo} returns this - */ -proto.pactus.HistoryInfo.prototype.setPayloadType = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string description = 4; - * @return {string} - */ -proto.pactus.HistoryInfo.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.HistoryInfo} returns this - */ -proto.pactus.HistoryInfo.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int64 amount = 5; - * @return {number} - */ -proto.pactus.HistoryInfo.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.HistoryInfo} returns this - */ -proto.pactus.HistoryInfo.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetAddressHistoryRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetAddressHistoryRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetAddressHistoryRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetAddressHistoryRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetAddressHistoryRequest} - */ -proto.pactus.GetAddressHistoryRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetAddressHistoryRequest; - return proto.pactus.GetAddressHistoryRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetAddressHistoryRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetAddressHistoryRequest} - */ -proto.pactus.GetAddressHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetAddressHistoryRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetAddressHistoryRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetAddressHistoryRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetAddressHistoryRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.GetAddressHistoryRequest.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetAddressHistoryRequest} returns this - */ -proto.pactus.GetAddressHistoryRequest.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string address = 2; - * @return {string} - */ -proto.pactus.GetAddressHistoryRequest.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetAddressHistoryRequest} returns this - */ -proto.pactus.GetAddressHistoryRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.pactus.GetAddressHistoryResponse.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetAddressHistoryResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetAddressHistoryResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetAddressHistoryResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetAddressHistoryResponse.toObject = function(includeInstance, msg) { - var f, obj = { - historyInfoList: jspb.Message.toObjectList(msg.getHistoryInfoList(), - proto.pactus.HistoryInfo.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetAddressHistoryResponse} - */ -proto.pactus.GetAddressHistoryResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetAddressHistoryResponse; - return proto.pactus.GetAddressHistoryResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetAddressHistoryResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetAddressHistoryResponse} - */ -proto.pactus.GetAddressHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.pactus.HistoryInfo; - reader.readMessage(value,proto.pactus.HistoryInfo.deserializeBinaryFromReader); - msg.addHistoryInfo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetAddressHistoryResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetAddressHistoryResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetAddressHistoryResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetAddressHistoryResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getHistoryInfoList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.pactus.HistoryInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated HistoryInfo history_info = 1; - * @return {!Array} - */ -proto.pactus.GetAddressHistoryResponse.prototype.getHistoryInfoList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.pactus.HistoryInfo, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.pactus.GetAddressHistoryResponse} returns this -*/ -proto.pactus.GetAddressHistoryResponse.prototype.setHistoryInfoList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.pactus.HistoryInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.pactus.HistoryInfo} - */ -proto.pactus.GetAddressHistoryResponse.prototype.addHistoryInfo = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pactus.HistoryInfo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.pactus.GetAddressHistoryResponse} returns this - */ -proto.pactus.GetAddressHistoryResponse.prototype.clearHistoryInfoList = function() { - return this.setHistoryInfoList([]); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetNewAddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetNewAddressRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetNewAddressRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNewAddressRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), - addressType: jspb.Message.getFieldWithDefault(msg, 2, 0), - label: jspb.Message.getFieldWithDefault(msg, 3, ""), - password: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetNewAddressRequest} - */ -proto.pactus.GetNewAddressRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetNewAddressRequest; - return proto.pactus.GetNewAddressRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetNewAddressRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetNewAddressRequest} - */ -proto.pactus.GetNewAddressRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - case 2: - var value = /** @type {!proto.pactus.AddressType} */ (reader.readEnum()); - msg.setAddressType(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setLabel(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPassword(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetNewAddressRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetNewAddressRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetNewAddressRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNewAddressRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddressType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } - f = message.getLabel(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getPassword(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.GetNewAddressRequest.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetNewAddressRequest} returns this - */ -proto.pactus.GetNewAddressRequest.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional AddressType address_type = 2; - * @return {!proto.pactus.AddressType} - */ -proto.pactus.GetNewAddressRequest.prototype.getAddressType = function() { - return /** @type {!proto.pactus.AddressType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.pactus.AddressType} value - * @return {!proto.pactus.GetNewAddressRequest} returns this - */ -proto.pactus.GetNewAddressRequest.prototype.setAddressType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; - - -/** - * optional string label = 3; - * @return {string} - */ -proto.pactus.GetNewAddressRequest.prototype.getLabel = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetNewAddressRequest} returns this - */ -proto.pactus.GetNewAddressRequest.prototype.setLabel = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string password = 4; - * @return {string} - */ -proto.pactus.GetNewAddressRequest.prototype.getPassword = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetNewAddressRequest} returns this - */ -proto.pactus.GetNewAddressRequest.prototype.setPassword = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetNewAddressResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetNewAddressResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetNewAddressResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNewAddressResponse.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), - addressInfo: (f = msg.getAddressInfo()) && proto.pactus.AddressInfo.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetNewAddressResponse} - */ -proto.pactus.GetNewAddressResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetNewAddressResponse; - return proto.pactus.GetNewAddressResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetNewAddressResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetNewAddressResponse} - */ -proto.pactus.GetNewAddressResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - case 2: - var value = new proto.pactus.AddressInfo; - reader.readMessage(value,proto.pactus.AddressInfo.deserializeBinaryFromReader); - msg.setAddressInfo(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetNewAddressResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetNewAddressResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetNewAddressResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetNewAddressResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddressInfo(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.pactus.AddressInfo.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.GetNewAddressResponse.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetNewAddressResponse} returns this - */ -proto.pactus.GetNewAddressResponse.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional AddressInfo address_info = 2; - * @return {?proto.pactus.AddressInfo} - */ -proto.pactus.GetNewAddressResponse.prototype.getAddressInfo = function() { - return /** @type{?proto.pactus.AddressInfo} */ ( - jspb.Message.getWrapperField(this, proto.pactus.AddressInfo, 2)); -}; - - -/** - * @param {?proto.pactus.AddressInfo|undefined} value - * @return {!proto.pactus.GetNewAddressResponse} returns this -*/ -proto.pactus.GetNewAddressResponse.prototype.setAddressInfo = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.pactus.GetNewAddressResponse} returns this - */ -proto.pactus.GetNewAddressResponse.prototype.clearAddressInfo = function() { - return this.setAddressInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.pactus.GetNewAddressResponse.prototype.hasAddressInfo = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.RestoreWalletRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.RestoreWalletRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.RestoreWalletRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.RestoreWalletRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), - mnemonic: jspb.Message.getFieldWithDefault(msg, 2, ""), - password: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.RestoreWalletRequest} - */ -proto.pactus.RestoreWalletRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.RestoreWalletRequest; - return proto.pactus.RestoreWalletRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.RestoreWalletRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.RestoreWalletRequest} - */ -proto.pactus.RestoreWalletRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMnemonic(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPassword(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.RestoreWalletRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.RestoreWalletRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.RestoreWalletRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.RestoreWalletRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getMnemonic(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPassword(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.RestoreWalletRequest.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.RestoreWalletRequest} returns this - */ -proto.pactus.RestoreWalletRequest.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string mnemonic = 2; - * @return {string} - */ -proto.pactus.RestoreWalletRequest.prototype.getMnemonic = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.RestoreWalletRequest} returns this - */ -proto.pactus.RestoreWalletRequest.prototype.setMnemonic = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string password = 3; - * @return {string} - */ -proto.pactus.RestoreWalletRequest.prototype.getPassword = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.RestoreWalletRequest} returns this - */ -proto.pactus.RestoreWalletRequest.prototype.setPassword = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.RestoreWalletResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.RestoreWalletResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.RestoreWalletResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.RestoreWalletResponse.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.RestoreWalletResponse} - */ -proto.pactus.RestoreWalletResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.RestoreWalletResponse; - return proto.pactus.RestoreWalletResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.RestoreWalletResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.RestoreWalletResponse} - */ -proto.pactus.RestoreWalletResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.RestoreWalletResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.RestoreWalletResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.RestoreWalletResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.RestoreWalletResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.RestoreWalletResponse.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.RestoreWalletResponse} returns this - */ -proto.pactus.RestoreWalletResponse.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.CreateWalletRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.CreateWalletRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.CreateWalletRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.CreateWalletRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), - password: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.CreateWalletRequest} - */ -proto.pactus.CreateWalletRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.CreateWalletRequest; - return proto.pactus.CreateWalletRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.CreateWalletRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.CreateWalletRequest} - */ -proto.pactus.CreateWalletRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPassword(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.CreateWalletRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.CreateWalletRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.CreateWalletRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.CreateWalletRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPassword(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.CreateWalletRequest.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.CreateWalletRequest} returns this - */ -proto.pactus.CreateWalletRequest.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string password = 4; - * @return {string} - */ -proto.pactus.CreateWalletRequest.prototype.getPassword = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.CreateWalletRequest} returns this - */ -proto.pactus.CreateWalletRequest.prototype.setPassword = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.CreateWalletResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.CreateWalletResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.CreateWalletResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.CreateWalletResponse.toObject = function(includeInstance, msg) { - var f, obj = { - mnemonic: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.CreateWalletResponse} - */ -proto.pactus.CreateWalletResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.CreateWalletResponse; - return proto.pactus.CreateWalletResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.CreateWalletResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.CreateWalletResponse} - */ -proto.pactus.CreateWalletResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMnemonic(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.CreateWalletResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.CreateWalletResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.CreateWalletResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.CreateWalletResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMnemonic(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string mnemonic = 2; - * @return {string} - */ -proto.pactus.CreateWalletResponse.prototype.getMnemonic = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.CreateWalletResponse} returns this - */ -proto.pactus.CreateWalletResponse.prototype.setMnemonic = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.LoadWalletRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.LoadWalletRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.LoadWalletRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.LoadWalletRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.LoadWalletRequest} - */ -proto.pactus.LoadWalletRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.LoadWalletRequest; - return proto.pactus.LoadWalletRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.LoadWalletRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.LoadWalletRequest} - */ -proto.pactus.LoadWalletRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.LoadWalletRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.LoadWalletRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.LoadWalletRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.LoadWalletRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.LoadWalletRequest.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.LoadWalletRequest} returns this - */ -proto.pactus.LoadWalletRequest.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.LoadWalletResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.LoadWalletResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.LoadWalletResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.LoadWalletResponse.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.LoadWalletResponse} - */ -proto.pactus.LoadWalletResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.LoadWalletResponse; - return proto.pactus.LoadWalletResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.LoadWalletResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.LoadWalletResponse} - */ -proto.pactus.LoadWalletResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.LoadWalletResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.LoadWalletResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.LoadWalletResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.LoadWalletResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.LoadWalletResponse.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.LoadWalletResponse} returns this - */ -proto.pactus.LoadWalletResponse.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.UnloadWalletRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.UnloadWalletRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.UnloadWalletRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.UnloadWalletRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.UnloadWalletRequest} - */ -proto.pactus.UnloadWalletRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.UnloadWalletRequest; - return proto.pactus.UnloadWalletRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.UnloadWalletRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.UnloadWalletRequest} - */ -proto.pactus.UnloadWalletRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.UnloadWalletRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.UnloadWalletRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.UnloadWalletRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.UnloadWalletRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.UnloadWalletRequest.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.UnloadWalletRequest} returns this - */ -proto.pactus.UnloadWalletRequest.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.UnloadWalletResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.UnloadWalletResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.UnloadWalletResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.UnloadWalletResponse.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.UnloadWalletResponse} - */ -proto.pactus.UnloadWalletResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.UnloadWalletResponse; - return proto.pactus.UnloadWalletResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.UnloadWalletResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.UnloadWalletResponse} - */ -proto.pactus.UnloadWalletResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.UnloadWalletResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.UnloadWalletResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.UnloadWalletResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.UnloadWalletResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.UnloadWalletResponse.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.UnloadWalletResponse} returns this - */ -proto.pactus.UnloadWalletResponse.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetValidatorAddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetValidatorAddressRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetValidatorAddressRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorAddressRequest.toObject = function(includeInstance, msg) { - var f, obj = { - publicKey: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetValidatorAddressRequest} - */ -proto.pactus.GetValidatorAddressRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetValidatorAddressRequest; - return proto.pactus.GetValidatorAddressRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetValidatorAddressRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetValidatorAddressRequest} - */ -proto.pactus.GetValidatorAddressRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetValidatorAddressRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetValidatorAddressRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetValidatorAddressRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorAddressRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPublicKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string public_key = 1; - * @return {string} - */ -proto.pactus.GetValidatorAddressRequest.prototype.getPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetValidatorAddressRequest} returns this - */ -proto.pactus.GetValidatorAddressRequest.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetValidatorAddressResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetValidatorAddressResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetValidatorAddressResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorAddressResponse.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetValidatorAddressResponse} - */ -proto.pactus.GetValidatorAddressResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetValidatorAddressResponse; - return proto.pactus.GetValidatorAddressResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetValidatorAddressResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetValidatorAddressResponse} - */ -proto.pactus.GetValidatorAddressResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetValidatorAddressResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetValidatorAddressResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetValidatorAddressResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetValidatorAddressResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string address = 1; - * @return {string} - */ -proto.pactus.GetValidatorAddressResponse.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetValidatorAddressResponse} returns this - */ -proto.pactus.GetValidatorAddressResponse.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.SignRawTransactionRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.SignRawTransactionRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.SignRawTransactionRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignRawTransactionRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), - rawTransaction: jspb.Message.getFieldWithDefault(msg, 2, ""), - password: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.SignRawTransactionRequest} - */ -proto.pactus.SignRawTransactionRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.SignRawTransactionRequest; - return proto.pactus.SignRawTransactionRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.SignRawTransactionRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.SignRawTransactionRequest} - */ -proto.pactus.SignRawTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setRawTransaction(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setPassword(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.SignRawTransactionRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.SignRawTransactionRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.SignRawTransactionRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignRawTransactionRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getRawTransaction(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getPassword(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.SignRawTransactionRequest.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignRawTransactionRequest} returns this - */ -proto.pactus.SignRawTransactionRequest.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string raw_transaction = 2; - * @return {string} - */ -proto.pactus.SignRawTransactionRequest.prototype.getRawTransaction = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignRawTransactionRequest} returns this - */ -proto.pactus.SignRawTransactionRequest.prototype.setRawTransaction = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string password = 3; - * @return {string} - */ -proto.pactus.SignRawTransactionRequest.prototype.getPassword = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignRawTransactionRequest} returns this - */ -proto.pactus.SignRawTransactionRequest.prototype.setPassword = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.SignRawTransactionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.SignRawTransactionResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.SignRawTransactionResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignRawTransactionResponse.toObject = function(includeInstance, msg) { - var f, obj = { - transactionId: jspb.Message.getFieldWithDefault(msg, 1, ""), - signedRawTransaction: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.SignRawTransactionResponse} - */ -proto.pactus.SignRawTransactionResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.SignRawTransactionResponse; - return proto.pactus.SignRawTransactionResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.SignRawTransactionResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.SignRawTransactionResponse} - */ -proto.pactus.SignRawTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setTransactionId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSignedRawTransaction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.SignRawTransactionResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.SignRawTransactionResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.SignRawTransactionResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignRawTransactionResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTransactionId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSignedRawTransaction(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string transaction_id = 1; - * @return {string} - */ -proto.pactus.SignRawTransactionResponse.prototype.getTransactionId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignRawTransactionResponse} returns this - */ -proto.pactus.SignRawTransactionResponse.prototype.setTransactionId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string signed_raw_transaction = 2; - * @return {string} - */ -proto.pactus.SignRawTransactionResponse.prototype.getSignedRawTransaction = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignRawTransactionResponse} returns this - */ -proto.pactus.SignRawTransactionResponse.prototype.setSignedRawTransaction = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetTotalBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetTotalBalanceRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetTotalBalanceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTotalBalanceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetTotalBalanceRequest} - */ -proto.pactus.GetTotalBalanceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetTotalBalanceRequest; - return proto.pactus.GetTotalBalanceRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetTotalBalanceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetTotalBalanceRequest} - */ -proto.pactus.GetTotalBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetTotalBalanceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetTotalBalanceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetTotalBalanceRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTotalBalanceRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.GetTotalBalanceRequest.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetTotalBalanceRequest} returns this - */ -proto.pactus.GetTotalBalanceRequest.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetTotalBalanceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetTotalBalanceResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetTotalBalanceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTotalBalanceResponse.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), - totalBalance: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetTotalBalanceResponse} - */ -proto.pactus.GetTotalBalanceResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetTotalBalanceResponse; - return proto.pactus.GetTotalBalanceResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetTotalBalanceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetTotalBalanceResponse} - */ -proto.pactus.GetTotalBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setTotalBalance(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetTotalBalanceResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetTotalBalanceResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetTotalBalanceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetTotalBalanceResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getTotalBalance(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.GetTotalBalanceResponse.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetTotalBalanceResponse} returns this - */ -proto.pactus.GetTotalBalanceResponse.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int64 total_balance = 2; - * @return {number} - */ -proto.pactus.GetTotalBalanceResponse.prototype.getTotalBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.GetTotalBalanceResponse} returns this - */ -proto.pactus.GetTotalBalanceResponse.prototype.setTotalBalance = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.SignMessageRequest.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.SignMessageRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.SignMessageRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignMessageRequest.toObject = function(includeInstance, msg) { - var f, obj = { - walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), - password: jspb.Message.getFieldWithDefault(msg, 2, ""), - address: jspb.Message.getFieldWithDefault(msg, 3, ""), - message: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.SignMessageRequest} - */ -proto.pactus.SignMessageRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.SignMessageRequest; - return proto.pactus.SignMessageRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.SignMessageRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.SignMessageRequest} - */ -proto.pactus.SignMessageRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWalletName(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setPassword(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.SignMessageRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.SignMessageRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.SignMessageRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignMessageRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getWalletName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getPassword(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional string wallet_name = 1; - * @return {string} - */ -proto.pactus.SignMessageRequest.prototype.getWalletName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignMessageRequest} returns this - */ -proto.pactus.SignMessageRequest.prototype.setWalletName = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string password = 2; - * @return {string} - */ -proto.pactus.SignMessageRequest.prototype.getPassword = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignMessageRequest} returns this - */ -proto.pactus.SignMessageRequest.prototype.setPassword = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string address = 3; - * @return {string} - */ -proto.pactus.SignMessageRequest.prototype.getAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignMessageRequest} returns this - */ -proto.pactus.SignMessageRequest.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string message = 4; - * @return {string} - */ -proto.pactus.SignMessageRequest.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignMessageRequest} returns this - */ -proto.pactus.SignMessageRequest.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.SignMessageResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.SignMessageResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.SignMessageResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignMessageResponse.toObject = function(includeInstance, msg) { - var f, obj = { - signature: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.SignMessageResponse} - */ -proto.pactus.SignMessageResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.SignMessageResponse; - return proto.pactus.SignMessageResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.SignMessageResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.SignMessageResponse} - */ -proto.pactus.SignMessageResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.SignMessageResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.SignMessageResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.SignMessageResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.SignMessageResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string signature = 1; - * @return {string} - */ -proto.pactus.SignMessageResponse.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.SignMessageResponse} returns this - */ -proto.pactus.SignMessageResponse.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * @enum {number} - */ -proto.pactus.AddressType = { - ADDRESS_TYPE_TREASURY: 0, - ADDRESS_TYPE_VALIDATOR: 1, - ADDRESS_TYPE_BLS_ACCOUNT: 2, - ADDRESS_TYPE_ED25519_ACCOUNT: 3 -}; - -goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/python/blockchain_pb2.py b/www/grpc/gen/python/blockchain_pb2.py deleted file mode 100644 index 71699b150..000000000 --- a/www/grpc/gen/python/blockchain_pb2.py +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: blockchain.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -import transaction_pb2 as transaction__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x62lockchain.proto\x12\x06pactus\x1a\x11transaction.proto\"-\n\x11GetAccountRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"C\n\x12GetAccountResponse\x12-\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x13.pactus.AccountInfoR\x07\x61\x63\x63ount\"\x1e\n\x1cGetValidatorAddressesRequest\"=\n\x1dGetValidatorAddressesResponse\x12\x1c\n\taddresses\x18\x01 \x03(\tR\taddresses\"/\n\x13GetValidatorRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x1bGetValidatorByNumberRequest\x12\x16\n\x06number\x18\x01 \x01(\x05R\x06number\"K\n\x14GetValidatorResponse\x12\x33\n\tvalidator\x18\x01 \x01(\x0b\x32\x15.pactus.ValidatorInfoR\tvalidator\"/\n\x13GetPublicKeyRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x14GetPublicKeyResponse\x12\x1d\n\npublic_key\x18\x01 \x01(\tR\tpublicKey\"_\n\x0fGetBlockRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x34\n\tverbosity\x18\x02 \x01(\x0e\x32\x16.pactus.BlockVerbosityR\tverbosity\"\x83\x02\n\x10GetBlockResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x12\n\x04hash\x18\x02 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x03 \x01(\tR\x04\x64\x61ta\x12\x1d\n\nblock_time\x18\x04 \x01(\rR\tblockTime\x12/\n\x06header\x18\x05 \x01(\x0b\x32\x17.pactus.BlockHeaderInfoR\x06header\x12\x34\n\tprev_cert\x18\x06 \x01(\x0b\x32\x17.pactus.CertificateInfoR\x08prevCert\x12)\n\x03txs\x18\x07 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"-\n\x13GetBlockHashRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"*\n\x14GetBlockHashResponse\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"+\n\x15GetBlockHeightRequest\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"0\n\x16GetBlockHeightResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"\x1a\n\x18GetBlockchainInfoRequest\"\xc1\x03\n\x19GetBlockchainInfoResponse\x12*\n\x11last_block_height\x18\x01 \x01(\rR\x0flastBlockHeight\x12&\n\x0flast_block_hash\x18\x02 \x01(\tR\rlastBlockHash\x12%\n\x0etotal_accounts\x18\x03 \x01(\x05R\rtotalAccounts\x12)\n\x10total_validators\x18\x04 \x01(\x05R\x0ftotalValidators\x12\x1f\n\x0btotal_power\x18\x05 \x01(\x03R\ntotalPower\x12\'\n\x0f\x63ommittee_power\x18\x06 \x01(\x03R\x0e\x63ommitteePower\x12H\n\x14\x63ommittee_validators\x18\x07 \x03(\x0b\x32\x15.pactus.ValidatorInfoR\x13\x63ommitteeValidators\x12\x1b\n\tis_pruned\x18\x08 \x01(\x08R\x08isPruned\x12%\n\x0epruning_height\x18\t \x01(\rR\rpruningHeight\x12&\n\x0flast_block_time\x18\n \x01(\x03R\rlastBlockTime\"\x19\n\x17GetConsensusInfoRequest\"}\n\x18GetConsensusInfoResponse\x12,\n\x08proposal\x18\x01 \x01(\x0b\x32\x10.pactus.ProposalR\x08proposal\x12\x33\n\tinstances\x18\x02 \x03(\x0b\x32\x15.pactus.ConsensusInfoR\tinstances\"Q\n\x17GetTxPoolContentRequest\x12\x36\n\x0cpayload_type\x18\x01 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\"E\n\x18GetTxPoolContentResponse\x12)\n\x03txs\x18\x01 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"\xdc\x02\n\rValidatorInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x1d\n\npublic_key\x18\x03 \x01(\tR\tpublicKey\x12\x16\n\x06number\x18\x04 \x01(\x05R\x06number\x12\x14\n\x05stake\x18\x05 \x01(\x03R\x05stake\x12.\n\x13last_bonding_height\x18\x06 \x01(\rR\x11lastBondingHeight\x12\x32\n\x15last_sortition_height\x18\x07 \x01(\rR\x13lastSortitionHeight\x12)\n\x10unbonding_height\x18\x08 \x01(\rR\x0funbondingHeight\x12\x18\n\x07\x61\x64\x64ress\x18\t \x01(\tR\x07\x61\x64\x64ress\x12-\n\x12\x61vailability_score\x18\n \x01(\x01R\x11\x61vailabilityScore\"\x81\x01\n\x0b\x41\x63\x63ountInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x16\n\x06number\x18\x03 \x01(\x05R\x06number\x12\x18\n\x07\x62\x61lance\x18\x04 \x01(\x03R\x07\x62\x61lance\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"\xc4\x01\n\x0f\x42lockHeaderInfo\x12\x18\n\x07version\x18\x01 \x01(\x05R\x07version\x12&\n\x0fprev_block_hash\x18\x02 \x01(\tR\rprevBlockHash\x12\x1d\n\nstate_root\x18\x03 \x01(\tR\tstateRoot\x12%\n\x0esortition_seed\x18\x04 \x01(\tR\rsortitionSeed\x12)\n\x10proposer_address\x18\x05 \x01(\tR\x0fproposerAddress\"\x97\x01\n\x0f\x43\x65rtificateInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1e\n\ncommitters\x18\x03 \x03(\x05R\ncommitters\x12\x1c\n\tabsentees\x18\x04 \x03(\x05R\tabsentees\x12\x1c\n\tsignature\x18\x05 \x01(\tR\tsignature\"\xb1\x01\n\x08VoteInfo\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x10.pactus.VoteTypeR\x04type\x12\x14\n\x05voter\x18\x02 \x01(\tR\x05voter\x12\x1d\n\nblock_hash\x18\x03 \x01(\tR\tblockHash\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12\x19\n\x08\x63p_round\x18\x05 \x01(\x05R\x07\x63pRound\x12\x19\n\x08\x63p_value\x18\x06 \x01(\x05R\x07\x63pValue\"\x97\x01\n\rConsensusInfo\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x16\n\x06\x61\x63tive\x18\x02 \x01(\x08R\x06\x61\x63tive\x12\x16\n\x06height\x18\x03 \x01(\rR\x06height\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12&\n\x05votes\x18\x05 \x03(\x0b\x32\x10.pactus.VoteInfoR\x05votes\"~\n\x08Proposal\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1d\n\nblock_data\x18\x03 \x01(\tR\tblockData\x12%\n\x0esignature_data\x18\x04 \x01(\tR\rsignatureData*H\n\x0e\x42lockVerbosity\x12\x0e\n\nBLOCK_DATA\x10\x00\x12\x0e\n\nBLOCK_INFO\x10\x01\x12\x16\n\x12\x42LOCK_TRANSACTIONS\x10\x02*\\\n\x08VoteType\x12\x10\n\x0cVOTE_UNKNOWN\x10\x00\x12\x10\n\x0cVOTE_PREPARE\x10\x01\x12\x12\n\x0eVOTE_PRECOMMIT\x10\x02\x12\x18\n\x14VOTE_CHANGE_PROPOSER\x10\x03\x32\x8b\x07\n\nBlockchain\x12=\n\x08GetBlock\x12\x17.pactus.GetBlockRequest\x1a\x18.pactus.GetBlockResponse\x12I\n\x0cGetBlockHash\x12\x1b.pactus.GetBlockHashRequest\x1a\x1c.pactus.GetBlockHashResponse\x12O\n\x0eGetBlockHeight\x12\x1d.pactus.GetBlockHeightRequest\x1a\x1e.pactus.GetBlockHeightResponse\x12X\n\x11GetBlockchainInfo\x12 .pactus.GetBlockchainInfoRequest\x1a!.pactus.GetBlockchainInfoResponse\x12U\n\x10GetConsensusInfo\x12\x1f.pactus.GetConsensusInfoRequest\x1a .pactus.GetConsensusInfoResponse\x12\x43\n\nGetAccount\x12\x19.pactus.GetAccountRequest\x1a\x1a.pactus.GetAccountResponse\x12I\n\x0cGetValidator\x12\x1b.pactus.GetValidatorRequest\x1a\x1c.pactus.GetValidatorResponse\x12Y\n\x14GetValidatorByNumber\x12#.pactus.GetValidatorByNumberRequest\x1a\x1c.pactus.GetValidatorResponse\x12\x64\n\x15GetValidatorAddresses\x12$.pactus.GetValidatorAddressesRequest\x1a%.pactus.GetValidatorAddressesResponse\x12I\n\x0cGetPublicKey\x12\x1b.pactus.GetPublicKeyRequest\x1a\x1c.pactus.GetPublicKeyResponse\x12U\n\x10GetTxPoolContent\x12\x1f.pactus.GetTxPoolContentRequest\x1a .pactus.GetTxPoolContentResponseBE\n\x11pactus.blockchainZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'blockchain_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\021pactus.blockchainZ0github.com/pactus-project/pactus/www/grpc/pactus' - _BLOCKVERBOSITY._serialized_start=3174 - _BLOCKVERBOSITY._serialized_end=3246 - _VOTETYPE._serialized_start=3248 - _VOTETYPE._serialized_end=3340 - _GETACCOUNTREQUEST._serialized_start=47 - _GETACCOUNTREQUEST._serialized_end=92 - _GETACCOUNTRESPONSE._serialized_start=94 - _GETACCOUNTRESPONSE._serialized_end=161 - _GETVALIDATORADDRESSESREQUEST._serialized_start=163 - _GETVALIDATORADDRESSESREQUEST._serialized_end=193 - _GETVALIDATORADDRESSESRESPONSE._serialized_start=195 - _GETVALIDATORADDRESSESRESPONSE._serialized_end=256 - _GETVALIDATORREQUEST._serialized_start=258 - _GETVALIDATORREQUEST._serialized_end=305 - _GETVALIDATORBYNUMBERREQUEST._serialized_start=307 - _GETVALIDATORBYNUMBERREQUEST._serialized_end=360 - _GETVALIDATORRESPONSE._serialized_start=362 - _GETVALIDATORRESPONSE._serialized_end=437 - _GETPUBLICKEYREQUEST._serialized_start=439 - _GETPUBLICKEYREQUEST._serialized_end=486 - _GETPUBLICKEYRESPONSE._serialized_start=488 - _GETPUBLICKEYRESPONSE._serialized_end=541 - _GETBLOCKREQUEST._serialized_start=543 - _GETBLOCKREQUEST._serialized_end=638 - _GETBLOCKRESPONSE._serialized_start=641 - _GETBLOCKRESPONSE._serialized_end=900 - _GETBLOCKHASHREQUEST._serialized_start=902 - _GETBLOCKHASHREQUEST._serialized_end=947 - _GETBLOCKHASHRESPONSE._serialized_start=949 - _GETBLOCKHASHRESPONSE._serialized_end=991 - _GETBLOCKHEIGHTREQUEST._serialized_start=993 - _GETBLOCKHEIGHTREQUEST._serialized_end=1036 - _GETBLOCKHEIGHTRESPONSE._serialized_start=1038 - _GETBLOCKHEIGHTRESPONSE._serialized_end=1086 - _GETBLOCKCHAININFOREQUEST._serialized_start=1088 - _GETBLOCKCHAININFOREQUEST._serialized_end=1114 - _GETBLOCKCHAININFORESPONSE._serialized_start=1117 - _GETBLOCKCHAININFORESPONSE._serialized_end=1566 - _GETCONSENSUSINFOREQUEST._serialized_start=1568 - _GETCONSENSUSINFOREQUEST._serialized_end=1593 - _GETCONSENSUSINFORESPONSE._serialized_start=1595 - _GETCONSENSUSINFORESPONSE._serialized_end=1720 - _GETTXPOOLCONTENTREQUEST._serialized_start=1722 - _GETTXPOOLCONTENTREQUEST._serialized_end=1803 - _GETTXPOOLCONTENTRESPONSE._serialized_start=1805 - _GETTXPOOLCONTENTRESPONSE._serialized_end=1874 - _VALIDATORINFO._serialized_start=1877 - _VALIDATORINFO._serialized_end=2225 - _ACCOUNTINFO._serialized_start=2228 - _ACCOUNTINFO._serialized_end=2357 - _BLOCKHEADERINFO._serialized_start=2360 - _BLOCKHEADERINFO._serialized_end=2556 - _CERTIFICATEINFO._serialized_start=2559 - _CERTIFICATEINFO._serialized_end=2710 - _VOTEINFO._serialized_start=2713 - _VOTEINFO._serialized_end=2890 - _CONSENSUSINFO._serialized_start=2893 - _CONSENSUSINFO._serialized_end=3044 - _PROPOSAL._serialized_start=3046 - _PROPOSAL._serialized_end=3172 - _BLOCKCHAIN._serialized_start=3343 - _BLOCKCHAIN._serialized_end=4250 -# @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/blockchain_pb2.pyi b/www/grpc/gen/python/blockchain_pb2.pyi deleted file mode 100644 index 27b2a9848..000000000 --- a/www/grpc/gen/python/blockchain_pb2.pyi +++ /dev/null @@ -1,290 +0,0 @@ -import transaction_pb2 as _transaction_pb2 -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class BlockVerbosity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () - BLOCK_DATA: _ClassVar[BlockVerbosity] - BLOCK_INFO: _ClassVar[BlockVerbosity] - BLOCK_TRANSACTIONS: _ClassVar[BlockVerbosity] - -class VoteType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () - VOTE_UNKNOWN: _ClassVar[VoteType] - VOTE_PREPARE: _ClassVar[VoteType] - VOTE_PRECOMMIT: _ClassVar[VoteType] - VOTE_CHANGE_PROPOSER: _ClassVar[VoteType] -BLOCK_DATA: BlockVerbosity -BLOCK_INFO: BlockVerbosity -BLOCK_TRANSACTIONS: BlockVerbosity -VOTE_UNKNOWN: VoteType -VOTE_PREPARE: VoteType -VOTE_PRECOMMIT: VoteType -VOTE_CHANGE_PROPOSER: VoteType - -class GetAccountRequest(_message.Message): - __slots__ = ("address",) - ADDRESS_FIELD_NUMBER: _ClassVar[int] - address: str - def __init__(self, address: _Optional[str] = ...) -> None: ... - -class GetAccountResponse(_message.Message): - __slots__ = ("account",) - ACCOUNT_FIELD_NUMBER: _ClassVar[int] - account: AccountInfo - def __init__(self, account: _Optional[_Union[AccountInfo, _Mapping]] = ...) -> None: ... - -class GetValidatorAddressesRequest(_message.Message): - __slots__ = () - def __init__(self) -> None: ... - -class GetValidatorAddressesResponse(_message.Message): - __slots__ = ("addresses",) - ADDRESSES_FIELD_NUMBER: _ClassVar[int] - addresses: _containers.RepeatedScalarFieldContainer[str] - def __init__(self, addresses: _Optional[_Iterable[str]] = ...) -> None: ... - -class GetValidatorRequest(_message.Message): - __slots__ = ("address",) - ADDRESS_FIELD_NUMBER: _ClassVar[int] - address: str - def __init__(self, address: _Optional[str] = ...) -> None: ... - -class GetValidatorByNumberRequest(_message.Message): - __slots__ = ("number",) - NUMBER_FIELD_NUMBER: _ClassVar[int] - number: int - def __init__(self, number: _Optional[int] = ...) -> None: ... - -class GetValidatorResponse(_message.Message): - __slots__ = ("validator",) - VALIDATOR_FIELD_NUMBER: _ClassVar[int] - validator: ValidatorInfo - def __init__(self, validator: _Optional[_Union[ValidatorInfo, _Mapping]] = ...) -> None: ... - -class GetPublicKeyRequest(_message.Message): - __slots__ = ("address",) - ADDRESS_FIELD_NUMBER: _ClassVar[int] - address: str - def __init__(self, address: _Optional[str] = ...) -> None: ... - -class GetPublicKeyResponse(_message.Message): - __slots__ = ("public_key",) - PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] - public_key: str - def __init__(self, public_key: _Optional[str] = ...) -> None: ... - -class GetBlockRequest(_message.Message): - __slots__ = ("height", "verbosity") - HEIGHT_FIELD_NUMBER: _ClassVar[int] - VERBOSITY_FIELD_NUMBER: _ClassVar[int] - height: int - verbosity: BlockVerbosity - def __init__(self, height: _Optional[int] = ..., verbosity: _Optional[_Union[BlockVerbosity, str]] = ...) -> None: ... - -class GetBlockResponse(_message.Message): - __slots__ = ("height", "hash", "data", "block_time", "header", "prev_cert", "txs") - HEIGHT_FIELD_NUMBER: _ClassVar[int] - HASH_FIELD_NUMBER: _ClassVar[int] - DATA_FIELD_NUMBER: _ClassVar[int] - BLOCK_TIME_FIELD_NUMBER: _ClassVar[int] - HEADER_FIELD_NUMBER: _ClassVar[int] - PREV_CERT_FIELD_NUMBER: _ClassVar[int] - TXS_FIELD_NUMBER: _ClassVar[int] - height: int - hash: str - data: str - block_time: int - header: BlockHeaderInfo - prev_cert: CertificateInfo - txs: _containers.RepeatedCompositeFieldContainer[_transaction_pb2.TransactionInfo] - def __init__(self, height: _Optional[int] = ..., hash: _Optional[str] = ..., data: _Optional[str] = ..., block_time: _Optional[int] = ..., header: _Optional[_Union[BlockHeaderInfo, _Mapping]] = ..., prev_cert: _Optional[_Union[CertificateInfo, _Mapping]] = ..., txs: _Optional[_Iterable[_Union[_transaction_pb2.TransactionInfo, _Mapping]]] = ...) -> None: ... - -class GetBlockHashRequest(_message.Message): - __slots__ = ("height",) - HEIGHT_FIELD_NUMBER: _ClassVar[int] - height: int - def __init__(self, height: _Optional[int] = ...) -> None: ... - -class GetBlockHashResponse(_message.Message): - __slots__ = ("hash",) - HASH_FIELD_NUMBER: _ClassVar[int] - hash: str - def __init__(self, hash: _Optional[str] = ...) -> None: ... - -class GetBlockHeightRequest(_message.Message): - __slots__ = ("hash",) - HASH_FIELD_NUMBER: _ClassVar[int] - hash: str - def __init__(self, hash: _Optional[str] = ...) -> None: ... - -class GetBlockHeightResponse(_message.Message): - __slots__ = ("height",) - HEIGHT_FIELD_NUMBER: _ClassVar[int] - height: int - def __init__(self, height: _Optional[int] = ...) -> None: ... - -class GetBlockchainInfoRequest(_message.Message): - __slots__ = () - def __init__(self) -> None: ... - -class GetBlockchainInfoResponse(_message.Message): - __slots__ = ("last_block_height", "last_block_hash", "total_accounts", "total_validators", "total_power", "committee_power", "committee_validators", "is_pruned", "pruning_height", "last_block_time") - LAST_BLOCK_HEIGHT_FIELD_NUMBER: _ClassVar[int] - LAST_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int] - TOTAL_ACCOUNTS_FIELD_NUMBER: _ClassVar[int] - TOTAL_VALIDATORS_FIELD_NUMBER: _ClassVar[int] - TOTAL_POWER_FIELD_NUMBER: _ClassVar[int] - COMMITTEE_POWER_FIELD_NUMBER: _ClassVar[int] - COMMITTEE_VALIDATORS_FIELD_NUMBER: _ClassVar[int] - IS_PRUNED_FIELD_NUMBER: _ClassVar[int] - PRUNING_HEIGHT_FIELD_NUMBER: _ClassVar[int] - LAST_BLOCK_TIME_FIELD_NUMBER: _ClassVar[int] - last_block_height: int - last_block_hash: str - total_accounts: int - total_validators: int - total_power: int - committee_power: int - committee_validators: _containers.RepeatedCompositeFieldContainer[ValidatorInfo] - is_pruned: bool - pruning_height: int - last_block_time: int - def __init__(self, last_block_height: _Optional[int] = ..., last_block_hash: _Optional[str] = ..., total_accounts: _Optional[int] = ..., total_validators: _Optional[int] = ..., total_power: _Optional[int] = ..., committee_power: _Optional[int] = ..., committee_validators: _Optional[_Iterable[_Union[ValidatorInfo, _Mapping]]] = ..., is_pruned: bool = ..., pruning_height: _Optional[int] = ..., last_block_time: _Optional[int] = ...) -> None: ... - -class GetConsensusInfoRequest(_message.Message): - __slots__ = () - def __init__(self) -> None: ... - -class GetConsensusInfoResponse(_message.Message): - __slots__ = ("proposal", "instances") - PROPOSAL_FIELD_NUMBER: _ClassVar[int] - INSTANCES_FIELD_NUMBER: _ClassVar[int] - proposal: Proposal - instances: _containers.RepeatedCompositeFieldContainer[ConsensusInfo] - def __init__(self, proposal: _Optional[_Union[Proposal, _Mapping]] = ..., instances: _Optional[_Iterable[_Union[ConsensusInfo, _Mapping]]] = ...) -> None: ... - -class GetTxPoolContentRequest(_message.Message): - __slots__ = ("payload_type",) - PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int] - payload_type: _transaction_pb2.PayloadType - def __init__(self, payload_type: _Optional[_Union[_transaction_pb2.PayloadType, str]] = ...) -> None: ... - -class GetTxPoolContentResponse(_message.Message): - __slots__ = ("txs",) - TXS_FIELD_NUMBER: _ClassVar[int] - txs: _containers.RepeatedCompositeFieldContainer[_transaction_pb2.TransactionInfo] - def __init__(self, txs: _Optional[_Iterable[_Union[_transaction_pb2.TransactionInfo, _Mapping]]] = ...) -> None: ... - -class ValidatorInfo(_message.Message): - __slots__ = ("hash", "data", "public_key", "number", "stake", "last_bonding_height", "last_sortition_height", "unbonding_height", "address", "availability_score") - HASH_FIELD_NUMBER: _ClassVar[int] - DATA_FIELD_NUMBER: _ClassVar[int] - PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] - NUMBER_FIELD_NUMBER: _ClassVar[int] - STAKE_FIELD_NUMBER: _ClassVar[int] - LAST_BONDING_HEIGHT_FIELD_NUMBER: _ClassVar[int] - LAST_SORTITION_HEIGHT_FIELD_NUMBER: _ClassVar[int] - UNBONDING_HEIGHT_FIELD_NUMBER: _ClassVar[int] - ADDRESS_FIELD_NUMBER: _ClassVar[int] - AVAILABILITY_SCORE_FIELD_NUMBER: _ClassVar[int] - hash: str - data: str - public_key: str - number: int - stake: int - last_bonding_height: int - last_sortition_height: int - unbonding_height: int - address: str - availability_score: float - def __init__(self, hash: _Optional[str] = ..., data: _Optional[str] = ..., public_key: _Optional[str] = ..., number: _Optional[int] = ..., stake: _Optional[int] = ..., last_bonding_height: _Optional[int] = ..., last_sortition_height: _Optional[int] = ..., unbonding_height: _Optional[int] = ..., address: _Optional[str] = ..., availability_score: _Optional[float] = ...) -> None: ... - -class AccountInfo(_message.Message): - __slots__ = ("hash", "data", "number", "balance", "address") - HASH_FIELD_NUMBER: _ClassVar[int] - DATA_FIELD_NUMBER: _ClassVar[int] - NUMBER_FIELD_NUMBER: _ClassVar[int] - BALANCE_FIELD_NUMBER: _ClassVar[int] - ADDRESS_FIELD_NUMBER: _ClassVar[int] - hash: str - data: str - number: int - balance: int - address: str - def __init__(self, hash: _Optional[str] = ..., data: _Optional[str] = ..., number: _Optional[int] = ..., balance: _Optional[int] = ..., address: _Optional[str] = ...) -> None: ... - -class BlockHeaderInfo(_message.Message): - __slots__ = ("version", "prev_block_hash", "state_root", "sortition_seed", "proposer_address") - VERSION_FIELD_NUMBER: _ClassVar[int] - PREV_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int] - STATE_ROOT_FIELD_NUMBER: _ClassVar[int] - SORTITION_SEED_FIELD_NUMBER: _ClassVar[int] - PROPOSER_ADDRESS_FIELD_NUMBER: _ClassVar[int] - version: int - prev_block_hash: str - state_root: str - sortition_seed: str - proposer_address: str - def __init__(self, version: _Optional[int] = ..., prev_block_hash: _Optional[str] = ..., state_root: _Optional[str] = ..., sortition_seed: _Optional[str] = ..., proposer_address: _Optional[str] = ...) -> None: ... - -class CertificateInfo(_message.Message): - __slots__ = ("hash", "round", "committers", "absentees", "signature") - HASH_FIELD_NUMBER: _ClassVar[int] - ROUND_FIELD_NUMBER: _ClassVar[int] - COMMITTERS_FIELD_NUMBER: _ClassVar[int] - ABSENTEES_FIELD_NUMBER: _ClassVar[int] - SIGNATURE_FIELD_NUMBER: _ClassVar[int] - hash: str - round: int - committers: _containers.RepeatedScalarFieldContainer[int] - absentees: _containers.RepeatedScalarFieldContainer[int] - signature: str - def __init__(self, hash: _Optional[str] = ..., round: _Optional[int] = ..., committers: _Optional[_Iterable[int]] = ..., absentees: _Optional[_Iterable[int]] = ..., signature: _Optional[str] = ...) -> None: ... - -class VoteInfo(_message.Message): - __slots__ = ("type", "voter", "block_hash", "round", "cp_round", "cp_value") - TYPE_FIELD_NUMBER: _ClassVar[int] - VOTER_FIELD_NUMBER: _ClassVar[int] - BLOCK_HASH_FIELD_NUMBER: _ClassVar[int] - ROUND_FIELD_NUMBER: _ClassVar[int] - CP_ROUND_FIELD_NUMBER: _ClassVar[int] - CP_VALUE_FIELD_NUMBER: _ClassVar[int] - type: VoteType - voter: str - block_hash: str - round: int - cp_round: int - cp_value: int - def __init__(self, type: _Optional[_Union[VoteType, str]] = ..., voter: _Optional[str] = ..., block_hash: _Optional[str] = ..., round: _Optional[int] = ..., cp_round: _Optional[int] = ..., cp_value: _Optional[int] = ...) -> None: ... - -class ConsensusInfo(_message.Message): - __slots__ = ("address", "active", "height", "round", "votes") - ADDRESS_FIELD_NUMBER: _ClassVar[int] - ACTIVE_FIELD_NUMBER: _ClassVar[int] - HEIGHT_FIELD_NUMBER: _ClassVar[int] - ROUND_FIELD_NUMBER: _ClassVar[int] - VOTES_FIELD_NUMBER: _ClassVar[int] - address: str - active: bool - height: int - round: int - votes: _containers.RepeatedCompositeFieldContainer[VoteInfo] - def __init__(self, address: _Optional[str] = ..., active: bool = ..., height: _Optional[int] = ..., round: _Optional[int] = ..., votes: _Optional[_Iterable[_Union[VoteInfo, _Mapping]]] = ...) -> None: ... - -class Proposal(_message.Message): - __slots__ = ("height", "round", "block_data", "signature_data") - HEIGHT_FIELD_NUMBER: _ClassVar[int] - ROUND_FIELD_NUMBER: _ClassVar[int] - BLOCK_DATA_FIELD_NUMBER: _ClassVar[int] - SIGNATURE_DATA_FIELD_NUMBER: _ClassVar[int] - height: int - round: int - block_data: str - signature_data: str - def __init__(self, height: _Optional[int] = ..., round: _Optional[int] = ..., block_data: _Optional[str] = ..., signature_data: _Optional[str] = ...) -> None: ... diff --git a/www/grpc/gen/python/blockchain_pb2_grpc.py b/www/grpc/gen/python/blockchain_pb2_grpc.py deleted file mode 100644 index 3db19551b..000000000 --- a/www/grpc/gen/python/blockchain_pb2_grpc.py +++ /dev/null @@ -1,415 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - -import blockchain_pb2 as blockchain__pb2 - - -class BlockchainStub(object): - """Blockchain service defines RPC methods for interacting with the blockchain. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.GetBlock = channel.unary_unary( - '/pactus.Blockchain/GetBlock', - request_serializer=blockchain__pb2.GetBlockRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetBlockResponse.FromString, - ) - self.GetBlockHash = channel.unary_unary( - '/pactus.Blockchain/GetBlockHash', - request_serializer=blockchain__pb2.GetBlockHashRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetBlockHashResponse.FromString, - ) - self.GetBlockHeight = channel.unary_unary( - '/pactus.Blockchain/GetBlockHeight', - request_serializer=blockchain__pb2.GetBlockHeightRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetBlockHeightResponse.FromString, - ) - self.GetBlockchainInfo = channel.unary_unary( - '/pactus.Blockchain/GetBlockchainInfo', - request_serializer=blockchain__pb2.GetBlockchainInfoRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetBlockchainInfoResponse.FromString, - ) - self.GetConsensusInfo = channel.unary_unary( - '/pactus.Blockchain/GetConsensusInfo', - request_serializer=blockchain__pb2.GetConsensusInfoRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetConsensusInfoResponse.FromString, - ) - self.GetAccount = channel.unary_unary( - '/pactus.Blockchain/GetAccount', - request_serializer=blockchain__pb2.GetAccountRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetAccountResponse.FromString, - ) - self.GetValidator = channel.unary_unary( - '/pactus.Blockchain/GetValidator', - request_serializer=blockchain__pb2.GetValidatorRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetValidatorResponse.FromString, - ) - self.GetValidatorByNumber = channel.unary_unary( - '/pactus.Blockchain/GetValidatorByNumber', - request_serializer=blockchain__pb2.GetValidatorByNumberRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetValidatorResponse.FromString, - ) - self.GetValidatorAddresses = channel.unary_unary( - '/pactus.Blockchain/GetValidatorAddresses', - request_serializer=blockchain__pb2.GetValidatorAddressesRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetValidatorAddressesResponse.FromString, - ) - self.GetPublicKey = channel.unary_unary( - '/pactus.Blockchain/GetPublicKey', - request_serializer=blockchain__pb2.GetPublicKeyRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetPublicKeyResponse.FromString, - ) - self.GetTxPoolContent = channel.unary_unary( - '/pactus.Blockchain/GetTxPoolContent', - request_serializer=blockchain__pb2.GetTxPoolContentRequest.SerializeToString, - response_deserializer=blockchain__pb2.GetTxPoolContentResponse.FromString, - ) - - -class BlockchainServicer(object): - """Blockchain service defines RPC methods for interacting with the blockchain. - """ - - def GetBlock(self, request, context): - """GetBlock retrieves information about a block based on the provided request - parameters. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetBlockHash(self, request, context): - """GetBlockHash retrieves the hash of a block at the specified height. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetBlockHeight(self, request, context): - """GetBlockHeight retrieves the height of a block with the specified hash. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetBlockchainInfo(self, request, context): - """GetBlockchainInfo retrieves general information about the blockchain. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetConsensusInfo(self, request, context): - """GetConsensusInfo retrieves information about the consensus instances. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetAccount(self, request, context): - """GetAccount retrieves information about an account based on the provided - address. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetValidator(self, request, context): - """GetValidator retrieves information about a validator based on the provided - address. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetValidatorByNumber(self, request, context): - """GetValidatorByNumber retrieves information about a validator based on the - provided number. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetValidatorAddresses(self, request, context): - """GetValidatorAddresses retrieves a list of all validator addresses. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetPublicKey(self, request, context): - """GetPublicKey retrieves the public key of an account based on the provided - address. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetTxPoolContent(self, request, context): - """GetTxPoolContent retrieves current transactions in the transaction pool. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_BlockchainServicer_to_server(servicer, server): - rpc_method_handlers = { - 'GetBlock': grpc.unary_unary_rpc_method_handler( - servicer.GetBlock, - request_deserializer=blockchain__pb2.GetBlockRequest.FromString, - response_serializer=blockchain__pb2.GetBlockResponse.SerializeToString, - ), - 'GetBlockHash': grpc.unary_unary_rpc_method_handler( - servicer.GetBlockHash, - request_deserializer=blockchain__pb2.GetBlockHashRequest.FromString, - response_serializer=blockchain__pb2.GetBlockHashResponse.SerializeToString, - ), - 'GetBlockHeight': grpc.unary_unary_rpc_method_handler( - servicer.GetBlockHeight, - request_deserializer=blockchain__pb2.GetBlockHeightRequest.FromString, - response_serializer=blockchain__pb2.GetBlockHeightResponse.SerializeToString, - ), - 'GetBlockchainInfo': grpc.unary_unary_rpc_method_handler( - servicer.GetBlockchainInfo, - request_deserializer=blockchain__pb2.GetBlockchainInfoRequest.FromString, - response_serializer=blockchain__pb2.GetBlockchainInfoResponse.SerializeToString, - ), - 'GetConsensusInfo': grpc.unary_unary_rpc_method_handler( - servicer.GetConsensusInfo, - request_deserializer=blockchain__pb2.GetConsensusInfoRequest.FromString, - response_serializer=blockchain__pb2.GetConsensusInfoResponse.SerializeToString, - ), - 'GetAccount': grpc.unary_unary_rpc_method_handler( - servicer.GetAccount, - request_deserializer=blockchain__pb2.GetAccountRequest.FromString, - response_serializer=blockchain__pb2.GetAccountResponse.SerializeToString, - ), - 'GetValidator': grpc.unary_unary_rpc_method_handler( - servicer.GetValidator, - request_deserializer=blockchain__pb2.GetValidatorRequest.FromString, - response_serializer=blockchain__pb2.GetValidatorResponse.SerializeToString, - ), - 'GetValidatorByNumber': grpc.unary_unary_rpc_method_handler( - servicer.GetValidatorByNumber, - request_deserializer=blockchain__pb2.GetValidatorByNumberRequest.FromString, - response_serializer=blockchain__pb2.GetValidatorResponse.SerializeToString, - ), - 'GetValidatorAddresses': grpc.unary_unary_rpc_method_handler( - servicer.GetValidatorAddresses, - request_deserializer=blockchain__pb2.GetValidatorAddressesRequest.FromString, - response_serializer=blockchain__pb2.GetValidatorAddressesResponse.SerializeToString, - ), - 'GetPublicKey': grpc.unary_unary_rpc_method_handler( - servicer.GetPublicKey, - request_deserializer=blockchain__pb2.GetPublicKeyRequest.FromString, - response_serializer=blockchain__pb2.GetPublicKeyResponse.SerializeToString, - ), - 'GetTxPoolContent': grpc.unary_unary_rpc_method_handler( - servicer.GetTxPoolContent, - request_deserializer=blockchain__pb2.GetTxPoolContentRequest.FromString, - response_serializer=blockchain__pb2.GetTxPoolContentResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'pactus.Blockchain', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class Blockchain(object): - """Blockchain service defines RPC methods for interacting with the blockchain. - """ - - @staticmethod - def GetBlock(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetBlock', - blockchain__pb2.GetBlockRequest.SerializeToString, - blockchain__pb2.GetBlockResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetBlockHash(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetBlockHash', - blockchain__pb2.GetBlockHashRequest.SerializeToString, - blockchain__pb2.GetBlockHashResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetBlockHeight(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetBlockHeight', - blockchain__pb2.GetBlockHeightRequest.SerializeToString, - blockchain__pb2.GetBlockHeightResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetBlockchainInfo(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetBlockchainInfo', - blockchain__pb2.GetBlockchainInfoRequest.SerializeToString, - blockchain__pb2.GetBlockchainInfoResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetConsensusInfo(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetConsensusInfo', - blockchain__pb2.GetConsensusInfoRequest.SerializeToString, - blockchain__pb2.GetConsensusInfoResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetAccount(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetAccount', - blockchain__pb2.GetAccountRequest.SerializeToString, - blockchain__pb2.GetAccountResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetValidator(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetValidator', - blockchain__pb2.GetValidatorRequest.SerializeToString, - blockchain__pb2.GetValidatorResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetValidatorByNumber(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetValidatorByNumber', - blockchain__pb2.GetValidatorByNumberRequest.SerializeToString, - blockchain__pb2.GetValidatorResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetValidatorAddresses(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetValidatorAddresses', - blockchain__pb2.GetValidatorAddressesRequest.SerializeToString, - blockchain__pb2.GetValidatorAddressesResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetPublicKey(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetPublicKey', - blockchain__pb2.GetPublicKeyRequest.SerializeToString, - blockchain__pb2.GetPublicKeyResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetTxPoolContent(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetTxPoolContent', - blockchain__pb2.GetTxPoolContentRequest.SerializeToString, - blockchain__pb2.GetTxPoolContentResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/python/network_pb2.py b/www/grpc/gen/python/network_pb2.py deleted file mode 100644 index 3c67a0b93..000000000 --- a/www/grpc/gen/python/network_pb2.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: network.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rnetwork.proto\x12\x06pactus\">\n\x15GetNetworkInfoRequest\x12%\n\x0eonly_connected\x18\x01 \x01(\x08R\ronlyConnected\"\xae\x04\n\x16GetNetworkInfoResponse\x12!\n\x0cnetwork_name\x18\x01 \x01(\tR\x0bnetworkName\x12(\n\x10total_sent_bytes\x18\x02 \x01(\x03R\x0etotalSentBytes\x12\x30\n\x14total_received_bytes\x18\x03 \x01(\x03R\x12totalReceivedBytes\x12\x32\n\x15\x63onnected_peers_count\x18\x04 \x01(\rR\x13\x63onnectedPeersCount\x12\x39\n\x0f\x63onnected_peers\x18\x05 \x03(\x0b\x32\x10.pactus.PeerInfoR\x0e\x63onnectedPeers\x12L\n\nsent_bytes\x18\x06 \x03(\x0b\x32-.pactus.GetNetworkInfoResponse.SentBytesEntryR\tsentBytes\x12X\n\x0ereceived_bytes\x18\x07 \x03(\x0b\x32\x31.pactus.GetNetworkInfoResponse.ReceivedBytesEntryR\rreceivedBytes\x1a<\n\x0eSentBytesEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\x1a@\n\x12ReceivedBytesEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\"\x14\n\x12GetNodeInfoRequest\"\x87\x03\n\x13GetNodeInfoResponse\x12\x18\n\x07moniker\x18\x01 \x01(\tR\x07moniker\x12\x14\n\x05\x61gent\x18\x02 \x01(\tR\x05\x61gent\x12\x17\n\x07peer_id\x18\x03 \x01(\tR\x06peerId\x12\x1d\n\nstarted_at\x18\x04 \x01(\x04R\tstartedAt\x12\"\n\x0creachability\x18\x05 \x01(\tR\x0creachability\x12\x1a\n\x08services\x18\x06 \x01(\x05R\x08services\x12%\n\x0eservices_names\x18\x07 \x01(\tR\rservicesNames\x12\x1f\n\x0blocal_addrs\x18\x08 \x03(\tR\nlocalAddrs\x12\x1c\n\tprotocols\x18\t \x03(\tR\tprotocols\x12!\n\x0c\x63lock_offset\x18\r \x01(\x01R\x0b\x63lockOffset\x12?\n\x0f\x63onnection_info\x18\x0e \x01(\x0b\x32\x16.pactus.ConnectionInfoR\x0e\x63onnectionInfo\"\xed\x06\n\x08PeerInfo\x12\x16\n\x06status\x18\x01 \x01(\x05R\x06status\x12\x18\n\x07moniker\x18\x02 \x01(\tR\x07moniker\x12\x14\n\x05\x61gent\x18\x03 \x01(\tR\x05\x61gent\x12\x17\n\x07peer_id\x18\x04 \x01(\tR\x06peerId\x12%\n\x0e\x63onsensus_keys\x18\x05 \x03(\tR\rconsensusKeys\x12/\n\x13\x63onsensus_addresses\x18\x06 \x03(\tR\x12\x63onsensusAddresses\x12\x1a\n\x08services\x18\x07 \x01(\rR\x08services\x12&\n\x0flast_block_hash\x18\x08 \x01(\tR\rlastBlockHash\x12\x16\n\x06height\x18\t \x01(\rR\x06height\x12)\n\x10received_bundles\x18\n \x01(\x05R\x0freceivedBundles\x12\'\n\x0finvalid_bundles\x18\x0b \x01(\x05R\x0einvalidBundles\x12\x1b\n\tlast_sent\x18\x0c \x01(\x03R\x08lastSent\x12#\n\rlast_received\x18\r \x01(\x03R\x0clastReceived\x12>\n\nsent_bytes\x18\x0e \x03(\x0b\x32\x1f.pactus.PeerInfo.SentBytesEntryR\tsentBytes\x12J\n\x0ereceived_bytes\x18\x0f \x03(\x0b\x32#.pactus.PeerInfo.ReceivedBytesEntryR\rreceivedBytes\x12\x18\n\x07\x61\x64\x64ress\x18\x10 \x01(\tR\x07\x61\x64\x64ress\x12\x1c\n\tdirection\x18\x11 \x01(\tR\tdirection\x12\x1c\n\tprotocols\x18\x12 \x03(\tR\tprotocols\x12%\n\x0etotal_sessions\x18\x13 \x01(\x05R\rtotalSessions\x12-\n\x12\x63ompleted_sessions\x18\x14 \x01(\x05R\x11\x63ompletedSessions\x1a<\n\x0eSentBytesEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\x1a@\n\x12ReceivedBytesEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\"\x96\x01\n\x0e\x43onnectionInfo\x12 \n\x0b\x63onnections\x18\x01 \x01(\x04R\x0b\x63onnections\x12/\n\x13inbound_connections\x18\x02 \x01(\x04R\x12inboundConnections\x12\x31\n\x14outbound_connections\x18\x03 \x01(\x04R\x13outboundConnections2\xa2\x01\n\x07Network\x12O\n\x0eGetNetworkInfo\x12\x1d.pactus.GetNetworkInfoRequest\x1a\x1e.pactus.GetNetworkInfoResponse\x12\x46\n\x0bGetNodeInfo\x12\x1a.pactus.GetNodeInfoRequest\x1a\x1b.pactus.GetNodeInfoResponseBB\n\x0epactus.networkZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'network_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\016pactus.networkZ0github.com/pactus-project/pactus/www/grpc/pactus' - _GETNETWORKINFORESPONSE_SENTBYTESENTRY._options = None - _GETNETWORKINFORESPONSE_SENTBYTESENTRY._serialized_options = b'8\001' - _GETNETWORKINFORESPONSE_RECEIVEDBYTESENTRY._options = None - _GETNETWORKINFORESPONSE_RECEIVEDBYTESENTRY._serialized_options = b'8\001' - _PEERINFO_SENTBYTESENTRY._options = None - _PEERINFO_SENTBYTESENTRY._serialized_options = b'8\001' - _PEERINFO_RECEIVEDBYTESENTRY._options = None - _PEERINFO_RECEIVEDBYTESENTRY._serialized_options = b'8\001' - _GETNETWORKINFOREQUEST._serialized_start=25 - _GETNETWORKINFOREQUEST._serialized_end=87 - _GETNETWORKINFORESPONSE._serialized_start=90 - _GETNETWORKINFORESPONSE._serialized_end=648 - _GETNETWORKINFORESPONSE_SENTBYTESENTRY._serialized_start=522 - _GETNETWORKINFORESPONSE_SENTBYTESENTRY._serialized_end=582 - _GETNETWORKINFORESPONSE_RECEIVEDBYTESENTRY._serialized_start=584 - _GETNETWORKINFORESPONSE_RECEIVEDBYTESENTRY._serialized_end=648 - _GETNODEINFOREQUEST._serialized_start=650 - _GETNODEINFOREQUEST._serialized_end=670 - _GETNODEINFORESPONSE._serialized_start=673 - _GETNODEINFORESPONSE._serialized_end=1064 - _PEERINFO._serialized_start=1067 - _PEERINFO._serialized_end=1944 - _PEERINFO_SENTBYTESENTRY._serialized_start=522 - _PEERINFO_SENTBYTESENTRY._serialized_end=582 - _PEERINFO_RECEIVEDBYTESENTRY._serialized_start=584 - _PEERINFO_RECEIVEDBYTESENTRY._serialized_end=648 - _CONNECTIONINFO._serialized_start=1947 - _CONNECTIONINFO._serialized_end=2097 - _NETWORK._serialized_start=2100 - _NETWORK._serialized_end=2262 -# @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/network_pb2.pyi b/www/grpc/gen/python/network_pb2.pyi deleted file mode 100644 index c0145a42f..000000000 --- a/www/grpc/gen/python/network_pb2.pyi +++ /dev/null @@ -1,142 +0,0 @@ -from google.protobuf.internal import containers as _containers -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class GetNetworkInfoRequest(_message.Message): - __slots__ = ("only_connected",) - ONLY_CONNECTED_FIELD_NUMBER: _ClassVar[int] - only_connected: bool - def __init__(self, only_connected: bool = ...) -> None: ... - -class GetNetworkInfoResponse(_message.Message): - __slots__ = ("network_name", "total_sent_bytes", "total_received_bytes", "connected_peers_count", "connected_peers", "sent_bytes", "received_bytes") - class SentBytesEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: int - value: int - def __init__(self, key: _Optional[int] = ..., value: _Optional[int] = ...) -> None: ... - class ReceivedBytesEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: int - value: int - def __init__(self, key: _Optional[int] = ..., value: _Optional[int] = ...) -> None: ... - NETWORK_NAME_FIELD_NUMBER: _ClassVar[int] - TOTAL_SENT_BYTES_FIELD_NUMBER: _ClassVar[int] - TOTAL_RECEIVED_BYTES_FIELD_NUMBER: _ClassVar[int] - CONNECTED_PEERS_COUNT_FIELD_NUMBER: _ClassVar[int] - CONNECTED_PEERS_FIELD_NUMBER: _ClassVar[int] - SENT_BYTES_FIELD_NUMBER: _ClassVar[int] - RECEIVED_BYTES_FIELD_NUMBER: _ClassVar[int] - network_name: str - total_sent_bytes: int - total_received_bytes: int - connected_peers_count: int - connected_peers: _containers.RepeatedCompositeFieldContainer[PeerInfo] - sent_bytes: _containers.ScalarMap[int, int] - received_bytes: _containers.ScalarMap[int, int] - def __init__(self, network_name: _Optional[str] = ..., total_sent_bytes: _Optional[int] = ..., total_received_bytes: _Optional[int] = ..., connected_peers_count: _Optional[int] = ..., connected_peers: _Optional[_Iterable[_Union[PeerInfo, _Mapping]]] = ..., sent_bytes: _Optional[_Mapping[int, int]] = ..., received_bytes: _Optional[_Mapping[int, int]] = ...) -> None: ... - -class GetNodeInfoRequest(_message.Message): - __slots__ = () - def __init__(self) -> None: ... - -class GetNodeInfoResponse(_message.Message): - __slots__ = ("moniker", "agent", "peer_id", "started_at", "reachability", "services", "services_names", "local_addrs", "protocols", "clock_offset", "connection_info") - MONIKER_FIELD_NUMBER: _ClassVar[int] - AGENT_FIELD_NUMBER: _ClassVar[int] - PEER_ID_FIELD_NUMBER: _ClassVar[int] - STARTED_AT_FIELD_NUMBER: _ClassVar[int] - REACHABILITY_FIELD_NUMBER: _ClassVar[int] - SERVICES_FIELD_NUMBER: _ClassVar[int] - SERVICES_NAMES_FIELD_NUMBER: _ClassVar[int] - LOCAL_ADDRS_FIELD_NUMBER: _ClassVar[int] - PROTOCOLS_FIELD_NUMBER: _ClassVar[int] - CLOCK_OFFSET_FIELD_NUMBER: _ClassVar[int] - CONNECTION_INFO_FIELD_NUMBER: _ClassVar[int] - moniker: str - agent: str - peer_id: str - started_at: int - reachability: str - services: int - services_names: str - local_addrs: _containers.RepeatedScalarFieldContainer[str] - protocols: _containers.RepeatedScalarFieldContainer[str] - clock_offset: float - connection_info: ConnectionInfo - def __init__(self, moniker: _Optional[str] = ..., agent: _Optional[str] = ..., peer_id: _Optional[str] = ..., started_at: _Optional[int] = ..., reachability: _Optional[str] = ..., services: _Optional[int] = ..., services_names: _Optional[str] = ..., local_addrs: _Optional[_Iterable[str]] = ..., protocols: _Optional[_Iterable[str]] = ..., clock_offset: _Optional[float] = ..., connection_info: _Optional[_Union[ConnectionInfo, _Mapping]] = ...) -> None: ... - -class PeerInfo(_message.Message): - __slots__ = ("status", "moniker", "agent", "peer_id", "consensus_keys", "consensus_addresses", "services", "last_block_hash", "height", "received_bundles", "invalid_bundles", "last_sent", "last_received", "sent_bytes", "received_bytes", "address", "direction", "protocols", "total_sessions", "completed_sessions") - class SentBytesEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: int - value: int - def __init__(self, key: _Optional[int] = ..., value: _Optional[int] = ...) -> None: ... - class ReceivedBytesEntry(_message.Message): - __slots__ = ("key", "value") - KEY_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - key: int - value: int - def __init__(self, key: _Optional[int] = ..., value: _Optional[int] = ...) -> None: ... - STATUS_FIELD_NUMBER: _ClassVar[int] - MONIKER_FIELD_NUMBER: _ClassVar[int] - AGENT_FIELD_NUMBER: _ClassVar[int] - PEER_ID_FIELD_NUMBER: _ClassVar[int] - CONSENSUS_KEYS_FIELD_NUMBER: _ClassVar[int] - CONSENSUS_ADDRESSES_FIELD_NUMBER: _ClassVar[int] - SERVICES_FIELD_NUMBER: _ClassVar[int] - LAST_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int] - HEIGHT_FIELD_NUMBER: _ClassVar[int] - RECEIVED_BUNDLES_FIELD_NUMBER: _ClassVar[int] - INVALID_BUNDLES_FIELD_NUMBER: _ClassVar[int] - LAST_SENT_FIELD_NUMBER: _ClassVar[int] - LAST_RECEIVED_FIELD_NUMBER: _ClassVar[int] - SENT_BYTES_FIELD_NUMBER: _ClassVar[int] - RECEIVED_BYTES_FIELD_NUMBER: _ClassVar[int] - ADDRESS_FIELD_NUMBER: _ClassVar[int] - DIRECTION_FIELD_NUMBER: _ClassVar[int] - PROTOCOLS_FIELD_NUMBER: _ClassVar[int] - TOTAL_SESSIONS_FIELD_NUMBER: _ClassVar[int] - COMPLETED_SESSIONS_FIELD_NUMBER: _ClassVar[int] - status: int - moniker: str - agent: str - peer_id: str - consensus_keys: _containers.RepeatedScalarFieldContainer[str] - consensus_addresses: _containers.RepeatedScalarFieldContainer[str] - services: int - last_block_hash: str - height: int - received_bundles: int - invalid_bundles: int - last_sent: int - last_received: int - sent_bytes: _containers.ScalarMap[int, int] - received_bytes: _containers.ScalarMap[int, int] - address: str - direction: str - protocols: _containers.RepeatedScalarFieldContainer[str] - total_sessions: int - completed_sessions: int - def __init__(self, status: _Optional[int] = ..., moniker: _Optional[str] = ..., agent: _Optional[str] = ..., peer_id: _Optional[str] = ..., consensus_keys: _Optional[_Iterable[str]] = ..., consensus_addresses: _Optional[_Iterable[str]] = ..., services: _Optional[int] = ..., last_block_hash: _Optional[str] = ..., height: _Optional[int] = ..., received_bundles: _Optional[int] = ..., invalid_bundles: _Optional[int] = ..., last_sent: _Optional[int] = ..., last_received: _Optional[int] = ..., sent_bytes: _Optional[_Mapping[int, int]] = ..., received_bytes: _Optional[_Mapping[int, int]] = ..., address: _Optional[str] = ..., direction: _Optional[str] = ..., protocols: _Optional[_Iterable[str]] = ..., total_sessions: _Optional[int] = ..., completed_sessions: _Optional[int] = ...) -> None: ... - -class ConnectionInfo(_message.Message): - __slots__ = ("connections", "inbound_connections", "outbound_connections") - CONNECTIONS_FIELD_NUMBER: _ClassVar[int] - INBOUND_CONNECTIONS_FIELD_NUMBER: _ClassVar[int] - OUTBOUND_CONNECTIONS_FIELD_NUMBER: _ClassVar[int] - connections: int - inbound_connections: int - outbound_connections: int - def __init__(self, connections: _Optional[int] = ..., inbound_connections: _Optional[int] = ..., outbound_connections: _Optional[int] = ...) -> None: ... diff --git a/www/grpc/gen/python/network_pb2_grpc.py b/www/grpc/gen/python/network_pb2_grpc.py deleted file mode 100644 index 3caacf583..000000000 --- a/www/grpc/gen/python/network_pb2_grpc.py +++ /dev/null @@ -1,104 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - -import network_pb2 as network__pb2 - - -class NetworkStub(object): - """Network service provides RPCs for retrieving information about the network. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.GetNetworkInfo = channel.unary_unary( - '/pactus.Network/GetNetworkInfo', - request_serializer=network__pb2.GetNetworkInfoRequest.SerializeToString, - response_deserializer=network__pb2.GetNetworkInfoResponse.FromString, - ) - self.GetNodeInfo = channel.unary_unary( - '/pactus.Network/GetNodeInfo', - request_serializer=network__pb2.GetNodeInfoRequest.SerializeToString, - response_deserializer=network__pb2.GetNodeInfoResponse.FromString, - ) - - -class NetworkServicer(object): - """Network service provides RPCs for retrieving information about the network. - """ - - def GetNetworkInfo(self, request, context): - """GetNetworkInfo retrieves information about the overall network. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetNodeInfo(self, request, context): - """GetNodeInfo retrieves information about a specific node in the network. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_NetworkServicer_to_server(servicer, server): - rpc_method_handlers = { - 'GetNetworkInfo': grpc.unary_unary_rpc_method_handler( - servicer.GetNetworkInfo, - request_deserializer=network__pb2.GetNetworkInfoRequest.FromString, - response_serializer=network__pb2.GetNetworkInfoResponse.SerializeToString, - ), - 'GetNodeInfo': grpc.unary_unary_rpc_method_handler( - servicer.GetNodeInfo, - request_deserializer=network__pb2.GetNodeInfoRequest.FromString, - response_serializer=network__pb2.GetNodeInfoResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'pactus.Network', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class Network(object): - """Network service provides RPCs for retrieving information about the network. - """ - - @staticmethod - def GetNetworkInfo(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Network/GetNetworkInfo', - network__pb2.GetNetworkInfoRequest.SerializeToString, - network__pb2.GetNetworkInfoResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetNodeInfo(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Network/GetNodeInfo', - network__pb2.GetNodeInfoRequest.SerializeToString, - network__pb2.GetNodeInfoResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/python/transaction_pb2.py b/www/grpc/gen/python/transaction_pb2.py deleted file mode 100644 index 94d753a18..000000000 --- a/www/grpc/gen/python/transaction_pb2.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: transaction.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11transaction.proto\x12\x06pactus\"c\n\x15GetTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tverbosity\x18\x02 \x01(\x0e\x32\x1c.pactus.TransactionVerbosityR\tverbosity\"\x95\x01\n\x16GetTransactionResponse\x12!\n\x0c\x62lock_height\x18\x01 \x01(\rR\x0b\x62lockHeight\x12\x1d\n\nblock_time\x18\x02 \x01(\rR\tblockTime\x12\x39\n\x0btransaction\x18\x03 \x01(\x0b\x32\x17.pactus.TransactionInfoR\x0btransaction\"\x88\x01\n\x13\x43\x61lculateFeeRequest\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x36\n\x0cpayload_type\x18\x02 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12!\n\x0c\x66ixed_amount\x18\x03 \x01(\x08R\x0b\x66ixedAmount\"@\n\x14\x43\x61lculateFeeResponse\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x02 \x01(\x03R\x03\x66\x65\x65\"S\n\x1b\x42roadcastTransactionRequest\x12\x34\n\x16signed_raw_transaction\x18\x01 \x01(\tR\x14signedRawTransaction\".\n\x1c\x42roadcastTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xb1\x01\n GetRawTransferTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"\xca\x01\n\x1cGetRawBondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x04 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x05 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x07 \x01(\tR\x04memo\"~\n\x1eGetRawUnbondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x03 \x01(\tR\x10validatorAddress\x12\x12\n\x04memo\x18\x04 \x01(\tR\x04memo\"\xd3\x01\n GetRawWithdrawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"D\n\x19GetRawTransactionResponse\x12\'\n\x0fraw_transaction\x18\x01 \x01(\tR\x0erawTransaction\"]\n\x0fPayloadTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"W\n\x0bPayloadBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\"B\n\x10PayloadSortition\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x14\n\x05proof\x18\x02 \x01(\tR\x05proof\"-\n\rPayloadUnbond\x12\x1c\n\tvalidator\x18\x01 \x01(\tR\tvalidator\"M\n\x0fPayloadWithdraw\x12\x12\n\x04\x66rom\x18\x01 \x01(\tR\x04\x66rom\x12\x0e\n\x02to\x18\x02 \x01(\tR\x02to\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"\xac\x04\n\x0fTransactionInfo\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x18\n\x07version\x18\x03 \x01(\x05R\x07version\x12\x1b\n\tlock_time\x18\x04 \x01(\rR\x08lockTime\x12\x14\n\x05value\x18\x05 \x01(\x03R\x05value\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x36\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12\x35\n\x08transfer\x18\x1e \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x1f \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12\x38\n\tsortition\x18 \x01(\x0b\x32\x18.pactus.PayloadSortitionH\x00R\tsortition\x12/\n\x06unbond\x18! \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\" \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdraw\x12\x12\n\x04memo\x18\x08 \x01(\tR\x04memo\x12\x1d\n\npublic_key\x18\t \x01(\tR\tpublicKey\x12\x1c\n\tsignature\x18\n \x01(\tR\tsignatureB\t\n\x07payload*\x83\x01\n\x0bPayloadType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10TRANSFER_PAYLOAD\x10\x01\x12\x10\n\x0c\x42OND_PAYLOAD\x10\x02\x12\x15\n\x11SORTITION_PAYLOAD\x10\x03\x12\x12\n\x0eUNBOND_PAYLOAD\x10\x04\x12\x14\n\x10WITHDRAW_PAYLOAD\x10\x05*B\n\x14TransactionVerbosity\x12\x14\n\x10TRANSACTION_DATA\x10\x00\x12\x14\n\x10TRANSACTION_INFO\x10\x01\x32\xa8\x05\n\x0bTransaction\x12O\n\x0eGetTransaction\x12\x1d.pactus.GetTransactionRequest\x1a\x1e.pactus.GetTransactionResponse\x12I\n\x0c\x43\x61lculateFee\x12\x1b.pactus.CalculateFeeRequest\x1a\x1c.pactus.CalculateFeeResponse\x12\x61\n\x14\x42roadcastTransaction\x12#.pactus.BroadcastTransactionRequest\x1a$.pactus.BroadcastTransactionResponse\x12h\n\x19GetRawTransferTransaction\x12(.pactus.GetRawTransferTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12`\n\x15GetRawBondTransaction\x12$.pactus.GetRawBondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12\x64\n\x17GetRawUnbondTransaction\x12&.pactus.GetRawUnbondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawWithdrawTransaction\x12(.pactus.GetRawWithdrawTransactionRequest\x1a!.pactus.GetRawTransactionResponseBF\n\x12pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'transaction_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\022pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactus' - _PAYLOADTYPE._serialized_start=2355 - _PAYLOADTYPE._serialized_end=2486 - _TRANSACTIONVERBOSITY._serialized_start=2488 - _TRANSACTIONVERBOSITY._serialized_end=2554 - _GETTRANSACTIONREQUEST._serialized_start=29 - _GETTRANSACTIONREQUEST._serialized_end=128 - _GETTRANSACTIONRESPONSE._serialized_start=131 - _GETTRANSACTIONRESPONSE._serialized_end=280 - _CALCULATEFEEREQUEST._serialized_start=283 - _CALCULATEFEEREQUEST._serialized_end=419 - _CALCULATEFEERESPONSE._serialized_start=421 - _CALCULATEFEERESPONSE._serialized_end=485 - _BROADCASTTRANSACTIONREQUEST._serialized_start=487 - _BROADCASTTRANSACTIONREQUEST._serialized_end=570 - _BROADCASTTRANSACTIONRESPONSE._serialized_start=572 - _BROADCASTTRANSACTIONRESPONSE._serialized_end=618 - _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_start=621 - _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_end=798 - _GETRAWBONDTRANSACTIONREQUEST._serialized_start=801 - _GETRAWBONDTRANSACTIONREQUEST._serialized_end=1003 - _GETRAWUNBONDTRANSACTIONREQUEST._serialized_start=1005 - _GETRAWUNBONDTRANSACTIONREQUEST._serialized_end=1131 - _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_start=1134 - _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_end=1345 - _GETRAWTRANSACTIONRESPONSE._serialized_start=1347 - _GETRAWTRANSACTIONRESPONSE._serialized_end=1415 - _PAYLOADTRANSFER._serialized_start=1417 - _PAYLOADTRANSFER._serialized_end=1510 - _PAYLOADBOND._serialized_start=1512 - _PAYLOADBOND._serialized_end=1599 - _PAYLOADSORTITION._serialized_start=1601 - _PAYLOADSORTITION._serialized_end=1667 - _PAYLOADUNBOND._serialized_start=1669 - _PAYLOADUNBOND._serialized_end=1714 - _PAYLOADWITHDRAW._serialized_start=1716 - _PAYLOADWITHDRAW._serialized_end=1793 - _TRANSACTIONINFO._serialized_start=1796 - _TRANSACTIONINFO._serialized_end=2352 - _TRANSACTION._serialized_start=2557 - _TRANSACTION._serialized_end=3237 -# @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/transaction_pb2.pyi b/www/grpc/gen/python/transaction_pb2.pyi deleted file mode 100644 index ac8d9ef60..000000000 --- a/www/grpc/gen/python/transaction_pb2.pyi +++ /dev/null @@ -1,219 +0,0 @@ -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class PayloadType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () - UNKNOWN: _ClassVar[PayloadType] - TRANSFER_PAYLOAD: _ClassVar[PayloadType] - BOND_PAYLOAD: _ClassVar[PayloadType] - SORTITION_PAYLOAD: _ClassVar[PayloadType] - UNBOND_PAYLOAD: _ClassVar[PayloadType] - WITHDRAW_PAYLOAD: _ClassVar[PayloadType] - -class TransactionVerbosity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () - TRANSACTION_DATA: _ClassVar[TransactionVerbosity] - TRANSACTION_INFO: _ClassVar[TransactionVerbosity] -UNKNOWN: PayloadType -TRANSFER_PAYLOAD: PayloadType -BOND_PAYLOAD: PayloadType -SORTITION_PAYLOAD: PayloadType -UNBOND_PAYLOAD: PayloadType -WITHDRAW_PAYLOAD: PayloadType -TRANSACTION_DATA: TransactionVerbosity -TRANSACTION_INFO: TransactionVerbosity - -class GetTransactionRequest(_message.Message): - __slots__ = ("id", "verbosity") - ID_FIELD_NUMBER: _ClassVar[int] - VERBOSITY_FIELD_NUMBER: _ClassVar[int] - id: str - verbosity: TransactionVerbosity - def __init__(self, id: _Optional[str] = ..., verbosity: _Optional[_Union[TransactionVerbosity, str]] = ...) -> None: ... - -class GetTransactionResponse(_message.Message): - __slots__ = ("block_height", "block_time", "transaction") - BLOCK_HEIGHT_FIELD_NUMBER: _ClassVar[int] - BLOCK_TIME_FIELD_NUMBER: _ClassVar[int] - TRANSACTION_FIELD_NUMBER: _ClassVar[int] - block_height: int - block_time: int - transaction: TransactionInfo - def __init__(self, block_height: _Optional[int] = ..., block_time: _Optional[int] = ..., transaction: _Optional[_Union[TransactionInfo, _Mapping]] = ...) -> None: ... - -class CalculateFeeRequest(_message.Message): - __slots__ = ("amount", "payload_type", "fixed_amount") - AMOUNT_FIELD_NUMBER: _ClassVar[int] - PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int] - FIXED_AMOUNT_FIELD_NUMBER: _ClassVar[int] - amount: int - payload_type: PayloadType - fixed_amount: bool - def __init__(self, amount: _Optional[int] = ..., payload_type: _Optional[_Union[PayloadType, str]] = ..., fixed_amount: bool = ...) -> None: ... - -class CalculateFeeResponse(_message.Message): - __slots__ = ("amount", "fee") - AMOUNT_FIELD_NUMBER: _ClassVar[int] - FEE_FIELD_NUMBER: _ClassVar[int] - amount: int - fee: int - def __init__(self, amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... - -class BroadcastTransactionRequest(_message.Message): - __slots__ = ("signed_raw_transaction",) - SIGNED_RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] - signed_raw_transaction: str - def __init__(self, signed_raw_transaction: _Optional[str] = ...) -> None: ... - -class BroadcastTransactionResponse(_message.Message): - __slots__ = ("id",) - ID_FIELD_NUMBER: _ClassVar[int] - id: str - def __init__(self, id: _Optional[str] = ...) -> None: ... - -class GetRawTransferTransactionRequest(_message.Message): - __slots__ = ("lock_time", "sender", "receiver", "amount", "fee", "memo") - LOCK_TIME_FIELD_NUMBER: _ClassVar[int] - SENDER_FIELD_NUMBER: _ClassVar[int] - RECEIVER_FIELD_NUMBER: _ClassVar[int] - AMOUNT_FIELD_NUMBER: _ClassVar[int] - FEE_FIELD_NUMBER: _ClassVar[int] - MEMO_FIELD_NUMBER: _ClassVar[int] - lock_time: int - sender: str - receiver: str - amount: int - fee: int - memo: str - def __init__(self, lock_time: _Optional[int] = ..., sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ... - -class GetRawBondTransactionRequest(_message.Message): - __slots__ = ("lock_time", "sender", "receiver", "stake", "public_key", "fee", "memo") - LOCK_TIME_FIELD_NUMBER: _ClassVar[int] - SENDER_FIELD_NUMBER: _ClassVar[int] - RECEIVER_FIELD_NUMBER: _ClassVar[int] - STAKE_FIELD_NUMBER: _ClassVar[int] - PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] - FEE_FIELD_NUMBER: _ClassVar[int] - MEMO_FIELD_NUMBER: _ClassVar[int] - lock_time: int - sender: str - receiver: str - stake: int - public_key: str - fee: int - memo: str - def __init__(self, lock_time: _Optional[int] = ..., sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ... - -class GetRawUnbondTransactionRequest(_message.Message): - __slots__ = ("lock_time", "validator_address", "memo") - LOCK_TIME_FIELD_NUMBER: _ClassVar[int] - VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] - MEMO_FIELD_NUMBER: _ClassVar[int] - lock_time: int - validator_address: str - memo: str - def __init__(self, lock_time: _Optional[int] = ..., validator_address: _Optional[str] = ..., memo: _Optional[str] = ...) -> None: ... - -class GetRawWithdrawTransactionRequest(_message.Message): - __slots__ = ("lock_time", "validator_address", "account_address", "amount", "fee", "memo") - LOCK_TIME_FIELD_NUMBER: _ClassVar[int] - VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] - ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int] - AMOUNT_FIELD_NUMBER: _ClassVar[int] - FEE_FIELD_NUMBER: _ClassVar[int] - MEMO_FIELD_NUMBER: _ClassVar[int] - lock_time: int - validator_address: str - account_address: str - amount: int - fee: int - memo: str - def __init__(self, lock_time: _Optional[int] = ..., validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ... - -class GetRawTransactionResponse(_message.Message): - __slots__ = ("raw_transaction",) - RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] - raw_transaction: str - def __init__(self, raw_transaction: _Optional[str] = ...) -> None: ... - -class PayloadTransfer(_message.Message): - __slots__ = ("sender", "receiver", "amount") - SENDER_FIELD_NUMBER: _ClassVar[int] - RECEIVER_FIELD_NUMBER: _ClassVar[int] - AMOUNT_FIELD_NUMBER: _ClassVar[int] - sender: str - receiver: str - amount: int - def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ... - -class PayloadBond(_message.Message): - __slots__ = ("sender", "receiver", "stake") - SENDER_FIELD_NUMBER: _ClassVar[int] - RECEIVER_FIELD_NUMBER: _ClassVar[int] - STAKE_FIELD_NUMBER: _ClassVar[int] - sender: str - receiver: str - stake: int - def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ...) -> None: ... - -class PayloadSortition(_message.Message): - __slots__ = ("address", "proof") - ADDRESS_FIELD_NUMBER: _ClassVar[int] - PROOF_FIELD_NUMBER: _ClassVar[int] - address: str - proof: str - def __init__(self, address: _Optional[str] = ..., proof: _Optional[str] = ...) -> None: ... - -class PayloadUnbond(_message.Message): - __slots__ = ("validator",) - VALIDATOR_FIELD_NUMBER: _ClassVar[int] - validator: str - def __init__(self, validator: _Optional[str] = ...) -> None: ... - -class PayloadWithdraw(_message.Message): - __slots__ = ("to", "amount") - FROM_FIELD_NUMBER: _ClassVar[int] - TO_FIELD_NUMBER: _ClassVar[int] - AMOUNT_FIELD_NUMBER: _ClassVar[int] - to: str - amount: int - def __init__(self, to: _Optional[str] = ..., amount: _Optional[int] = ..., **kwargs) -> None: ... - -class TransactionInfo(_message.Message): - __slots__ = ("id", "data", "version", "lock_time", "value", "fee", "payload_type", "transfer", "bond", "sortition", "unbond", "withdraw", "memo", "public_key", "signature") - ID_FIELD_NUMBER: _ClassVar[int] - DATA_FIELD_NUMBER: _ClassVar[int] - VERSION_FIELD_NUMBER: _ClassVar[int] - LOCK_TIME_FIELD_NUMBER: _ClassVar[int] - VALUE_FIELD_NUMBER: _ClassVar[int] - FEE_FIELD_NUMBER: _ClassVar[int] - PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int] - TRANSFER_FIELD_NUMBER: _ClassVar[int] - BOND_FIELD_NUMBER: _ClassVar[int] - SORTITION_FIELD_NUMBER: _ClassVar[int] - UNBOND_FIELD_NUMBER: _ClassVar[int] - WITHDRAW_FIELD_NUMBER: _ClassVar[int] - MEMO_FIELD_NUMBER: _ClassVar[int] - PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] - SIGNATURE_FIELD_NUMBER: _ClassVar[int] - id: str - data: str - version: int - lock_time: int - value: int - fee: int - payload_type: PayloadType - transfer: PayloadTransfer - bond: PayloadBond - sortition: PayloadSortition - unbond: PayloadUnbond - withdraw: PayloadWithdraw - memo: str - public_key: str - signature: str - def __init__(self, id: _Optional[str] = ..., data: _Optional[str] = ..., version: _Optional[int] = ..., lock_time: _Optional[int] = ..., value: _Optional[int] = ..., fee: _Optional[int] = ..., payload_type: _Optional[_Union[PayloadType, str]] = ..., transfer: _Optional[_Union[PayloadTransfer, _Mapping]] = ..., bond: _Optional[_Union[PayloadBond, _Mapping]] = ..., sortition: _Optional[_Union[PayloadSortition, _Mapping]] = ..., unbond: _Optional[_Union[PayloadUnbond, _Mapping]] = ..., withdraw: _Optional[_Union[PayloadWithdraw, _Mapping]] = ..., memo: _Optional[str] = ..., public_key: _Optional[str] = ..., signature: _Optional[str] = ...) -> None: ... diff --git a/www/grpc/gen/python/transaction_pb2_grpc.py b/www/grpc/gen/python/transaction_pb2_grpc.py deleted file mode 100644 index a1d6e68ca..000000000 --- a/www/grpc/gen/python/transaction_pb2_grpc.py +++ /dev/null @@ -1,279 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - -import transaction_pb2 as transaction__pb2 - - -class TransactionStub(object): - """Transaction service defines various RPC methods for interacting with - transactions. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.GetTransaction = channel.unary_unary( - '/pactus.Transaction/GetTransaction', - request_serializer=transaction__pb2.GetTransactionRequest.SerializeToString, - response_deserializer=transaction__pb2.GetTransactionResponse.FromString, - ) - self.CalculateFee = channel.unary_unary( - '/pactus.Transaction/CalculateFee', - request_serializer=transaction__pb2.CalculateFeeRequest.SerializeToString, - response_deserializer=transaction__pb2.CalculateFeeResponse.FromString, - ) - self.BroadcastTransaction = channel.unary_unary( - '/pactus.Transaction/BroadcastTransaction', - request_serializer=transaction__pb2.BroadcastTransactionRequest.SerializeToString, - response_deserializer=transaction__pb2.BroadcastTransactionResponse.FromString, - ) - self.GetRawTransferTransaction = channel.unary_unary( - '/pactus.Transaction/GetRawTransferTransaction', - request_serializer=transaction__pb2.GetRawTransferTransactionRequest.SerializeToString, - response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString, - ) - self.GetRawBondTransaction = channel.unary_unary( - '/pactus.Transaction/GetRawBondTransaction', - request_serializer=transaction__pb2.GetRawBondTransactionRequest.SerializeToString, - response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString, - ) - self.GetRawUnbondTransaction = channel.unary_unary( - '/pactus.Transaction/GetRawUnbondTransaction', - request_serializer=transaction__pb2.GetRawUnbondTransactionRequest.SerializeToString, - response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString, - ) - self.GetRawWithdrawTransaction = channel.unary_unary( - '/pactus.Transaction/GetRawWithdrawTransaction', - request_serializer=transaction__pb2.GetRawWithdrawTransactionRequest.SerializeToString, - response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString, - ) - - -class TransactionServicer(object): - """Transaction service defines various RPC methods for interacting with - transactions. - """ - - def GetTransaction(self, request, context): - """GetTransaction retrieves transaction details based on the provided request - parameters. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CalculateFee(self, request, context): - """CalculateFee calculates the transaction fee based on the specified amount - and payload type. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def BroadcastTransaction(self, request, context): - """BroadcastTransaction broadcasts a signed transaction to the network. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetRawTransferTransaction(self, request, context): - """GetRawTransferTransaction retrieves raw details of a transfer transaction. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetRawBondTransaction(self, request, context): - """GetRawBondTransaction retrieves raw details of a bond transaction. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetRawUnbondTransaction(self, request, context): - """GetRawUnbondTransaction retrieves raw details of an unbond transaction. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetRawWithdrawTransaction(self, request, context): - """GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_TransactionServicer_to_server(servicer, server): - rpc_method_handlers = { - 'GetTransaction': grpc.unary_unary_rpc_method_handler( - servicer.GetTransaction, - request_deserializer=transaction__pb2.GetTransactionRequest.FromString, - response_serializer=transaction__pb2.GetTransactionResponse.SerializeToString, - ), - 'CalculateFee': grpc.unary_unary_rpc_method_handler( - servicer.CalculateFee, - request_deserializer=transaction__pb2.CalculateFeeRequest.FromString, - response_serializer=transaction__pb2.CalculateFeeResponse.SerializeToString, - ), - 'BroadcastTransaction': grpc.unary_unary_rpc_method_handler( - servicer.BroadcastTransaction, - request_deserializer=transaction__pb2.BroadcastTransactionRequest.FromString, - response_serializer=transaction__pb2.BroadcastTransactionResponse.SerializeToString, - ), - 'GetRawTransferTransaction': grpc.unary_unary_rpc_method_handler( - servicer.GetRawTransferTransaction, - request_deserializer=transaction__pb2.GetRawTransferTransactionRequest.FromString, - response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString, - ), - 'GetRawBondTransaction': grpc.unary_unary_rpc_method_handler( - servicer.GetRawBondTransaction, - request_deserializer=transaction__pb2.GetRawBondTransactionRequest.FromString, - response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString, - ), - 'GetRawUnbondTransaction': grpc.unary_unary_rpc_method_handler( - servicer.GetRawUnbondTransaction, - request_deserializer=transaction__pb2.GetRawUnbondTransactionRequest.FromString, - response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString, - ), - 'GetRawWithdrawTransaction': grpc.unary_unary_rpc_method_handler( - servicer.GetRawWithdrawTransaction, - request_deserializer=transaction__pb2.GetRawWithdrawTransactionRequest.FromString, - response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'pactus.Transaction', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class Transaction(object): - """Transaction service defines various RPC methods for interacting with - transactions. - """ - - @staticmethod - def GetTransaction(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetTransaction', - transaction__pb2.GetTransactionRequest.SerializeToString, - transaction__pb2.GetTransactionResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def CalculateFee(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/CalculateFee', - transaction__pb2.CalculateFeeRequest.SerializeToString, - transaction__pb2.CalculateFeeResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def BroadcastTransaction(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/BroadcastTransaction', - transaction__pb2.BroadcastTransactionRequest.SerializeToString, - transaction__pb2.BroadcastTransactionResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetRawTransferTransaction(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetRawTransferTransaction', - transaction__pb2.GetRawTransferTransactionRequest.SerializeToString, - transaction__pb2.GetRawTransactionResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetRawBondTransaction(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetRawBondTransaction', - transaction__pb2.GetRawBondTransactionRequest.SerializeToString, - transaction__pb2.GetRawTransactionResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetRawUnbondTransaction(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetRawUnbondTransaction', - transaction__pb2.GetRawUnbondTransactionRequest.SerializeToString, - transaction__pb2.GetRawTransactionResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetRawWithdrawTransaction(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetRawWithdrawTransaction', - transaction__pb2.GetRawWithdrawTransactionRequest.SerializeToString, - transaction__pb2.GetRawTransactionResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/python/utils_pb2.py b/www/grpc/gen/python/utils_pb2.py deleted file mode 100644 index 7861e87ad..000000000 --- a/www/grpc/gen/python/utils_pb2.py +++ /dev/null @@ -1,34 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: utils.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0butils.proto\x12\x06pactus\"]\n SignMessageWithPrivateKeyRequest\x12\x1f\n\x0bprivate_key\x18\x01 \x01(\tR\nprivateKey\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\"A\n!SignMessageWithPrivateKeyResponse\x12\x1c\n\tsignature\x18\x01 \x01(\tR\tsignature\"m\n\x14VerifyMessageRequest\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\x12\x1c\n\tsignature\x18\x02 \x01(\tR\tsignature\x12\x1d\n\npublic_key\x18\x03 \x01(\tR\tpublicKey\"2\n\x15VerifyMessageResponse\x12\x19\n\x08is_valid\x18\x01 \x01(\x08R\x07isValid2\xc7\x01\n\x05Utils\x12p\n\x19SignMessageWithPrivateKey\x12(.pactus.SignMessageWithPrivateKeyRequest\x1a).pactus.SignMessageWithPrivateKeyResponse\x12L\n\rVerifyMessage\x12\x1c.pactus.VerifyMessageRequest\x1a\x1d.pactus.VerifyMessageResponseB@\n\x0cpactus.utilsZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'utils_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\014pactus.utilsZ0github.com/pactus-project/pactus/www/grpc/pactus' - _SIGNMESSAGEWITHPRIVATEKEYREQUEST._serialized_start=23 - _SIGNMESSAGEWITHPRIVATEKEYREQUEST._serialized_end=116 - _SIGNMESSAGEWITHPRIVATEKEYRESPONSE._serialized_start=118 - _SIGNMESSAGEWITHPRIVATEKEYRESPONSE._serialized_end=183 - _VERIFYMESSAGEREQUEST._serialized_start=185 - _VERIFYMESSAGEREQUEST._serialized_end=294 - _VERIFYMESSAGERESPONSE._serialized_start=296 - _VERIFYMESSAGERESPONSE._serialized_end=346 - _UTILS._serialized_start=349 - _UTILS._serialized_end=548 -# @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/utils_pb2.pyi b/www/grpc/gen/python/utils_pb2.pyi deleted file mode 100644 index 0bfaf6e53..000000000 --- a/www/grpc/gen/python/utils_pb2.pyi +++ /dev/null @@ -1,35 +0,0 @@ -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Optional as _Optional - -DESCRIPTOR: _descriptor.FileDescriptor - -class SignMessageWithPrivateKeyRequest(_message.Message): - __slots__ = ("private_key", "message") - PRIVATE_KEY_FIELD_NUMBER: _ClassVar[int] - MESSAGE_FIELD_NUMBER: _ClassVar[int] - private_key: str - message: str - def __init__(self, private_key: _Optional[str] = ..., message: _Optional[str] = ...) -> None: ... - -class SignMessageWithPrivateKeyResponse(_message.Message): - __slots__ = ("signature",) - SIGNATURE_FIELD_NUMBER: _ClassVar[int] - signature: str - def __init__(self, signature: _Optional[str] = ...) -> None: ... - -class VerifyMessageRequest(_message.Message): - __slots__ = ("message", "signature", "public_key") - MESSAGE_FIELD_NUMBER: _ClassVar[int] - SIGNATURE_FIELD_NUMBER: _ClassVar[int] - PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] - message: str - signature: str - public_key: str - def __init__(self, message: _Optional[str] = ..., signature: _Optional[str] = ..., public_key: _Optional[str] = ...) -> None: ... - -class VerifyMessageResponse(_message.Message): - __slots__ = ("is_valid",) - IS_VALID_FIELD_NUMBER: _ClassVar[int] - is_valid: bool - def __init__(self, is_valid: bool = ...) -> None: ... diff --git a/www/grpc/gen/python/utils_pb2_grpc.py b/www/grpc/gen/python/utils_pb2_grpc.py deleted file mode 100644 index 90e02e1c8..000000000 --- a/www/grpc/gen/python/utils_pb2_grpc.py +++ /dev/null @@ -1,107 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - -import utils_pb2 as utils__pb2 - - -class UtilsStub(object): - """Utils service defines RPC methods for utility functions such as message - signing and verification. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.SignMessageWithPrivateKey = channel.unary_unary( - '/pactus.Utils/SignMessageWithPrivateKey', - request_serializer=utils__pb2.SignMessageWithPrivateKeyRequest.SerializeToString, - response_deserializer=utils__pb2.SignMessageWithPrivateKeyResponse.FromString, - ) - self.VerifyMessage = channel.unary_unary( - '/pactus.Utils/VerifyMessage', - request_serializer=utils__pb2.VerifyMessageRequest.SerializeToString, - response_deserializer=utils__pb2.VerifyMessageResponse.FromString, - ) - - -class UtilsServicer(object): - """Utils service defines RPC methods for utility functions such as message - signing and verification. - """ - - def SignMessageWithPrivateKey(self, request, context): - """SignMessageWithPrivateKey sign message with provided private key. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def VerifyMessage(self, request, context): - """VerifyMessage verify signature with public key and message - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_UtilsServicer_to_server(servicer, server): - rpc_method_handlers = { - 'SignMessageWithPrivateKey': grpc.unary_unary_rpc_method_handler( - servicer.SignMessageWithPrivateKey, - request_deserializer=utils__pb2.SignMessageWithPrivateKeyRequest.FromString, - response_serializer=utils__pb2.SignMessageWithPrivateKeyResponse.SerializeToString, - ), - 'VerifyMessage': grpc.unary_unary_rpc_method_handler( - servicer.VerifyMessage, - request_deserializer=utils__pb2.VerifyMessageRequest.FromString, - response_serializer=utils__pb2.VerifyMessageResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'pactus.Utils', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class Utils(object): - """Utils service defines RPC methods for utility functions such as message - signing and verification. - """ - - @staticmethod - def SignMessageWithPrivateKey(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Utils/SignMessageWithPrivateKey', - utils__pb2.SignMessageWithPrivateKeyRequest.SerializeToString, - utils__pb2.SignMessageWithPrivateKeyResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def VerifyMessage(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Utils/VerifyMessage', - utils__pb2.VerifyMessageRequest.SerializeToString, - utils__pb2.VerifyMessageResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/python/wallet_pb2.py b/www/grpc/gen/python/wallet_pb2.py deleted file mode 100644 index 2f2b028d4..000000000 --- a/www/grpc/gen/python/wallet_pb2.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: wallet.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -import transaction_pb2 as transaction__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cwallet.proto\x12\x06pactus\x1a\x11transaction.proto\"p\n\x0b\x41\x64\x64ressInfo\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x1d\n\npublic_key\x18\x02 \x01(\tR\tpublicKey\x12\x14\n\x05label\x18\x03 \x01(\tR\x05label\x12\x12\n\x04path\x18\x04 \x01(\tR\x04path\"\xa5\x01\n\x0bHistoryInfo\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\x12\x12\n\x04time\x18\x02 \x01(\rR\x04time\x12!\n\x0cpayload_type\x18\x03 \x01(\tR\x0bpayloadType\x12 \n\x0b\x64\x65scription\x18\x04 \x01(\tR\x0b\x64\x65scription\x12\x16\n\x06\x61mount\x18\x05 \x01(\x03R\x06\x61mount\"U\n\x18GetAddressHistoryRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x01(\tR\x07\x61\x64\x64ress\"S\n\x19GetAddressHistoryResponse\x12\x36\n\x0chistory_info\x18\x01 \x03(\x0b\x32\x13.pactus.HistoryInfoR\x0bhistoryInfo\"\xa1\x01\n\x14GetNewAddressRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x36\n\x0c\x61\x64\x64ress_type\x18\x02 \x01(\x0e\x32\x13.pactus.AddressTypeR\x0b\x61\x64\x64ressType\x12\x14\n\x05label\x18\x03 \x01(\tR\x05label\x12\x1a\n\x08password\x18\x04 \x01(\tR\x08password\"p\n\x15GetNewAddressResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x36\n\x0c\x61\x64\x64ress_info\x18\x02 \x01(\x0b\x32\x13.pactus.AddressInfoR\x0b\x61\x64\x64ressInfo\"o\n\x14RestoreWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08mnemonic\x18\x02 \x01(\tR\x08mnemonic\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\"8\n\x15RestoreWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"R\n\x13\x43reateWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08password\x18\x04 \x01(\tR\x08password\"2\n\x14\x43reateWalletResponse\x12\x1a\n\x08mnemonic\x18\x02 \x01(\tR\x08mnemonic\"4\n\x11LoadWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"5\n\x12LoadWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"6\n\x13UnloadWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"7\n\x14UnloadWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\";\n\x1aGetValidatorAddressRequest\x12\x1d\n\npublic_key\x18\x01 \x01(\tR\tpublicKey\"7\n\x1bGetValidatorAddressResponse\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"\x81\x01\n\x19SignRawTransactionRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\'\n\x0fraw_transaction\x18\x02 \x01(\tR\x0erawTransaction\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\"y\n\x1aSignRawTransactionResponse\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\x12\x34\n\x16signed_raw_transaction\x18\x02 \x01(\tR\x14signedRawTransaction\"9\n\x16GetTotalBalanceRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"_\n\x17GetTotalBalanceResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12#\n\rtotal_balance\x18\x02 \x01(\x03R\x0ctotalBalance\"\x85\x01\n\x12SignMessageRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12\x18\n\x07message\x18\x04 \x01(\tR\x07message\"3\n\x13SignMessageResponse\x12\x1c\n\tsignature\x18\x01 \x01(\tR\tsignature*\x84\x01\n\x0b\x41\x64\x64ressType\x12\x19\n\x15\x41\x44\x44RESS_TYPE_TREASURY\x10\x00\x12\x1a\n\x16\x41\x44\x44RESS_TYPE_VALIDATOR\x10\x01\x12\x1c\n\x18\x41\x44\x44RESS_TYPE_BLS_ACCOUNT\x10\x02\x12 \n\x1c\x41\x44\x44RESS_TYPE_ED25519_ACCOUNT\x10\x03\x32\xb2\x06\n\x06Wallet\x12I\n\x0c\x43reateWallet\x12\x1b.pactus.CreateWalletRequest\x1a\x1c.pactus.CreateWalletResponse\x12L\n\rRestoreWallet\x12\x1c.pactus.RestoreWalletRequest\x1a\x1d.pactus.RestoreWalletResponse\x12\x43\n\nLoadWallet\x12\x19.pactus.LoadWalletRequest\x1a\x1a.pactus.LoadWalletResponse\x12I\n\x0cUnloadWallet\x12\x1b.pactus.UnloadWalletRequest\x1a\x1c.pactus.UnloadWalletResponse\x12R\n\x0fGetTotalBalance\x12\x1e.pactus.GetTotalBalanceRequest\x1a\x1f.pactus.GetTotalBalanceResponse\x12[\n\x12SignRawTransaction\x12!.pactus.SignRawTransactionRequest\x1a\".pactus.SignRawTransactionResponse\x12^\n\x13GetValidatorAddress\x12\".pactus.GetValidatorAddressRequest\x1a#.pactus.GetValidatorAddressResponse\x12L\n\rGetNewAddress\x12\x1c.pactus.GetNewAddressRequest\x1a\x1d.pactus.GetNewAddressResponse\x12X\n\x11GetAddressHistory\x12 .pactus.GetAddressHistoryRequest\x1a!.pactus.GetAddressHistoryResponse\x12\x46\n\x0bSignMessage\x12\x1a.pactus.SignMessageRequest\x1a\x1b.pactus.SignMessageResponseBA\n\rpactus.walletZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'wallet_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\n\rpactus.walletZ0github.com/pactus-project/pactus/www/grpc/pactus' - _ADDRESSTYPE._serialized_start=2023 - _ADDRESSTYPE._serialized_end=2155 - _ADDRESSINFO._serialized_start=43 - _ADDRESSINFO._serialized_end=155 - _HISTORYINFO._serialized_start=158 - _HISTORYINFO._serialized_end=323 - _GETADDRESSHISTORYREQUEST._serialized_start=325 - _GETADDRESSHISTORYREQUEST._serialized_end=410 - _GETADDRESSHISTORYRESPONSE._serialized_start=412 - _GETADDRESSHISTORYRESPONSE._serialized_end=495 - _GETNEWADDRESSREQUEST._serialized_start=498 - _GETNEWADDRESSREQUEST._serialized_end=659 - _GETNEWADDRESSRESPONSE._serialized_start=661 - _GETNEWADDRESSRESPONSE._serialized_end=773 - _RESTOREWALLETREQUEST._serialized_start=775 - _RESTOREWALLETREQUEST._serialized_end=886 - _RESTOREWALLETRESPONSE._serialized_start=888 - _RESTOREWALLETRESPONSE._serialized_end=944 - _CREATEWALLETREQUEST._serialized_start=946 - _CREATEWALLETREQUEST._serialized_end=1028 - _CREATEWALLETRESPONSE._serialized_start=1030 - _CREATEWALLETRESPONSE._serialized_end=1080 - _LOADWALLETREQUEST._serialized_start=1082 - _LOADWALLETREQUEST._serialized_end=1134 - _LOADWALLETRESPONSE._serialized_start=1136 - _LOADWALLETRESPONSE._serialized_end=1189 - _UNLOADWALLETREQUEST._serialized_start=1191 - _UNLOADWALLETREQUEST._serialized_end=1245 - _UNLOADWALLETRESPONSE._serialized_start=1247 - _UNLOADWALLETRESPONSE._serialized_end=1302 - _GETVALIDATORADDRESSREQUEST._serialized_start=1304 - _GETVALIDATORADDRESSREQUEST._serialized_end=1363 - _GETVALIDATORADDRESSRESPONSE._serialized_start=1365 - _GETVALIDATORADDRESSRESPONSE._serialized_end=1420 - _SIGNRAWTRANSACTIONREQUEST._serialized_start=1423 - _SIGNRAWTRANSACTIONREQUEST._serialized_end=1552 - _SIGNRAWTRANSACTIONRESPONSE._serialized_start=1554 - _SIGNRAWTRANSACTIONRESPONSE._serialized_end=1675 - _GETTOTALBALANCEREQUEST._serialized_start=1677 - _GETTOTALBALANCEREQUEST._serialized_end=1734 - _GETTOTALBALANCERESPONSE._serialized_start=1736 - _GETTOTALBALANCERESPONSE._serialized_end=1831 - _SIGNMESSAGEREQUEST._serialized_start=1834 - _SIGNMESSAGEREQUEST._serialized_end=1967 - _SIGNMESSAGERESPONSE._serialized_start=1969 - _SIGNMESSAGERESPONSE._serialized_end=2020 - _WALLET._serialized_start=2158 - _WALLET._serialized_end=2976 -# @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/wallet_pb2.pyi b/www/grpc/gen/python/wallet_pb2.pyi deleted file mode 100644 index 7cb1ab386..000000000 --- a/www/grpc/gen/python/wallet_pb2.pyi +++ /dev/null @@ -1,195 +0,0 @@ -import transaction_pb2 as _transaction_pb2 -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DESCRIPTOR: _descriptor.FileDescriptor - -class AddressType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = () - ADDRESS_TYPE_TREASURY: _ClassVar[AddressType] - ADDRESS_TYPE_VALIDATOR: _ClassVar[AddressType] - ADDRESS_TYPE_BLS_ACCOUNT: _ClassVar[AddressType] - ADDRESS_TYPE_ED25519_ACCOUNT: _ClassVar[AddressType] -ADDRESS_TYPE_TREASURY: AddressType -ADDRESS_TYPE_VALIDATOR: AddressType -ADDRESS_TYPE_BLS_ACCOUNT: AddressType -ADDRESS_TYPE_ED25519_ACCOUNT: AddressType - -class AddressInfo(_message.Message): - __slots__ = ("address", "public_key", "label", "path") - ADDRESS_FIELD_NUMBER: _ClassVar[int] - PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] - LABEL_FIELD_NUMBER: _ClassVar[int] - PATH_FIELD_NUMBER: _ClassVar[int] - address: str - public_key: str - label: str - path: str - def __init__(self, address: _Optional[str] = ..., public_key: _Optional[str] = ..., label: _Optional[str] = ..., path: _Optional[str] = ...) -> None: ... - -class HistoryInfo(_message.Message): - __slots__ = ("transaction_id", "time", "payload_type", "description", "amount") - TRANSACTION_ID_FIELD_NUMBER: _ClassVar[int] - TIME_FIELD_NUMBER: _ClassVar[int] - PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int] - DESCRIPTION_FIELD_NUMBER: _ClassVar[int] - AMOUNT_FIELD_NUMBER: _ClassVar[int] - transaction_id: str - time: int - payload_type: str - description: str - amount: int - def __init__(self, transaction_id: _Optional[str] = ..., time: _Optional[int] = ..., payload_type: _Optional[str] = ..., description: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ... - -class GetAddressHistoryRequest(_message.Message): - __slots__ = ("wallet_name", "address") - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - ADDRESS_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - address: str - def __init__(self, wallet_name: _Optional[str] = ..., address: _Optional[str] = ...) -> None: ... - -class GetAddressHistoryResponse(_message.Message): - __slots__ = ("history_info",) - HISTORY_INFO_FIELD_NUMBER: _ClassVar[int] - history_info: _containers.RepeatedCompositeFieldContainer[HistoryInfo] - def __init__(self, history_info: _Optional[_Iterable[_Union[HistoryInfo, _Mapping]]] = ...) -> None: ... - -class GetNewAddressRequest(_message.Message): - __slots__ = ("wallet_name", "address_type", "label", "password") - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - ADDRESS_TYPE_FIELD_NUMBER: _ClassVar[int] - LABEL_FIELD_NUMBER: _ClassVar[int] - PASSWORD_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - address_type: AddressType - label: str - password: str - def __init__(self, wallet_name: _Optional[str] = ..., address_type: _Optional[_Union[AddressType, str]] = ..., label: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... - -class GetNewAddressResponse(_message.Message): - __slots__ = ("wallet_name", "address_info") - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - ADDRESS_INFO_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - address_info: AddressInfo - def __init__(self, wallet_name: _Optional[str] = ..., address_info: _Optional[_Union[AddressInfo, _Mapping]] = ...) -> None: ... - -class RestoreWalletRequest(_message.Message): - __slots__ = ("wallet_name", "mnemonic", "password") - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - MNEMONIC_FIELD_NUMBER: _ClassVar[int] - PASSWORD_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - mnemonic: str - password: str - def __init__(self, wallet_name: _Optional[str] = ..., mnemonic: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... - -class RestoreWalletResponse(_message.Message): - __slots__ = ("wallet_name",) - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... - -class CreateWalletRequest(_message.Message): - __slots__ = ("wallet_name", "password") - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - PASSWORD_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - password: str - def __init__(self, wallet_name: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... - -class CreateWalletResponse(_message.Message): - __slots__ = ("mnemonic",) - MNEMONIC_FIELD_NUMBER: _ClassVar[int] - mnemonic: str - def __init__(self, mnemonic: _Optional[str] = ...) -> None: ... - -class LoadWalletRequest(_message.Message): - __slots__ = ("wallet_name",) - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... - -class LoadWalletResponse(_message.Message): - __slots__ = ("wallet_name",) - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... - -class UnloadWalletRequest(_message.Message): - __slots__ = ("wallet_name",) - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... - -class UnloadWalletResponse(_message.Message): - __slots__ = ("wallet_name",) - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... - -class GetValidatorAddressRequest(_message.Message): - __slots__ = ("public_key",) - PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] - public_key: str - def __init__(self, public_key: _Optional[str] = ...) -> None: ... - -class GetValidatorAddressResponse(_message.Message): - __slots__ = ("address",) - ADDRESS_FIELD_NUMBER: _ClassVar[int] - address: str - def __init__(self, address: _Optional[str] = ...) -> None: ... - -class SignRawTransactionRequest(_message.Message): - __slots__ = ("wallet_name", "raw_transaction", "password") - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] - PASSWORD_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - raw_transaction: str - password: str - def __init__(self, wallet_name: _Optional[str] = ..., raw_transaction: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... - -class SignRawTransactionResponse(_message.Message): - __slots__ = ("transaction_id", "signed_raw_transaction") - TRANSACTION_ID_FIELD_NUMBER: _ClassVar[int] - SIGNED_RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] - transaction_id: str - signed_raw_transaction: str - def __init__(self, transaction_id: _Optional[str] = ..., signed_raw_transaction: _Optional[str] = ...) -> None: ... - -class GetTotalBalanceRequest(_message.Message): - __slots__ = ("wallet_name",) - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... - -class GetTotalBalanceResponse(_message.Message): - __slots__ = ("wallet_name", "total_balance") - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - TOTAL_BALANCE_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - total_balance: int - def __init__(self, wallet_name: _Optional[str] = ..., total_balance: _Optional[int] = ...) -> None: ... - -class SignMessageRequest(_message.Message): - __slots__ = ("wallet_name", "password", "address", "message") - WALLET_NAME_FIELD_NUMBER: _ClassVar[int] - PASSWORD_FIELD_NUMBER: _ClassVar[int] - ADDRESS_FIELD_NUMBER: _ClassVar[int] - MESSAGE_FIELD_NUMBER: _ClassVar[int] - wallet_name: str - password: str - address: str - message: str - def __init__(self, wallet_name: _Optional[str] = ..., password: _Optional[str] = ..., address: _Optional[str] = ..., message: _Optional[str] = ...) -> None: ... - -class SignMessageResponse(_message.Message): - __slots__ = ("signature",) - SIGNATURE_FIELD_NUMBER: _ClassVar[int] - signature: str - def __init__(self, signature: _Optional[str] = ...) -> None: ... diff --git a/www/grpc/gen/python/wallet_pb2_grpc.py b/www/grpc/gen/python/wallet_pb2_grpc.py deleted file mode 100644 index 0bdf5636e..000000000 --- a/www/grpc/gen/python/wallet_pb2_grpc.py +++ /dev/null @@ -1,377 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - -import wallet_pb2 as wallet__pb2 - - -class WalletStub(object): - """Define the Wallet service with various RPC methods for wallet management. - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.CreateWallet = channel.unary_unary( - '/pactus.Wallet/CreateWallet', - request_serializer=wallet__pb2.CreateWalletRequest.SerializeToString, - response_deserializer=wallet__pb2.CreateWalletResponse.FromString, - ) - self.RestoreWallet = channel.unary_unary( - '/pactus.Wallet/RestoreWallet', - request_serializer=wallet__pb2.RestoreWalletRequest.SerializeToString, - response_deserializer=wallet__pb2.RestoreWalletResponse.FromString, - ) - self.LoadWallet = channel.unary_unary( - '/pactus.Wallet/LoadWallet', - request_serializer=wallet__pb2.LoadWalletRequest.SerializeToString, - response_deserializer=wallet__pb2.LoadWalletResponse.FromString, - ) - self.UnloadWallet = channel.unary_unary( - '/pactus.Wallet/UnloadWallet', - request_serializer=wallet__pb2.UnloadWalletRequest.SerializeToString, - response_deserializer=wallet__pb2.UnloadWalletResponse.FromString, - ) - self.GetTotalBalance = channel.unary_unary( - '/pactus.Wallet/GetTotalBalance', - request_serializer=wallet__pb2.GetTotalBalanceRequest.SerializeToString, - response_deserializer=wallet__pb2.GetTotalBalanceResponse.FromString, - ) - self.SignRawTransaction = channel.unary_unary( - '/pactus.Wallet/SignRawTransaction', - request_serializer=wallet__pb2.SignRawTransactionRequest.SerializeToString, - response_deserializer=wallet__pb2.SignRawTransactionResponse.FromString, - ) - self.GetValidatorAddress = channel.unary_unary( - '/pactus.Wallet/GetValidatorAddress', - request_serializer=wallet__pb2.GetValidatorAddressRequest.SerializeToString, - response_deserializer=wallet__pb2.GetValidatorAddressResponse.FromString, - ) - self.GetNewAddress = channel.unary_unary( - '/pactus.Wallet/GetNewAddress', - request_serializer=wallet__pb2.GetNewAddressRequest.SerializeToString, - response_deserializer=wallet__pb2.GetNewAddressResponse.FromString, - ) - self.GetAddressHistory = channel.unary_unary( - '/pactus.Wallet/GetAddressHistory', - request_serializer=wallet__pb2.GetAddressHistoryRequest.SerializeToString, - response_deserializer=wallet__pb2.GetAddressHistoryResponse.FromString, - ) - self.SignMessage = channel.unary_unary( - '/pactus.Wallet/SignMessage', - request_serializer=wallet__pb2.SignMessageRequest.SerializeToString, - response_deserializer=wallet__pb2.SignMessageResponse.FromString, - ) - - -class WalletServicer(object): - """Define the Wallet service with various RPC methods for wallet management. - """ - - def CreateWallet(self, request, context): - """CreateWallet creates a new wallet with the specified parameters. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def RestoreWallet(self, request, context): - """RestoreWallet restores an existing wallet with the given mnemonic. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def LoadWallet(self, request, context): - """LoadWallet loads an existing wallet with the given name. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def UnloadWallet(self, request, context): - """UnloadWallet unloads a currently loaded wallet with the specified name. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetTotalBalance(self, request, context): - """GetTotalBalance returns the total available balance of the wallet. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def SignRawTransaction(self, request, context): - """SignRawTransaction signs a raw transaction for a specified wallet. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetValidatorAddress(self, request, context): - """GetValidatorAddress retrieves the validator address associated with a - public key. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetNewAddress(self, request, context): - """GetNewAddress generates a new address for the specified wallet. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetAddressHistory(self, request, context): - """GetAddressHistory retrieves the transaction history of an address. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def SignMessage(self, request, context): - """SignMessage signs an arbitrary message. - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_WalletServicer_to_server(servicer, server): - rpc_method_handlers = { - 'CreateWallet': grpc.unary_unary_rpc_method_handler( - servicer.CreateWallet, - request_deserializer=wallet__pb2.CreateWalletRequest.FromString, - response_serializer=wallet__pb2.CreateWalletResponse.SerializeToString, - ), - 'RestoreWallet': grpc.unary_unary_rpc_method_handler( - servicer.RestoreWallet, - request_deserializer=wallet__pb2.RestoreWalletRequest.FromString, - response_serializer=wallet__pb2.RestoreWalletResponse.SerializeToString, - ), - 'LoadWallet': grpc.unary_unary_rpc_method_handler( - servicer.LoadWallet, - request_deserializer=wallet__pb2.LoadWalletRequest.FromString, - response_serializer=wallet__pb2.LoadWalletResponse.SerializeToString, - ), - 'UnloadWallet': grpc.unary_unary_rpc_method_handler( - servicer.UnloadWallet, - request_deserializer=wallet__pb2.UnloadWalletRequest.FromString, - response_serializer=wallet__pb2.UnloadWalletResponse.SerializeToString, - ), - 'GetTotalBalance': grpc.unary_unary_rpc_method_handler( - servicer.GetTotalBalance, - request_deserializer=wallet__pb2.GetTotalBalanceRequest.FromString, - response_serializer=wallet__pb2.GetTotalBalanceResponse.SerializeToString, - ), - 'SignRawTransaction': grpc.unary_unary_rpc_method_handler( - servicer.SignRawTransaction, - request_deserializer=wallet__pb2.SignRawTransactionRequest.FromString, - response_serializer=wallet__pb2.SignRawTransactionResponse.SerializeToString, - ), - 'GetValidatorAddress': grpc.unary_unary_rpc_method_handler( - servicer.GetValidatorAddress, - request_deserializer=wallet__pb2.GetValidatorAddressRequest.FromString, - response_serializer=wallet__pb2.GetValidatorAddressResponse.SerializeToString, - ), - 'GetNewAddress': grpc.unary_unary_rpc_method_handler( - servicer.GetNewAddress, - request_deserializer=wallet__pb2.GetNewAddressRequest.FromString, - response_serializer=wallet__pb2.GetNewAddressResponse.SerializeToString, - ), - 'GetAddressHistory': grpc.unary_unary_rpc_method_handler( - servicer.GetAddressHistory, - request_deserializer=wallet__pb2.GetAddressHistoryRequest.FromString, - response_serializer=wallet__pb2.GetAddressHistoryResponse.SerializeToString, - ), - 'SignMessage': grpc.unary_unary_rpc_method_handler( - servicer.SignMessage, - request_deserializer=wallet__pb2.SignMessageRequest.FromString, - response_serializer=wallet__pb2.SignMessageResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'pactus.Wallet', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class Wallet(object): - """Define the Wallet service with various RPC methods for wallet management. - """ - - @staticmethod - def CreateWallet(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/CreateWallet', - wallet__pb2.CreateWalletRequest.SerializeToString, - wallet__pb2.CreateWalletResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def RestoreWallet(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/RestoreWallet', - wallet__pb2.RestoreWalletRequest.SerializeToString, - wallet__pb2.RestoreWalletResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def LoadWallet(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/LoadWallet', - wallet__pb2.LoadWalletRequest.SerializeToString, - wallet__pb2.LoadWalletResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def UnloadWallet(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/UnloadWallet', - wallet__pb2.UnloadWalletRequest.SerializeToString, - wallet__pb2.UnloadWalletResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetTotalBalance(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/GetTotalBalance', - wallet__pb2.GetTotalBalanceRequest.SerializeToString, - wallet__pb2.GetTotalBalanceResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def SignRawTransaction(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/SignRawTransaction', - wallet__pb2.SignRawTransactionRequest.SerializeToString, - wallet__pb2.SignRawTransactionResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetValidatorAddress(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/GetValidatorAddress', - wallet__pb2.GetValidatorAddressRequest.SerializeToString, - wallet__pb2.GetValidatorAddressResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetNewAddress(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/GetNewAddress', - wallet__pb2.GetNewAddressRequest.SerializeToString, - wallet__pb2.GetNewAddressResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def GetAddressHistory(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/GetAddressHistory', - wallet__pb2.GetAddressHistoryRequest.SerializeToString, - wallet__pb2.GetAddressHistoryResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def SignMessage(request, - target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/SignMessage', - wallet__pb2.SignMessageRequest.SerializeToString, - wallet__pb2.SignMessageResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/rust/pactus.rs b/www/grpc/gen/rust/pactus.rs deleted file mode 100644 index f5f5e27b2..000000000 --- a/www/grpc/gen/rust/pactus.rs +++ /dev/null @@ -1,1281 +0,0 @@ -// @generated -/// Request message for retrieving transaction details. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTransactionRequest { - /// The unique ID of the transaction to retrieve. - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - /// The verbosity level for transaction details. - #[prost(enumeration="TransactionVerbosity", tag="2")] - pub verbosity: i32, -} -/// Response message containing details of a transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTransactionResponse { - /// The height of the block containing the transaction. - #[prost(uint32, tag="1")] - pub block_height: u32, - /// The UNIX timestamp of the block containing the transaction. - #[prost(uint32, tag="2")] - pub block_time: u32, - /// Detailed information about the transaction. - #[prost(message, optional, tag="3")] - pub transaction: ::core::option::Option, -} -/// Request message for calculating transaction fee. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CalculateFeeRequest { - /// The amount involved in the transaction, specified in NanoPAC. - #[prost(int64, tag="1")] - pub amount: i64, - /// The type of transaction payload. - #[prost(enumeration="PayloadType", tag="2")] - pub payload_type: i32, - /// Indicates if the amount should be fixed and include the fee. - #[prost(bool, tag="3")] - pub fixed_amount: bool, -} -/// Response message containing the calculated transaction fee. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CalculateFeeResponse { - /// The calculated amount in NanoPAC. - #[prost(int64, tag="1")] - pub amount: i64, - /// The calculated transaction fee in NanoPAC. - #[prost(int64, tag="2")] - pub fee: i64, -} -/// Request message for broadcasting a signed transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BroadcastTransactionRequest { - /// The signed raw transaction data to be broadcasted. - #[prost(string, tag="1")] - pub signed_raw_transaction: ::prost::alloc::string::String, -} -/// Response message containing the ID of the broadcasted transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BroadcastTransactionResponse { - /// The unique ID of the broadcasted transaction. - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, -} -/// Request message for retrieving raw details of a transfer transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetRawTransferTransactionRequest { - /// The lock time for the transaction. If not set, defaults to the last block - /// height. - #[prost(uint32, tag="1")] - pub lock_time: u32, - /// The sender's account address. - #[prost(string, tag="2")] - pub sender: ::prost::alloc::string::String, - /// The receiver's account address. - #[prost(string, tag="3")] - pub receiver: ::prost::alloc::string::String, - /// The amount to be transferred, specified in NanoPAC. Must be greater than 0. - #[prost(int64, tag="4")] - pub amount: i64, - /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - #[prost(int64, tag="5")] - pub fee: i64, - /// A memo string for the transaction. - #[prost(string, tag="6")] - pub memo: ::prost::alloc::string::String, -} -/// Request message for retrieving raw details of a bond transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetRawBondTransactionRequest { - /// The lock time for the transaction. If not set, defaults to the last block - /// height. - #[prost(uint32, tag="1")] - pub lock_time: u32, - /// The sender's account address. - #[prost(string, tag="2")] - pub sender: ::prost::alloc::string::String, - /// The receiver's validator address. - #[prost(string, tag="3")] - pub receiver: ::prost::alloc::string::String, - /// The stake amount in NanoPAC. Must be greater than 0. - #[prost(int64, tag="4")] - pub stake: i64, - /// The public key of the validator. - #[prost(string, tag="5")] - pub public_key: ::prost::alloc::string::String, - /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - #[prost(int64, tag="6")] - pub fee: i64, - /// A memo string for the transaction. - #[prost(string, tag="7")] - pub memo: ::prost::alloc::string::String, -} -/// Request message for retrieving raw details of an unbond transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetRawUnbondTransactionRequest { - /// The lock time for the transaction. If not set, defaults to the last block - /// height. - #[prost(uint32, tag="1")] - pub lock_time: u32, - /// The address of the validator to unbond from. - #[prost(string, tag="3")] - pub validator_address: ::prost::alloc::string::String, - /// A memo string for the transaction. - #[prost(string, tag="4")] - pub memo: ::prost::alloc::string::String, -} -/// Request message for retrieving raw details of a withdraw transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetRawWithdrawTransactionRequest { - /// The lock time for the transaction. If not set, defaults to the last block - /// height. - #[prost(uint32, tag="1")] - pub lock_time: u32, - /// The address of the validator to withdraw from. - #[prost(string, tag="2")] - pub validator_address: ::prost::alloc::string::String, - /// The address of the account to withdraw to. - #[prost(string, tag="3")] - pub account_address: ::prost::alloc::string::String, - /// The withdrawal amount in NanoPAC. Must be greater than 0. - #[prost(int64, tag="4")] - pub amount: i64, - /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - #[prost(int64, tag="5")] - pub fee: i64, - /// A memo string for the transaction. - #[prost(string, tag="6")] - pub memo: ::prost::alloc::string::String, -} -/// Response message containing raw transaction data. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetRawTransactionResponse { - /// The raw transaction data. - #[prost(string, tag="1")] - pub raw_transaction: ::prost::alloc::string::String, -} -/// Payload for a transfer transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PayloadTransfer { - /// The sender's address. - #[prost(string, tag="1")] - pub sender: ::prost::alloc::string::String, - /// The receiver's address. - #[prost(string, tag="2")] - pub receiver: ::prost::alloc::string::String, - /// The amount to be transferred in NanoPAC. - #[prost(int64, tag="3")] - pub amount: i64, -} -/// Payload for a bond transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PayloadBond { - /// The sender's address. - #[prost(string, tag="1")] - pub sender: ::prost::alloc::string::String, - /// The receiver's address. - #[prost(string, tag="2")] - pub receiver: ::prost::alloc::string::String, - /// The stake amount in NanoPAC. - #[prost(int64, tag="3")] - pub stake: i64, -} -/// Payload for a sortition transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PayloadSortition { - /// The validator address associated with the sortition proof. - #[prost(string, tag="1")] - pub address: ::prost::alloc::string::String, - /// The proof for the sortition. - #[prost(string, tag="2")] - pub proof: ::prost::alloc::string::String, -} -/// Payload for an unbond transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PayloadUnbond { - /// The address of the validator to unbond from. - #[prost(string, tag="1")] - pub validator: ::prost::alloc::string::String, -} -/// Payload for a withdraw transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PayloadWithdraw { - /// The address to withdraw from. - #[prost(string, tag="1")] - pub from: ::prost::alloc::string::String, - /// The address to withdraw to. - #[prost(string, tag="2")] - pub to: ::prost::alloc::string::String, - /// The withdrawal amount in NanoPAC. - #[prost(int64, tag="3")] - pub amount: i64, -} -/// Information about a transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TransactionInfo { - /// The unique ID of the transaction. - #[prost(string, tag="1")] - pub id: ::prost::alloc::string::String, - /// The raw transaction data. - #[prost(string, tag="2")] - pub data: ::prost::alloc::string::String, - /// The version of the transaction. - #[prost(int32, tag="3")] - pub version: i32, - /// The lock time for the transaction. - #[prost(uint32, tag="4")] - pub lock_time: u32, - /// The value of the transaction in NanoPAC. - #[prost(int64, tag="5")] - pub value: i64, - /// The fee for the transaction in NanoPAC. - #[prost(int64, tag="6")] - pub fee: i64, - /// The type of transaction payload. - #[prost(enumeration="PayloadType", tag="7")] - pub payload_type: i32, - /// A memo string for the transaction. - #[prost(string, tag="8")] - pub memo: ::prost::alloc::string::String, - /// The public key associated with the transaction. - #[prost(string, tag="9")] - pub public_key: ::prost::alloc::string::String, - /// The signature for the transaction. - #[prost(string, tag="10")] - pub signature: ::prost::alloc::string::String, - #[prost(oneof="transaction_info::Payload", tags="30, 31, 32, 33, 34")] - pub payload: ::core::option::Option, -} -/// Nested message and enum types in `TransactionInfo`. -pub mod transaction_info { - #[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Payload { - /// Transfer transaction payload. - #[prost(message, tag="30")] - Transfer(super::PayloadTransfer), - /// Bond transaction payload. - #[prost(message, tag="31")] - Bond(super::PayloadBond), - /// Sortition transaction payload. - #[prost(message, tag="32")] - Sortition(super::PayloadSortition), - /// Unbond transaction payload. - #[prost(message, tag="33")] - Unbond(super::PayloadUnbond), - /// Withdraw transaction payload. - #[prost(message, tag="34")] - Withdraw(super::PayloadWithdraw), - } -} -/// Enumeration for different types of transaction payloads. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum PayloadType { - /// Unknown payload type. - Unknown = 0, - /// Transfer payload type. - TransferPayload = 1, - /// Bond payload type. - BondPayload = 2, - /// Sortition payload type. - SortitionPayload = 3, - /// Unbond payload type. - UnbondPayload = 4, - /// Withdraw payload type. - WithdrawPayload = 5, -} -impl PayloadType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - PayloadType::Unknown => "UNKNOWN", - PayloadType::TransferPayload => "TRANSFER_PAYLOAD", - PayloadType::BondPayload => "BOND_PAYLOAD", - PayloadType::SortitionPayload => "SORTITION_PAYLOAD", - PayloadType::UnbondPayload => "UNBOND_PAYLOAD", - PayloadType::WithdrawPayload => "WITHDRAW_PAYLOAD", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UNKNOWN" => Some(Self::Unknown), - "TRANSFER_PAYLOAD" => Some(Self::TransferPayload), - "BOND_PAYLOAD" => Some(Self::BondPayload), - "SORTITION_PAYLOAD" => Some(Self::SortitionPayload), - "UNBOND_PAYLOAD" => Some(Self::UnbondPayload), - "WITHDRAW_PAYLOAD" => Some(Self::WithdrawPayload), - _ => None, - } - } -} -/// Enumeration for verbosity levels when requesting transaction details. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum TransactionVerbosity { - /// Request transaction data only. - TransactionData = 0, - /// Request detailed transaction information. - TransactionInfo = 1, -} -impl TransactionVerbosity { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - TransactionVerbosity::TransactionData => "TRANSACTION_DATA", - TransactionVerbosity::TransactionInfo => "TRANSACTION_INFO", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "TRANSACTION_DATA" => Some(Self::TransactionData), - "TRANSACTION_INFO" => Some(Self::TransactionInfo), - _ => None, - } - } -} -/// Message to request account information based on an address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetAccountRequest { - /// The address of the account to retrieve information for. - #[prost(string, tag="1")] - pub address: ::prost::alloc::string::String, -} -/// Message containing the response with account information. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetAccountResponse { - /// Detailed information about the account. - #[prost(message, optional, tag="1")] - pub account: ::core::option::Option, -} -/// Message to request validator addresses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetValidatorAddressesRequest { -} -/// Message containing the response with a list of validator addresses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetValidatorAddressesResponse { - /// List of validator addresses. - #[prost(string, repeated, tag="1")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Message to request validator information based on an address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetValidatorRequest { - /// The address of the validator to retrieve information for. - #[prost(string, tag="1")] - pub address: ::prost::alloc::string::String, -} -/// Message to request validator information based on a validator number. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetValidatorByNumberRequest { - /// The unique number of the validator to retrieve information for. - #[prost(int32, tag="1")] - pub number: i32, -} -/// Message containing the response with validator information. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetValidatorResponse { - /// Detailed information about the validator. - #[prost(message, optional, tag="1")] - pub validator: ::core::option::Option, -} -/// Message to request public key based on an address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetPublicKeyRequest { - /// The address for which to retrieve the public key. - #[prost(string, tag="1")] - pub address: ::prost::alloc::string::String, -} -/// Message containing the response with the public key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetPublicKeyResponse { - /// The public key associated with the provided address. - #[prost(string, tag="1")] - pub public_key: ::prost::alloc::string::String, -} -/// Message to request block information based on height and verbosity level. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockRequest { - /// The height of the block to retrieve. - #[prost(uint32, tag="1")] - pub height: u32, - /// The verbosity level for block information. - #[prost(enumeration="BlockVerbosity", tag="2")] - pub verbosity: i32, -} -/// Message containing the response with block information. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockResponse { - /// The height of the block. - #[prost(uint32, tag="1")] - pub height: u32, - /// The hash of the block. - #[prost(string, tag="2")] - pub hash: ::prost::alloc::string::String, - /// Block data, available only if verbosity level is set to BLOCK_DATA. - #[prost(string, tag="3")] - pub data: ::prost::alloc::string::String, - /// The timestamp of the block. - #[prost(uint32, tag="4")] - pub block_time: u32, - /// Header information of the block. - #[prost(message, optional, tag="5")] - pub header: ::core::option::Option, - /// Certificate information of the previous block. - #[prost(message, optional, tag="6")] - pub prev_cert: ::core::option::Option, - /// List of transactions in the block, available when verbosity level is set to - /// BLOCK_TRANSACTIONS. - #[prost(message, repeated, tag="7")] - pub txs: ::prost::alloc::vec::Vec, -} -/// Message to request block hash based on height. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockHashRequest { - /// The height of the block to retrieve the hash for. - #[prost(uint32, tag="1")] - pub height: u32, -} -/// Message containing the response with the block hash. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockHashResponse { - /// The hash of the block. - #[prost(string, tag="1")] - pub hash: ::prost::alloc::string::String, -} -/// Message to request block height based on hash. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockHeightRequest { - /// The hash of the block to retrieve the height for. - #[prost(string, tag="1")] - pub hash: ::prost::alloc::string::String, -} -/// Message containing the response with the block height. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockHeightResponse { - /// The height of the block. - #[prost(uint32, tag="1")] - pub height: u32, -} -/// Message to request general information about the blockchain. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockchainInfoRequest { -} -/// Message containing the response with general blockchain information. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetBlockchainInfoResponse { - /// The height of the last block in the blockchain. - #[prost(uint32, tag="1")] - pub last_block_height: u32, - /// The hash of the last block in the blockchain. - #[prost(string, tag="2")] - pub last_block_hash: ::prost::alloc::string::String, - /// The total number of accounts in the blockchain. - #[prost(int32, tag="3")] - pub total_accounts: i32, - /// The total number of validators in the blockchain. - #[prost(int32, tag="4")] - pub total_validators: i32, - /// The total power of the blockchain. - #[prost(int64, tag="5")] - pub total_power: i64, - /// The power of the committee. - #[prost(int64, tag="6")] - pub committee_power: i64, - /// List of committee validators. - #[prost(message, repeated, tag="7")] - pub committee_validators: ::prost::alloc::vec::Vec, - /// If the blocks are subject to pruning. - #[prost(bool, tag="8")] - pub is_pruned: bool, - /// Lowest-height block stored (only present if pruning is enabled) - #[prost(uint32, tag="9")] - pub pruning_height: u32, - /// Timestamp of the last block in Unix format - #[prost(int64, tag="10")] - pub last_block_time: i64, -} -/// Message to request consensus information. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetConsensusInfoRequest { -} -/// Message containing the response with consensus information. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetConsensusInfoResponse { - /// The proposal of the consensus info. - #[prost(message, optional, tag="1")] - pub proposal: ::core::option::Option, - /// List of consensus instances. - #[prost(message, repeated, tag="2")] - pub instances: ::prost::alloc::vec::Vec, -} -/// Request message to retrieve transactions in the transaction pool. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTxPoolContentRequest { - /// The type of transactions to retrieve from the transaction pool. 0 means all - /// types. - #[prost(enumeration="PayloadType", tag="1")] - pub payload_type: i32, -} -/// Response message containing transactions in the transaction pool. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTxPoolContentResponse { - /// List of transactions currently in the pool. - #[prost(message, repeated, tag="1")] - pub txs: ::prost::alloc::vec::Vec, -} -/// Message containing information about a validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ValidatorInfo { - /// The hash of the validator. - #[prost(string, tag="1")] - pub hash: ::prost::alloc::string::String, - /// The serialized data of the validator. - #[prost(string, tag="2")] - pub data: ::prost::alloc::string::String, - /// The public key of the validator. - #[prost(string, tag="3")] - pub public_key: ::prost::alloc::string::String, - /// The unique number assigned to the validator. - #[prost(int32, tag="4")] - pub number: i32, - /// The stake of the validator in NanoPAC. - #[prost(int64, tag="5")] - pub stake: i64, - /// The height at which the validator last bonded. - #[prost(uint32, tag="6")] - pub last_bonding_height: u32, - /// The height at which the validator last participated in sortition. - #[prost(uint32, tag="7")] - pub last_sortition_height: u32, - /// The height at which the validator will unbond. - #[prost(uint32, tag="8")] - pub unbonding_height: u32, - /// The address of the validator. - #[prost(string, tag="9")] - pub address: ::prost::alloc::string::String, - /// The availability score of the validator. - #[prost(double, tag="10")] - pub availability_score: f64, -} -/// Message containing information about an account. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AccountInfo { - /// The hash of the account. - #[prost(string, tag="1")] - pub hash: ::prost::alloc::string::String, - /// The serialized data of the account. - #[prost(string, tag="2")] - pub data: ::prost::alloc::string::String, - /// The unique number assigned to the account. - #[prost(int32, tag="3")] - pub number: i32, - /// The balance of the account in NanoPAC. - #[prost(int64, tag="4")] - pub balance: i64, - /// The address of the account. - #[prost(string, tag="5")] - pub address: ::prost::alloc::string::String, -} -/// Message containing information about the header of a block. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BlockHeaderInfo { - /// The version of the block. - #[prost(int32, tag="1")] - pub version: i32, - /// The hash of the previous block. - #[prost(string, tag="2")] - pub prev_block_hash: ::prost::alloc::string::String, - /// The state root hash of the blockchain. - #[prost(string, tag="3")] - pub state_root: ::prost::alloc::string::String, - /// The sortition seed of the block. - #[prost(string, tag="4")] - pub sortition_seed: ::prost::alloc::string::String, - /// The address of the proposer of the block. - #[prost(string, tag="5")] - pub proposer_address: ::prost::alloc::string::String, -} -/// Message containing information about a certificate. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CertificateInfo { - /// The hash of the certificate. - #[prost(string, tag="1")] - pub hash: ::prost::alloc::string::String, - /// The round of the certificate. - #[prost(int32, tag="2")] - pub round: i32, - /// List of committers in the certificate. - #[prost(int32, repeated, tag="3")] - pub committers: ::prost::alloc::vec::Vec, - /// List of absentees in the certificate. - #[prost(int32, repeated, tag="4")] - pub absentees: ::prost::alloc::vec::Vec, - /// The signature of the certificate. - #[prost(string, tag="5")] - pub signature: ::prost::alloc::string::String, -} -/// Message containing information about a vote. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VoteInfo { - /// The type of the vote. - #[prost(enumeration="VoteType", tag="1")] - pub r#type: i32, - /// The address of the voter. - #[prost(string, tag="2")] - pub voter: ::prost::alloc::string::String, - /// The hash of the block being voted on. - #[prost(string, tag="3")] - pub block_hash: ::prost::alloc::string::String, - /// The consensus round of the vote. - #[prost(int32, tag="4")] - pub round: i32, - /// The change-proposer round of the vote. - #[prost(int32, tag="5")] - pub cp_round: i32, - /// The change-proposer value of the vote. - #[prost(int32, tag="6")] - pub cp_value: i32, -} -/// Message containing information about a consensus instance. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConsensusInfo { - /// The address of the consensus instance. - #[prost(string, tag="1")] - pub address: ::prost::alloc::string::String, - /// Indicates whether the consensus instance is active and part of the - /// committee. - #[prost(bool, tag="2")] - pub active: bool, - /// The height of the consensus instance. - #[prost(uint32, tag="3")] - pub height: u32, - /// The round of the consensus instance. - #[prost(int32, tag="4")] - pub round: i32, - /// List of votes in the consensus instance. - #[prost(message, repeated, tag="5")] - pub votes: ::prost::alloc::vec::Vec, -} -/// Message containing information about a proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Proposal { - /// The height of the proposal. - #[prost(uint32, tag="1")] - pub height: u32, - /// The round of the proposal. - #[prost(int32, tag="2")] - pub round: i32, - /// The block data of the proposal. - #[prost(string, tag="3")] - pub block_data: ::prost::alloc::string::String, - /// The signature data of the proposal. - #[prost(string, tag="4")] - pub signature_data: ::prost::alloc::string::String, -} -/// Enumeration for verbosity levels when requesting block information. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum BlockVerbosity { - /// Request only block data. - BlockData = 0, - /// Request block information and transaction IDs. - BlockInfo = 1, - /// Request block information and detailed transaction data. - BlockTransactions = 2, -} -impl BlockVerbosity { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - BlockVerbosity::BlockData => "BLOCK_DATA", - BlockVerbosity::BlockInfo => "BLOCK_INFO", - BlockVerbosity::BlockTransactions => "BLOCK_TRANSACTIONS", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "BLOCK_DATA" => Some(Self::BlockData), - "BLOCK_INFO" => Some(Self::BlockInfo), - "BLOCK_TRANSACTIONS" => Some(Self::BlockTransactions), - _ => None, - } - } -} -/// Enumeration for types of votes. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum VoteType { - /// Unknown vote type. - VoteUnknown = 0, - /// Prepare vote type. - VotePrepare = 1, - /// Precommit vote type. - VotePrecommit = 2, - /// Change proposer vote type. - VoteChangeProposer = 3, -} -impl VoteType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - VoteType::VoteUnknown => "VOTE_UNKNOWN", - VoteType::VotePrepare => "VOTE_PREPARE", - VoteType::VotePrecommit => "VOTE_PRECOMMIT", - VoteType::VoteChangeProposer => "VOTE_CHANGE_PROPOSER", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "VOTE_UNKNOWN" => Some(Self::VoteUnknown), - "VOTE_PREPARE" => Some(Self::VotePrepare), - "VOTE_PRECOMMIT" => Some(Self::VotePrecommit), - "VOTE_CHANGE_PROPOSER" => Some(Self::VoteChangeProposer), - _ => None, - } - } -} -/// Request message for retrieving overall network information. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetNetworkInfoRequest { - /// If true, only returns peers with connected status. - #[prost(bool, tag="1")] - pub only_connected: bool, -} -/// Response message containing information about the overall network. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetNetworkInfoResponse { - /// Name of the network. - #[prost(string, tag="1")] - pub network_name: ::prost::alloc::string::String, - /// Total bytes sent across the network. - #[prost(int64, tag="2")] - pub total_sent_bytes: i64, - /// Total bytes received across the network. - #[prost(int64, tag="3")] - pub total_received_bytes: i64, - /// Number of connected peers. - #[prost(uint32, tag="4")] - pub connected_peers_count: u32, - /// List of connected peers. - #[prost(message, repeated, tag="5")] - pub connected_peers: ::prost::alloc::vec::Vec, - /// Bytes sent per peer ID. - #[prost(map="int32, int64", tag="6")] - pub sent_bytes: ::std::collections::HashMap, - /// Bytes received per peer ID. - #[prost(map="int32, int64", tag="7")] - pub received_bytes: ::std::collections::HashMap, -} -/// Request message for retrieving information about a specific node in the -/// network. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetNodeInfoRequest { -} -/// Response message containing information about a specific node in the network. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetNodeInfoResponse { - /// Moniker of the node. - #[prost(string, tag="1")] - pub moniker: ::prost::alloc::string::String, - /// Agent information of the node. - #[prost(string, tag="2")] - pub agent: ::prost::alloc::string::String, - /// Peer ID of the node. - #[prost(string, tag="3")] - pub peer_id: ::prost::alloc::string::String, - /// Timestamp when the node started. - #[prost(uint64, tag="4")] - pub started_at: u64, - /// Reachability status of the node. - #[prost(string, tag="5")] - pub reachability: ::prost::alloc::string::String, - /// A bitfield indicating the services provided by the node. - #[prost(int32, tag="6")] - pub services: i32, - /// Names of services provided by the node. - #[prost(string, tag="7")] - pub services_names: ::prost::alloc::string::String, - /// List of addresses associated with the node. - #[prost(string, repeated, tag="8")] - pub local_addrs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// List of protocols supported by the node. - #[prost(string, repeated, tag="9")] - pub protocols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Clock offset of the node. - #[prost(double, tag="13")] - pub clock_offset: f64, - /// Information about the node's connections. - #[prost(message, optional, tag="14")] - pub connection_info: ::core::option::Option, -} -/// Information about a peer in the network. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct PeerInfo { - /// Status of the peer. - #[prost(int32, tag="1")] - pub status: i32, - /// Moniker of the peer. - #[prost(string, tag="2")] - pub moniker: ::prost::alloc::string::String, - /// Agent information of the peer. - #[prost(string, tag="3")] - pub agent: ::prost::alloc::string::String, - /// Peer ID of the peer. - #[prost(string, tag="4")] - pub peer_id: ::prost::alloc::string::String, - /// Consensus keys used by the peer. - #[prost(string, repeated, tag="5")] - pub consensus_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Consensus addresses of the peer. - #[prost(string, repeated, tag="6")] - pub consensus_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Services provided by the peer. - #[prost(uint32, tag="7")] - pub services: u32, - /// Hash of the last block the peer knows. - #[prost(string, tag="8")] - pub last_block_hash: ::prost::alloc::string::String, - /// Blockchain height of the peer. - #[prost(uint32, tag="9")] - pub height: u32, - /// Number of received bundles. - #[prost(int32, tag="10")] - pub received_bundles: i32, - /// Number of invalid bundles received. - #[prost(int32, tag="11")] - pub invalid_bundles: i32, - /// Timestamp of the last sent bundle. - #[prost(int64, tag="12")] - pub last_sent: i64, - /// Timestamp of the last received bundle. - #[prost(int64, tag="13")] - pub last_received: i64, - /// Bytes sent per message type. - #[prost(map="int32, int64", tag="14")] - pub sent_bytes: ::std::collections::HashMap, - /// Bytes received per message type. - #[prost(map="int32, int64", tag="15")] - pub received_bytes: ::std::collections::HashMap, - /// Network address of the peer. - #[prost(string, tag="16")] - pub address: ::prost::alloc::string::String, - /// Direction of connection with the peer. - #[prost(string, tag="17")] - pub direction: ::prost::alloc::string::String, - /// List of protocols supported by the peer. - #[prost(string, repeated, tag="18")] - pub protocols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Total download sessions with the peer. - #[prost(int32, tag="19")] - pub total_sessions: i32, - /// Completed download sessions with the peer. - #[prost(int32, tag="20")] - pub completed_sessions: i32, -} -/// ConnectionInfo contains information about the node's connections. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ConnectionInfo { - /// Total number of connections. - #[prost(uint64, tag="1")] - pub connections: u64, - /// Number of inbound connections. - #[prost(uint64, tag="2")] - pub inbound_connections: u64, - /// Number of outbound connections. - #[prost(uint64, tag="3")] - pub outbound_connections: u64, -} -/// Request message for sign message with private key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignMessageWithPrivateKeyRequest { - /// The private key to sign the message. - #[prost(string, tag="1")] - pub private_key: ::prost::alloc::string::String, - /// The message to sign. - #[prost(string, tag="2")] - pub message: ::prost::alloc::string::String, -} -/// Response message containing the generated signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignMessageWithPrivateKeyResponse { - /// The signature of the message. - #[prost(string, tag="1")] - pub signature: ::prost::alloc::string::String, -} -/// Request message for verifying a message signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VerifyMessageRequest { - /// The signed message. - #[prost(string, tag="1")] - pub message: ::prost::alloc::string::String, - /// The signature of the message. - #[prost(string, tag="2")] - pub signature: ::prost::alloc::string::String, - /// The public key of the signer. - #[prost(string, tag="3")] - pub public_key: ::prost::alloc::string::String, -} -/// Response message containing the resualt of validation of signature and message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct VerifyMessageResponse { - /// Indicates if the signature is valid (true) or not (false). - #[prost(bool, tag="1")] - pub is_valid: bool, -} -/// Message containing address information. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct AddressInfo { - /// The address string. - #[prost(string, tag="1")] - pub address: ::prost::alloc::string::String, - /// The public key associated with the address. - #[prost(string, tag="2")] - pub public_key: ::prost::alloc::string::String, - /// A label associated with the address. - #[prost(string, tag="3")] - pub label: ::prost::alloc::string::String, - /// The Hierarchical Deterministic path of the address within the wallet. - #[prost(string, tag="4")] - pub path: ::prost::alloc::string::String, -} -/// Message containing transaction history information for an address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct HistoryInfo { - /// The transaction ID hash. - #[prost(string, tag="1")] - pub transaction_id: ::prost::alloc::string::String, - /// The timestamp of the transaction. - #[prost(uint32, tag="2")] - pub time: u32, - /// The payload type of the transaction. - #[prost(string, tag="3")] - pub payload_type: ::prost::alloc::string::String, - /// A description of the transaction. - #[prost(string, tag="4")] - pub description: ::prost::alloc::string::String, - /// The amount involved in the transaction. - #[prost(int64, tag="5")] - pub amount: i64, -} -/// Request message to get an address transaction history. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetAddressHistoryRequest { - /// The name of the wallet. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, - /// The address to retrieve the transaction history for. - #[prost(string, tag="2")] - pub address: ::prost::alloc::string::String, -} -/// Response message containing the address transaction history. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetAddressHistoryResponse { - /// Array of history information for the address. - #[prost(message, repeated, tag="1")] - pub history_info: ::prost::alloc::vec::Vec, -} -/// Request message for generating a new address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetNewAddressRequest { - /// The name of the wallet to generate a new address. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, - /// The type of address to generate. - #[prost(enumeration="AddressType", tag="2")] - pub address_type: i32, - /// A label for the new address. - #[prost(string, tag="3")] - pub label: ::prost::alloc::string::String, - /// Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. - #[prost(string, tag="4")] - pub password: ::prost::alloc::string::String, -} -/// Response message containing the newly generated address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetNewAddressResponse { - /// The name of the wallet from which the address is generated. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, - /// Information about the newly generated address. - #[prost(message, optional, tag="2")] - pub address_info: ::core::option::Option, -} -/// Request message for restoring an existing wallet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RestoreWalletRequest { - /// The name of the wallet to restore. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, - /// The mnemonic for wallet recovery. - #[prost(string, tag="2")] - pub mnemonic: ::prost::alloc::string::String, - /// The password for securing the wallet. - #[prost(string, tag="3")] - pub password: ::prost::alloc::string::String, -} -/// Response message containing the name of the restored wallet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct RestoreWalletResponse { - /// The name of the restored wallet. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, -} -/// Request message for creating a new wallet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateWalletRequest { - /// The name of the new wallet. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, - /// The password for securing the wallet. - #[prost(string, tag="4")] - pub password: ::prost::alloc::string::String, -} -/// Response message containing the mnemonic for wallet recovery. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct CreateWalletResponse { - /// The mnemonic for wallet recovery. - #[prost(string, tag="2")] - pub mnemonic: ::prost::alloc::string::String, -} -/// Request message for loading an existing wallet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct LoadWalletRequest { - /// The name of the wallet to load. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, -} -/// Response message containing the name of the loaded wallet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct LoadWalletResponse { - /// The name of the loaded wallet. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, -} -/// Request message for unloading a currently loaded wallet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UnloadWalletRequest { - /// The name of the wallet to unload. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, -} -/// Response message containing the name of the unloaded wallet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UnloadWalletResponse { - /// The name of the unloaded wallet. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, -} -/// Request message for obtaining the validator address associated with a public -/// key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetValidatorAddressRequest { - /// The public key for which the validator address is requested. - #[prost(string, tag="1")] - pub public_key: ::prost::alloc::string::String, -} -/// Response message containing the validator address corresponding to a public -/// key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetValidatorAddressResponse { - /// The validator address associated with the public key. - #[prost(string, tag="1")] - pub address: ::prost::alloc::string::String, -} -/// Request message for signing a raw transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignRawTransactionRequest { - /// The name of the wallet used for signing. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, - /// The raw transaction data to be signed. - #[prost(string, tag="2")] - pub raw_transaction: ::prost::alloc::string::String, - /// The password for unlocking the wallet for signing. - #[prost(string, tag="3")] - pub password: ::prost::alloc::string::String, -} -/// Response message containing the transaction ID and signed raw transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignRawTransactionResponse { - /// The ID of the signed transaction. - #[prost(string, tag="1")] - pub transaction_id: ::prost::alloc::string::String, - /// The signed raw transaction data. - #[prost(string, tag="2")] - pub signed_raw_transaction: ::prost::alloc::string::String, -} -/// Request message for obtaining the available balance of a wallet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTotalBalanceRequest { - /// The name of the wallet to get the total balance. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, -} -/// Response message containing the available balance of the wallet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetTotalBalanceResponse { - /// The name of the wallet. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, - /// The total balance of the wallet in NanoPAC. - #[prost(int64, tag="2")] - pub total_balance: i64, -} -/// Request message to sign an arbitrary message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignMessageRequest { - /// The name of the wallet. - #[prost(string, tag="1")] - pub wallet_name: ::prost::alloc::string::String, - /// The password for unlocking the wallet for signing. - #[prost(string, tag="2")] - pub password: ::prost::alloc::string::String, - /// The account address associated with the private key. - #[prost(string, tag="3")] - pub address: ::prost::alloc::string::String, - /// The arbitrary message to be signed. - #[prost(string, tag="4")] - pub message: ::prost::alloc::string::String, -} -/// Response message containing the available balance of the wallet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct SignMessageResponse { - /// Signature of the message. - #[prost(string, tag="1")] - pub signature: ::prost::alloc::string::String, -} -/// Enum for the address type. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -pub enum AddressType { - /// Treasury address type. - /// Should not be used to generate new addresses. - Treasury = 0, - /// Validator address type. - Validator = 1, - /// Account address type with BLS signature scheme. - BlsAccount = 2, - /// Account address type with Ed25519 signature scheme. - /// Note: Generating a new Ed25519 address requires the wallet password. - Ed25519Account = 3, -} -impl AddressType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - AddressType::Treasury => "ADDRESS_TYPE_TREASURY", - AddressType::Validator => "ADDRESS_TYPE_VALIDATOR", - AddressType::BlsAccount => "ADDRESS_TYPE_BLS_ACCOUNT", - AddressType::Ed25519Account => "ADDRESS_TYPE_ED25519_ACCOUNT", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "ADDRESS_TYPE_TREASURY" => Some(Self::Treasury), - "ADDRESS_TYPE_VALIDATOR" => Some(Self::Validator), - "ADDRESS_TYPE_BLS_ACCOUNT" => Some(Self::BlsAccount), - "ADDRESS_TYPE_ED25519_ACCOUNT" => Some(Self::Ed25519Account), - _ => None, - } - } -} -include!("pactus.serde.rs"); -include!("pactus.tonic.rs"); -// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/www/grpc/gen/rust/pactus.serde.rs b/www/grpc/gen/rust/pactus.serde.rs deleted file mode 100644 index c6ab16ca7..000000000 --- a/www/grpc/gen/rust/pactus.serde.rs +++ /dev/null @@ -1,10265 +0,0 @@ -// @generated -impl serde::Serialize for AccountInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.hash.is_empty() { - len += 1; - } - if !self.data.is_empty() { - len += 1; - } - if self.number != 0 { - len += 1; - } - if self.balance != 0 { - len += 1; - } - if !self.address.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.AccountInfo", len)?; - if !self.hash.is_empty() { - struct_ser.serialize_field("hash", &self.hash)?; - } - if !self.data.is_empty() { - struct_ser.serialize_field("data", &self.data)?; - } - if self.number != 0 { - struct_ser.serialize_field("number", &self.number)?; - } - if self.balance != 0 { - struct_ser.serialize_field("balance", ToString::to_string(&self.balance).as_str())?; - } - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AccountInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "hash", - "data", - "number", - "balance", - "address", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Hash, - Data, - Number, - Balance, - Address, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "hash" => Ok(GeneratedField::Hash), - "data" => Ok(GeneratedField::Data), - "number" => Ok(GeneratedField::Number), - "balance" => Ok(GeneratedField::Balance), - "address" => Ok(GeneratedField::Address), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AccountInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.AccountInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut hash__ = None; - let mut data__ = None; - let mut number__ = None; - let mut balance__ = None; - let mut address__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = Some(map.next_value()?); - } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = Some(map.next_value()?); - } - GeneratedField::Number => { - if number__.is_some() { - return Err(serde::de::Error::duplicate_field("number")); - } - number__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Balance => { - if balance__.is_some() { - return Err(serde::de::Error::duplicate_field("balance")); - } - balance__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - } - } - Ok(AccountInfo { - hash: hash__.unwrap_or_default(), - data: data__.unwrap_or_default(), - number: number__.unwrap_or_default(), - balance: balance__.unwrap_or_default(), - address: address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.AccountInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for AddressInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - if !self.public_key.is_empty() { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if !self.path.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.AddressInfo", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if !self.public_key.is_empty() { - struct_ser.serialize_field("publicKey", &self.public_key)?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; - } - if !self.path.is_empty() { - struct_ser.serialize_field("path", &self.path)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for AddressInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "public_key", - "publicKey", - "label", - "path", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - PublicKey, - Label, - Path, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - "label" => Ok(GeneratedField::Label), - "path" => Ok(GeneratedField::Path), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AddressInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.AddressInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut public_key__ = None; - let mut label__ = None; - let mut path__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - GeneratedField::PublicKey => { - if public_key__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKey")); - } - public_key__ = Some(map.next_value()?); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map.next_value()?); - } - GeneratedField::Path => { - if path__.is_some() { - return Err(serde::de::Error::duplicate_field("path")); - } - path__ = Some(map.next_value()?); - } - } - } - Ok(AddressInfo { - address: address__.unwrap_or_default(), - public_key: public_key__.unwrap_or_default(), - label: label__.unwrap_or_default(), - path: path__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.AddressInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for AddressType { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Treasury => "ADDRESS_TYPE_TREASURY", - Self::Validator => "ADDRESS_TYPE_VALIDATOR", - Self::BlsAccount => "ADDRESS_TYPE_BLS_ACCOUNT", - Self::Ed25519Account => "ADDRESS_TYPE_ED25519_ACCOUNT", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for AddressType { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "ADDRESS_TYPE_TREASURY", - "ADDRESS_TYPE_VALIDATOR", - "ADDRESS_TYPE_BLS_ACCOUNT", - "ADDRESS_TYPE_ED25519_ACCOUNT", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = AddressType; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(AddressType::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(AddressType::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "ADDRESS_TYPE_TREASURY" => Ok(AddressType::Treasury), - "ADDRESS_TYPE_VALIDATOR" => Ok(AddressType::Validator), - "ADDRESS_TYPE_BLS_ACCOUNT" => Ok(AddressType::BlsAccount), - "ADDRESS_TYPE_ED25519_ACCOUNT" => Ok(AddressType::Ed25519Account), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for BlockHeaderInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.version != 0 { - len += 1; - } - if !self.prev_block_hash.is_empty() { - len += 1; - } - if !self.state_root.is_empty() { - len += 1; - } - if !self.sortition_seed.is_empty() { - len += 1; - } - if !self.proposer_address.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.BlockHeaderInfo", len)?; - if self.version != 0 { - struct_ser.serialize_field("version", &self.version)?; - } - if !self.prev_block_hash.is_empty() { - struct_ser.serialize_field("prevBlockHash", &self.prev_block_hash)?; - } - if !self.state_root.is_empty() { - struct_ser.serialize_field("stateRoot", &self.state_root)?; - } - if !self.sortition_seed.is_empty() { - struct_ser.serialize_field("sortitionSeed", &self.sortition_seed)?; - } - if !self.proposer_address.is_empty() { - struct_ser.serialize_field("proposerAddress", &self.proposer_address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for BlockHeaderInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "version", - "prev_block_hash", - "prevBlockHash", - "state_root", - "stateRoot", - "sortition_seed", - "sortitionSeed", - "proposer_address", - "proposerAddress", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Version, - PrevBlockHash, - StateRoot, - SortitionSeed, - ProposerAddress, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "version" => Ok(GeneratedField::Version), - "prevBlockHash" | "prev_block_hash" => Ok(GeneratedField::PrevBlockHash), - "stateRoot" | "state_root" => Ok(GeneratedField::StateRoot), - "sortitionSeed" | "sortition_seed" => Ok(GeneratedField::SortitionSeed), - "proposerAddress" | "proposer_address" => Ok(GeneratedField::ProposerAddress), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BlockHeaderInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.BlockHeaderInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut version__ = None; - let mut prev_block_hash__ = None; - let mut state_root__ = None; - let mut sortition_seed__ = None; - let mut proposer_address__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::PrevBlockHash => { - if prev_block_hash__.is_some() { - return Err(serde::de::Error::duplicate_field("prevBlockHash")); - } - prev_block_hash__ = Some(map.next_value()?); - } - GeneratedField::StateRoot => { - if state_root__.is_some() { - return Err(serde::de::Error::duplicate_field("stateRoot")); - } - state_root__ = Some(map.next_value()?); - } - GeneratedField::SortitionSeed => { - if sortition_seed__.is_some() { - return Err(serde::de::Error::duplicate_field("sortitionSeed")); - } - sortition_seed__ = Some(map.next_value()?); - } - GeneratedField::ProposerAddress => { - if proposer_address__.is_some() { - return Err(serde::de::Error::duplicate_field("proposerAddress")); - } - proposer_address__ = Some(map.next_value()?); - } - } - } - Ok(BlockHeaderInfo { - version: version__.unwrap_or_default(), - prev_block_hash: prev_block_hash__.unwrap_or_default(), - state_root: state_root__.unwrap_or_default(), - sortition_seed: sortition_seed__.unwrap_or_default(), - proposer_address: proposer_address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.BlockHeaderInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for BlockVerbosity { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::BlockData => "BLOCK_DATA", - Self::BlockInfo => "BLOCK_INFO", - Self::BlockTransactions => "BLOCK_TRANSACTIONS", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for BlockVerbosity { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "BLOCK_DATA", - "BLOCK_INFO", - "BLOCK_TRANSACTIONS", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BlockVerbosity; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(BlockVerbosity::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(BlockVerbosity::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "BLOCK_DATA" => Ok(BlockVerbosity::BlockData), - "BLOCK_INFO" => Ok(BlockVerbosity::BlockInfo), - "BLOCK_TRANSACTIONS" => Ok(BlockVerbosity::BlockTransactions), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for BroadcastTransactionRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.signed_raw_transaction.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.BroadcastTransactionRequest", len)?; - if !self.signed_raw_transaction.is_empty() { - struct_ser.serialize_field("signedRawTransaction", &self.signed_raw_transaction)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for BroadcastTransactionRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "signed_raw_transaction", - "signedRawTransaction", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - SignedRawTransaction, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "signedRawTransaction" | "signed_raw_transaction" => Ok(GeneratedField::SignedRawTransaction), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BroadcastTransactionRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.BroadcastTransactionRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut signed_raw_transaction__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::SignedRawTransaction => { - if signed_raw_transaction__.is_some() { - return Err(serde::de::Error::duplicate_field("signedRawTransaction")); - } - signed_raw_transaction__ = Some(map.next_value()?); - } - } - } - Ok(BroadcastTransactionRequest { - signed_raw_transaction: signed_raw_transaction__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.BroadcastTransactionRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for BroadcastTransactionResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.id.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.BroadcastTransactionResponse", len)?; - if !self.id.is_empty() { - struct_ser.serialize_field("id", &self.id)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for BroadcastTransactionResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "id", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Id, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "id" => Ok(GeneratedField::Id), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BroadcastTransactionResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.BroadcastTransactionResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut id__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Id => { - if id__.is_some() { - return Err(serde::de::Error::duplicate_field("id")); - } - id__ = Some(map.next_value()?); - } - } - } - Ok(BroadcastTransactionResponse { - id: id__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.BroadcastTransactionResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CalculateFeeRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.amount != 0 { - len += 1; - } - if self.payload_type != 0 { - len += 1; - } - if self.fixed_amount { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.CalculateFeeRequest", len)?; - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - if self.payload_type != 0 { - let v = PayloadType::from_i32(self.payload_type) - .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.payload_type)))?; - struct_ser.serialize_field("payloadType", &v)?; - } - if self.fixed_amount { - struct_ser.serialize_field("fixedAmount", &self.fixed_amount)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CalculateFeeRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "amount", - "payload_type", - "payloadType", - "fixed_amount", - "fixedAmount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Amount, - PayloadType, - FixedAmount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "amount" => Ok(GeneratedField::Amount), - "payloadType" | "payload_type" => Ok(GeneratedField::PayloadType), - "fixedAmount" | "fixed_amount" => Ok(GeneratedField::FixedAmount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CalculateFeeRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.CalculateFeeRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut amount__ = None; - let mut payload_type__ = None; - let mut fixed_amount__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::PayloadType => { - if payload_type__.is_some() { - return Err(serde::de::Error::duplicate_field("payloadType")); - } - payload_type__ = Some(map.next_value::()? as i32); - } - GeneratedField::FixedAmount => { - if fixed_amount__.is_some() { - return Err(serde::de::Error::duplicate_field("fixedAmount")); - } - fixed_amount__ = Some(map.next_value()?); - } - } - } - Ok(CalculateFeeRequest { - amount: amount__.unwrap_or_default(), - payload_type: payload_type__.unwrap_or_default(), - fixed_amount: fixed_amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.CalculateFeeRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CalculateFeeResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.amount != 0 { - len += 1; - } - if self.fee != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.CalculateFeeResponse", len)?; - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CalculateFeeResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "amount", - "fee", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Amount, - Fee, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "amount" => Ok(GeneratedField::Amount), - "fee" => Ok(GeneratedField::Fee), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CalculateFeeResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.CalculateFeeResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut amount__ = None; - let mut fee__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(CalculateFeeResponse { - amount: amount__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.CalculateFeeResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CertificateInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.hash.is_empty() { - len += 1; - } - if self.round != 0 { - len += 1; - } - if !self.committers.is_empty() { - len += 1; - } - if !self.absentees.is_empty() { - len += 1; - } - if !self.signature.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.CertificateInfo", len)?; - if !self.hash.is_empty() { - struct_ser.serialize_field("hash", &self.hash)?; - } - if self.round != 0 { - struct_ser.serialize_field("round", &self.round)?; - } - if !self.committers.is_empty() { - struct_ser.serialize_field("committers", &self.committers)?; - } - if !self.absentees.is_empty() { - struct_ser.serialize_field("absentees", &self.absentees)?; - } - if !self.signature.is_empty() { - struct_ser.serialize_field("signature", &self.signature)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CertificateInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "hash", - "round", - "committers", - "absentees", - "signature", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Hash, - Round, - Committers, - Absentees, - Signature, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "hash" => Ok(GeneratedField::Hash), - "round" => Ok(GeneratedField::Round), - "committers" => Ok(GeneratedField::Committers), - "absentees" => Ok(GeneratedField::Absentees), - "signature" => Ok(GeneratedField::Signature), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CertificateInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.CertificateInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut hash__ = None; - let mut round__ = None; - let mut committers__ = None; - let mut absentees__ = None; - let mut signature__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = Some(map.next_value()?); - } - GeneratedField::Round => { - if round__.is_some() { - return Err(serde::de::Error::duplicate_field("round")); - } - round__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Committers => { - if committers__.is_some() { - return Err(serde::de::Error::duplicate_field("committers")); - } - committers__ = - Some(map.next_value::>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - GeneratedField::Absentees => { - if absentees__.is_some() { - return Err(serde::de::Error::duplicate_field("absentees")); - } - absentees__ = - Some(map.next_value::>>()? - .into_iter().map(|x| x.0).collect()) - ; - } - GeneratedField::Signature => { - if signature__.is_some() { - return Err(serde::de::Error::duplicate_field("signature")); - } - signature__ = Some(map.next_value()?); - } - } - } - Ok(CertificateInfo { - hash: hash__.unwrap_or_default(), - round: round__.unwrap_or_default(), - committers: committers__.unwrap_or_default(), - absentees: absentees__.unwrap_or_default(), - signature: signature__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.CertificateInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ConnectionInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.connections != 0 { - len += 1; - } - if self.inbound_connections != 0 { - len += 1; - } - if self.outbound_connections != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.ConnectionInfo", len)?; - if self.connections != 0 { - struct_ser.serialize_field("connections", ToString::to_string(&self.connections).as_str())?; - } - if self.inbound_connections != 0 { - struct_ser.serialize_field("inboundConnections", ToString::to_string(&self.inbound_connections).as_str())?; - } - if self.outbound_connections != 0 { - struct_ser.serialize_field("outboundConnections", ToString::to_string(&self.outbound_connections).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ConnectionInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "connections", - "inbound_connections", - "inboundConnections", - "outbound_connections", - "outboundConnections", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Connections, - InboundConnections, - OutboundConnections, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "connections" => Ok(GeneratedField::Connections), - "inboundConnections" | "inbound_connections" => Ok(GeneratedField::InboundConnections), - "outboundConnections" | "outbound_connections" => Ok(GeneratedField::OutboundConnections), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ConnectionInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.ConnectionInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut connections__ = None; - let mut inbound_connections__ = None; - let mut outbound_connections__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Connections => { - if connections__.is_some() { - return Err(serde::de::Error::duplicate_field("connections")); - } - connections__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::InboundConnections => { - if inbound_connections__.is_some() { - return Err(serde::de::Error::duplicate_field("inboundConnections")); - } - inbound_connections__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::OutboundConnections => { - if outbound_connections__.is_some() { - return Err(serde::de::Error::duplicate_field("outboundConnections")); - } - outbound_connections__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(ConnectionInfo { - connections: connections__.unwrap_or_default(), - inbound_connections: inbound_connections__.unwrap_or_default(), - outbound_connections: outbound_connections__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.ConnectionInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ConsensusInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - if self.active { - len += 1; - } - if self.height != 0 { - len += 1; - } - if self.round != 0 { - len += 1; - } - if !self.votes.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.ConsensusInfo", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if self.active { - struct_ser.serialize_field("active", &self.active)?; - } - if self.height != 0 { - struct_ser.serialize_field("height", &self.height)?; - } - if self.round != 0 { - struct_ser.serialize_field("round", &self.round)?; - } - if !self.votes.is_empty() { - struct_ser.serialize_field("votes", &self.votes)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ConsensusInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "active", - "height", - "round", - "votes", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Active, - Height, - Round, - Votes, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "active" => Ok(GeneratedField::Active), - "height" => Ok(GeneratedField::Height), - "round" => Ok(GeneratedField::Round), - "votes" => Ok(GeneratedField::Votes), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ConsensusInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.ConsensusInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut active__ = None; - let mut height__ = None; - let mut round__ = None; - let mut votes__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - GeneratedField::Active => { - if active__.is_some() { - return Err(serde::de::Error::duplicate_field("active")); - } - active__ = Some(map.next_value()?); - } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Round => { - if round__.is_some() { - return Err(serde::de::Error::duplicate_field("round")); - } - round__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Votes => { - if votes__.is_some() { - return Err(serde::de::Error::duplicate_field("votes")); - } - votes__ = Some(map.next_value()?); - } - } - } - Ok(ConsensusInfo { - address: address__.unwrap_or_default(), - active: active__.unwrap_or_default(), - height: height__.unwrap_or_default(), - round: round__.unwrap_or_default(), - votes: votes__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.ConsensusInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CreateWalletRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - if !self.password.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.CreateWalletRequest", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - if !self.password.is_empty() { - struct_ser.serialize_field("password", &self.password)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CreateWalletRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - "password", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - Password, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - "password" => Ok(GeneratedField::Password), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CreateWalletRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.CreateWalletRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - let mut password__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - GeneratedField::Password => { - if password__.is_some() { - return Err(serde::de::Error::duplicate_field("password")); - } - password__ = Some(map.next_value()?); - } - } - } - Ok(CreateWalletRequest { - wallet_name: wallet_name__.unwrap_or_default(), - password: password__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.CreateWalletRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for CreateWalletResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.mnemonic.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.CreateWalletResponse", len)?; - if !self.mnemonic.is_empty() { - struct_ser.serialize_field("mnemonic", &self.mnemonic)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for CreateWalletResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "mnemonic", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Mnemonic, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "mnemonic" => Ok(GeneratedField::Mnemonic), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = CreateWalletResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.CreateWalletResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut mnemonic__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Mnemonic => { - if mnemonic__.is_some() { - return Err(serde::de::Error::duplicate_field("mnemonic")); - } - mnemonic__ = Some(map.next_value()?); - } - } - } - Ok(CreateWalletResponse { - mnemonic: mnemonic__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.CreateWalletResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetAccountRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetAccountRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetAccountRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetAccountRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetAccountRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - } - } - Ok(GetAccountRequest { - address: address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetAccountRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetAccountResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.account.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetAccountResponse", len)?; - if let Some(v) = self.account.as_ref() { - struct_ser.serialize_field("account", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetAccountResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "account", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Account, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "account" => Ok(GeneratedField::Account), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetAccountResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetAccountResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut account__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Account => { - if account__.is_some() { - return Err(serde::de::Error::duplicate_field("account")); - } - account__ = map.next_value()?; - } - } - } - Ok(GetAccountResponse { - account: account__, - }) - } - } - deserializer.deserialize_struct("pactus.GetAccountResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetAddressHistoryRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - if !self.address.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetAddressHistoryRequest", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetAddressHistoryRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - "address", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - Address, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - "address" => Ok(GeneratedField::Address), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetAddressHistoryRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetAddressHistoryRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - let mut address__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - } - } - Ok(GetAddressHistoryRequest { - wallet_name: wallet_name__.unwrap_or_default(), - address: address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetAddressHistoryRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetAddressHistoryResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.history_info.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetAddressHistoryResponse", len)?; - if !self.history_info.is_empty() { - struct_ser.serialize_field("historyInfo", &self.history_info)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetAddressHistoryResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "history_info", - "historyInfo", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - HistoryInfo, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "historyInfo" | "history_info" => Ok(GeneratedField::HistoryInfo), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetAddressHistoryResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetAddressHistoryResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut history_info__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::HistoryInfo => { - if history_info__.is_some() { - return Err(serde::de::Error::duplicate_field("historyInfo")); - } - history_info__ = Some(map.next_value()?); - } - } - } - Ok(GetAddressHistoryResponse { - history_info: history_info__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetAddressHistoryResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetBlockHashRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.height != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetBlockHashRequest", len)?; - if self.height != 0 { - struct_ser.serialize_field("height", &self.height)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetBlockHashRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "height", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Height, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "height" => Ok(GeneratedField::Height), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetBlockHashRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetBlockHashRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut height__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(GetBlockHashRequest { - height: height__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetBlockHashRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetBlockHashResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.hash.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetBlockHashResponse", len)?; - if !self.hash.is_empty() { - struct_ser.serialize_field("hash", &self.hash)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetBlockHashResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "hash", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Hash, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "hash" => Ok(GeneratedField::Hash), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetBlockHashResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetBlockHashResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut hash__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = Some(map.next_value()?); - } - } - } - Ok(GetBlockHashResponse { - hash: hash__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetBlockHashResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetBlockHeightRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.hash.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetBlockHeightRequest", len)?; - if !self.hash.is_empty() { - struct_ser.serialize_field("hash", &self.hash)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetBlockHeightRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "hash", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Hash, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "hash" => Ok(GeneratedField::Hash), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetBlockHeightRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetBlockHeightRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut hash__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = Some(map.next_value()?); - } - } - } - Ok(GetBlockHeightRequest { - hash: hash__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetBlockHeightRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetBlockHeightResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.height != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetBlockHeightResponse", len)?; - if self.height != 0 { - struct_ser.serialize_field("height", &self.height)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetBlockHeightResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "height", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Height, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "height" => Ok(GeneratedField::Height), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetBlockHeightResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetBlockHeightResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut height__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(GetBlockHeightResponse { - height: height__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetBlockHeightResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetBlockRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.height != 0 { - len += 1; - } - if self.verbosity != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetBlockRequest", len)?; - if self.height != 0 { - struct_ser.serialize_field("height", &self.height)?; - } - if self.verbosity != 0 { - let v = BlockVerbosity::from_i32(self.verbosity) - .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.verbosity)))?; - struct_ser.serialize_field("verbosity", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetBlockRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "height", - "verbosity", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Height, - Verbosity, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "height" => Ok(GeneratedField::Height), - "verbosity" => Ok(GeneratedField::Verbosity), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetBlockRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetBlockRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut height__ = None; - let mut verbosity__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Verbosity => { - if verbosity__.is_some() { - return Err(serde::de::Error::duplicate_field("verbosity")); - } - verbosity__ = Some(map.next_value::()? as i32); - } - } - } - Ok(GetBlockRequest { - height: height__.unwrap_or_default(), - verbosity: verbosity__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetBlockRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetBlockResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.height != 0 { - len += 1; - } - if !self.hash.is_empty() { - len += 1; - } - if !self.data.is_empty() { - len += 1; - } - if self.block_time != 0 { - len += 1; - } - if self.header.is_some() { - len += 1; - } - if self.prev_cert.is_some() { - len += 1; - } - if !self.txs.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetBlockResponse", len)?; - if self.height != 0 { - struct_ser.serialize_field("height", &self.height)?; - } - if !self.hash.is_empty() { - struct_ser.serialize_field("hash", &self.hash)?; - } - if !self.data.is_empty() { - struct_ser.serialize_field("data", &self.data)?; - } - if self.block_time != 0 { - struct_ser.serialize_field("blockTime", &self.block_time)?; - } - if let Some(v) = self.header.as_ref() { - struct_ser.serialize_field("header", v)?; - } - if let Some(v) = self.prev_cert.as_ref() { - struct_ser.serialize_field("prevCert", v)?; - } - if !self.txs.is_empty() { - struct_ser.serialize_field("txs", &self.txs)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetBlockResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "height", - "hash", - "data", - "block_time", - "blockTime", - "header", - "prev_cert", - "prevCert", - "txs", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Height, - Hash, - Data, - BlockTime, - Header, - PrevCert, - Txs, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "height" => Ok(GeneratedField::Height), - "hash" => Ok(GeneratedField::Hash), - "data" => Ok(GeneratedField::Data), - "blockTime" | "block_time" => Ok(GeneratedField::BlockTime), - "header" => Ok(GeneratedField::Header), - "prevCert" | "prev_cert" => Ok(GeneratedField::PrevCert), - "txs" => Ok(GeneratedField::Txs), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetBlockResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetBlockResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut height__ = None; - let mut hash__ = None; - let mut data__ = None; - let mut block_time__ = None; - let mut header__ = None; - let mut prev_cert__ = None; - let mut txs__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = Some(map.next_value()?); - } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = Some(map.next_value()?); - } - GeneratedField::BlockTime => { - if block_time__.is_some() { - return Err(serde::de::Error::duplicate_field("blockTime")); - } - block_time__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Header => { - if header__.is_some() { - return Err(serde::de::Error::duplicate_field("header")); - } - header__ = map.next_value()?; - } - GeneratedField::PrevCert => { - if prev_cert__.is_some() { - return Err(serde::de::Error::duplicate_field("prevCert")); - } - prev_cert__ = map.next_value()?; - } - GeneratedField::Txs => { - if txs__.is_some() { - return Err(serde::de::Error::duplicate_field("txs")); - } - txs__ = Some(map.next_value()?); - } - } - } - Ok(GetBlockResponse { - height: height__.unwrap_or_default(), - hash: hash__.unwrap_or_default(), - data: data__.unwrap_or_default(), - block_time: block_time__.unwrap_or_default(), - header: header__, - prev_cert: prev_cert__, - txs: txs__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetBlockResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetBlockchainInfoRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("pactus.GetBlockchainInfoRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetBlockchainInfoRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetBlockchainInfoRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetBlockchainInfoRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; - } - Ok(GetBlockchainInfoRequest { - }) - } - } - deserializer.deserialize_struct("pactus.GetBlockchainInfoRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetBlockchainInfoResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.last_block_height != 0 { - len += 1; - } - if !self.last_block_hash.is_empty() { - len += 1; - } - if self.total_accounts != 0 { - len += 1; - } - if self.total_validators != 0 { - len += 1; - } - if self.total_power != 0 { - len += 1; - } - if self.committee_power != 0 { - len += 1; - } - if !self.committee_validators.is_empty() { - len += 1; - } - if self.is_pruned { - len += 1; - } - if self.pruning_height != 0 { - len += 1; - } - if self.last_block_time != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetBlockchainInfoResponse", len)?; - if self.last_block_height != 0 { - struct_ser.serialize_field("lastBlockHeight", &self.last_block_height)?; - } - if !self.last_block_hash.is_empty() { - struct_ser.serialize_field("lastBlockHash", &self.last_block_hash)?; - } - if self.total_accounts != 0 { - struct_ser.serialize_field("totalAccounts", &self.total_accounts)?; - } - if self.total_validators != 0 { - struct_ser.serialize_field("totalValidators", &self.total_validators)?; - } - if self.total_power != 0 { - struct_ser.serialize_field("totalPower", ToString::to_string(&self.total_power).as_str())?; - } - if self.committee_power != 0 { - struct_ser.serialize_field("committeePower", ToString::to_string(&self.committee_power).as_str())?; - } - if !self.committee_validators.is_empty() { - struct_ser.serialize_field("committeeValidators", &self.committee_validators)?; - } - if self.is_pruned { - struct_ser.serialize_field("isPruned", &self.is_pruned)?; - } - if self.pruning_height != 0 { - struct_ser.serialize_field("pruningHeight", &self.pruning_height)?; - } - if self.last_block_time != 0 { - struct_ser.serialize_field("lastBlockTime", ToString::to_string(&self.last_block_time).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetBlockchainInfoResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "last_block_height", - "lastBlockHeight", - "last_block_hash", - "lastBlockHash", - "total_accounts", - "totalAccounts", - "total_validators", - "totalValidators", - "total_power", - "totalPower", - "committee_power", - "committeePower", - "committee_validators", - "committeeValidators", - "is_pruned", - "isPruned", - "pruning_height", - "pruningHeight", - "last_block_time", - "lastBlockTime", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - LastBlockHeight, - LastBlockHash, - TotalAccounts, - TotalValidators, - TotalPower, - CommitteePower, - CommitteeValidators, - IsPruned, - PruningHeight, - LastBlockTime, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "lastBlockHeight" | "last_block_height" => Ok(GeneratedField::LastBlockHeight), - "lastBlockHash" | "last_block_hash" => Ok(GeneratedField::LastBlockHash), - "totalAccounts" | "total_accounts" => Ok(GeneratedField::TotalAccounts), - "totalValidators" | "total_validators" => Ok(GeneratedField::TotalValidators), - "totalPower" | "total_power" => Ok(GeneratedField::TotalPower), - "committeePower" | "committee_power" => Ok(GeneratedField::CommitteePower), - "committeeValidators" | "committee_validators" => Ok(GeneratedField::CommitteeValidators), - "isPruned" | "is_pruned" => Ok(GeneratedField::IsPruned), - "pruningHeight" | "pruning_height" => Ok(GeneratedField::PruningHeight), - "lastBlockTime" | "last_block_time" => Ok(GeneratedField::LastBlockTime), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetBlockchainInfoResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetBlockchainInfoResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut last_block_height__ = None; - let mut last_block_hash__ = None; - let mut total_accounts__ = None; - let mut total_validators__ = None; - let mut total_power__ = None; - let mut committee_power__ = None; - let mut committee_validators__ = None; - let mut is_pruned__ = None; - let mut pruning_height__ = None; - let mut last_block_time__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::LastBlockHeight => { - if last_block_height__.is_some() { - return Err(serde::de::Error::duplicate_field("lastBlockHeight")); - } - last_block_height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::LastBlockHash => { - if last_block_hash__.is_some() { - return Err(serde::de::Error::duplicate_field("lastBlockHash")); - } - last_block_hash__ = Some(map.next_value()?); - } - GeneratedField::TotalAccounts => { - if total_accounts__.is_some() { - return Err(serde::de::Error::duplicate_field("totalAccounts")); - } - total_accounts__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::TotalValidators => { - if total_validators__.is_some() { - return Err(serde::de::Error::duplicate_field("totalValidators")); - } - total_validators__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::TotalPower => { - if total_power__.is_some() { - return Err(serde::de::Error::duplicate_field("totalPower")); - } - total_power__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::CommitteePower => { - if committee_power__.is_some() { - return Err(serde::de::Error::duplicate_field("committeePower")); - } - committee_power__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::CommitteeValidators => { - if committee_validators__.is_some() { - return Err(serde::de::Error::duplicate_field("committeeValidators")); - } - committee_validators__ = Some(map.next_value()?); - } - GeneratedField::IsPruned => { - if is_pruned__.is_some() { - return Err(serde::de::Error::duplicate_field("isPruned")); - } - is_pruned__ = Some(map.next_value()?); - } - GeneratedField::PruningHeight => { - if pruning_height__.is_some() { - return Err(serde::de::Error::duplicate_field("pruningHeight")); - } - pruning_height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::LastBlockTime => { - if last_block_time__.is_some() { - return Err(serde::de::Error::duplicate_field("lastBlockTime")); - } - last_block_time__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(GetBlockchainInfoResponse { - last_block_height: last_block_height__.unwrap_or_default(), - last_block_hash: last_block_hash__.unwrap_or_default(), - total_accounts: total_accounts__.unwrap_or_default(), - total_validators: total_validators__.unwrap_or_default(), - total_power: total_power__.unwrap_or_default(), - committee_power: committee_power__.unwrap_or_default(), - committee_validators: committee_validators__.unwrap_or_default(), - is_pruned: is_pruned__.unwrap_or_default(), - pruning_height: pruning_height__.unwrap_or_default(), - last_block_time: last_block_time__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetBlockchainInfoResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetConsensusInfoRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("pactus.GetConsensusInfoRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetConsensusInfoRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetConsensusInfoRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetConsensusInfoRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; - } - Ok(GetConsensusInfoRequest { - }) - } - } - deserializer.deserialize_struct("pactus.GetConsensusInfoRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetConsensusInfoResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.proposal.is_some() { - len += 1; - } - if !self.instances.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetConsensusInfoResponse", len)?; - if let Some(v) = self.proposal.as_ref() { - struct_ser.serialize_field("proposal", v)?; - } - if !self.instances.is_empty() { - struct_ser.serialize_field("instances", &self.instances)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetConsensusInfoResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "proposal", - "instances", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Proposal, - Instances, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "proposal" => Ok(GeneratedField::Proposal), - "instances" => Ok(GeneratedField::Instances), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetConsensusInfoResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetConsensusInfoResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut proposal__ = None; - let mut instances__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Proposal => { - if proposal__.is_some() { - return Err(serde::de::Error::duplicate_field("proposal")); - } - proposal__ = map.next_value()?; - } - GeneratedField::Instances => { - if instances__.is_some() { - return Err(serde::de::Error::duplicate_field("instances")); - } - instances__ = Some(map.next_value()?); - } - } - } - Ok(GetConsensusInfoResponse { - proposal: proposal__, - instances: instances__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetConsensusInfoResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetNetworkInfoRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.only_connected { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetNetworkInfoRequest", len)?; - if self.only_connected { - struct_ser.serialize_field("onlyConnected", &self.only_connected)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetNetworkInfoRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "only_connected", - "onlyConnected", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - OnlyConnected, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "onlyConnected" | "only_connected" => Ok(GeneratedField::OnlyConnected), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetNetworkInfoRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetNetworkInfoRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut only_connected__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::OnlyConnected => { - if only_connected__.is_some() { - return Err(serde::de::Error::duplicate_field("onlyConnected")); - } - only_connected__ = Some(map.next_value()?); - } - } - } - Ok(GetNetworkInfoRequest { - only_connected: only_connected__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetNetworkInfoRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetNetworkInfoResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.network_name.is_empty() { - len += 1; - } - if self.total_sent_bytes != 0 { - len += 1; - } - if self.total_received_bytes != 0 { - len += 1; - } - if self.connected_peers_count != 0 { - len += 1; - } - if !self.connected_peers.is_empty() { - len += 1; - } - if !self.sent_bytes.is_empty() { - len += 1; - } - if !self.received_bytes.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetNetworkInfoResponse", len)?; - if !self.network_name.is_empty() { - struct_ser.serialize_field("networkName", &self.network_name)?; - } - if self.total_sent_bytes != 0 { - struct_ser.serialize_field("totalSentBytes", ToString::to_string(&self.total_sent_bytes).as_str())?; - } - if self.total_received_bytes != 0 { - struct_ser.serialize_field("totalReceivedBytes", ToString::to_string(&self.total_received_bytes).as_str())?; - } - if self.connected_peers_count != 0 { - struct_ser.serialize_field("connectedPeersCount", &self.connected_peers_count)?; - } - if !self.connected_peers.is_empty() { - struct_ser.serialize_field("connectedPeers", &self.connected_peers)?; - } - if !self.sent_bytes.is_empty() { - let v: std::collections::HashMap<_, _> = self.sent_bytes.iter() - .map(|(k, v)| (k, v.to_string())).collect(); - struct_ser.serialize_field("sentBytes", &v)?; - } - if !self.received_bytes.is_empty() { - let v: std::collections::HashMap<_, _> = self.received_bytes.iter() - .map(|(k, v)| (k, v.to_string())).collect(); - struct_ser.serialize_field("receivedBytes", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetNetworkInfoResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "network_name", - "networkName", - "total_sent_bytes", - "totalSentBytes", - "total_received_bytes", - "totalReceivedBytes", - "connected_peers_count", - "connectedPeersCount", - "connected_peers", - "connectedPeers", - "sent_bytes", - "sentBytes", - "received_bytes", - "receivedBytes", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - NetworkName, - TotalSentBytes, - TotalReceivedBytes, - ConnectedPeersCount, - ConnectedPeers, - SentBytes, - ReceivedBytes, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "networkName" | "network_name" => Ok(GeneratedField::NetworkName), - "totalSentBytes" | "total_sent_bytes" => Ok(GeneratedField::TotalSentBytes), - "totalReceivedBytes" | "total_received_bytes" => Ok(GeneratedField::TotalReceivedBytes), - "connectedPeersCount" | "connected_peers_count" => Ok(GeneratedField::ConnectedPeersCount), - "connectedPeers" | "connected_peers" => Ok(GeneratedField::ConnectedPeers), - "sentBytes" | "sent_bytes" => Ok(GeneratedField::SentBytes), - "receivedBytes" | "received_bytes" => Ok(GeneratedField::ReceivedBytes), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetNetworkInfoResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetNetworkInfoResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut network_name__ = None; - let mut total_sent_bytes__ = None; - let mut total_received_bytes__ = None; - let mut connected_peers_count__ = None; - let mut connected_peers__ = None; - let mut sent_bytes__ = None; - let mut received_bytes__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::NetworkName => { - if network_name__.is_some() { - return Err(serde::de::Error::duplicate_field("networkName")); - } - network_name__ = Some(map.next_value()?); - } - GeneratedField::TotalSentBytes => { - if total_sent_bytes__.is_some() { - return Err(serde::de::Error::duplicate_field("totalSentBytes")); - } - total_sent_bytes__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::TotalReceivedBytes => { - if total_received_bytes__.is_some() { - return Err(serde::de::Error::duplicate_field("totalReceivedBytes")); - } - total_received_bytes__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::ConnectedPeersCount => { - if connected_peers_count__.is_some() { - return Err(serde::de::Error::duplicate_field("connectedPeersCount")); - } - connected_peers_count__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::ConnectedPeers => { - if connected_peers__.is_some() { - return Err(serde::de::Error::duplicate_field("connectedPeers")); - } - connected_peers__ = Some(map.next_value()?); - } - GeneratedField::SentBytes => { - if sent_bytes__.is_some() { - return Err(serde::de::Error::duplicate_field("sentBytes")); - } - sent_bytes__ = Some( - map.next_value::, ::pbjson::private::NumberDeserialize>>()? - .into_iter().map(|(k,v)| (k.0, v.0)).collect() - ); - } - GeneratedField::ReceivedBytes => { - if received_bytes__.is_some() { - return Err(serde::de::Error::duplicate_field("receivedBytes")); - } - received_bytes__ = Some( - map.next_value::, ::pbjson::private::NumberDeserialize>>()? - .into_iter().map(|(k,v)| (k.0, v.0)).collect() - ); - } - } - } - Ok(GetNetworkInfoResponse { - network_name: network_name__.unwrap_or_default(), - total_sent_bytes: total_sent_bytes__.unwrap_or_default(), - total_received_bytes: total_received_bytes__.unwrap_or_default(), - connected_peers_count: connected_peers_count__.unwrap_or_default(), - connected_peers: connected_peers__.unwrap_or_default(), - sent_bytes: sent_bytes__.unwrap_or_default(), - received_bytes: received_bytes__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetNetworkInfoResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetNewAddressRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - if self.address_type != 0 { - len += 1; - } - if !self.label.is_empty() { - len += 1; - } - if !self.password.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetNewAddressRequest", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - if self.address_type != 0 { - let v = AddressType::from_i32(self.address_type) - .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.address_type)))?; - struct_ser.serialize_field("addressType", &v)?; - } - if !self.label.is_empty() { - struct_ser.serialize_field("label", &self.label)?; - } - if !self.password.is_empty() { - struct_ser.serialize_field("password", &self.password)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetNewAddressRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - "address_type", - "addressType", - "label", - "password", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - AddressType, - Label, - Password, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - "addressType" | "address_type" => Ok(GeneratedField::AddressType), - "label" => Ok(GeneratedField::Label), - "password" => Ok(GeneratedField::Password), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetNewAddressRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetNewAddressRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - let mut address_type__ = None; - let mut label__ = None; - let mut password__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - GeneratedField::AddressType => { - if address_type__.is_some() { - return Err(serde::de::Error::duplicate_field("addressType")); - } - address_type__ = Some(map.next_value::()? as i32); - } - GeneratedField::Label => { - if label__.is_some() { - return Err(serde::de::Error::duplicate_field("label")); - } - label__ = Some(map.next_value()?); - } - GeneratedField::Password => { - if password__.is_some() { - return Err(serde::de::Error::duplicate_field("password")); - } - password__ = Some(map.next_value()?); - } - } - } - Ok(GetNewAddressRequest { - wallet_name: wallet_name__.unwrap_or_default(), - address_type: address_type__.unwrap_or_default(), - label: label__.unwrap_or_default(), - password: password__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetNewAddressRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetNewAddressResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - if self.address_info.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetNewAddressResponse", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - if let Some(v) = self.address_info.as_ref() { - struct_ser.serialize_field("addressInfo", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetNewAddressResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - "address_info", - "addressInfo", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - AddressInfo, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - "addressInfo" | "address_info" => Ok(GeneratedField::AddressInfo), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetNewAddressResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetNewAddressResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - let mut address_info__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - GeneratedField::AddressInfo => { - if address_info__.is_some() { - return Err(serde::de::Error::duplicate_field("addressInfo")); - } - address_info__ = map.next_value()?; - } - } - } - Ok(GetNewAddressResponse { - wallet_name: wallet_name__.unwrap_or_default(), - address_info: address_info__, - }) - } - } - deserializer.deserialize_struct("pactus.GetNewAddressResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetNodeInfoRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("pactus.GetNodeInfoRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetNodeInfoRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetNodeInfoRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetNodeInfoRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; - } - Ok(GetNodeInfoRequest { - }) - } - } - deserializer.deserialize_struct("pactus.GetNodeInfoRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetNodeInfoResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.moniker.is_empty() { - len += 1; - } - if !self.agent.is_empty() { - len += 1; - } - if !self.peer_id.is_empty() { - len += 1; - } - if self.started_at != 0 { - len += 1; - } - if !self.reachability.is_empty() { - len += 1; - } - if self.services != 0 { - len += 1; - } - if !self.services_names.is_empty() { - len += 1; - } - if !self.local_addrs.is_empty() { - len += 1; - } - if !self.protocols.is_empty() { - len += 1; - } - if self.clock_offset != 0. { - len += 1; - } - if self.connection_info.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetNodeInfoResponse", len)?; - if !self.moniker.is_empty() { - struct_ser.serialize_field("moniker", &self.moniker)?; - } - if !self.agent.is_empty() { - struct_ser.serialize_field("agent", &self.agent)?; - } - if !self.peer_id.is_empty() { - struct_ser.serialize_field("peerId", &self.peer_id)?; - } - if self.started_at != 0 { - struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; - } - if !self.reachability.is_empty() { - struct_ser.serialize_field("reachability", &self.reachability)?; - } - if self.services != 0 { - struct_ser.serialize_field("services", &self.services)?; - } - if !self.services_names.is_empty() { - struct_ser.serialize_field("servicesNames", &self.services_names)?; - } - if !self.local_addrs.is_empty() { - struct_ser.serialize_field("localAddrs", &self.local_addrs)?; - } - if !self.protocols.is_empty() { - struct_ser.serialize_field("protocols", &self.protocols)?; - } - if self.clock_offset != 0. { - struct_ser.serialize_field("clockOffset", &self.clock_offset)?; - } - if let Some(v) = self.connection_info.as_ref() { - struct_ser.serialize_field("connectionInfo", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "moniker", - "agent", - "peer_id", - "peerId", - "started_at", - "startedAt", - "reachability", - "services", - "services_names", - "servicesNames", - "local_addrs", - "localAddrs", - "protocols", - "clock_offset", - "clockOffset", - "connection_info", - "connectionInfo", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Moniker, - Agent, - PeerId, - StartedAt, - Reachability, - Services, - ServicesNames, - LocalAddrs, - Protocols, - ClockOffset, - ConnectionInfo, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "moniker" => Ok(GeneratedField::Moniker), - "agent" => Ok(GeneratedField::Agent), - "peerId" | "peer_id" => Ok(GeneratedField::PeerId), - "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), - "reachability" => Ok(GeneratedField::Reachability), - "services" => Ok(GeneratedField::Services), - "servicesNames" | "services_names" => Ok(GeneratedField::ServicesNames), - "localAddrs" | "local_addrs" => Ok(GeneratedField::LocalAddrs), - "protocols" => Ok(GeneratedField::Protocols), - "clockOffset" | "clock_offset" => Ok(GeneratedField::ClockOffset), - "connectionInfo" | "connection_info" => Ok(GeneratedField::ConnectionInfo), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetNodeInfoResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetNodeInfoResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut moniker__ = None; - let mut agent__ = None; - let mut peer_id__ = None; - let mut started_at__ = None; - let mut reachability__ = None; - let mut services__ = None; - let mut services_names__ = None; - let mut local_addrs__ = None; - let mut protocols__ = None; - let mut clock_offset__ = None; - let mut connection_info__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Moniker => { - if moniker__.is_some() { - return Err(serde::de::Error::duplicate_field("moniker")); - } - moniker__ = Some(map.next_value()?); - } - GeneratedField::Agent => { - if agent__.is_some() { - return Err(serde::de::Error::duplicate_field("agent")); - } - agent__ = Some(map.next_value()?); - } - GeneratedField::PeerId => { - if peer_id__.is_some() { - return Err(serde::de::Error::duplicate_field("peerId")); - } - peer_id__ = Some(map.next_value()?); - } - GeneratedField::StartedAt => { - if started_at__.is_some() { - return Err(serde::de::Error::duplicate_field("startedAt")); - } - started_at__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Reachability => { - if reachability__.is_some() { - return Err(serde::de::Error::duplicate_field("reachability")); - } - reachability__ = Some(map.next_value()?); - } - GeneratedField::Services => { - if services__.is_some() { - return Err(serde::de::Error::duplicate_field("services")); - } - services__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::ServicesNames => { - if services_names__.is_some() { - return Err(serde::de::Error::duplicate_field("servicesNames")); - } - services_names__ = Some(map.next_value()?); - } - GeneratedField::LocalAddrs => { - if local_addrs__.is_some() { - return Err(serde::de::Error::duplicate_field("localAddrs")); - } - local_addrs__ = Some(map.next_value()?); - } - GeneratedField::Protocols => { - if protocols__.is_some() { - return Err(serde::de::Error::duplicate_field("protocols")); - } - protocols__ = Some(map.next_value()?); - } - GeneratedField::ClockOffset => { - if clock_offset__.is_some() { - return Err(serde::de::Error::duplicate_field("clockOffset")); - } - clock_offset__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::ConnectionInfo => { - if connection_info__.is_some() { - return Err(serde::de::Error::duplicate_field("connectionInfo")); - } - connection_info__ = map.next_value()?; - } - } - } - Ok(GetNodeInfoResponse { - moniker: moniker__.unwrap_or_default(), - agent: agent__.unwrap_or_default(), - peer_id: peer_id__.unwrap_or_default(), - started_at: started_at__.unwrap_or_default(), - reachability: reachability__.unwrap_or_default(), - services: services__.unwrap_or_default(), - services_names: services_names__.unwrap_or_default(), - local_addrs: local_addrs__.unwrap_or_default(), - protocols: protocols__.unwrap_or_default(), - clock_offset: clock_offset__.unwrap_or_default(), - connection_info: connection_info__, - }) - } - } - deserializer.deserialize_struct("pactus.GetNodeInfoResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetPublicKeyRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetPublicKeyRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetPublicKeyRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetPublicKeyRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetPublicKeyRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - } - } - Ok(GetPublicKeyRequest { - address: address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetPublicKeyRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetPublicKeyResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.public_key.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetPublicKeyResponse", len)?; - if !self.public_key.is_empty() { - struct_ser.serialize_field("publicKey", &self.public_key)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetPublicKeyResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "public_key", - "publicKey", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PublicKey, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetPublicKeyResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetPublicKeyResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut public_key__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::PublicKey => { - if public_key__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKey")); - } - public_key__ = Some(map.next_value()?); - } - } - } - Ok(GetPublicKeyResponse { - public_key: public_key__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetPublicKeyResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetRawBondTransactionRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.lock_time != 0 { - len += 1; - } - if !self.sender.is_empty() { - len += 1; - } - if !self.receiver.is_empty() { - len += 1; - } - if self.stake != 0 { - len += 1; - } - if !self.public_key.is_empty() { - len += 1; - } - if self.fee != 0 { - len += 1; - } - if !self.memo.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetRawBondTransactionRequest", len)?; - if self.lock_time != 0 { - struct_ser.serialize_field("lockTime", &self.lock_time)?; - } - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.receiver.is_empty() { - struct_ser.serialize_field("receiver", &self.receiver)?; - } - if self.stake != 0 { - struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; - } - if !self.public_key.is_empty() { - struct_ser.serialize_field("publicKey", &self.public_key)?; - } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } - if !self.memo.is_empty() { - struct_ser.serialize_field("memo", &self.memo)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetRawBondTransactionRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "lock_time", - "lockTime", - "sender", - "receiver", - "stake", - "public_key", - "publicKey", - "fee", - "memo", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - LockTime, - Sender, - Receiver, - Stake, - PublicKey, - Fee, - Memo, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), - "sender" => Ok(GeneratedField::Sender), - "receiver" => Ok(GeneratedField::Receiver), - "stake" => Ok(GeneratedField::Stake), - "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - "fee" => Ok(GeneratedField::Fee), - "memo" => Ok(GeneratedField::Memo), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetRawBondTransactionRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetRawBondTransactionRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut lock_time__ = None; - let mut sender__ = None; - let mut receiver__ = None; - let mut stake__ = None; - let mut public_key__ = None; - let mut fee__ = None; - let mut memo__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::LockTime => { - if lock_time__.is_some() { - return Err(serde::de::Error::duplicate_field("lockTime")); - } - lock_time__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map.next_value()?); - } - GeneratedField::Receiver => { - if receiver__.is_some() { - return Err(serde::de::Error::duplicate_field("receiver")); - } - receiver__ = Some(map.next_value()?); - } - GeneratedField::Stake => { - if stake__.is_some() { - return Err(serde::de::Error::duplicate_field("stake")); - } - stake__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::PublicKey => { - if public_key__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKey")); - } - public_key__ = Some(map.next_value()?); - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Memo => { - if memo__.is_some() { - return Err(serde::de::Error::duplicate_field("memo")); - } - memo__ = Some(map.next_value()?); - } - } - } - Ok(GetRawBondTransactionRequest { - lock_time: lock_time__.unwrap_or_default(), - sender: sender__.unwrap_or_default(), - receiver: receiver__.unwrap_or_default(), - stake: stake__.unwrap_or_default(), - public_key: public_key__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - memo: memo__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetRawBondTransactionRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetRawTransactionResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.raw_transaction.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetRawTransactionResponse", len)?; - if !self.raw_transaction.is_empty() { - struct_ser.serialize_field("rawTransaction", &self.raw_transaction)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetRawTransactionResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "raw_transaction", - "rawTransaction", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - RawTransaction, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "rawTransaction" | "raw_transaction" => Ok(GeneratedField::RawTransaction), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetRawTransactionResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetRawTransactionResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut raw_transaction__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::RawTransaction => { - if raw_transaction__.is_some() { - return Err(serde::de::Error::duplicate_field("rawTransaction")); - } - raw_transaction__ = Some(map.next_value()?); - } - } - } - Ok(GetRawTransactionResponse { - raw_transaction: raw_transaction__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetRawTransactionResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetRawTransferTransactionRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.lock_time != 0 { - len += 1; - } - if !self.sender.is_empty() { - len += 1; - } - if !self.receiver.is_empty() { - len += 1; - } - if self.amount != 0 { - len += 1; - } - if self.fee != 0 { - len += 1; - } - if !self.memo.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetRawTransferTransactionRequest", len)?; - if self.lock_time != 0 { - struct_ser.serialize_field("lockTime", &self.lock_time)?; - } - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.receiver.is_empty() { - struct_ser.serialize_field("receiver", &self.receiver)?; - } - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } - if !self.memo.is_empty() { - struct_ser.serialize_field("memo", &self.memo)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetRawTransferTransactionRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "lock_time", - "lockTime", - "sender", - "receiver", - "amount", - "fee", - "memo", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - LockTime, - Sender, - Receiver, - Amount, - Fee, - Memo, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), - "sender" => Ok(GeneratedField::Sender), - "receiver" => Ok(GeneratedField::Receiver), - "amount" => Ok(GeneratedField::Amount), - "fee" => Ok(GeneratedField::Fee), - "memo" => Ok(GeneratedField::Memo), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetRawTransferTransactionRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetRawTransferTransactionRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut lock_time__ = None; - let mut sender__ = None; - let mut receiver__ = None; - let mut amount__ = None; - let mut fee__ = None; - let mut memo__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::LockTime => { - if lock_time__.is_some() { - return Err(serde::de::Error::duplicate_field("lockTime")); - } - lock_time__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map.next_value()?); - } - GeneratedField::Receiver => { - if receiver__.is_some() { - return Err(serde::de::Error::duplicate_field("receiver")); - } - receiver__ = Some(map.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Memo => { - if memo__.is_some() { - return Err(serde::de::Error::duplicate_field("memo")); - } - memo__ = Some(map.next_value()?); - } - } - } - Ok(GetRawTransferTransactionRequest { - lock_time: lock_time__.unwrap_or_default(), - sender: sender__.unwrap_or_default(), - receiver: receiver__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - memo: memo__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetRawTransferTransactionRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetRawUnbondTransactionRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.lock_time != 0 { - len += 1; - } - if !self.validator_address.is_empty() { - len += 1; - } - if !self.memo.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetRawUnbondTransactionRequest", len)?; - if self.lock_time != 0 { - struct_ser.serialize_field("lockTime", &self.lock_time)?; - } - if !self.validator_address.is_empty() { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if !self.memo.is_empty() { - struct_ser.serialize_field("memo", &self.memo)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetRawUnbondTransactionRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "lock_time", - "lockTime", - "validator_address", - "validatorAddress", - "memo", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - LockTime, - ValidatorAddress, - Memo, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "memo" => Ok(GeneratedField::Memo), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetRawUnbondTransactionRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetRawUnbondTransactionRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut lock_time__ = None; - let mut validator_address__ = None; - let mut memo__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::LockTime => { - if lock_time__.is_some() { - return Err(serde::de::Error::duplicate_field("lockTime")); - } - lock_time__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map.next_value()?); - } - GeneratedField::Memo => { - if memo__.is_some() { - return Err(serde::de::Error::duplicate_field("memo")); - } - memo__ = Some(map.next_value()?); - } - } - } - Ok(GetRawUnbondTransactionRequest { - lock_time: lock_time__.unwrap_or_default(), - validator_address: validator_address__.unwrap_or_default(), - memo: memo__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetRawUnbondTransactionRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetRawWithdrawTransactionRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.lock_time != 0 { - len += 1; - } - if !self.validator_address.is_empty() { - len += 1; - } - if !self.account_address.is_empty() { - len += 1; - } - if self.amount != 0 { - len += 1; - } - if self.fee != 0 { - len += 1; - } - if !self.memo.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetRawWithdrawTransactionRequest", len)?; - if self.lock_time != 0 { - struct_ser.serialize_field("lockTime", &self.lock_time)?; - } - if !self.validator_address.is_empty() { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if !self.account_address.is_empty() { - struct_ser.serialize_field("accountAddress", &self.account_address)?; - } - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } - if !self.memo.is_empty() { - struct_ser.serialize_field("memo", &self.memo)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetRawWithdrawTransactionRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "lock_time", - "lockTime", - "validator_address", - "validatorAddress", - "account_address", - "accountAddress", - "amount", - "fee", - "memo", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - LockTime, - ValidatorAddress, - AccountAddress, - Amount, - Fee, - Memo, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "accountAddress" | "account_address" => Ok(GeneratedField::AccountAddress), - "amount" => Ok(GeneratedField::Amount), - "fee" => Ok(GeneratedField::Fee), - "memo" => Ok(GeneratedField::Memo), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetRawWithdrawTransactionRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetRawWithdrawTransactionRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut lock_time__ = None; - let mut validator_address__ = None; - let mut account_address__ = None; - let mut amount__ = None; - let mut fee__ = None; - let mut memo__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::LockTime => { - if lock_time__.is_some() { - return Err(serde::de::Error::duplicate_field("lockTime")); - } - lock_time__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map.next_value()?); - } - GeneratedField::AccountAddress => { - if account_address__.is_some() { - return Err(serde::de::Error::duplicate_field("accountAddress")); - } - account_address__ = Some(map.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Memo => { - if memo__.is_some() { - return Err(serde::de::Error::duplicate_field("memo")); - } - memo__ = Some(map.next_value()?); - } - } - } - Ok(GetRawWithdrawTransactionRequest { - lock_time: lock_time__.unwrap_or_default(), - validator_address: validator_address__.unwrap_or_default(), - account_address: account_address__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - memo: memo__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetRawWithdrawTransactionRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetTotalBalanceRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetTotalBalanceRequest", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetTotalBalanceRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetTotalBalanceRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetTotalBalanceRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - } - } - Ok(GetTotalBalanceRequest { - wallet_name: wallet_name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetTotalBalanceRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetTotalBalanceResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - if self.total_balance != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetTotalBalanceResponse", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - if self.total_balance != 0 { - struct_ser.serialize_field("totalBalance", ToString::to_string(&self.total_balance).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetTotalBalanceResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - "total_balance", - "totalBalance", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - TotalBalance, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - "totalBalance" | "total_balance" => Ok(GeneratedField::TotalBalance), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetTotalBalanceResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetTotalBalanceResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - let mut total_balance__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - GeneratedField::TotalBalance => { - if total_balance__.is_some() { - return Err(serde::de::Error::duplicate_field("totalBalance")); - } - total_balance__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(GetTotalBalanceResponse { - wallet_name: wallet_name__.unwrap_or_default(), - total_balance: total_balance__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetTotalBalanceResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetTransactionRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.id.is_empty() { - len += 1; - } - if self.verbosity != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetTransactionRequest", len)?; - if !self.id.is_empty() { - struct_ser.serialize_field("id", &self.id)?; - } - if self.verbosity != 0 { - let v = TransactionVerbosity::from_i32(self.verbosity) - .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.verbosity)))?; - struct_ser.serialize_field("verbosity", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetTransactionRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "id", - "verbosity", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Id, - Verbosity, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "id" => Ok(GeneratedField::Id), - "verbosity" => Ok(GeneratedField::Verbosity), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetTransactionRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetTransactionRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut id__ = None; - let mut verbosity__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Id => { - if id__.is_some() { - return Err(serde::de::Error::duplicate_field("id")); - } - id__ = Some(map.next_value()?); - } - GeneratedField::Verbosity => { - if verbosity__.is_some() { - return Err(serde::de::Error::duplicate_field("verbosity")); - } - verbosity__ = Some(map.next_value::()? as i32); - } - } - } - Ok(GetTransactionRequest { - id: id__.unwrap_or_default(), - verbosity: verbosity__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetTransactionRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetTransactionResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.block_height != 0 { - len += 1; - } - if self.block_time != 0 { - len += 1; - } - if self.transaction.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetTransactionResponse", len)?; - if self.block_height != 0 { - struct_ser.serialize_field("blockHeight", &self.block_height)?; - } - if self.block_time != 0 { - struct_ser.serialize_field("blockTime", &self.block_time)?; - } - if let Some(v) = self.transaction.as_ref() { - struct_ser.serialize_field("transaction", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetTransactionResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "block_height", - "blockHeight", - "block_time", - "blockTime", - "transaction", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - BlockHeight, - BlockTime, - Transaction, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "blockHeight" | "block_height" => Ok(GeneratedField::BlockHeight), - "blockTime" | "block_time" => Ok(GeneratedField::BlockTime), - "transaction" => Ok(GeneratedField::Transaction), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetTransactionResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetTransactionResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut block_height__ = None; - let mut block_time__ = None; - let mut transaction__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::BlockHeight => { - if block_height__.is_some() { - return Err(serde::de::Error::duplicate_field("blockHeight")); - } - block_height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::BlockTime => { - if block_time__.is_some() { - return Err(serde::de::Error::duplicate_field("blockTime")); - } - block_time__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Transaction => { - if transaction__.is_some() { - return Err(serde::de::Error::duplicate_field("transaction")); - } - transaction__ = map.next_value()?; - } - } - } - Ok(GetTransactionResponse { - block_height: block_height__.unwrap_or_default(), - block_time: block_time__.unwrap_or_default(), - transaction: transaction__, - }) - } - } - deserializer.deserialize_struct("pactus.GetTransactionResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetTxPoolContentRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.payload_type != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetTxPoolContentRequest", len)?; - if self.payload_type != 0 { - let v = PayloadType::from_i32(self.payload_type) - .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.payload_type)))?; - struct_ser.serialize_field("payloadType", &v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetTxPoolContentRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "payload_type", - "payloadType", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PayloadType, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "payloadType" | "payload_type" => Ok(GeneratedField::PayloadType), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetTxPoolContentRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetTxPoolContentRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut payload_type__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::PayloadType => { - if payload_type__.is_some() { - return Err(serde::de::Error::duplicate_field("payloadType")); - } - payload_type__ = Some(map.next_value::()? as i32); - } - } - } - Ok(GetTxPoolContentRequest { - payload_type: payload_type__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetTxPoolContentRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetTxPoolContentResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.txs.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetTxPoolContentResponse", len)?; - if !self.txs.is_empty() { - struct_ser.serialize_field("txs", &self.txs)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetTxPoolContentResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "txs", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Txs, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "txs" => Ok(GeneratedField::Txs), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetTxPoolContentResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetTxPoolContentResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut txs__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Txs => { - if txs__.is_some() { - return Err(serde::de::Error::duplicate_field("txs")); - } - txs__ = Some(map.next_value()?); - } - } - } - Ok(GetTxPoolContentResponse { - txs: txs__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetTxPoolContentResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetValidatorAddressRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.public_key.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorAddressRequest", len)?; - if !self.public_key.is_empty() { - struct_ser.serialize_field("publicKey", &self.public_key)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetValidatorAddressRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "public_key", - "publicKey", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PublicKey, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetValidatorAddressRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetValidatorAddressRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut public_key__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::PublicKey => { - if public_key__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKey")); - } - public_key__ = Some(map.next_value()?); - } - } - } - Ok(GetValidatorAddressRequest { - public_key: public_key__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetValidatorAddressRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetValidatorAddressResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorAddressResponse", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetValidatorAddressResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetValidatorAddressResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetValidatorAddressResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - } - } - Ok(GetValidatorAddressResponse { - address: address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetValidatorAddressResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetValidatorAddressesRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let len = 0; - let struct_ser = serializer.serialize_struct("pactus.GetValidatorAddressesRequest", len)?; - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetValidatorAddressesRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - Err(serde::de::Error::unknown_field(value, FIELDS)) - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetValidatorAddressesRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetValidatorAddressesRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - while map.next_key::()?.is_some() { - let _ = map.next_value::()?; - } - Ok(GetValidatorAddressesRequest { - }) - } - } - deserializer.deserialize_struct("pactus.GetValidatorAddressesRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetValidatorAddressesResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.addresses.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorAddressesResponse", len)?; - if !self.addresses.is_empty() { - struct_ser.serialize_field("addresses", &self.addresses)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetValidatorAddressesResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "addresses", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Addresses, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "addresses" => Ok(GeneratedField::Addresses), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetValidatorAddressesResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetValidatorAddressesResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut addresses__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Addresses => { - if addresses__.is_some() { - return Err(serde::de::Error::duplicate_field("addresses")); - } - addresses__ = Some(map.next_value()?); - } - } - } - Ok(GetValidatorAddressesResponse { - addresses: addresses__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetValidatorAddressesResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetValidatorByNumberRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.number != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorByNumberRequest", len)?; - if self.number != 0 { - struct_ser.serialize_field("number", &self.number)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetValidatorByNumberRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "number", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Number, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "number" => Ok(GeneratedField::Number), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetValidatorByNumberRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetValidatorByNumberRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut number__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Number => { - if number__.is_some() { - return Err(serde::de::Error::duplicate_field("number")); - } - number__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(GetValidatorByNumberRequest { - number: number__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetValidatorByNumberRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetValidatorRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorRequest", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetValidatorRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetValidatorRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetValidatorRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - } - } - Ok(GetValidatorRequest { - address: address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.GetValidatorRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for GetValidatorResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.validator.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorResponse", len)?; - if let Some(v) = self.validator.as_ref() { - struct_ser.serialize_field("validator", v)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for GetValidatorResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Validator, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "validator" => Ok(GeneratedField::Validator), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GetValidatorResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.GetValidatorResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Validator => { - if validator__.is_some() { - return Err(serde::de::Error::duplicate_field("validator")); - } - validator__ = map.next_value()?; - } - } - } - Ok(GetValidatorResponse { - validator: validator__, - }) - } - } - deserializer.deserialize_struct("pactus.GetValidatorResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for HistoryInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.transaction_id.is_empty() { - len += 1; - } - if self.time != 0 { - len += 1; - } - if !self.payload_type.is_empty() { - len += 1; - } - if !self.description.is_empty() { - len += 1; - } - if self.amount != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.HistoryInfo", len)?; - if !self.transaction_id.is_empty() { - struct_ser.serialize_field("transactionId", &self.transaction_id)?; - } - if self.time != 0 { - struct_ser.serialize_field("time", &self.time)?; - } - if !self.payload_type.is_empty() { - struct_ser.serialize_field("payloadType", &self.payload_type)?; - } - if !self.description.is_empty() { - struct_ser.serialize_field("description", &self.description)?; - } - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for HistoryInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "transaction_id", - "transactionId", - "time", - "payload_type", - "payloadType", - "description", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - TransactionId, - Time, - PayloadType, - Description, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "transactionId" | "transaction_id" => Ok(GeneratedField::TransactionId), - "time" => Ok(GeneratedField::Time), - "payloadType" | "payload_type" => Ok(GeneratedField::PayloadType), - "description" => Ok(GeneratedField::Description), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = HistoryInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.HistoryInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut transaction_id__ = None; - let mut time__ = None; - let mut payload_type__ = None; - let mut description__ = None; - let mut amount__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::TransactionId => { - if transaction_id__.is_some() { - return Err(serde::de::Error::duplicate_field("transactionId")); - } - transaction_id__ = Some(map.next_value()?); - } - GeneratedField::Time => { - if time__.is_some() { - return Err(serde::de::Error::duplicate_field("time")); - } - time__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::PayloadType => { - if payload_type__.is_some() { - return Err(serde::de::Error::duplicate_field("payloadType")); - } - payload_type__ = Some(map.next_value()?); - } - GeneratedField::Description => { - if description__.is_some() { - return Err(serde::de::Error::duplicate_field("description")); - } - description__ = Some(map.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(HistoryInfo { - transaction_id: transaction_id__.unwrap_or_default(), - time: time__.unwrap_or_default(), - payload_type: payload_type__.unwrap_or_default(), - description: description__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.HistoryInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for LoadWalletRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.LoadWalletRequest", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for LoadWalletRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = LoadWalletRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.LoadWalletRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - } - } - Ok(LoadWalletRequest { - wallet_name: wallet_name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.LoadWalletRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for LoadWalletResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.LoadWalletResponse", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for LoadWalletResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = LoadWalletResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.LoadWalletResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - } - } - Ok(LoadWalletResponse { - wallet_name: wallet_name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.LoadWalletResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PayloadBond { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.receiver.is_empty() { - len += 1; - } - if self.stake != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.PayloadBond", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.receiver.is_empty() { - struct_ser.serialize_field("receiver", &self.receiver)?; - } - if self.stake != 0 { - struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PayloadBond { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sender", - "receiver", - "stake", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Receiver, - Stake, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sender" => Ok(GeneratedField::Sender), - "receiver" => Ok(GeneratedField::Receiver), - "stake" => Ok(GeneratedField::Stake), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PayloadBond; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.PayloadBond") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sender__ = None; - let mut receiver__ = None; - let mut stake__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map.next_value()?); - } - GeneratedField::Receiver => { - if receiver__.is_some() { - return Err(serde::de::Error::duplicate_field("receiver")); - } - receiver__ = Some(map.next_value()?); - } - GeneratedField::Stake => { - if stake__.is_some() { - return Err(serde::de::Error::duplicate_field("stake")); - } - stake__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(PayloadBond { - sender: sender__.unwrap_or_default(), - receiver: receiver__.unwrap_or_default(), - stake: stake__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.PayloadBond", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PayloadSortition { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.address.is_empty() { - len += 1; - } - if !self.proof.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.PayloadSortition", len)?; - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if !self.proof.is_empty() { - struct_ser.serialize_field("proof", &self.proof)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PayloadSortition { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "address", - "proof", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Address, - Proof, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "address" => Ok(GeneratedField::Address), - "proof" => Ok(GeneratedField::Proof), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PayloadSortition; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.PayloadSortition") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut address__ = None; - let mut proof__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - GeneratedField::Proof => { - if proof__.is_some() { - return Err(serde::de::Error::duplicate_field("proof")); - } - proof__ = Some(map.next_value()?); - } - } - } - Ok(PayloadSortition { - address: address__.unwrap_or_default(), - proof: proof__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.PayloadSortition", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PayloadTransfer { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.receiver.is_empty() { - len += 1; - } - if self.amount != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.PayloadTransfer", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.receiver.is_empty() { - struct_ser.serialize_field("receiver", &self.receiver)?; - } - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PayloadTransfer { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sender", - "receiver", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Receiver, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sender" => Ok(GeneratedField::Sender), - "receiver" => Ok(GeneratedField::Receiver), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PayloadTransfer; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.PayloadTransfer") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sender__ = None; - let mut receiver__ = None; - let mut amount__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map.next_value()?); - } - GeneratedField::Receiver => { - if receiver__.is_some() { - return Err(serde::de::Error::duplicate_field("receiver")); - } - receiver__ = Some(map.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(PayloadTransfer { - sender: sender__.unwrap_or_default(), - receiver: receiver__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.PayloadTransfer", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PayloadType { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::Unknown => "UNKNOWN", - Self::TransferPayload => "TRANSFER_PAYLOAD", - Self::BondPayload => "BOND_PAYLOAD", - Self::SortitionPayload => "SORTITION_PAYLOAD", - Self::UnbondPayload => "UNBOND_PAYLOAD", - Self::WithdrawPayload => "WITHDRAW_PAYLOAD", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for PayloadType { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "UNKNOWN", - "TRANSFER_PAYLOAD", - "BOND_PAYLOAD", - "SORTITION_PAYLOAD", - "UNBOND_PAYLOAD", - "WITHDRAW_PAYLOAD", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PayloadType; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(PayloadType::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(PayloadType::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "UNKNOWN" => Ok(PayloadType::Unknown), - "TRANSFER_PAYLOAD" => Ok(PayloadType::TransferPayload), - "BOND_PAYLOAD" => Ok(PayloadType::BondPayload), - "SORTITION_PAYLOAD" => Ok(PayloadType::SortitionPayload), - "UNBOND_PAYLOAD" => Ok(PayloadType::UnbondPayload), - "WITHDRAW_PAYLOAD" => Ok(PayloadType::WithdrawPayload), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for PayloadUnbond { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.validator.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.PayloadUnbond", len)?; - if !self.validator.is_empty() { - struct_ser.serialize_field("validator", &self.validator)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PayloadUnbond { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Validator, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "validator" => Ok(GeneratedField::Validator), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PayloadUnbond; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.PayloadUnbond") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Validator => { - if validator__.is_some() { - return Err(serde::de::Error::duplicate_field("validator")); - } - validator__ = Some(map.next_value()?); - } - } - } - Ok(PayloadUnbond { - validator: validator__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.PayloadUnbond", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PayloadWithdraw { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.from.is_empty() { - len += 1; - } - if !self.to.is_empty() { - len += 1; - } - if self.amount != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.PayloadWithdraw", len)?; - if !self.from.is_empty() { - struct_ser.serialize_field("from", &self.from)?; - } - if !self.to.is_empty() { - struct_ser.serialize_field("to", &self.to)?; - } - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PayloadWithdraw { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "from", - "to", - "amount", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - From, - To, - Amount, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "from" => Ok(GeneratedField::From), - "to" => Ok(GeneratedField::To), - "amount" => Ok(GeneratedField::Amount), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PayloadWithdraw; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.PayloadWithdraw") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut from__ = None; - let mut to__ = None; - let mut amount__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::From => { - if from__.is_some() { - return Err(serde::de::Error::duplicate_field("from")); - } - from__ = Some(map.next_value()?); - } - GeneratedField::To => { - if to__.is_some() { - return Err(serde::de::Error::duplicate_field("to")); - } - to__ = Some(map.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(PayloadWithdraw { - from: from__.unwrap_or_default(), - to: to__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.PayloadWithdraw", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for PeerInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.status != 0 { - len += 1; - } - if !self.moniker.is_empty() { - len += 1; - } - if !self.agent.is_empty() { - len += 1; - } - if !self.peer_id.is_empty() { - len += 1; - } - if !self.consensus_keys.is_empty() { - len += 1; - } - if !self.consensus_addresses.is_empty() { - len += 1; - } - if self.services != 0 { - len += 1; - } - if !self.last_block_hash.is_empty() { - len += 1; - } - if self.height != 0 { - len += 1; - } - if self.received_bundles != 0 { - len += 1; - } - if self.invalid_bundles != 0 { - len += 1; - } - if self.last_sent != 0 { - len += 1; - } - if self.last_received != 0 { - len += 1; - } - if !self.sent_bytes.is_empty() { - len += 1; - } - if !self.received_bytes.is_empty() { - len += 1; - } - if !self.address.is_empty() { - len += 1; - } - if !self.direction.is_empty() { - len += 1; - } - if !self.protocols.is_empty() { - len += 1; - } - if self.total_sessions != 0 { - len += 1; - } - if self.completed_sessions != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.PeerInfo", len)?; - if self.status != 0 { - struct_ser.serialize_field("status", &self.status)?; - } - if !self.moniker.is_empty() { - struct_ser.serialize_field("moniker", &self.moniker)?; - } - if !self.agent.is_empty() { - struct_ser.serialize_field("agent", &self.agent)?; - } - if !self.peer_id.is_empty() { - struct_ser.serialize_field("peerId", &self.peer_id)?; - } - if !self.consensus_keys.is_empty() { - struct_ser.serialize_field("consensusKeys", &self.consensus_keys)?; - } - if !self.consensus_addresses.is_empty() { - struct_ser.serialize_field("consensusAddresses", &self.consensus_addresses)?; - } - if self.services != 0 { - struct_ser.serialize_field("services", &self.services)?; - } - if !self.last_block_hash.is_empty() { - struct_ser.serialize_field("lastBlockHash", &self.last_block_hash)?; - } - if self.height != 0 { - struct_ser.serialize_field("height", &self.height)?; - } - if self.received_bundles != 0 { - struct_ser.serialize_field("receivedBundles", &self.received_bundles)?; - } - if self.invalid_bundles != 0 { - struct_ser.serialize_field("invalidBundles", &self.invalid_bundles)?; - } - if self.last_sent != 0 { - struct_ser.serialize_field("lastSent", ToString::to_string(&self.last_sent).as_str())?; - } - if self.last_received != 0 { - struct_ser.serialize_field("lastReceived", ToString::to_string(&self.last_received).as_str())?; - } - if !self.sent_bytes.is_empty() { - let v: std::collections::HashMap<_, _> = self.sent_bytes.iter() - .map(|(k, v)| (k, v.to_string())).collect(); - struct_ser.serialize_field("sentBytes", &v)?; - } - if !self.received_bytes.is_empty() { - let v: std::collections::HashMap<_, _> = self.received_bytes.iter() - .map(|(k, v)| (k, v.to_string())).collect(); - struct_ser.serialize_field("receivedBytes", &v)?; - } - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if !self.direction.is_empty() { - struct_ser.serialize_field("direction", &self.direction)?; - } - if !self.protocols.is_empty() { - struct_ser.serialize_field("protocols", &self.protocols)?; - } - if self.total_sessions != 0 { - struct_ser.serialize_field("totalSessions", &self.total_sessions)?; - } - if self.completed_sessions != 0 { - struct_ser.serialize_field("completedSessions", &self.completed_sessions)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for PeerInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "status", - "moniker", - "agent", - "peer_id", - "peerId", - "consensus_keys", - "consensusKeys", - "consensus_addresses", - "consensusAddresses", - "services", - "last_block_hash", - "lastBlockHash", - "height", - "received_bundles", - "receivedBundles", - "invalid_bundles", - "invalidBundles", - "last_sent", - "lastSent", - "last_received", - "lastReceived", - "sent_bytes", - "sentBytes", - "received_bytes", - "receivedBytes", - "address", - "direction", - "protocols", - "total_sessions", - "totalSessions", - "completed_sessions", - "completedSessions", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Status, - Moniker, - Agent, - PeerId, - ConsensusKeys, - ConsensusAddresses, - Services, - LastBlockHash, - Height, - ReceivedBundles, - InvalidBundles, - LastSent, - LastReceived, - SentBytes, - ReceivedBytes, - Address, - Direction, - Protocols, - TotalSessions, - CompletedSessions, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "status" => Ok(GeneratedField::Status), - "moniker" => Ok(GeneratedField::Moniker), - "agent" => Ok(GeneratedField::Agent), - "peerId" | "peer_id" => Ok(GeneratedField::PeerId), - "consensusKeys" | "consensus_keys" => Ok(GeneratedField::ConsensusKeys), - "consensusAddresses" | "consensus_addresses" => Ok(GeneratedField::ConsensusAddresses), - "services" => Ok(GeneratedField::Services), - "lastBlockHash" | "last_block_hash" => Ok(GeneratedField::LastBlockHash), - "height" => Ok(GeneratedField::Height), - "receivedBundles" | "received_bundles" => Ok(GeneratedField::ReceivedBundles), - "invalidBundles" | "invalid_bundles" => Ok(GeneratedField::InvalidBundles), - "lastSent" | "last_sent" => Ok(GeneratedField::LastSent), - "lastReceived" | "last_received" => Ok(GeneratedField::LastReceived), - "sentBytes" | "sent_bytes" => Ok(GeneratedField::SentBytes), - "receivedBytes" | "received_bytes" => Ok(GeneratedField::ReceivedBytes), - "address" => Ok(GeneratedField::Address), - "direction" => Ok(GeneratedField::Direction), - "protocols" => Ok(GeneratedField::Protocols), - "totalSessions" | "total_sessions" => Ok(GeneratedField::TotalSessions), - "completedSessions" | "completed_sessions" => Ok(GeneratedField::CompletedSessions), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = PeerInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.PeerInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut status__ = None; - let mut moniker__ = None; - let mut agent__ = None; - let mut peer_id__ = None; - let mut consensus_keys__ = None; - let mut consensus_addresses__ = None; - let mut services__ = None; - let mut last_block_hash__ = None; - let mut height__ = None; - let mut received_bundles__ = None; - let mut invalid_bundles__ = None; - let mut last_sent__ = None; - let mut last_received__ = None; - let mut sent_bytes__ = None; - let mut received_bytes__ = None; - let mut address__ = None; - let mut direction__ = None; - let mut protocols__ = None; - let mut total_sessions__ = None; - let mut completed_sessions__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Status => { - if status__.is_some() { - return Err(serde::de::Error::duplicate_field("status")); - } - status__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Moniker => { - if moniker__.is_some() { - return Err(serde::de::Error::duplicate_field("moniker")); - } - moniker__ = Some(map.next_value()?); - } - GeneratedField::Agent => { - if agent__.is_some() { - return Err(serde::de::Error::duplicate_field("agent")); - } - agent__ = Some(map.next_value()?); - } - GeneratedField::PeerId => { - if peer_id__.is_some() { - return Err(serde::de::Error::duplicate_field("peerId")); - } - peer_id__ = Some(map.next_value()?); - } - GeneratedField::ConsensusKeys => { - if consensus_keys__.is_some() { - return Err(serde::de::Error::duplicate_field("consensusKeys")); - } - consensus_keys__ = Some(map.next_value()?); - } - GeneratedField::ConsensusAddresses => { - if consensus_addresses__.is_some() { - return Err(serde::de::Error::duplicate_field("consensusAddresses")); - } - consensus_addresses__ = Some(map.next_value()?); - } - GeneratedField::Services => { - if services__.is_some() { - return Err(serde::de::Error::duplicate_field("services")); - } - services__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::LastBlockHash => { - if last_block_hash__.is_some() { - return Err(serde::de::Error::duplicate_field("lastBlockHash")); - } - last_block_hash__ = Some(map.next_value()?); - } - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::ReceivedBundles => { - if received_bundles__.is_some() { - return Err(serde::de::Error::duplicate_field("receivedBundles")); - } - received_bundles__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::InvalidBundles => { - if invalid_bundles__.is_some() { - return Err(serde::de::Error::duplicate_field("invalidBundles")); - } - invalid_bundles__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::LastSent => { - if last_sent__.is_some() { - return Err(serde::de::Error::duplicate_field("lastSent")); - } - last_sent__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::LastReceived => { - if last_received__.is_some() { - return Err(serde::de::Error::duplicate_field("lastReceived")); - } - last_received__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::SentBytes => { - if sent_bytes__.is_some() { - return Err(serde::de::Error::duplicate_field("sentBytes")); - } - sent_bytes__ = Some( - map.next_value::, ::pbjson::private::NumberDeserialize>>()? - .into_iter().map(|(k,v)| (k.0, v.0)).collect() - ); - } - GeneratedField::ReceivedBytes => { - if received_bytes__.is_some() { - return Err(serde::de::Error::duplicate_field("receivedBytes")); - } - received_bytes__ = Some( - map.next_value::, ::pbjson::private::NumberDeserialize>>()? - .into_iter().map(|(k,v)| (k.0, v.0)).collect() - ); - } - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - GeneratedField::Direction => { - if direction__.is_some() { - return Err(serde::de::Error::duplicate_field("direction")); - } - direction__ = Some(map.next_value()?); - } - GeneratedField::Protocols => { - if protocols__.is_some() { - return Err(serde::de::Error::duplicate_field("protocols")); - } - protocols__ = Some(map.next_value()?); - } - GeneratedField::TotalSessions => { - if total_sessions__.is_some() { - return Err(serde::de::Error::duplicate_field("totalSessions")); - } - total_sessions__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::CompletedSessions => { - if completed_sessions__.is_some() { - return Err(serde::de::Error::duplicate_field("completedSessions")); - } - completed_sessions__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(PeerInfo { - status: status__.unwrap_or_default(), - moniker: moniker__.unwrap_or_default(), - agent: agent__.unwrap_or_default(), - peer_id: peer_id__.unwrap_or_default(), - consensus_keys: consensus_keys__.unwrap_or_default(), - consensus_addresses: consensus_addresses__.unwrap_or_default(), - services: services__.unwrap_or_default(), - last_block_hash: last_block_hash__.unwrap_or_default(), - height: height__.unwrap_or_default(), - received_bundles: received_bundles__.unwrap_or_default(), - invalid_bundles: invalid_bundles__.unwrap_or_default(), - last_sent: last_sent__.unwrap_or_default(), - last_received: last_received__.unwrap_or_default(), - sent_bytes: sent_bytes__.unwrap_or_default(), - received_bytes: received_bytes__.unwrap_or_default(), - address: address__.unwrap_or_default(), - direction: direction__.unwrap_or_default(), - protocols: protocols__.unwrap_or_default(), - total_sessions: total_sessions__.unwrap_or_default(), - completed_sessions: completed_sessions__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.PeerInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for Proposal { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.height != 0 { - len += 1; - } - if self.round != 0 { - len += 1; - } - if !self.block_data.is_empty() { - len += 1; - } - if !self.signature_data.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.Proposal", len)?; - if self.height != 0 { - struct_ser.serialize_field("height", &self.height)?; - } - if self.round != 0 { - struct_ser.serialize_field("round", &self.round)?; - } - if !self.block_data.is_empty() { - struct_ser.serialize_field("blockData", &self.block_data)?; - } - if !self.signature_data.is_empty() { - struct_ser.serialize_field("signatureData", &self.signature_data)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for Proposal { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "height", - "round", - "block_data", - "blockData", - "signature_data", - "signatureData", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Height, - Round, - BlockData, - SignatureData, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "height" => Ok(GeneratedField::Height), - "round" => Ok(GeneratedField::Round), - "blockData" | "block_data" => Ok(GeneratedField::BlockData), - "signatureData" | "signature_data" => Ok(GeneratedField::SignatureData), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = Proposal; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.Proposal") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut height__ = None; - let mut round__ = None; - let mut block_data__ = None; - let mut signature_data__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Height => { - if height__.is_some() { - return Err(serde::de::Error::duplicate_field("height")); - } - height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Round => { - if round__.is_some() { - return Err(serde::de::Error::duplicate_field("round")); - } - round__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::BlockData => { - if block_data__.is_some() { - return Err(serde::de::Error::duplicate_field("blockData")); - } - block_data__ = Some(map.next_value()?); - } - GeneratedField::SignatureData => { - if signature_data__.is_some() { - return Err(serde::de::Error::duplicate_field("signatureData")); - } - signature_data__ = Some(map.next_value()?); - } - } - } - Ok(Proposal { - height: height__.unwrap_or_default(), - round: round__.unwrap_or_default(), - block_data: block_data__.unwrap_or_default(), - signature_data: signature_data__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.Proposal", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for RestoreWalletRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - if !self.mnemonic.is_empty() { - len += 1; - } - if !self.password.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.RestoreWalletRequest", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - if !self.mnemonic.is_empty() { - struct_ser.serialize_field("mnemonic", &self.mnemonic)?; - } - if !self.password.is_empty() { - struct_ser.serialize_field("password", &self.password)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RestoreWalletRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - "mnemonic", - "password", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - Mnemonic, - Password, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - "mnemonic" => Ok(GeneratedField::Mnemonic), - "password" => Ok(GeneratedField::Password), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RestoreWalletRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.RestoreWalletRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - let mut mnemonic__ = None; - let mut password__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - GeneratedField::Mnemonic => { - if mnemonic__.is_some() { - return Err(serde::de::Error::duplicate_field("mnemonic")); - } - mnemonic__ = Some(map.next_value()?); - } - GeneratedField::Password => { - if password__.is_some() { - return Err(serde::de::Error::duplicate_field("password")); - } - password__ = Some(map.next_value()?); - } - } - } - Ok(RestoreWalletRequest { - wallet_name: wallet_name__.unwrap_or_default(), - mnemonic: mnemonic__.unwrap_or_default(), - password: password__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.RestoreWalletRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for RestoreWalletResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.RestoreWalletResponse", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RestoreWalletResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RestoreWalletResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.RestoreWalletResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - } - } - Ok(RestoreWalletResponse { - wallet_name: wallet_name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.RestoreWalletResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SignMessageRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - if !self.password.is_empty() { - len += 1; - } - if !self.address.is_empty() { - len += 1; - } - if !self.message.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.SignMessageRequest", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - if !self.password.is_empty() { - struct_ser.serialize_field("password", &self.password)?; - } - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if !self.message.is_empty() { - struct_ser.serialize_field("message", &self.message)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SignMessageRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - "password", - "address", - "message", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - Password, - Address, - Message, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - "password" => Ok(GeneratedField::Password), - "address" => Ok(GeneratedField::Address), - "message" => Ok(GeneratedField::Message), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SignMessageRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.SignMessageRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - let mut password__ = None; - let mut address__ = None; - let mut message__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - GeneratedField::Password => { - if password__.is_some() { - return Err(serde::de::Error::duplicate_field("password")); - } - password__ = Some(map.next_value()?); - } - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - GeneratedField::Message => { - if message__.is_some() { - return Err(serde::de::Error::duplicate_field("message")); - } - message__ = Some(map.next_value()?); - } - } - } - Ok(SignMessageRequest { - wallet_name: wallet_name__.unwrap_or_default(), - password: password__.unwrap_or_default(), - address: address__.unwrap_or_default(), - message: message__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.SignMessageRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SignMessageResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.signature.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.SignMessageResponse", len)?; - if !self.signature.is_empty() { - struct_ser.serialize_field("signature", &self.signature)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SignMessageResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "signature", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Signature, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "signature" => Ok(GeneratedField::Signature), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SignMessageResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.SignMessageResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut signature__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Signature => { - if signature__.is_some() { - return Err(serde::de::Error::duplicate_field("signature")); - } - signature__ = Some(map.next_value()?); - } - } - } - Ok(SignMessageResponse { - signature: signature__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.SignMessageResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SignMessageWithPrivateKeyRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.private_key.is_empty() { - len += 1; - } - if !self.message.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.SignMessageWithPrivateKeyRequest", len)?; - if !self.private_key.is_empty() { - struct_ser.serialize_field("privateKey", &self.private_key)?; - } - if !self.message.is_empty() { - struct_ser.serialize_field("message", &self.message)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SignMessageWithPrivateKeyRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "private_key", - "privateKey", - "message", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - PrivateKey, - Message, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "privateKey" | "private_key" => Ok(GeneratedField::PrivateKey), - "message" => Ok(GeneratedField::Message), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SignMessageWithPrivateKeyRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.SignMessageWithPrivateKeyRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut private_key__ = None; - let mut message__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::PrivateKey => { - if private_key__.is_some() { - return Err(serde::de::Error::duplicate_field("privateKey")); - } - private_key__ = Some(map.next_value()?); - } - GeneratedField::Message => { - if message__.is_some() { - return Err(serde::de::Error::duplicate_field("message")); - } - message__ = Some(map.next_value()?); - } - } - } - Ok(SignMessageWithPrivateKeyRequest { - private_key: private_key__.unwrap_or_default(), - message: message__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.SignMessageWithPrivateKeyRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SignMessageWithPrivateKeyResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.signature.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.SignMessageWithPrivateKeyResponse", len)?; - if !self.signature.is_empty() { - struct_ser.serialize_field("signature", &self.signature)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SignMessageWithPrivateKeyResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "signature", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Signature, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "signature" => Ok(GeneratedField::Signature), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SignMessageWithPrivateKeyResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.SignMessageWithPrivateKeyResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut signature__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Signature => { - if signature__.is_some() { - return Err(serde::de::Error::duplicate_field("signature")); - } - signature__ = Some(map.next_value()?); - } - } - } - Ok(SignMessageWithPrivateKeyResponse { - signature: signature__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.SignMessageWithPrivateKeyResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SignRawTransactionRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - if !self.raw_transaction.is_empty() { - len += 1; - } - if !self.password.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.SignRawTransactionRequest", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - if !self.raw_transaction.is_empty() { - struct_ser.serialize_field("rawTransaction", &self.raw_transaction)?; - } - if !self.password.is_empty() { - struct_ser.serialize_field("password", &self.password)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SignRawTransactionRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - "raw_transaction", - "rawTransaction", - "password", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - RawTransaction, - Password, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - "rawTransaction" | "raw_transaction" => Ok(GeneratedField::RawTransaction), - "password" => Ok(GeneratedField::Password), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SignRawTransactionRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.SignRawTransactionRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - let mut raw_transaction__ = None; - let mut password__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - GeneratedField::RawTransaction => { - if raw_transaction__.is_some() { - return Err(serde::de::Error::duplicate_field("rawTransaction")); - } - raw_transaction__ = Some(map.next_value()?); - } - GeneratedField::Password => { - if password__.is_some() { - return Err(serde::de::Error::duplicate_field("password")); - } - password__ = Some(map.next_value()?); - } - } - } - Ok(SignRawTransactionRequest { - wallet_name: wallet_name__.unwrap_or_default(), - raw_transaction: raw_transaction__.unwrap_or_default(), - password: password__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.SignRawTransactionRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for SignRawTransactionResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.transaction_id.is_empty() { - len += 1; - } - if !self.signed_raw_transaction.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.SignRawTransactionResponse", len)?; - if !self.transaction_id.is_empty() { - struct_ser.serialize_field("transactionId", &self.transaction_id)?; - } - if !self.signed_raw_transaction.is_empty() { - struct_ser.serialize_field("signedRawTransaction", &self.signed_raw_transaction)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for SignRawTransactionResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "transaction_id", - "transactionId", - "signed_raw_transaction", - "signedRawTransaction", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - TransactionId, - SignedRawTransaction, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "transactionId" | "transaction_id" => Ok(GeneratedField::TransactionId), - "signedRawTransaction" | "signed_raw_transaction" => Ok(GeneratedField::SignedRawTransaction), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = SignRawTransactionResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.SignRawTransactionResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut transaction_id__ = None; - let mut signed_raw_transaction__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::TransactionId => { - if transaction_id__.is_some() { - return Err(serde::de::Error::duplicate_field("transactionId")); - } - transaction_id__ = Some(map.next_value()?); - } - GeneratedField::SignedRawTransaction => { - if signed_raw_transaction__.is_some() { - return Err(serde::de::Error::duplicate_field("signedRawTransaction")); - } - signed_raw_transaction__ = Some(map.next_value()?); - } - } - } - Ok(SignRawTransactionResponse { - transaction_id: transaction_id__.unwrap_or_default(), - signed_raw_transaction: signed_raw_transaction__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.SignRawTransactionResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for TransactionInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.id.is_empty() { - len += 1; - } - if !self.data.is_empty() { - len += 1; - } - if self.version != 0 { - len += 1; - } - if self.lock_time != 0 { - len += 1; - } - if self.value != 0 { - len += 1; - } - if self.fee != 0 { - len += 1; - } - if self.payload_type != 0 { - len += 1; - } - if !self.memo.is_empty() { - len += 1; - } - if !self.public_key.is_empty() { - len += 1; - } - if !self.signature.is_empty() { - len += 1; - } - if self.payload.is_some() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.TransactionInfo", len)?; - if !self.id.is_empty() { - struct_ser.serialize_field("id", &self.id)?; - } - if !self.data.is_empty() { - struct_ser.serialize_field("data", &self.data)?; - } - if self.version != 0 { - struct_ser.serialize_field("version", &self.version)?; - } - if self.lock_time != 0 { - struct_ser.serialize_field("lockTime", &self.lock_time)?; - } - if self.value != 0 { - struct_ser.serialize_field("value", ToString::to_string(&self.value).as_str())?; - } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } - if self.payload_type != 0 { - let v = PayloadType::from_i32(self.payload_type) - .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.payload_type)))?; - struct_ser.serialize_field("payloadType", &v)?; - } - if !self.memo.is_empty() { - struct_ser.serialize_field("memo", &self.memo)?; - } - if !self.public_key.is_empty() { - struct_ser.serialize_field("publicKey", &self.public_key)?; - } - if !self.signature.is_empty() { - struct_ser.serialize_field("signature", &self.signature)?; - } - if let Some(v) = self.payload.as_ref() { - match v { - transaction_info::Payload::Transfer(v) => { - struct_ser.serialize_field("transfer", v)?; - } - transaction_info::Payload::Bond(v) => { - struct_ser.serialize_field("bond", v)?; - } - transaction_info::Payload::Sortition(v) => { - struct_ser.serialize_field("sortition", v)?; - } - transaction_info::Payload::Unbond(v) => { - struct_ser.serialize_field("unbond", v)?; - } - transaction_info::Payload::Withdraw(v) => { - struct_ser.serialize_field("withdraw", v)?; - } - } - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for TransactionInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "id", - "data", - "version", - "lock_time", - "lockTime", - "value", - "fee", - "payload_type", - "payloadType", - "memo", - "public_key", - "publicKey", - "signature", - "transfer", - "bond", - "sortition", - "unbond", - "withdraw", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Id, - Data, - Version, - LockTime, - Value, - Fee, - PayloadType, - Memo, - PublicKey, - Signature, - Transfer, - Bond, - Sortition, - Unbond, - Withdraw, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "id" => Ok(GeneratedField::Id), - "data" => Ok(GeneratedField::Data), - "version" => Ok(GeneratedField::Version), - "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), - "value" => Ok(GeneratedField::Value), - "fee" => Ok(GeneratedField::Fee), - "payloadType" | "payload_type" => Ok(GeneratedField::PayloadType), - "memo" => Ok(GeneratedField::Memo), - "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - "signature" => Ok(GeneratedField::Signature), - "transfer" => Ok(GeneratedField::Transfer), - "bond" => Ok(GeneratedField::Bond), - "sortition" => Ok(GeneratedField::Sortition), - "unbond" => Ok(GeneratedField::Unbond), - "withdraw" => Ok(GeneratedField::Withdraw), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = TransactionInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.TransactionInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut id__ = None; - let mut data__ = None; - let mut version__ = None; - let mut lock_time__ = None; - let mut value__ = None; - let mut fee__ = None; - let mut payload_type__ = None; - let mut memo__ = None; - let mut public_key__ = None; - let mut signature__ = None; - let mut payload__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Id => { - if id__.is_some() { - return Err(serde::de::Error::duplicate_field("id")); - } - id__ = Some(map.next_value()?); - } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = Some(map.next_value()?); - } - GeneratedField::Version => { - if version__.is_some() { - return Err(serde::de::Error::duplicate_field("version")); - } - version__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::LockTime => { - if lock_time__.is_some() { - return Err(serde::de::Error::duplicate_field("lockTime")); - } - lock_time__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Value => { - if value__.is_some() { - return Err(serde::de::Error::duplicate_field("value")); - } - value__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::PayloadType => { - if payload_type__.is_some() { - return Err(serde::de::Error::duplicate_field("payloadType")); - } - payload_type__ = Some(map.next_value::()? as i32); - } - GeneratedField::Memo => { - if memo__.is_some() { - return Err(serde::de::Error::duplicate_field("memo")); - } - memo__ = Some(map.next_value()?); - } - GeneratedField::PublicKey => { - if public_key__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKey")); - } - public_key__ = Some(map.next_value()?); - } - GeneratedField::Signature => { - if signature__.is_some() { - return Err(serde::de::Error::duplicate_field("signature")); - } - signature__ = Some(map.next_value()?); - } - GeneratedField::Transfer => { - if payload__.is_some() { - return Err(serde::de::Error::duplicate_field("transfer")); - } - payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Transfer) -; - } - GeneratedField::Bond => { - if payload__.is_some() { - return Err(serde::de::Error::duplicate_field("bond")); - } - payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Bond) -; - } - GeneratedField::Sortition => { - if payload__.is_some() { - return Err(serde::de::Error::duplicate_field("sortition")); - } - payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Sortition) -; - } - GeneratedField::Unbond => { - if payload__.is_some() { - return Err(serde::de::Error::duplicate_field("unbond")); - } - payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Unbond) -; - } - GeneratedField::Withdraw => { - if payload__.is_some() { - return Err(serde::de::Error::duplicate_field("withdraw")); - } - payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Withdraw) -; - } - } - } - Ok(TransactionInfo { - id: id__.unwrap_or_default(), - data: data__.unwrap_or_default(), - version: version__.unwrap_or_default(), - lock_time: lock_time__.unwrap_or_default(), - value: value__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - payload_type: payload_type__.unwrap_or_default(), - memo: memo__.unwrap_or_default(), - public_key: public_key__.unwrap_or_default(), - signature: signature__.unwrap_or_default(), - payload: payload__, - }) - } - } - deserializer.deserialize_struct("pactus.TransactionInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for TransactionVerbosity { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::TransactionData => "TRANSACTION_DATA", - Self::TransactionInfo => "TRANSACTION_INFO", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for TransactionVerbosity { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "TRANSACTION_DATA", - "TRANSACTION_INFO", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = TransactionVerbosity; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(TransactionVerbosity::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(TransactionVerbosity::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "TRANSACTION_DATA" => Ok(TransactionVerbosity::TransactionData), - "TRANSACTION_INFO" => Ok(TransactionVerbosity::TransactionInfo), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} -impl serde::Serialize for UnloadWalletRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.UnloadWalletRequest", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for UnloadWalletRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = UnloadWalletRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.UnloadWalletRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - } - } - Ok(UnloadWalletRequest { - wallet_name: wallet_name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.UnloadWalletRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for UnloadWalletResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.UnloadWalletResponse", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for UnloadWalletResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = UnloadWalletResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.UnloadWalletResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - } - } - Ok(UnloadWalletResponse { - wallet_name: wallet_name__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.UnloadWalletResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for ValidatorInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.hash.is_empty() { - len += 1; - } - if !self.data.is_empty() { - len += 1; - } - if !self.public_key.is_empty() { - len += 1; - } - if self.number != 0 { - len += 1; - } - if self.stake != 0 { - len += 1; - } - if self.last_bonding_height != 0 { - len += 1; - } - if self.last_sortition_height != 0 { - len += 1; - } - if self.unbonding_height != 0 { - len += 1; - } - if !self.address.is_empty() { - len += 1; - } - if self.availability_score != 0. { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.ValidatorInfo", len)?; - if !self.hash.is_empty() { - struct_ser.serialize_field("hash", &self.hash)?; - } - if !self.data.is_empty() { - struct_ser.serialize_field("data", &self.data)?; - } - if !self.public_key.is_empty() { - struct_ser.serialize_field("publicKey", &self.public_key)?; - } - if self.number != 0 { - struct_ser.serialize_field("number", &self.number)?; - } - if self.stake != 0 { - struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; - } - if self.last_bonding_height != 0 { - struct_ser.serialize_field("lastBondingHeight", &self.last_bonding_height)?; - } - if self.last_sortition_height != 0 { - struct_ser.serialize_field("lastSortitionHeight", &self.last_sortition_height)?; - } - if self.unbonding_height != 0 { - struct_ser.serialize_field("unbondingHeight", &self.unbonding_height)?; - } - if !self.address.is_empty() { - struct_ser.serialize_field("address", &self.address)?; - } - if self.availability_score != 0. { - struct_ser.serialize_field("availabilityScore", &self.availability_score)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for ValidatorInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "hash", - "data", - "public_key", - "publicKey", - "number", - "stake", - "last_bonding_height", - "lastBondingHeight", - "last_sortition_height", - "lastSortitionHeight", - "unbonding_height", - "unbondingHeight", - "address", - "availability_score", - "availabilityScore", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Hash, - Data, - PublicKey, - Number, - Stake, - LastBondingHeight, - LastSortitionHeight, - UnbondingHeight, - Address, - AvailabilityScore, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "hash" => Ok(GeneratedField::Hash), - "data" => Ok(GeneratedField::Data), - "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - "number" => Ok(GeneratedField::Number), - "stake" => Ok(GeneratedField::Stake), - "lastBondingHeight" | "last_bonding_height" => Ok(GeneratedField::LastBondingHeight), - "lastSortitionHeight" | "last_sortition_height" => Ok(GeneratedField::LastSortitionHeight), - "unbondingHeight" | "unbonding_height" => Ok(GeneratedField::UnbondingHeight), - "address" => Ok(GeneratedField::Address), - "availabilityScore" | "availability_score" => Ok(GeneratedField::AvailabilityScore), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = ValidatorInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.ValidatorInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut hash__ = None; - let mut data__ = None; - let mut public_key__ = None; - let mut number__ = None; - let mut stake__ = None; - let mut last_bonding_height__ = None; - let mut last_sortition_height__ = None; - let mut unbonding_height__ = None; - let mut address__ = None; - let mut availability_score__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Hash => { - if hash__.is_some() { - return Err(serde::de::Error::duplicate_field("hash")); - } - hash__ = Some(map.next_value()?); - } - GeneratedField::Data => { - if data__.is_some() { - return Err(serde::de::Error::duplicate_field("data")); - } - data__ = Some(map.next_value()?); - } - GeneratedField::PublicKey => { - if public_key__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKey")); - } - public_key__ = Some(map.next_value()?); - } - GeneratedField::Number => { - if number__.is_some() { - return Err(serde::de::Error::duplicate_field("number")); - } - number__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Stake => { - if stake__.is_some() { - return Err(serde::de::Error::duplicate_field("stake")); - } - stake__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::LastBondingHeight => { - if last_bonding_height__.is_some() { - return Err(serde::de::Error::duplicate_field("lastBondingHeight")); - } - last_bonding_height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::LastSortitionHeight => { - if last_sortition_height__.is_some() { - return Err(serde::de::Error::duplicate_field("lastSortitionHeight")); - } - last_sortition_height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::UnbondingHeight => { - if unbonding_height__.is_some() { - return Err(serde::de::Error::duplicate_field("unbondingHeight")); - } - unbonding_height__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Address => { - if address__.is_some() { - return Err(serde::de::Error::duplicate_field("address")); - } - address__ = Some(map.next_value()?); - } - GeneratedField::AvailabilityScore => { - if availability_score__.is_some() { - return Err(serde::de::Error::duplicate_field("availabilityScore")); - } - availability_score__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(ValidatorInfo { - hash: hash__.unwrap_or_default(), - data: data__.unwrap_or_default(), - public_key: public_key__.unwrap_or_default(), - number: number__.unwrap_or_default(), - stake: stake__.unwrap_or_default(), - last_bonding_height: last_bonding_height__.unwrap_or_default(), - last_sortition_height: last_sortition_height__.unwrap_or_default(), - unbonding_height: unbonding_height__.unwrap_or_default(), - address: address__.unwrap_or_default(), - availability_score: availability_score__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.ValidatorInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for VerifyMessageRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.message.is_empty() { - len += 1; - } - if !self.signature.is_empty() { - len += 1; - } - if !self.public_key.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.VerifyMessageRequest", len)?; - if !self.message.is_empty() { - struct_ser.serialize_field("message", &self.message)?; - } - if !self.signature.is_empty() { - struct_ser.serialize_field("signature", &self.signature)?; - } - if !self.public_key.is_empty() { - struct_ser.serialize_field("publicKey", &self.public_key)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for VerifyMessageRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "message", - "signature", - "public_key", - "publicKey", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Message, - Signature, - PublicKey, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "message" => Ok(GeneratedField::Message), - "signature" => Ok(GeneratedField::Signature), - "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = VerifyMessageRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.VerifyMessageRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut message__ = None; - let mut signature__ = None; - let mut public_key__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Message => { - if message__.is_some() { - return Err(serde::de::Error::duplicate_field("message")); - } - message__ = Some(map.next_value()?); - } - GeneratedField::Signature => { - if signature__.is_some() { - return Err(serde::de::Error::duplicate_field("signature")); - } - signature__ = Some(map.next_value()?); - } - GeneratedField::PublicKey => { - if public_key__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKey")); - } - public_key__ = Some(map.next_value()?); - } - } - } - Ok(VerifyMessageRequest { - message: message__.unwrap_or_default(), - signature: signature__.unwrap_or_default(), - public_key: public_key__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.VerifyMessageRequest", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for VerifyMessageResponse { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.is_valid { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.VerifyMessageResponse", len)?; - if self.is_valid { - struct_ser.serialize_field("isValid", &self.is_valid)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for VerifyMessageResponse { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "is_valid", - "isValid", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - IsValid, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "isValid" | "is_valid" => Ok(GeneratedField::IsValid), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = VerifyMessageResponse; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.VerifyMessageResponse") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut is_valid__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::IsValid => { - if is_valid__.is_some() { - return Err(serde::de::Error::duplicate_field("isValid")); - } - is_valid__ = Some(map.next_value()?); - } - } - } - Ok(VerifyMessageResponse { - is_valid: is_valid__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.VerifyMessageResponse", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for VoteInfo { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if self.r#type != 0 { - len += 1; - } - if !self.voter.is_empty() { - len += 1; - } - if !self.block_hash.is_empty() { - len += 1; - } - if self.round != 0 { - len += 1; - } - if self.cp_round != 0 { - len += 1; - } - if self.cp_value != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.VoteInfo", len)?; - if self.r#type != 0 { - let v = VoteType::from_i32(self.r#type) - .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.r#type)))?; - struct_ser.serialize_field("type", &v)?; - } - if !self.voter.is_empty() { - struct_ser.serialize_field("voter", &self.voter)?; - } - if !self.block_hash.is_empty() { - struct_ser.serialize_field("blockHash", &self.block_hash)?; - } - if self.round != 0 { - struct_ser.serialize_field("round", &self.round)?; - } - if self.cp_round != 0 { - struct_ser.serialize_field("cpRound", &self.cp_round)?; - } - if self.cp_value != 0 { - struct_ser.serialize_field("cpValue", &self.cp_value)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for VoteInfo { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "type", - "voter", - "block_hash", - "blockHash", - "round", - "cp_round", - "cpRound", - "cp_value", - "cpValue", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Type, - Voter, - BlockHash, - Round, - CpRound, - CpValue, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "type" => Ok(GeneratedField::Type), - "voter" => Ok(GeneratedField::Voter), - "blockHash" | "block_hash" => Ok(GeneratedField::BlockHash), - "round" => Ok(GeneratedField::Round), - "cpRound" | "cp_round" => Ok(GeneratedField::CpRound), - "cpValue" | "cp_value" => Ok(GeneratedField::CpValue), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = VoteInfo; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.VoteInfo") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut r#type__ = None; - let mut voter__ = None; - let mut block_hash__ = None; - let mut round__ = None; - let mut cp_round__ = None; - let mut cp_value__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Type => { - if r#type__.is_some() { - return Err(serde::de::Error::duplicate_field("type")); - } - r#type__ = Some(map.next_value::()? as i32); - } - GeneratedField::Voter => { - if voter__.is_some() { - return Err(serde::de::Error::duplicate_field("voter")); - } - voter__ = Some(map.next_value()?); - } - GeneratedField::BlockHash => { - if block_hash__.is_some() { - return Err(serde::de::Error::duplicate_field("blockHash")); - } - block_hash__ = Some(map.next_value()?); - } - GeneratedField::Round => { - if round__.is_some() { - return Err(serde::de::Error::duplicate_field("round")); - } - round__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::CpRound => { - if cp_round__.is_some() { - return Err(serde::de::Error::duplicate_field("cpRound")); - } - cp_round__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::CpValue => { - if cp_value__.is_some() { - return Err(serde::de::Error::duplicate_field("cpValue")); - } - cp_value__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(VoteInfo { - r#type: r#type__.unwrap_or_default(), - voter: voter__.unwrap_or_default(), - block_hash: block_hash__.unwrap_or_default(), - round: round__.unwrap_or_default(), - cp_round: cp_round__.unwrap_or_default(), - cp_value: cp_value__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.VoteInfo", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for VoteType { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - let variant = match self { - Self::VoteUnknown => "VOTE_UNKNOWN", - Self::VotePrepare => "VOTE_PREPARE", - Self::VotePrecommit => "VOTE_PRECOMMIT", - Self::VoteChangeProposer => "VOTE_CHANGE_PROPOSER", - }; - serializer.serialize_str(variant) - } -} -impl<'de> serde::Deserialize<'de> for VoteType { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "VOTE_UNKNOWN", - "VOTE_PREPARE", - "VOTE_PRECOMMIT", - "VOTE_CHANGE_PROPOSER", - ]; - - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = VoteType; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(VoteType::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) - } - - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(VoteType::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) - } - - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "VOTE_UNKNOWN" => Ok(VoteType::VoteUnknown), - "VOTE_PREPARE" => Ok(VoteType::VotePrepare), - "VOTE_PRECOMMIT" => Ok(VoteType::VotePrecommit), - "VOTE_CHANGE_PROPOSER" => Ok(VoteType::VoteChangeProposer), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), - } - } - } - deserializer.deserialize_any(GeneratedVisitor) - } -} diff --git a/www/grpc/gen/rust/pactus.tonic.rs b/www/grpc/gen/rust/pactus.tonic.rs deleted file mode 100644 index cd4fd58fe..000000000 --- a/www/grpc/gen/rust/pactus.tonic.rs +++ /dev/null @@ -1,3577 +0,0 @@ -// @generated -/// Generated client implementations. -pub mod transaction_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct TransactionClient { - inner: tonic::client::Grpc, - } - impl TransactionClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl TransactionClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> TransactionClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - TransactionClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn get_transaction( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Transaction/GetTransaction", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Transaction", "GetTransaction")); - self.inner.unary(req, path, codec).await - } - pub async fn calculate_fee( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Transaction/CalculateFee", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Transaction", "CalculateFee")); - self.inner.unary(req, path, codec).await - } - pub async fn broadcast_transaction( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Transaction/BroadcastTransaction", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Transaction", "BroadcastTransaction")); - self.inner.unary(req, path, codec).await - } - pub async fn get_raw_transfer_transaction( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Transaction/GetRawTransferTransaction", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("pactus.Transaction", "GetRawTransferTransaction"), - ); - self.inner.unary(req, path, codec).await - } - pub async fn get_raw_bond_transaction( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Transaction/GetRawBondTransaction", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Transaction", "GetRawBondTransaction")); - self.inner.unary(req, path, codec).await - } - pub async fn get_raw_unbond_transaction( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Transaction/GetRawUnbondTransaction", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("pactus.Transaction", "GetRawUnbondTransaction"), - ); - self.inner.unary(req, path, codec).await - } - pub async fn get_raw_withdraw_transaction( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Transaction/GetRawWithdrawTransaction", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert( - GrpcMethod::new("pactus.Transaction", "GetRawWithdrawTransaction"), - ); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod transaction_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with TransactionServer. - #[async_trait] - pub trait Transaction: Send + Sync + 'static { - async fn get_transaction( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn calculate_fee( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn broadcast_transaction( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_raw_transfer_transaction( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_raw_bond_transaction( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_raw_unbond_transaction( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_raw_withdraw_transaction( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - #[derive(Debug)] - pub struct TransactionServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl TransactionServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for TransactionServer - where - T: Transaction, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/pactus.Transaction/GetTransaction" => { - #[allow(non_camel_case_types)] - struct GetTransactionSvc(pub Arc); - impl< - T: Transaction, - > tonic::server::UnaryService - for GetTransactionSvc { - type Response = super::GetTransactionResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_transaction(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetTransactionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Transaction/CalculateFee" => { - #[allow(non_camel_case_types)] - struct CalculateFeeSvc(pub Arc); - impl< - T: Transaction, - > tonic::server::UnaryService - for CalculateFeeSvc { - type Response = super::CalculateFeeResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).calculate_fee(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = CalculateFeeSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Transaction/BroadcastTransaction" => { - #[allow(non_camel_case_types)] - struct BroadcastTransactionSvc(pub Arc); - impl< - T: Transaction, - > tonic::server::UnaryService - for BroadcastTransactionSvc { - type Response = super::BroadcastTransactionResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).broadcast_transaction(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = BroadcastTransactionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Transaction/GetRawTransferTransaction" => { - #[allow(non_camel_case_types)] - struct GetRawTransferTransactionSvc(pub Arc); - impl< - T: Transaction, - > tonic::server::UnaryService< - super::GetRawTransferTransactionRequest, - > for GetRawTransferTransactionSvc { - type Response = super::GetRawTransactionResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::GetRawTransferTransactionRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_raw_transfer_transaction(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetRawTransferTransactionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Transaction/GetRawBondTransaction" => { - #[allow(non_camel_case_types)] - struct GetRawBondTransactionSvc(pub Arc); - impl< - T: Transaction, - > tonic::server::UnaryService - for GetRawBondTransactionSvc { - type Response = super::GetRawTransactionResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_raw_bond_transaction(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetRawBondTransactionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Transaction/GetRawUnbondTransaction" => { - #[allow(non_camel_case_types)] - struct GetRawUnbondTransactionSvc(pub Arc); - impl< - T: Transaction, - > tonic::server::UnaryService - for GetRawUnbondTransactionSvc { - type Response = super::GetRawTransactionResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::GetRawUnbondTransactionRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_raw_unbond_transaction(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetRawUnbondTransactionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Transaction/GetRawWithdrawTransaction" => { - #[allow(non_camel_case_types)] - struct GetRawWithdrawTransactionSvc(pub Arc); - impl< - T: Transaction, - > tonic::server::UnaryService< - super::GetRawWithdrawTransactionRequest, - > for GetRawWithdrawTransactionSvc { - type Response = super::GetRawTransactionResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::GetRawWithdrawTransactionRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_raw_withdraw_transaction(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetRawWithdrawTransactionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) - } - } - } - } - impl Clone for TransactionServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for TransactionServer { - const NAME: &'static str = "pactus.Transaction"; - } -} -/// Generated client implementations. -pub mod blockchain_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct BlockchainClient { - inner: tonic::client::Grpc, - } - impl BlockchainClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl BlockchainClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> BlockchainClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - BlockchainClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn get_block( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetBlock", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetBlock")); - self.inner.unary(req, path, codec).await - } - pub async fn get_block_hash( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetBlockHash", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetBlockHash")); - self.inner.unary(req, path, codec).await - } - pub async fn get_block_height( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetBlockHeight", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetBlockHeight")); - self.inner.unary(req, path, codec).await - } - pub async fn get_blockchain_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetBlockchainInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetBlockchainInfo")); - self.inner.unary(req, path, codec).await - } - pub async fn get_consensus_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetConsensusInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetConsensusInfo")); - self.inner.unary(req, path, codec).await - } - pub async fn get_account( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetAccount", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetAccount")); - self.inner.unary(req, path, codec).await - } - pub async fn get_validator( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetValidator", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetValidator")); - self.inner.unary(req, path, codec).await - } - pub async fn get_validator_by_number( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetValidatorByNumber", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetValidatorByNumber")); - self.inner.unary(req, path, codec).await - } - pub async fn get_validator_addresses( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetValidatorAddresses", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetValidatorAddresses")); - self.inner.unary(req, path, codec).await - } - pub async fn get_public_key( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetPublicKey", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetPublicKey")); - self.inner.unary(req, path, codec).await - } - pub async fn get_tx_pool_content( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Blockchain/GetTxPoolContent", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Blockchain", "GetTxPoolContent")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod blockchain_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with BlockchainServer. - #[async_trait] - pub trait Blockchain: Send + Sync + 'static { - async fn get_block( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_block_hash( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_block_height( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_blockchain_info( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_consensus_info( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_account( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_validator( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_validator_by_number( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_validator_addresses( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_public_key( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_tx_pool_content( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - #[derive(Debug)] - pub struct BlockchainServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl BlockchainServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for BlockchainServer - where - T: Blockchain, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/pactus.Blockchain/GetBlock" => { - #[allow(non_camel_case_types)] - struct GetBlockSvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetBlockSvc { - type Response = super::GetBlockResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { (*inner).get_block(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetBlockSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Blockchain/GetBlockHash" => { - #[allow(non_camel_case_types)] - struct GetBlockHashSvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetBlockHashSvc { - type Response = super::GetBlockHashResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_block_hash(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetBlockHashSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Blockchain/GetBlockHeight" => { - #[allow(non_camel_case_types)] - struct GetBlockHeightSvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetBlockHeightSvc { - type Response = super::GetBlockHeightResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_block_height(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetBlockHeightSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Blockchain/GetBlockchainInfo" => { - #[allow(non_camel_case_types)] - struct GetBlockchainInfoSvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetBlockchainInfoSvc { - type Response = super::GetBlockchainInfoResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_blockchain_info(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetBlockchainInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Blockchain/GetConsensusInfo" => { - #[allow(non_camel_case_types)] - struct GetConsensusInfoSvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetConsensusInfoSvc { - type Response = super::GetConsensusInfoResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_consensus_info(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetConsensusInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Blockchain/GetAccount" => { - #[allow(non_camel_case_types)] - struct GetAccountSvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetAccountSvc { - type Response = super::GetAccountResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { (*inner).get_account(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetAccountSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Blockchain/GetValidator" => { - #[allow(non_camel_case_types)] - struct GetValidatorSvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetValidatorSvc { - type Response = super::GetValidatorResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_validator(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetValidatorSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Blockchain/GetValidatorByNumber" => { - #[allow(non_camel_case_types)] - struct GetValidatorByNumberSvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetValidatorByNumberSvc { - type Response = super::GetValidatorResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_validator_by_number(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetValidatorByNumberSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Blockchain/GetValidatorAddresses" => { - #[allow(non_camel_case_types)] - struct GetValidatorAddressesSvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetValidatorAddressesSvc { - type Response = super::GetValidatorAddressesResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_validator_addresses(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetValidatorAddressesSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Blockchain/GetPublicKey" => { - #[allow(non_camel_case_types)] - struct GetPublicKeySvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetPublicKeySvc { - type Response = super::GetPublicKeyResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_public_key(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetPublicKeySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Blockchain/GetTxPoolContent" => { - #[allow(non_camel_case_types)] - struct GetTxPoolContentSvc(pub Arc); - impl< - T: Blockchain, - > tonic::server::UnaryService - for GetTxPoolContentSvc { - type Response = super::GetTxPoolContentResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_tx_pool_content(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetTxPoolContentSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) - } - } - } - } - impl Clone for BlockchainServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for BlockchainServer { - const NAME: &'static str = "pactus.Blockchain"; - } -} -/// Generated client implementations. -pub mod network_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct NetworkClient { - inner: tonic::client::Grpc, - } - impl NetworkClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl NetworkClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> NetworkClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - NetworkClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn get_network_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Network/GetNetworkInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Network", "GetNetworkInfo")); - self.inner.unary(req, path, codec).await - } - pub async fn get_node_info( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Network/GetNodeInfo", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Network", "GetNodeInfo")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod network_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with NetworkServer. - #[async_trait] - pub trait Network: Send + Sync + 'static { - async fn get_network_info( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_node_info( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - #[derive(Debug)] - pub struct NetworkServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl NetworkServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for NetworkServer - where - T: Network, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/pactus.Network/GetNetworkInfo" => { - #[allow(non_camel_case_types)] - struct GetNetworkInfoSvc(pub Arc); - impl< - T: Network, - > tonic::server::UnaryService - for GetNetworkInfoSvc { - type Response = super::GetNetworkInfoResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_network_info(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetNetworkInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Network/GetNodeInfo" => { - #[allow(non_camel_case_types)] - struct GetNodeInfoSvc(pub Arc); - impl< - T: Network, - > tonic::server::UnaryService - for GetNodeInfoSvc { - type Response = super::GetNodeInfoResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_node_info(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetNodeInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) - } - } - } - } - impl Clone for NetworkServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for NetworkServer { - const NAME: &'static str = "pactus.Network"; - } -} -/// Generated client implementations. -pub mod utils_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct UtilsClient { - inner: tonic::client::Grpc, - } - impl UtilsClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl UtilsClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> UtilsClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - UtilsClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn sign_message_with_private_key( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Utils/SignMessageWithPrivateKey", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Utils", "SignMessageWithPrivateKey")); - self.inner.unary(req, path, codec).await - } - pub async fn verify_message( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Utils/VerifyMessage", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Utils", "VerifyMessage")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod utils_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with UtilsServer. - #[async_trait] - pub trait Utils: Send + Sync + 'static { - async fn sign_message_with_private_key( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn verify_message( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - #[derive(Debug)] - pub struct UtilsServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl UtilsServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for UtilsServer - where - T: Utils, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/pactus.Utils/SignMessageWithPrivateKey" => { - #[allow(non_camel_case_types)] - struct SignMessageWithPrivateKeySvc(pub Arc); - impl< - T: Utils, - > tonic::server::UnaryService< - super::SignMessageWithPrivateKeyRequest, - > for SignMessageWithPrivateKeySvc { - type Response = super::SignMessageWithPrivateKeyResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - super::SignMessageWithPrivateKeyRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).sign_message_with_private_key(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SignMessageWithPrivateKeySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Utils/VerifyMessage" => { - #[allow(non_camel_case_types)] - struct VerifyMessageSvc(pub Arc); - impl< - T: Utils, - > tonic::server::UnaryService - for VerifyMessageSvc { - type Response = super::VerifyMessageResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).verify_message(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = VerifyMessageSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) - } - } - } - } - impl Clone for UtilsServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for UtilsServer { - const NAME: &'static str = "pactus.Utils"; - } -} -/// Generated client implementations. -pub mod wallet_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct WalletClient { - inner: tonic::client::Grpc, - } - impl WalletClient { - /// Attempt to create a new client by connecting to a given endpoint. - pub async fn connect(dst: D) -> Result - where - D: TryInto, - D::Error: Into, - { - let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; - Ok(Self::new(conn)) - } - } - impl WalletClient - where - T: tonic::client::GrpcService, - T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> WalletClient> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request, - Response = http::Response< - >::ResponseBody, - >, - >, - , - >>::Error: Into + Send + Sync, - { - WalletClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - pub async fn create_wallet( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Wallet/CreateWallet", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Wallet", "CreateWallet")); - self.inner.unary(req, path, codec).await - } - pub async fn restore_wallet( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Wallet/RestoreWallet", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Wallet", "RestoreWallet")); - self.inner.unary(req, path, codec).await - } - pub async fn load_wallet( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/pactus.Wallet/LoadWallet"); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("pactus.Wallet", "LoadWallet")); - self.inner.unary(req, path, codec).await - } - pub async fn unload_wallet( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Wallet/UnloadWallet", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Wallet", "UnloadWallet")); - self.inner.unary(req, path, codec).await - } - pub async fn get_total_balance( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Wallet/GetTotalBalance", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Wallet", "GetTotalBalance")); - self.inner.unary(req, path, codec).await - } - pub async fn sign_raw_transaction( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Wallet/SignRawTransaction", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Wallet", "SignRawTransaction")); - self.inner.unary(req, path, codec).await - } - pub async fn get_validator_address( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Wallet/GetValidatorAddress", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Wallet", "GetValidatorAddress")); - self.inner.unary(req, path, codec).await - } - pub async fn get_new_address( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Wallet/GetNewAddress", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Wallet", "GetNewAddress")); - self.inner.unary(req, path, codec).await - } - pub async fn get_address_history( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Wallet/GetAddressHistory", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("pactus.Wallet", "GetAddressHistory")); - self.inner.unary(req, path, codec).await - } - pub async fn sign_message( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/pactus.Wallet/SignMessage", - ); - let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new("pactus.Wallet", "SignMessage")); - self.inner.unary(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod wallet_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with WalletServer. - #[async_trait] - pub trait Wallet: Send + Sync + 'static { - async fn create_wallet( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn restore_wallet( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn load_wallet( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn unload_wallet( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_total_balance( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn sign_raw_transaction( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_validator_address( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_new_address( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn get_address_history( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn sign_message( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - } - #[derive(Debug)] - pub struct WalletServer { - inner: _Inner, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option, - max_encoding_message_size: Option, - } - struct _Inner(Arc); - impl WalletServer { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc) -> Self { - let inner = _Inner(inner); - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor( - inner: T, - interceptor: F, - ) -> InterceptedService - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl tonic::codegen::Service> for WalletServer - where - T: Wallet, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, - { - type Response = http::Response; - type Error = std::convert::Infallible; - type Future = BoxFuture; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request) -> Self::Future { - let inner = self.inner.clone(); - match req.uri().path() { - "/pactus.Wallet/CreateWallet" => { - #[allow(non_camel_case_types)] - struct CreateWalletSvc(pub Arc); - impl< - T: Wallet, - > tonic::server::UnaryService - for CreateWalletSvc { - type Response = super::CreateWalletResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).create_wallet(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = CreateWalletSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Wallet/RestoreWallet" => { - #[allow(non_camel_case_types)] - struct RestoreWalletSvc(pub Arc); - impl< - T: Wallet, - > tonic::server::UnaryService - for RestoreWalletSvc { - type Response = super::RestoreWalletResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).restore_wallet(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = RestoreWalletSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Wallet/LoadWallet" => { - #[allow(non_camel_case_types)] - struct LoadWalletSvc(pub Arc); - impl tonic::server::UnaryService - for LoadWalletSvc { - type Response = super::LoadWalletResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { (*inner).load_wallet(request).await }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = LoadWalletSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Wallet/UnloadWallet" => { - #[allow(non_camel_case_types)] - struct UnloadWalletSvc(pub Arc); - impl< - T: Wallet, - > tonic::server::UnaryService - for UnloadWalletSvc { - type Response = super::UnloadWalletResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).unload_wallet(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = UnloadWalletSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Wallet/GetTotalBalance" => { - #[allow(non_camel_case_types)] - struct GetTotalBalanceSvc(pub Arc); - impl< - T: Wallet, - > tonic::server::UnaryService - for GetTotalBalanceSvc { - type Response = super::GetTotalBalanceResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_total_balance(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetTotalBalanceSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Wallet/SignRawTransaction" => { - #[allow(non_camel_case_types)] - struct SignRawTransactionSvc(pub Arc); - impl< - T: Wallet, - > tonic::server::UnaryService - for SignRawTransactionSvc { - type Response = super::SignRawTransactionResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).sign_raw_transaction(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SignRawTransactionSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Wallet/GetValidatorAddress" => { - #[allow(non_camel_case_types)] - struct GetValidatorAddressSvc(pub Arc); - impl< - T: Wallet, - > tonic::server::UnaryService - for GetValidatorAddressSvc { - type Response = super::GetValidatorAddressResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_validator_address(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetValidatorAddressSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Wallet/GetNewAddress" => { - #[allow(non_camel_case_types)] - struct GetNewAddressSvc(pub Arc); - impl< - T: Wallet, - > tonic::server::UnaryService - for GetNewAddressSvc { - type Response = super::GetNewAddressResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_new_address(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetNewAddressSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Wallet/GetAddressHistory" => { - #[allow(non_camel_case_types)] - struct GetAddressHistorySvc(pub Arc); - impl< - T: Wallet, - > tonic::server::UnaryService - for GetAddressHistorySvc { - type Response = super::GetAddressHistoryResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).get_address_history(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = GetAddressHistorySvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/pactus.Wallet/SignMessage" => { - #[allow(non_camel_case_types)] - struct SignMessageSvc(pub Arc); - impl< - T: Wallet, - > tonic::server::UnaryService - for SignMessageSvc { - type Response = super::SignMessageResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - (*inner).sign_message(request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let inner = inner.0; - let method = SignMessageSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - Ok( - http::Response::builder() - .status(200) - .header("grpc-status", "12") - .header("content-type", "application/grpc") - .body(empty_body()) - .unwrap(), - ) - }) - } - } - } - } - impl Clone for WalletServer { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - impl Clone for _Inner { - fn clone(&self) -> Self { - Self(Arc::clone(&self.0)) - } - } - impl std::fmt::Debug for _Inner { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.0) - } - } - impl tonic::server::NamedService for WalletServer { - const NAME: &'static str = "pactus.Wallet"; - } -} diff --git a/www/grpc/proto/transaction.proto b/www/grpc/proto/transaction.proto index 370d3954f..d608bee3e 100644 --- a/www/grpc/proto/transaction.proto +++ b/www/grpc/proto/transaction.proto @@ -19,21 +19,8 @@ service Transaction { rpc BroadcastTransaction(BroadcastTransactionRequest) returns (BroadcastTransactionResponse); - // GetRawTransferTransaction retrieves raw details of a transfer transaction. - rpc GetRawTransferTransaction(GetRawTransferTransactionRequest) - returns (GetRawTransactionResponse); - - // GetRawBondTransaction retrieves raw details of a bond transaction. - rpc GetRawBondTransaction(GetRawBondTransactionRequest) - returns (GetRawTransactionResponse); - - // GetRawUnbondTransaction retrieves raw details of an unbond transaction. - rpc GetRawUnbondTransaction(GetRawUnbondTransactionRequest) - returns (GetRawTransactionResponse); - - // GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. - rpc GetRawWithdrawTransaction(GetRawWithdrawTransactionRequest) - returns (GetRawTransactionResponse); + // GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. + rpc GetRawTransaction(GetRawTransactionRequest) returns(GetRawTransactionResponse); } // Request message for retrieving transaction details. @@ -84,68 +71,64 @@ message BroadcastTransactionResponse { string id = 1; } -// Request message for retrieving raw details of a transfer transaction. -message GetRawTransferTransactionRequest { +// Request message for retrieving raw details of transaction. +message GetRawTransactionRequest { // The lock time for the transaction. If not set, defaults to the last block // height. uint32 lock_time = 1; + // A memo string for the transaction. + string memo = 2; + + oneof transaction { + GetRawTransferTransactionRequest transfer = 3; + GetRawBondTransactionRequest bond = 4; + GetRawUnbondTransactionRequest unbond = 5; + GetRawWithdrawTransactionRequest withdraw = 6; + } +} + +// Request message for retrieving raw details of a transfer transaction. +message GetRawTransferTransactionRequest { // The sender's account address. - string sender = 2; + string sender = 1; // The receiver's account address. - string receiver = 3; + string receiver = 2; // The amount to be transferred, specified in NanoPAC. Must be greater than 0. - int64 amount = 4; + int64 amount = 3; // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - int64 fee = 5; - // A memo string for the transaction. - string memo = 6; + int64 fee = 4; } // Request message for retrieving raw details of a bond transaction. message GetRawBondTransactionRequest { - // The lock time for the transaction. If not set, defaults to the last block - // height. - uint32 lock_time = 1; // The sender's account address. - string sender = 2; + string sender = 1; // The receiver's validator address. - string receiver = 3; + string receiver = 2; // The stake amount in NanoPAC. Must be greater than 0. - int64 stake = 4; + int64 stake = 3; // The public key of the validator. - string public_key = 5; + string public_key = 4; // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - int64 fee = 6; - // A memo string for the transaction. - string memo = 7; + int64 fee = 5; } // Request message for retrieving raw details of an unbond transaction. message GetRawUnbondTransactionRequest { - // The lock time for the transaction. If not set, defaults to the last block - // height. - uint32 lock_time = 1; // The address of the validator to unbond from. - string validator_address = 3; - // A memo string for the transaction. - string memo = 4; + string validator_address = 1; } // Request message for retrieving raw details of a withdraw transaction. message GetRawWithdrawTransactionRequest { - // The lock time for the transaction. If not set, defaults to the last block - // height. - uint32 lock_time = 1; // The address of the validator to withdraw from. - string validator_address = 2; + string validator_address = 1; // The address of the account to withdraw to. - string account_address = 3; + string account_address = 2; // The withdrawal amount in NanoPAC. Must be greater than 0. - int64 amount = 4; + int64 amount = 3; // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - int64 fee = 5; - // A memo string for the transaction. - string memo = 6; + int64 fee = 4; } // Response message containing raw transaction data. diff --git a/www/grpc/swagger-ui/pactus.swagger.json b/www/grpc/swagger-ui/pactus.swagger.json index ef57177be..505fb746c 100644 --- a/www/grpc/swagger-ui/pactus.swagger.json +++ b/www/grpc/swagger-ui/pactus.swagger.json @@ -596,10 +596,10 @@ ] } }, - "/pactus/transaction/get_raw_bond_transaction": { + "/pactus/transaction/get_raw_transaction": { "get": { - "summary": "GetRawBondTransaction retrieves raw details of a bond transaction.", - "operationId": "Transaction_GetRawBondTransaction", + "summary": "GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.", + "operationId": "Transaction_GetRawTransaction", "responses": { "200": { "description": "A successful response.", @@ -624,215 +624,102 @@ "format": "int64" }, { - "name": "sender", - "description": "The sender's account address.", + "name": "memo", + "description": "A memo string for the transaction.", "in": "query", "required": false, "type": "string" }, { - "name": "receiver", - "description": "The receiver's validator address.", + "name": "transfer.sender", + "description": "The sender's account address.", "in": "query", "required": false, "type": "string" }, { - "name": "stake", - "description": "The stake amount in NanoPAC. Must be greater than 0.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "publicKey", - "description": "The public key of the validator.", + "name": "transfer.receiver", + "description": "The receiver's account address.", "in": "query", "required": false, "type": "string" }, { - "name": "fee", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", + "name": "transfer.amount", + "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0.", "in": "query", "required": false, "type": "string", "format": "int64" }, { - "name": "memo", - "description": "A memo string for the transaction.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "Transaction" - ] - } - }, - "/pactus/transaction/get_raw_transfer_transaction": { - "get": { - "summary": "GetRawTransferTransaction retrieves raw details of a transfer transaction.", - "operationId": "Transaction_GetRawTransferTransaction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/pactusGetRawTransactionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "lockTime", - "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", + "name": "transfer.fee", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "in": "query", "required": false, - "type": "integer", + "type": "string", "format": "int64" }, { - "name": "sender", + "name": "bond.sender", "description": "The sender's account address.", "in": "query", "required": false, "type": "string" }, { - "name": "receiver", - "description": "The receiver's account address.", + "name": "bond.receiver", + "description": "The receiver's validator address.", "in": "query", "required": false, "type": "string" }, { - "name": "amount", - "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "fee", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", + "name": "bond.stake", + "description": "The stake amount in NanoPAC. Must be greater than 0.", "in": "query", "required": false, "type": "string", "format": "int64" }, { - "name": "memo", - "description": "A memo string for the transaction.", + "name": "bond.publicKey", + "description": "The public key of the validator.", "in": "query", "required": false, "type": "string" - } - ], - "tags": [ - "Transaction" - ] - } - }, - "/pactus/transaction/get_raw_unbond_transaction": { - "get": { - "summary": "GetRawUnbondTransaction retrieves raw details of an unbond transaction.", - "operationId": "Transaction_GetRawUnbondTransaction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/pactusGetRawTransactionResponse" - } }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ { - "name": "lockTime", - "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", + "name": "bond.fee", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "in": "query", "required": false, - "type": "integer", + "type": "string", "format": "int64" }, { - "name": "validatorAddress", + "name": "unbond.validatorAddress", "description": "The address of the validator to unbond from.", "in": "query", "required": false, "type": "string" }, { - "name": "memo", - "description": "A memo string for the transaction.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "Transaction" - ] - } - }, - "/pactus/transaction/get_raw_withdraw_transaction": { - "get": { - "summary": "GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.", - "operationId": "Transaction_GetRawWithdrawTransaction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/pactusGetRawTransactionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "lockTime", - "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "validatorAddress", + "name": "withdraw.validatorAddress", "description": "The address of the validator to withdraw from.", "in": "query", "required": false, "type": "string" }, { - "name": "accountAddress", + "name": "withdraw.accountAddress", "description": "The address of the account to withdraw to.", "in": "query", "required": false, "type": "string" }, { - "name": "amount", + "name": "withdraw.amount", "description": "The withdrawal amount in NanoPAC. Must be greater than 0.", "in": "query", "required": false, @@ -840,19 +727,12 @@ "format": "int64" }, { - "name": "fee", + "name": "withdraw.fee", "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "in": "query", "required": false, "type": "string", "format": "int64" - }, - { - "name": "memo", - "description": "A memo string for the transaction.", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ @@ -1792,6 +1672,34 @@ }, "description": "Message containing the response with the public key." }, + "pactusGetRawBondTransactionRequest": { + "type": "object", + "properties": { + "sender": { + "type": "string", + "description": "The sender's account address." + }, + "receiver": { + "type": "string", + "description": "The receiver's validator address." + }, + "stake": { + "type": "string", + "format": "int64", + "description": "The stake amount in NanoPAC. Must be greater than 0." + }, + "publicKey": { + "type": "string", + "description": "The public key of the validator." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." + } + }, + "description": "Request message for retrieving raw details of a bond transaction." + }, "pactusGetRawTransactionResponse": { "type": "object", "properties": { @@ -1802,6 +1710,64 @@ }, "description": "Response message containing raw transaction data." }, + "pactusGetRawTransferTransactionRequest": { + "type": "object", + "properties": { + "sender": { + "type": "string", + "description": "The sender's account address." + }, + "receiver": { + "type": "string", + "description": "The receiver's account address." + }, + "amount": { + "type": "string", + "format": "int64", + "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." + } + }, + "description": "Request message for retrieving raw details of a transfer transaction." + }, + "pactusGetRawUnbondTransactionRequest": { + "type": "object", + "properties": { + "validatorAddress": { + "type": "string", + "description": "The address of the validator to unbond from." + } + }, + "description": "Request message for retrieving raw details of an unbond transaction." + }, + "pactusGetRawWithdrawTransactionRequest": { + "type": "object", + "properties": { + "validatorAddress": { + "type": "string", + "description": "The address of the validator to withdraw from." + }, + "accountAddress": { + "type": "string", + "description": "The address of the account to withdraw to." + }, + "amount": { + "type": "string", + "format": "int64", + "description": "The withdrawal amount in NanoPAC. Must be greater than 0." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." + } + }, + "description": "Request message for retrieving raw details of a withdraw transaction." + }, "pactusGetTotalBalanceResponse": { "type": "object", "properties": { diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index b45e3d6d2..cf0fba253 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -104,50 +104,75 @@ func (s *transactionServer) CalculateFee(_ context.Context, }, nil } -func (s *transactionServer) GetRawTransferTransaction(_ context.Context, - req *pactus.GetRawTransferTransactionRequest, +func (s *transactionServer) GetRawTransaction(_ context.Context, + req *pactus.GetRawTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { - sender, err := crypto.AddressFromString(req.Sender) - if err != nil { - return nil, err + lockTime := s.getLockTime(req.LockTime) + + switch r := req.Transaction.(type) { + case *pactus.GetRawTransactionRequest_Transfer: + raw, err := s.handleRawTransfer(r, lockTime, req.Memo) + return &pactus.GetRawTransactionResponse{ + RawTransaction: hex.EncodeToString(raw), + }, err + case *pactus.GetRawTransactionRequest_Bond: + raw, err := s.handleRawBond(r, lockTime, req.Memo) + return &pactus.GetRawTransactionResponse{ + RawTransaction: hex.EncodeToString(raw), + }, err + case *pactus.GetRawTransactionRequest_Unbond: + raw, err := s.handleRawUnBond(r, lockTime, req.Memo) + return &pactus.GetRawTransactionResponse{ + RawTransaction: hex.EncodeToString(raw), + }, err + case *pactus.GetRawTransactionRequest_Withdraw: + raw, err := s.handleRawWithdraw(r, lockTime, req.Memo) + return &pactus.GetRawTransactionResponse{ + RawTransaction: hex.EncodeToString(raw), + }, err } - receiver, err := crypto.AddressFromString(req.Receiver) + return nil, status.Errorf(codes.InvalidArgument, "invalid transaction type") +} + +func (s *transactionServer) handleRawTransfer(r *pactus.GetRawTransactionRequest_Transfer, + lockTime uint32, + memo string, +) ([]byte, error) { + sender, err := crypto.AddressFromString(r.Transfer.Sender) if err != nil { return nil, err } - amt := amount.Amount(req.Amount) - fee := s.getFee(req.Fee, amt) - lockTime := s.getLockTime(req.LockTime) - - transferTx := tx.NewTransferTx(lockTime, sender, receiver, amt, fee, tx.WithMemo(req.Memo)) - rawTx, err := transferTx.Bytes() + receiver, err := crypto.AddressFromString(r.Transfer.Receiver) if err != nil { return nil, err } - return &pactus.GetRawTransactionResponse{ - RawTransaction: hex.EncodeToString(rawTx), - }, nil + amt := amount.Amount(r.Transfer.Amount) + fee := s.getFee(r.Transfer.Fee, amt) + + transferTx := tx.NewTransferTx(lockTime, sender, receiver, amt, fee, tx.WithMemo(memo)) + return transferTx.Bytes() } -func (s *transactionServer) GetRawBondTransaction(_ context.Context, - req *pactus.GetRawBondTransactionRequest, -) (*pactus.GetRawTransactionResponse, error) { - sender, err := crypto.AddressFromString(req.Sender) +func (s *transactionServer) handleRawBond(r *pactus.GetRawTransactionRequest_Bond, + lockTime uint32, + memo string, +) ([]byte, error) { + sender, err := crypto.AddressFromString(r.Bond.Sender) if err != nil { return nil, err } - receiver, err := crypto.AddressFromString(req.Receiver) + receiver, err := crypto.AddressFromString(r.Bond.Receiver) if err != nil { return nil, err } var publicKey *bls.PublicKey - if req.PublicKey != "" { - publicKey, err = bls.PublicKeyFromString(req.PublicKey) + if r.Bond.PublicKey != "" { + publicKey, err = bls.PublicKeyFromString(r.Bond.PublicKey) if err != nil { return nil, err } @@ -155,68 +180,45 @@ func (s *transactionServer) GetRawBondTransaction(_ context.Context, publicKey = nil } - amt := amount.Amount(req.Stake) - fee := s.getFee(req.Fee, amt) - lockTime := s.getLockTime(req.LockTime) - - bondTx := tx.NewBondTx(lockTime, sender, receiver, publicKey, amt, fee, tx.WithMemo(req.Memo)) - rawTx, err := bondTx.Bytes() - if err != nil { - return nil, err - } + amt := amount.Amount(r.Bond.Stake) + fee := s.getFee(r.Bond.Fee, amt) - return &pactus.GetRawTransactionResponse{ - RawTransaction: hex.EncodeToString(rawTx), - }, nil + bondTx := tx.NewBondTx(lockTime, sender, receiver, publicKey, amt, fee, tx.WithMemo(memo)) + return bondTx.Bytes() } -func (s *transactionServer) GetRawUnbondTransaction(_ context.Context, - req *pactus.GetRawUnbondTransactionRequest, -) (*pactus.GetRawTransactionResponse, error) { - validatorAddr, err := crypto.AddressFromString(req.ValidatorAddress) +func (s *transactionServer) handleRawUnBond(r *pactus.GetRawTransactionRequest_Unbond, + lockTime uint32, + memo string, +) ([]byte, error) { + validatorAddr, err := crypto.AddressFromString(r.Unbond.ValidatorAddress) if err != nil { return nil, err } - lockTime := s.getLockTime(req.LockTime) - - unbondTx := tx.NewUnbondTx(lockTime, validatorAddr, tx.WithMemo(req.Memo)) - rawTx, err := unbondTx.Bytes() - if err != nil { - return nil, err - } - - return &pactus.GetRawTransactionResponse{ - RawTransaction: hex.EncodeToString(rawTx), - }, nil + unbondTx := tx.NewUnbondTx(lockTime, validatorAddr, tx.WithMemo(memo)) + return unbondTx.Bytes() } -func (s *transactionServer) GetRawWithdrawTransaction(_ context.Context, - req *pactus.GetRawWithdrawTransactionRequest, -) (*pactus.GetRawTransactionResponse, error) { - validatorAddr, err := crypto.AddressFromString(req.ValidatorAddress) +func (s *transactionServer) handleRawWithdraw(r *pactus.GetRawTransactionRequest_Withdraw, + lockTime uint32, + memo string, +) ([]byte, error) { + validatorAddr, err := crypto.AddressFromString(r.Withdraw.ValidatorAddress) if err != nil { return nil, err } - accountAddr, err := crypto.AddressFromString(req.AccountAddress) + accountAddr, err := crypto.AddressFromString(r.Withdraw.AccountAddress) if err != nil { return nil, err } - amt := amount.Amount(req.Amount) - fee := s.getFee(req.Fee, amt) - lockTime := s.getLockTime(req.LockTime) - - withdrawTx := tx.NewWithdrawTx(lockTime, validatorAddr, accountAddr, amt, fee, tx.WithMemo(req.Memo)) - rawTx, err := withdrawTx.Bytes() - if err != nil { - return nil, err - } + amt := amount.Amount(r.Withdraw.Amount) + fee := s.getFee(r.Withdraw.Fee, amt) - return &pactus.GetRawTransactionResponse{ - RawTransaction: hex.EncodeToString(rawTx), - }, nil + withdrawTx := tx.NewWithdrawTx(lockTime, validatorAddr, accountAddr, amt, fee, tx.WithMemo(memo)) + return withdrawTx.Bytes() } func (s *transactionServer) getFee(f int64, amt amount.Amount) amount.Amount { diff --git a/www/grpc/transaction_test.go b/www/grpc/transaction_test.go index 7a3a9dd08..baa8e9312 100644 --- a/www/grpc/transaction_test.go +++ b/www/grpc/transaction_test.go @@ -128,12 +128,16 @@ func TestGetRawTransaction(t *testing.T) { t.Run("Transfer", func(t *testing.T) { amt := td.RandAmount() - res, err := client.GetRawTransferTransaction(context.Background(), - &pactus.GetRawTransferTransactionRequest{ - Sender: td.RandAccAddress().String(), - Receiver: td.RandAccAddress().String(), - Amount: amt.ToNanoPAC(), - Memo: td.RandString(32), + res, err := client.GetRawTransaction(context.Background(), + &pactus.GetRawTransactionRequest{ + Transaction: &pactus.GetRawTransactionRequest_Transfer{ + Transfer: &pactus.GetRawTransferTransactionRequest{ + Sender: td.RandAccAddress().String(), + Receiver: td.RandAccAddress().String(), + Amount: amt.ToNanoPAC(), + }, + }, + Memo: td.RandString(32), }) assert.NoError(t, err) assert.NotEmpty(t, res.RawTransaction) @@ -152,13 +156,17 @@ func TestGetRawTransaction(t *testing.T) { amt := td.RandAmount() pub, _ := td.RandBLSKeyPair() - res, err := client.GetRawBondTransaction(context.Background(), - &pactus.GetRawBondTransactionRequest{ - Sender: td.RandAccAddress().String(), - Receiver: td.RandValAddress().String(), - Stake: amt.ToNanoPAC(), - PublicKey: pub.String(), - Memo: td.RandString(32), + res, err := client.GetRawTransaction(context.Background(), + &pactus.GetRawTransactionRequest{ + Transaction: &pactus.GetRawTransactionRequest_Bond{ + Bond: &pactus.GetRawBondTransactionRequest{ + Sender: td.RandAccAddress().String(), + Receiver: td.RandValAddress().String(), + Stake: amt.ToNanoPAC(), + PublicKey: pub.String(), + }, + }, + Memo: td.RandString(32), }) assert.NoError(t, err) assert.NotEmpty(t, res.RawTransaction) @@ -174,10 +182,14 @@ func TestGetRawTransaction(t *testing.T) { }) t.Run("Unbond", func(t *testing.T) { - res, err := client.GetRawUnbondTransaction(context.Background(), - &pactus.GetRawUnbondTransactionRequest{ - ValidatorAddress: td.RandValAddress().String(), - Memo: td.RandString(32), + res, err := client.GetRawTransaction(context.Background(), + &pactus.GetRawTransactionRequest{ + Transaction: &pactus.GetRawTransactionRequest_Unbond{ + Unbond: &pactus.GetRawUnbondTransactionRequest{ + ValidatorAddress: td.RandValAddress().String(), + }, + }, + Memo: td.RandString(32), }) assert.NoError(t, err) assert.NotEmpty(t, res.RawTransaction) @@ -193,12 +205,16 @@ func TestGetRawTransaction(t *testing.T) { t.Run("Withdraw", func(t *testing.T) { amt := td.RandAmount() - res, err := client.GetRawWithdrawTransaction(context.Background(), - &pactus.GetRawWithdrawTransactionRequest{ - ValidatorAddress: td.RandValAddress().String(), - AccountAddress: td.RandAccAddress().String(), - Amount: amt.ToNanoPAC(), - Memo: td.RandString(32), + res, err := client.GetRawTransaction(context.Background(), + &pactus.GetRawTransactionRequest{ + Transaction: &pactus.GetRawTransactionRequest_Withdraw{ + Withdraw: &pactus.GetRawWithdrawTransactionRequest{ + ValidatorAddress: td.RandValAddress().String(), + AccountAddress: td.RandAccAddress().String(), + Amount: amt.ToNanoPAC(), + }, + }, + Memo: td.RandString(32), }) assert.NoError(t, err) From a1a4359ac4071823b6d9bed95e7708a54eda6d16 Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 10 Sep 2024 09:52:09 +0330 Subject: [PATCH 02/17] fix: regenrated proto buf files --- www/grpc/gen/dart/blockchain.pb.dart | 1994 ++ www/grpc/gen/dart/blockchain.pbenum.dart | 47 + www/grpc/gen/dart/blockchain.pbjson.dart | 415 + www/grpc/gen/dart/blockchain.pbserver.dart | 68 + www/grpc/gen/dart/network.pb.dart | 751 + www/grpc/gen/dart/network.pbenum.dart | 7 + www/grpc/gen/dart/network.pbjson.dart | 170 + www/grpc/gen/dart/network.pbserver.dart | 41 + www/grpc/gen/dart/transaction.pb.dart | 1533 + www/grpc/gen/dart/transaction.pbenum.dart | 49 + www/grpc/gen/dart/transaction.pbjson.dart | 298 + www/grpc/gen/dart/transaction.pbserver.dart | 47 + www/grpc/gen/dart/utils.pb.dart | 256 + www/grpc/gen/dart/utils.pbenum.dart | 7 + www/grpc/gen/dart/utils.pbjson.dart | 71 + www/grpc/gen/dart/utils.pbserver.dart | 41 + www/grpc/gen/dart/wallet.pb.dart | 1401 + www/grpc/gen/dart/wallet.pbenum.dart | 30 + www/grpc/gen/dart/wallet.pbjson.dart | 309 + www/grpc/gen/dart/wallet.pbserver.dart | 65 + www/grpc/gen/docs/grpc.md | 3063 ++ www/grpc/gen/docs/json-rpc.md | 2969 ++ www/grpc/gen/go/blockchain.cobra.pb.go | 493 + www/grpc/gen/go/blockchain.pb.go | 2658 ++ www/grpc/gen/go/blockchain.pb.gw.go | 920 + www/grpc/gen/go/blockchain_grpc.pb.go | 524 + www/grpc/gen/go/blockchain_jgw.pb.go | 227 + www/grpc/gen/go/network.cobra.pb.go | 109 + www/grpc/gen/go/network.pb.go | 933 + www/grpc/gen/go/network.pb.gw.go | 242 + www/grpc/gen/go/network_grpc.pb.go | 154 + www/grpc/gen/go/network_jgw.pb.go | 74 + www/grpc/gen/go/transaction.cobra.pb.go | 241 + www/grpc/gen/go/transaction.pb.go | 1999 ++ www/grpc/gen/go/transaction.pb.gw.go | 434 + www/grpc/gen/go/transaction_grpc.pb.go | 240 + www/grpc/gen/go/transaction_jgw.pb.go | 108 + www/grpc/gen/go/utils.cobra.pb.go | 114 + www/grpc/gen/go/utils.pb.go | 394 + www/grpc/gen/go/utils.pb.gw.go | 260 + www/grpc/gen/go/utils_grpc.pb.go | 156 + www/grpc/gen/go/utils_jgw.pb.go | 74 + www/grpc/gen/go/wallet.cobra.pb.go | 467 + www/grpc/gen/go/wallet.pb.go | 1919 ++ www/grpc/gen/go/wallet.pb.gw.go | 869 + www/grpc/gen/go/wallet_grpc.pb.go | 478 + www/grpc/gen/go/wallet_jgw.pb.go | 210 + .../pactus/blockchain/BlockchainGrpc.java | 1183 + .../blockchain/BlockchainOuterClass.java | 25014 ++++++++++++++++ .../gen/java/pactus/network/NetworkGrpc.java | 389 + .../pactus/network/NetworkOuterClass.java | 10189 +++++++ .../pactus/transaction/TransactionGrpc.java | 574 + .../transaction/TransactionOuterClass.java | 17954 +++++++++++ www/grpc/gen/java/pactus/utils/UtilsGrpc.java | 394 + .../java/pactus/utils/UtilsOuterClass.java | 2927 ++ .../gen/java/pactus/wallet/WalletGrpc.java | 1081 + .../java/pactus/wallet/WalletOuterClass.java | 17689 +++++++++++ www/grpc/gen/js/blockchain_grpc_pb.js | 381 + www/grpc/gen/js/blockchain_pb.js | 6046 ++++ www/grpc/gen/js/network_grpc_pb.js | 80 + www/grpc/gen/js/network_pb.js | 2193 ++ www/grpc/gen/js/transaction_grpc_pb.js | 151 + www/grpc/gen/js/transaction_pb.js | 4311 +++ www/grpc/gen/js/utils_grpc_pb.js | 81 + www/grpc/gen/js/utils_pb.js | 722 + www/grpc/gen/js/wallet_grpc_pb.js | 354 + www/grpc/gen/js/wallet_pb.js | 4092 +++ www/grpc/gen/python/blockchain_pb2.py | 87 + www/grpc/gen/python/blockchain_pb2.pyi | 290 + www/grpc/gen/python/blockchain_pb2_grpc.py | 415 + www/grpc/gen/python/network_pb2.py | 54 + www/grpc/gen/python/network_pb2.pyi | 142 + www/grpc/gen/python/network_pb2_grpc.py | 104 + www/grpc/gen/python/transaction_pb2.py | 66 + www/grpc/gen/python/transaction_pb2.pyi | 219 + www/grpc/gen/python/transaction_pb2_grpc.py | 177 + www/grpc/gen/python/utils_pb2.py | 34 + www/grpc/gen/python/utils_pb2.pyi | 35 + www/grpc/gen/python/utils_pb2_grpc.py | 107 + www/grpc/gen/python/wallet_pb2.py | 73 + www/grpc/gen/python/wallet_pb2.pyi | 195 + www/grpc/gen/python/wallet_pb2_grpc.py | 377 + www/grpc/gen/rust/pactus.rs | 1282 + www/grpc/gen/rust/pactus.serde.rs | 10289 +++++++ www/grpc/gen/rust/pactus.tonic.rs | 3329 ++ 85 files changed, 141009 insertions(+) create mode 100644 www/grpc/gen/dart/blockchain.pb.dart create mode 100644 www/grpc/gen/dart/blockchain.pbenum.dart create mode 100644 www/grpc/gen/dart/blockchain.pbjson.dart create mode 100644 www/grpc/gen/dart/blockchain.pbserver.dart create mode 100644 www/grpc/gen/dart/network.pb.dart create mode 100644 www/grpc/gen/dart/network.pbenum.dart create mode 100644 www/grpc/gen/dart/network.pbjson.dart create mode 100644 www/grpc/gen/dart/network.pbserver.dart create mode 100644 www/grpc/gen/dart/transaction.pb.dart create mode 100644 www/grpc/gen/dart/transaction.pbenum.dart create mode 100644 www/grpc/gen/dart/transaction.pbjson.dart create mode 100644 www/grpc/gen/dart/transaction.pbserver.dart create mode 100644 www/grpc/gen/dart/utils.pb.dart create mode 100644 www/grpc/gen/dart/utils.pbenum.dart create mode 100644 www/grpc/gen/dart/utils.pbjson.dart create mode 100644 www/grpc/gen/dart/utils.pbserver.dart create mode 100644 www/grpc/gen/dart/wallet.pb.dart create mode 100644 www/grpc/gen/dart/wallet.pbenum.dart create mode 100644 www/grpc/gen/dart/wallet.pbjson.dart create mode 100644 www/grpc/gen/dart/wallet.pbserver.dart create mode 100644 www/grpc/gen/docs/grpc.md create mode 100644 www/grpc/gen/docs/json-rpc.md create mode 100644 www/grpc/gen/go/blockchain.cobra.pb.go create mode 100644 www/grpc/gen/go/blockchain.pb.go create mode 100644 www/grpc/gen/go/blockchain.pb.gw.go create mode 100644 www/grpc/gen/go/blockchain_grpc.pb.go create mode 100644 www/grpc/gen/go/blockchain_jgw.pb.go create mode 100644 www/grpc/gen/go/network.cobra.pb.go create mode 100644 www/grpc/gen/go/network.pb.go create mode 100644 www/grpc/gen/go/network.pb.gw.go create mode 100644 www/grpc/gen/go/network_grpc.pb.go create mode 100644 www/grpc/gen/go/network_jgw.pb.go create mode 100644 www/grpc/gen/go/transaction.cobra.pb.go create mode 100644 www/grpc/gen/go/transaction.pb.go create mode 100644 www/grpc/gen/go/transaction.pb.gw.go create mode 100644 www/grpc/gen/go/transaction_grpc.pb.go create mode 100644 www/grpc/gen/go/transaction_jgw.pb.go create mode 100644 www/grpc/gen/go/utils.cobra.pb.go create mode 100644 www/grpc/gen/go/utils.pb.go create mode 100644 www/grpc/gen/go/utils.pb.gw.go create mode 100644 www/grpc/gen/go/utils_grpc.pb.go create mode 100644 www/grpc/gen/go/utils_jgw.pb.go create mode 100644 www/grpc/gen/go/wallet.cobra.pb.go create mode 100644 www/grpc/gen/go/wallet.pb.go create mode 100644 www/grpc/gen/go/wallet.pb.gw.go create mode 100644 www/grpc/gen/go/wallet_grpc.pb.go create mode 100644 www/grpc/gen/go/wallet_jgw.pb.go create mode 100644 www/grpc/gen/java/pactus/blockchain/BlockchainGrpc.java create mode 100644 www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java create mode 100644 www/grpc/gen/java/pactus/network/NetworkGrpc.java create mode 100644 www/grpc/gen/java/pactus/network/NetworkOuterClass.java create mode 100644 www/grpc/gen/java/pactus/transaction/TransactionGrpc.java create mode 100644 www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java create mode 100644 www/grpc/gen/java/pactus/utils/UtilsGrpc.java create mode 100644 www/grpc/gen/java/pactus/utils/UtilsOuterClass.java create mode 100644 www/grpc/gen/java/pactus/wallet/WalletGrpc.java create mode 100644 www/grpc/gen/java/pactus/wallet/WalletOuterClass.java create mode 100644 www/grpc/gen/js/blockchain_grpc_pb.js create mode 100644 www/grpc/gen/js/blockchain_pb.js create mode 100644 www/grpc/gen/js/network_grpc_pb.js create mode 100644 www/grpc/gen/js/network_pb.js create mode 100644 www/grpc/gen/js/transaction_grpc_pb.js create mode 100644 www/grpc/gen/js/transaction_pb.js create mode 100644 www/grpc/gen/js/utils_grpc_pb.js create mode 100644 www/grpc/gen/js/utils_pb.js create mode 100644 www/grpc/gen/js/wallet_grpc_pb.js create mode 100644 www/grpc/gen/js/wallet_pb.js create mode 100644 www/grpc/gen/python/blockchain_pb2.py create mode 100644 www/grpc/gen/python/blockchain_pb2.pyi create mode 100644 www/grpc/gen/python/blockchain_pb2_grpc.py create mode 100644 www/grpc/gen/python/network_pb2.py create mode 100644 www/grpc/gen/python/network_pb2.pyi create mode 100644 www/grpc/gen/python/network_pb2_grpc.py create mode 100644 www/grpc/gen/python/transaction_pb2.py create mode 100644 www/grpc/gen/python/transaction_pb2.pyi create mode 100644 www/grpc/gen/python/transaction_pb2_grpc.py create mode 100644 www/grpc/gen/python/utils_pb2.py create mode 100644 www/grpc/gen/python/utils_pb2.pyi create mode 100644 www/grpc/gen/python/utils_pb2_grpc.py create mode 100644 www/grpc/gen/python/wallet_pb2.py create mode 100644 www/grpc/gen/python/wallet_pb2.pyi create mode 100644 www/grpc/gen/python/wallet_pb2_grpc.py create mode 100644 www/grpc/gen/rust/pactus.rs create mode 100644 www/grpc/gen/rust/pactus.serde.rs create mode 100644 www/grpc/gen/rust/pactus.tonic.rs diff --git a/www/grpc/gen/dart/blockchain.pb.dart b/www/grpc/gen/dart/blockchain.pb.dart new file mode 100644 index 000000000..32465c8d3 --- /dev/null +++ b/www/grpc/gen/dart/blockchain.pb.dart @@ -0,0 +1,1994 @@ +/// +// Generated code. Do not modify. +// source: blockchain.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'transaction.pb.dart' as $0; + +import 'blockchain.pbenum.dart'; +import 'transaction.pbenum.dart' as $0; + +export 'blockchain.pbenum.dart'; + +class GetAccountRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetAccountRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..hasRequiredFields = false + ; + + GetAccountRequest._() : super(); + factory GetAccountRequest({ + $core.String? address, + }) { + final _result = create(); + if (address != null) { + _result.address = address; + } + return _result; + } + factory GetAccountRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetAccountRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetAccountRequest clone() => GetAccountRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetAccountRequest copyWith(void Function(GetAccountRequest) updates) => super.copyWith((message) => updates(message as GetAccountRequest)) as GetAccountRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetAccountRequest create() => GetAccountRequest._(); + GetAccountRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetAccountRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetAccountRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get address => $_getSZ(0); + @$pb.TagNumber(1) + set address($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasAddress() => $_has(0); + @$pb.TagNumber(1) + void clearAddress() => clearField(1); +} + +class GetAccountResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetAccountResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'account', subBuilder: AccountInfo.create) + ..hasRequiredFields = false + ; + + GetAccountResponse._() : super(); + factory GetAccountResponse({ + AccountInfo? account, + }) { + final _result = create(); + if (account != null) { + _result.account = account; + } + return _result; + } + factory GetAccountResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetAccountResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetAccountResponse clone() => GetAccountResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetAccountResponse copyWith(void Function(GetAccountResponse) updates) => super.copyWith((message) => updates(message as GetAccountResponse)) as GetAccountResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetAccountResponse create() => GetAccountResponse._(); + GetAccountResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetAccountResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetAccountResponse? _defaultInstance; + + @$pb.TagNumber(1) + AccountInfo get account => $_getN(0); + @$pb.TagNumber(1) + set account(AccountInfo v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasAccount() => $_has(0); + @$pb.TagNumber(1) + void clearAccount() => clearField(1); + @$pb.TagNumber(1) + AccountInfo ensureAccount() => $_ensure(0); +} + +class GetValidatorAddressesRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorAddressesRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + GetValidatorAddressesRequest._() : super(); + factory GetValidatorAddressesRequest() => create(); + factory GetValidatorAddressesRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidatorAddressesRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidatorAddressesRequest clone() => GetValidatorAddressesRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidatorAddressesRequest copyWith(void Function(GetValidatorAddressesRequest) updates) => super.copyWith((message) => updates(message as GetValidatorAddressesRequest)) as GetValidatorAddressesRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetValidatorAddressesRequest create() => GetValidatorAddressesRequest._(); + GetValidatorAddressesRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetValidatorAddressesRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetValidatorAddressesRequest? _defaultInstance; +} + +class GetValidatorAddressesResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorAddressesResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..pPS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'addresses') + ..hasRequiredFields = false + ; + + GetValidatorAddressesResponse._() : super(); + factory GetValidatorAddressesResponse({ + $core.Iterable<$core.String>? addresses, + }) { + final _result = create(); + if (addresses != null) { + _result.addresses.addAll(addresses); + } + return _result; + } + factory GetValidatorAddressesResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidatorAddressesResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidatorAddressesResponse clone() => GetValidatorAddressesResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidatorAddressesResponse copyWith(void Function(GetValidatorAddressesResponse) updates) => super.copyWith((message) => updates(message as GetValidatorAddressesResponse)) as GetValidatorAddressesResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetValidatorAddressesResponse create() => GetValidatorAddressesResponse._(); + GetValidatorAddressesResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetValidatorAddressesResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetValidatorAddressesResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$core.String> get addresses => $_getList(0); +} + +class GetValidatorRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..hasRequiredFields = false + ; + + GetValidatorRequest._() : super(); + factory GetValidatorRequest({ + $core.String? address, + }) { + final _result = create(); + if (address != null) { + _result.address = address; + } + return _result; + } + factory GetValidatorRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidatorRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidatorRequest clone() => GetValidatorRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidatorRequest copyWith(void Function(GetValidatorRequest) updates) => super.copyWith((message) => updates(message as GetValidatorRequest)) as GetValidatorRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetValidatorRequest create() => GetValidatorRequest._(); + GetValidatorRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetValidatorRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetValidatorRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get address => $_getSZ(0); + @$pb.TagNumber(1) + set address($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasAddress() => $_has(0); + @$pb.TagNumber(1) + void clearAddress() => clearField(1); +} + +class GetValidatorByNumberRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorByNumberRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'number', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + GetValidatorByNumberRequest._() : super(); + factory GetValidatorByNumberRequest({ + $core.int? number, + }) { + final _result = create(); + if (number != null) { + _result.number = number; + } + return _result; + } + factory GetValidatorByNumberRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidatorByNumberRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidatorByNumberRequest clone() => GetValidatorByNumberRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidatorByNumberRequest copyWith(void Function(GetValidatorByNumberRequest) updates) => super.copyWith((message) => updates(message as GetValidatorByNumberRequest)) as GetValidatorByNumberRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetValidatorByNumberRequest create() => GetValidatorByNumberRequest._(); + GetValidatorByNumberRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetValidatorByNumberRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetValidatorByNumberRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get number => $_getIZ(0); + @$pb.TagNumber(1) + set number($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasNumber() => $_has(0); + @$pb.TagNumber(1) + void clearNumber() => clearField(1); +} + +class GetValidatorResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validator', subBuilder: ValidatorInfo.create) + ..hasRequiredFields = false + ; + + GetValidatorResponse._() : super(); + factory GetValidatorResponse({ + ValidatorInfo? validator, + }) { + final _result = create(); + if (validator != null) { + _result.validator = validator; + } + return _result; + } + factory GetValidatorResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidatorResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidatorResponse clone() => GetValidatorResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidatorResponse copyWith(void Function(GetValidatorResponse) updates) => super.copyWith((message) => updates(message as GetValidatorResponse)) as GetValidatorResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetValidatorResponse create() => GetValidatorResponse._(); + GetValidatorResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetValidatorResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetValidatorResponse? _defaultInstance; + + @$pb.TagNumber(1) + ValidatorInfo get validator => $_getN(0); + @$pb.TagNumber(1) + set validator(ValidatorInfo v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasValidator() => $_has(0); + @$pb.TagNumber(1) + void clearValidator() => clearField(1); + @$pb.TagNumber(1) + ValidatorInfo ensureValidator() => $_ensure(0); +} + +class GetPublicKeyRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPublicKeyRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..hasRequiredFields = false + ; + + GetPublicKeyRequest._() : super(); + factory GetPublicKeyRequest({ + $core.String? address, + }) { + final _result = create(); + if (address != null) { + _result.address = address; + } + return _result; + } + factory GetPublicKeyRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPublicKeyRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPublicKeyRequest clone() => GetPublicKeyRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPublicKeyRequest copyWith(void Function(GetPublicKeyRequest) updates) => super.copyWith((message) => updates(message as GetPublicKeyRequest)) as GetPublicKeyRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPublicKeyRequest create() => GetPublicKeyRequest._(); + GetPublicKeyRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPublicKeyRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPublicKeyRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get address => $_getSZ(0); + @$pb.TagNumber(1) + set address($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasAddress() => $_has(0); + @$pb.TagNumber(1) + void clearAddress() => clearField(1); +} + +class GetPublicKeyResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetPublicKeyResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') + ..hasRequiredFields = false + ; + + GetPublicKeyResponse._() : super(); + factory GetPublicKeyResponse({ + $core.String? publicKey, + }) { + final _result = create(); + if (publicKey != null) { + _result.publicKey = publicKey; + } + return _result; + } + factory GetPublicKeyResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetPublicKeyResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetPublicKeyResponse clone() => GetPublicKeyResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetPublicKeyResponse copyWith(void Function(GetPublicKeyResponse) updates) => super.copyWith((message) => updates(message as GetPublicKeyResponse)) as GetPublicKeyResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetPublicKeyResponse create() => GetPublicKeyResponse._(); + GetPublicKeyResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetPublicKeyResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetPublicKeyResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get publicKey => $_getSZ(0); + @$pb.TagNumber(1) + set publicKey($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPublicKey() => $_has(0); + @$pb.TagNumber(1) + void clearPublicKey() => clearField(1); +} + +class GetBlockRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) + ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'verbosity', $pb.PbFieldType.OE, defaultOrMaker: BlockVerbosity.BLOCK_DATA, valueOf: BlockVerbosity.valueOf, enumValues: BlockVerbosity.values) + ..hasRequiredFields = false + ; + + GetBlockRequest._() : super(); + factory GetBlockRequest({ + $core.int? height, + BlockVerbosity? verbosity, + }) { + final _result = create(); + if (height != null) { + _result.height = height; + } + if (verbosity != null) { + _result.verbosity = verbosity; + } + return _result; + } + factory GetBlockRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBlockRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBlockRequest clone() => GetBlockRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBlockRequest copyWith(void Function(GetBlockRequest) updates) => super.copyWith((message) => updates(message as GetBlockRequest)) as GetBlockRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetBlockRequest create() => GetBlockRequest._(); + GetBlockRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBlockRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBlockRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get height => $_getIZ(0); + @$pb.TagNumber(1) + set height($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasHeight() => $_has(0); + @$pb.TagNumber(1) + void clearHeight() => clearField(1); + + @$pb.TagNumber(2) + BlockVerbosity get verbosity => $_getN(1); + @$pb.TagNumber(2) + set verbosity(BlockVerbosity v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasVerbosity() => $_has(1); + @$pb.TagNumber(2) + void clearVerbosity() => clearField(2); +} + +class GetBlockResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'data') + ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockTime', $pb.PbFieldType.OU3) + ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'header', subBuilder: BlockHeaderInfo.create) + ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'prevCert', subBuilder: CertificateInfo.create) + ..pc<$0.TransactionInfo>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'txs', $pb.PbFieldType.PM, subBuilder: $0.TransactionInfo.create) + ..hasRequiredFields = false + ; + + GetBlockResponse._() : super(); + factory GetBlockResponse({ + $core.int? height, + $core.String? hash, + $core.String? data, + $core.int? blockTime, + BlockHeaderInfo? header, + CertificateInfo? prevCert, + $core.Iterable<$0.TransactionInfo>? txs, + }) { + final _result = create(); + if (height != null) { + _result.height = height; + } + if (hash != null) { + _result.hash = hash; + } + if (data != null) { + _result.data = data; + } + if (blockTime != null) { + _result.blockTime = blockTime; + } + if (header != null) { + _result.header = header; + } + if (prevCert != null) { + _result.prevCert = prevCert; + } + if (txs != null) { + _result.txs.addAll(txs); + } + return _result; + } + factory GetBlockResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBlockResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBlockResponse clone() => GetBlockResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBlockResponse copyWith(void Function(GetBlockResponse) updates) => super.copyWith((message) => updates(message as GetBlockResponse)) as GetBlockResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetBlockResponse create() => GetBlockResponse._(); + GetBlockResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBlockResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBlockResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get height => $_getIZ(0); + @$pb.TagNumber(1) + set height($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasHeight() => $_has(0); + @$pb.TagNumber(1) + void clearHeight() => clearField(1); + + @$pb.TagNumber(2) + $core.String get hash => $_getSZ(1); + @$pb.TagNumber(2) + set hash($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasHash() => $_has(1); + @$pb.TagNumber(2) + void clearHash() => clearField(2); + + @$pb.TagNumber(3) + $core.String get data => $_getSZ(2); + @$pb.TagNumber(3) + set data($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasData() => $_has(2); + @$pb.TagNumber(3) + void clearData() => clearField(3); + + @$pb.TagNumber(4) + $core.int get blockTime => $_getIZ(3); + @$pb.TagNumber(4) + set blockTime($core.int v) { $_setUnsignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasBlockTime() => $_has(3); + @$pb.TagNumber(4) + void clearBlockTime() => clearField(4); + + @$pb.TagNumber(5) + BlockHeaderInfo get header => $_getN(4); + @$pb.TagNumber(5) + set header(BlockHeaderInfo v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasHeader() => $_has(4); + @$pb.TagNumber(5) + void clearHeader() => clearField(5); + @$pb.TagNumber(5) + BlockHeaderInfo ensureHeader() => $_ensure(4); + + @$pb.TagNumber(6) + CertificateInfo get prevCert => $_getN(5); + @$pb.TagNumber(6) + set prevCert(CertificateInfo v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasPrevCert() => $_has(5); + @$pb.TagNumber(6) + void clearPrevCert() => clearField(6); + @$pb.TagNumber(6) + CertificateInfo ensurePrevCert() => $_ensure(5); + + @$pb.TagNumber(7) + $core.List<$0.TransactionInfo> get txs => $_getList(6); +} + +class GetBlockHashRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockHashRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) + ..hasRequiredFields = false + ; + + GetBlockHashRequest._() : super(); + factory GetBlockHashRequest({ + $core.int? height, + }) { + final _result = create(); + if (height != null) { + _result.height = height; + } + return _result; + } + factory GetBlockHashRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBlockHashRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBlockHashRequest clone() => GetBlockHashRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBlockHashRequest copyWith(void Function(GetBlockHashRequest) updates) => super.copyWith((message) => updates(message as GetBlockHashRequest)) as GetBlockHashRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetBlockHashRequest create() => GetBlockHashRequest._(); + GetBlockHashRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBlockHashRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBlockHashRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get height => $_getIZ(0); + @$pb.TagNumber(1) + set height($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasHeight() => $_has(0); + @$pb.TagNumber(1) + void clearHeight() => clearField(1); +} + +class GetBlockHashResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockHashResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') + ..hasRequiredFields = false + ; + + GetBlockHashResponse._() : super(); + factory GetBlockHashResponse({ + $core.String? hash, + }) { + final _result = create(); + if (hash != null) { + _result.hash = hash; + } + return _result; + } + factory GetBlockHashResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBlockHashResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBlockHashResponse clone() => GetBlockHashResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBlockHashResponse copyWith(void Function(GetBlockHashResponse) updates) => super.copyWith((message) => updates(message as GetBlockHashResponse)) as GetBlockHashResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetBlockHashResponse create() => GetBlockHashResponse._(); + GetBlockHashResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBlockHashResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBlockHashResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get hash => $_getSZ(0); + @$pb.TagNumber(1) + set hash($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasHash() => $_has(0); + @$pb.TagNumber(1) + void clearHash() => clearField(1); +} + +class GetBlockHeightRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockHeightRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') + ..hasRequiredFields = false + ; + + GetBlockHeightRequest._() : super(); + factory GetBlockHeightRequest({ + $core.String? hash, + }) { + final _result = create(); + if (hash != null) { + _result.hash = hash; + } + return _result; + } + factory GetBlockHeightRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBlockHeightRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBlockHeightRequest clone() => GetBlockHeightRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBlockHeightRequest copyWith(void Function(GetBlockHeightRequest) updates) => super.copyWith((message) => updates(message as GetBlockHeightRequest)) as GetBlockHeightRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetBlockHeightRequest create() => GetBlockHeightRequest._(); + GetBlockHeightRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBlockHeightRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBlockHeightRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get hash => $_getSZ(0); + @$pb.TagNumber(1) + set hash($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasHash() => $_has(0); + @$pb.TagNumber(1) + void clearHash() => clearField(1); +} + +class GetBlockHeightResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockHeightResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) + ..hasRequiredFields = false + ; + + GetBlockHeightResponse._() : super(); + factory GetBlockHeightResponse({ + $core.int? height, + }) { + final _result = create(); + if (height != null) { + _result.height = height; + } + return _result; + } + factory GetBlockHeightResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBlockHeightResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBlockHeightResponse clone() => GetBlockHeightResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBlockHeightResponse copyWith(void Function(GetBlockHeightResponse) updates) => super.copyWith((message) => updates(message as GetBlockHeightResponse)) as GetBlockHeightResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetBlockHeightResponse create() => GetBlockHeightResponse._(); + GetBlockHeightResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBlockHeightResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBlockHeightResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get height => $_getIZ(0); + @$pb.TagNumber(1) + set height($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasHeight() => $_has(0); + @$pb.TagNumber(1) + void clearHeight() => clearField(1); +} + +class GetBlockchainInfoRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockchainInfoRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + GetBlockchainInfoRequest._() : super(); + factory GetBlockchainInfoRequest() => create(); + factory GetBlockchainInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBlockchainInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBlockchainInfoRequest clone() => GetBlockchainInfoRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBlockchainInfoRequest copyWith(void Function(GetBlockchainInfoRequest) updates) => super.copyWith((message) => updates(message as GetBlockchainInfoRequest)) as GetBlockchainInfoRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetBlockchainInfoRequest create() => GetBlockchainInfoRequest._(); + GetBlockchainInfoRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBlockchainInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBlockchainInfoRequest? _defaultInstance; +} + +class GetBlockchainInfoResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetBlockchainInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastBlockHeight', $pb.PbFieldType.OU3) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastBlockHash') + ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalAccounts', $pb.PbFieldType.O3) + ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalValidators', $pb.PbFieldType.O3) + ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalPower') + ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'committeePower') + ..pc(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'committeeValidators', $pb.PbFieldType.PM, subBuilder: ValidatorInfo.create) + ..aOB(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isPruned') + ..a<$core.int>(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'pruningHeight', $pb.PbFieldType.OU3) + ..aInt64(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastBlockTime') + ..hasRequiredFields = false + ; + + GetBlockchainInfoResponse._() : super(); + factory GetBlockchainInfoResponse({ + $core.int? lastBlockHeight, + $core.String? lastBlockHash, + $core.int? totalAccounts, + $core.int? totalValidators, + $fixnum.Int64? totalPower, + $fixnum.Int64? committeePower, + $core.Iterable? committeeValidators, + $core.bool? isPruned, + $core.int? pruningHeight, + $fixnum.Int64? lastBlockTime, + }) { + final _result = create(); + if (lastBlockHeight != null) { + _result.lastBlockHeight = lastBlockHeight; + } + if (lastBlockHash != null) { + _result.lastBlockHash = lastBlockHash; + } + if (totalAccounts != null) { + _result.totalAccounts = totalAccounts; + } + if (totalValidators != null) { + _result.totalValidators = totalValidators; + } + if (totalPower != null) { + _result.totalPower = totalPower; + } + if (committeePower != null) { + _result.committeePower = committeePower; + } + if (committeeValidators != null) { + _result.committeeValidators.addAll(committeeValidators); + } + if (isPruned != null) { + _result.isPruned = isPruned; + } + if (pruningHeight != null) { + _result.pruningHeight = pruningHeight; + } + if (lastBlockTime != null) { + _result.lastBlockTime = lastBlockTime; + } + return _result; + } + factory GetBlockchainInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetBlockchainInfoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetBlockchainInfoResponse clone() => GetBlockchainInfoResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetBlockchainInfoResponse copyWith(void Function(GetBlockchainInfoResponse) updates) => super.copyWith((message) => updates(message as GetBlockchainInfoResponse)) as GetBlockchainInfoResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetBlockchainInfoResponse create() => GetBlockchainInfoResponse._(); + GetBlockchainInfoResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetBlockchainInfoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetBlockchainInfoResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get lastBlockHeight => $_getIZ(0); + @$pb.TagNumber(1) + set lastBlockHeight($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasLastBlockHeight() => $_has(0); + @$pb.TagNumber(1) + void clearLastBlockHeight() => clearField(1); + + @$pb.TagNumber(2) + $core.String get lastBlockHash => $_getSZ(1); + @$pb.TagNumber(2) + set lastBlockHash($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasLastBlockHash() => $_has(1); + @$pb.TagNumber(2) + void clearLastBlockHash() => clearField(2); + + @$pb.TagNumber(3) + $core.int get totalAccounts => $_getIZ(2); + @$pb.TagNumber(3) + set totalAccounts($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasTotalAccounts() => $_has(2); + @$pb.TagNumber(3) + void clearTotalAccounts() => clearField(3); + + @$pb.TagNumber(4) + $core.int get totalValidators => $_getIZ(3); + @$pb.TagNumber(4) + set totalValidators($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasTotalValidators() => $_has(3); + @$pb.TagNumber(4) + void clearTotalValidators() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get totalPower => $_getI64(4); + @$pb.TagNumber(5) + set totalPower($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasTotalPower() => $_has(4); + @$pb.TagNumber(5) + void clearTotalPower() => clearField(5); + + @$pb.TagNumber(6) + $fixnum.Int64 get committeePower => $_getI64(5); + @$pb.TagNumber(6) + set committeePower($fixnum.Int64 v) { $_setInt64(5, v); } + @$pb.TagNumber(6) + $core.bool hasCommitteePower() => $_has(5); + @$pb.TagNumber(6) + void clearCommitteePower() => clearField(6); + + @$pb.TagNumber(7) + $core.List get committeeValidators => $_getList(6); + + @$pb.TagNumber(8) + $core.bool get isPruned => $_getBF(7); + @$pb.TagNumber(8) + set isPruned($core.bool v) { $_setBool(7, v); } + @$pb.TagNumber(8) + $core.bool hasIsPruned() => $_has(7); + @$pb.TagNumber(8) + void clearIsPruned() => clearField(8); + + @$pb.TagNumber(9) + $core.int get pruningHeight => $_getIZ(8); + @$pb.TagNumber(9) + set pruningHeight($core.int v) { $_setUnsignedInt32(8, v); } + @$pb.TagNumber(9) + $core.bool hasPruningHeight() => $_has(8); + @$pb.TagNumber(9) + void clearPruningHeight() => clearField(9); + + @$pb.TagNumber(10) + $fixnum.Int64 get lastBlockTime => $_getI64(9); + @$pb.TagNumber(10) + set lastBlockTime($fixnum.Int64 v) { $_setInt64(9, v); } + @$pb.TagNumber(10) + $core.bool hasLastBlockTime() => $_has(9); + @$pb.TagNumber(10) + void clearLastBlockTime() => clearField(10); +} + +class GetConsensusInfoRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetConsensusInfoRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + GetConsensusInfoRequest._() : super(); + factory GetConsensusInfoRequest() => create(); + factory GetConsensusInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetConsensusInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetConsensusInfoRequest clone() => GetConsensusInfoRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetConsensusInfoRequest copyWith(void Function(GetConsensusInfoRequest) updates) => super.copyWith((message) => updates(message as GetConsensusInfoRequest)) as GetConsensusInfoRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetConsensusInfoRequest create() => GetConsensusInfoRequest._(); + GetConsensusInfoRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetConsensusInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetConsensusInfoRequest? _defaultInstance; +} + +class GetConsensusInfoResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetConsensusInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'proposal', subBuilder: Proposal.create) + ..pc(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'instances', $pb.PbFieldType.PM, subBuilder: ConsensusInfo.create) + ..hasRequiredFields = false + ; + + GetConsensusInfoResponse._() : super(); + factory GetConsensusInfoResponse({ + Proposal? proposal, + $core.Iterable? instances, + }) { + final _result = create(); + if (proposal != null) { + _result.proposal = proposal; + } + if (instances != null) { + _result.instances.addAll(instances); + } + return _result; + } + factory GetConsensusInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetConsensusInfoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetConsensusInfoResponse clone() => GetConsensusInfoResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetConsensusInfoResponse copyWith(void Function(GetConsensusInfoResponse) updates) => super.copyWith((message) => updates(message as GetConsensusInfoResponse)) as GetConsensusInfoResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetConsensusInfoResponse create() => GetConsensusInfoResponse._(); + GetConsensusInfoResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetConsensusInfoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetConsensusInfoResponse? _defaultInstance; + + @$pb.TagNumber(1) + Proposal get proposal => $_getN(0); + @$pb.TagNumber(1) + set proposal(Proposal v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasProposal() => $_has(0); + @$pb.TagNumber(1) + void clearProposal() => clearField(1); + @$pb.TagNumber(1) + Proposal ensureProposal() => $_ensure(0); + + @$pb.TagNumber(2) + $core.List get instances => $_getList(1); +} + +class GetTxPoolContentRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTxPoolContentRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..e<$0.PayloadType>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payloadType', $pb.PbFieldType.OE, defaultOrMaker: $0.PayloadType.UNKNOWN, valueOf: $0.PayloadType.valueOf, enumValues: $0.PayloadType.values) + ..hasRequiredFields = false + ; + + GetTxPoolContentRequest._() : super(); + factory GetTxPoolContentRequest({ + $0.PayloadType? payloadType, + }) { + final _result = create(); + if (payloadType != null) { + _result.payloadType = payloadType; + } + return _result; + } + factory GetTxPoolContentRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetTxPoolContentRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetTxPoolContentRequest clone() => GetTxPoolContentRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetTxPoolContentRequest copyWith(void Function(GetTxPoolContentRequest) updates) => super.copyWith((message) => updates(message as GetTxPoolContentRequest)) as GetTxPoolContentRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetTxPoolContentRequest create() => GetTxPoolContentRequest._(); + GetTxPoolContentRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetTxPoolContentRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetTxPoolContentRequest? _defaultInstance; + + @$pb.TagNumber(1) + $0.PayloadType get payloadType => $_getN(0); + @$pb.TagNumber(1) + set payloadType($0.PayloadType v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasPayloadType() => $_has(0); + @$pb.TagNumber(1) + void clearPayloadType() => clearField(1); +} + +class GetTxPoolContentResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTxPoolContentResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..pc<$0.TransactionInfo>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'txs', $pb.PbFieldType.PM, subBuilder: $0.TransactionInfo.create) + ..hasRequiredFields = false + ; + + GetTxPoolContentResponse._() : super(); + factory GetTxPoolContentResponse({ + $core.Iterable<$0.TransactionInfo>? txs, + }) { + final _result = create(); + if (txs != null) { + _result.txs.addAll(txs); + } + return _result; + } + factory GetTxPoolContentResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetTxPoolContentResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetTxPoolContentResponse clone() => GetTxPoolContentResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetTxPoolContentResponse copyWith(void Function(GetTxPoolContentResponse) updates) => super.copyWith((message) => updates(message as GetTxPoolContentResponse)) as GetTxPoolContentResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetTxPoolContentResponse create() => GetTxPoolContentResponse._(); + GetTxPoolContentResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetTxPoolContentResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetTxPoolContentResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List<$0.TransactionInfo> get txs => $_getList(0); +} + +class ValidatorInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ValidatorInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'data') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') + ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'number', $pb.PbFieldType.O3) + ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') + ..a<$core.int>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastBondingHeight', $pb.PbFieldType.OU3) + ..a<$core.int>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastSortitionHeight', $pb.PbFieldType.OU3) + ..a<$core.int>(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbondingHeight', $pb.PbFieldType.OU3) + ..aOS(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..a<$core.double>(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'availabilityScore', $pb.PbFieldType.OD) + ..hasRequiredFields = false + ; + + ValidatorInfo._() : super(); + factory ValidatorInfo({ + $core.String? hash, + $core.String? data, + $core.String? publicKey, + $core.int? number, + $fixnum.Int64? stake, + $core.int? lastBondingHeight, + $core.int? lastSortitionHeight, + $core.int? unbondingHeight, + $core.String? address, + $core.double? availabilityScore, + }) { + final _result = create(); + if (hash != null) { + _result.hash = hash; + } + if (data != null) { + _result.data = data; + } + if (publicKey != null) { + _result.publicKey = publicKey; + } + if (number != null) { + _result.number = number; + } + if (stake != null) { + _result.stake = stake; + } + if (lastBondingHeight != null) { + _result.lastBondingHeight = lastBondingHeight; + } + if (lastSortitionHeight != null) { + _result.lastSortitionHeight = lastSortitionHeight; + } + if (unbondingHeight != null) { + _result.unbondingHeight = unbondingHeight; + } + if (address != null) { + _result.address = address; + } + if (availabilityScore != null) { + _result.availabilityScore = availabilityScore; + } + return _result; + } + factory ValidatorInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ValidatorInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ValidatorInfo clone() => ValidatorInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ValidatorInfo copyWith(void Function(ValidatorInfo) updates) => super.copyWith((message) => updates(message as ValidatorInfo)) as ValidatorInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static ValidatorInfo create() => ValidatorInfo._(); + ValidatorInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ValidatorInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ValidatorInfo? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get hash => $_getSZ(0); + @$pb.TagNumber(1) + set hash($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasHash() => $_has(0); + @$pb.TagNumber(1) + void clearHash() => clearField(1); + + @$pb.TagNumber(2) + $core.String get data => $_getSZ(1); + @$pb.TagNumber(2) + set data($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasData() => $_has(1); + @$pb.TagNumber(2) + void clearData() => clearField(2); + + @$pb.TagNumber(3) + $core.String get publicKey => $_getSZ(2); + @$pb.TagNumber(3) + set publicKey($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPublicKey() => $_has(2); + @$pb.TagNumber(3) + void clearPublicKey() => clearField(3); + + @$pb.TagNumber(4) + $core.int get number => $_getIZ(3); + @$pb.TagNumber(4) + set number($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasNumber() => $_has(3); + @$pb.TagNumber(4) + void clearNumber() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get stake => $_getI64(4); + @$pb.TagNumber(5) + set stake($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasStake() => $_has(4); + @$pb.TagNumber(5) + void clearStake() => clearField(5); + + @$pb.TagNumber(6) + $core.int get lastBondingHeight => $_getIZ(5); + @$pb.TagNumber(6) + set lastBondingHeight($core.int v) { $_setUnsignedInt32(5, v); } + @$pb.TagNumber(6) + $core.bool hasLastBondingHeight() => $_has(5); + @$pb.TagNumber(6) + void clearLastBondingHeight() => clearField(6); + + @$pb.TagNumber(7) + $core.int get lastSortitionHeight => $_getIZ(6); + @$pb.TagNumber(7) + set lastSortitionHeight($core.int v) { $_setUnsignedInt32(6, v); } + @$pb.TagNumber(7) + $core.bool hasLastSortitionHeight() => $_has(6); + @$pb.TagNumber(7) + void clearLastSortitionHeight() => clearField(7); + + @$pb.TagNumber(8) + $core.int get unbondingHeight => $_getIZ(7); + @$pb.TagNumber(8) + set unbondingHeight($core.int v) { $_setUnsignedInt32(7, v); } + @$pb.TagNumber(8) + $core.bool hasUnbondingHeight() => $_has(7); + @$pb.TagNumber(8) + void clearUnbondingHeight() => clearField(8); + + @$pb.TagNumber(9) + $core.String get address => $_getSZ(8); + @$pb.TagNumber(9) + set address($core.String v) { $_setString(8, v); } + @$pb.TagNumber(9) + $core.bool hasAddress() => $_has(8); + @$pb.TagNumber(9) + void clearAddress() => clearField(9); + + @$pb.TagNumber(10) + $core.double get availabilityScore => $_getN(9); + @$pb.TagNumber(10) + set availabilityScore($core.double v) { $_setDouble(9, v); } + @$pb.TagNumber(10) + $core.bool hasAvailabilityScore() => $_has(9); + @$pb.TagNumber(10) + void clearAvailabilityScore() => clearField(10); +} + +class AccountInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'AccountInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'data') + ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'number', $pb.PbFieldType.O3) + ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'balance') + ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..hasRequiredFields = false + ; + + AccountInfo._() : super(); + factory AccountInfo({ + $core.String? hash, + $core.String? data, + $core.int? number, + $fixnum.Int64? balance, + $core.String? address, + }) { + final _result = create(); + if (hash != null) { + _result.hash = hash; + } + if (data != null) { + _result.data = data; + } + if (number != null) { + _result.number = number; + } + if (balance != null) { + _result.balance = balance; + } + if (address != null) { + _result.address = address; + } + return _result; + } + factory AccountInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AccountInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + AccountInfo clone() => AccountInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + AccountInfo copyWith(void Function(AccountInfo) updates) => super.copyWith((message) => updates(message as AccountInfo)) as AccountInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static AccountInfo create() => AccountInfo._(); + AccountInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AccountInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AccountInfo? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get hash => $_getSZ(0); + @$pb.TagNumber(1) + set hash($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasHash() => $_has(0); + @$pb.TagNumber(1) + void clearHash() => clearField(1); + + @$pb.TagNumber(2) + $core.String get data => $_getSZ(1); + @$pb.TagNumber(2) + set data($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasData() => $_has(1); + @$pb.TagNumber(2) + void clearData() => clearField(2); + + @$pb.TagNumber(3) + $core.int get number => $_getIZ(2); + @$pb.TagNumber(3) + set number($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasNumber() => $_has(2); + @$pb.TagNumber(3) + void clearNumber() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get balance => $_getI64(3); + @$pb.TagNumber(4) + set balance($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasBalance() => $_has(3); + @$pb.TagNumber(4) + void clearBalance() => clearField(4); + + @$pb.TagNumber(5) + $core.String get address => $_getSZ(4); + @$pb.TagNumber(5) + set address($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasAddress() => $_has(4); + @$pb.TagNumber(5) + void clearAddress() => clearField(5); +} + +class BlockHeaderInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BlockHeaderInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version', $pb.PbFieldType.O3) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'prevBlockHash') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stateRoot') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sortitionSeed') + ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'proposerAddress') + ..hasRequiredFields = false + ; + + BlockHeaderInfo._() : super(); + factory BlockHeaderInfo({ + $core.int? version, + $core.String? prevBlockHash, + $core.String? stateRoot, + $core.String? sortitionSeed, + $core.String? proposerAddress, + }) { + final _result = create(); + if (version != null) { + _result.version = version; + } + if (prevBlockHash != null) { + _result.prevBlockHash = prevBlockHash; + } + if (stateRoot != null) { + _result.stateRoot = stateRoot; + } + if (sortitionSeed != null) { + _result.sortitionSeed = sortitionSeed; + } + if (proposerAddress != null) { + _result.proposerAddress = proposerAddress; + } + return _result; + } + factory BlockHeaderInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BlockHeaderInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + BlockHeaderInfo clone() => BlockHeaderInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + BlockHeaderInfo copyWith(void Function(BlockHeaderInfo) updates) => super.copyWith((message) => updates(message as BlockHeaderInfo)) as BlockHeaderInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static BlockHeaderInfo create() => BlockHeaderInfo._(); + BlockHeaderInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BlockHeaderInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BlockHeaderInfo? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get version => $_getIZ(0); + @$pb.TagNumber(1) + set version($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasVersion() => $_has(0); + @$pb.TagNumber(1) + void clearVersion() => clearField(1); + + @$pb.TagNumber(2) + $core.String get prevBlockHash => $_getSZ(1); + @$pb.TagNumber(2) + set prevBlockHash($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPrevBlockHash() => $_has(1); + @$pb.TagNumber(2) + void clearPrevBlockHash() => clearField(2); + + @$pb.TagNumber(3) + $core.String get stateRoot => $_getSZ(2); + @$pb.TagNumber(3) + set stateRoot($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasStateRoot() => $_has(2); + @$pb.TagNumber(3) + void clearStateRoot() => clearField(3); + + @$pb.TagNumber(4) + $core.String get sortitionSeed => $_getSZ(3); + @$pb.TagNumber(4) + set sortitionSeed($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasSortitionSeed() => $_has(3); + @$pb.TagNumber(4) + void clearSortitionSeed() => clearField(4); + + @$pb.TagNumber(5) + $core.String get proposerAddress => $_getSZ(4); + @$pb.TagNumber(5) + set proposerAddress($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasProposerAddress() => $_has(4); + @$pb.TagNumber(5) + void clearProposerAddress() => clearField(5); +} + +class CertificateInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CertificateInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'hash') + ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'round', $pb.PbFieldType.O3) + ..p<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'committers', $pb.PbFieldType.K3) + ..p<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'absentees', $pb.PbFieldType.K3) + ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature') + ..hasRequiredFields = false + ; + + CertificateInfo._() : super(); + factory CertificateInfo({ + $core.String? hash, + $core.int? round, + $core.Iterable<$core.int>? committers, + $core.Iterable<$core.int>? absentees, + $core.String? signature, + }) { + final _result = create(); + if (hash != null) { + _result.hash = hash; + } + if (round != null) { + _result.round = round; + } + if (committers != null) { + _result.committers.addAll(committers); + } + if (absentees != null) { + _result.absentees.addAll(absentees); + } + if (signature != null) { + _result.signature = signature; + } + return _result; + } + factory CertificateInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CertificateInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CertificateInfo clone() => CertificateInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CertificateInfo copyWith(void Function(CertificateInfo) updates) => super.copyWith((message) => updates(message as CertificateInfo)) as CertificateInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CertificateInfo create() => CertificateInfo._(); + CertificateInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CertificateInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CertificateInfo? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get hash => $_getSZ(0); + @$pb.TagNumber(1) + set hash($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasHash() => $_has(0); + @$pb.TagNumber(1) + void clearHash() => clearField(1); + + @$pb.TagNumber(2) + $core.int get round => $_getIZ(1); + @$pb.TagNumber(2) + set round($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasRound() => $_has(1); + @$pb.TagNumber(2) + void clearRound() => clearField(2); + + @$pb.TagNumber(3) + $core.List<$core.int> get committers => $_getList(2); + + @$pb.TagNumber(4) + $core.List<$core.int> get absentees => $_getList(3); + + @$pb.TagNumber(5) + $core.String get signature => $_getSZ(4); + @$pb.TagNumber(5) + set signature($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasSignature() => $_has(4); + @$pb.TagNumber(5) + void clearSignature() => clearField(5); +} + +class VoteInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'VoteInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: VoteType.VOTE_UNKNOWN, valueOf: VoteType.valueOf, enumValues: VoteType.values) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'voter') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockHash') + ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'round', $pb.PbFieldType.O3) + ..a<$core.int>(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cpRound', $pb.PbFieldType.O3) + ..a<$core.int>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'cpValue', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + VoteInfo._() : super(); + factory VoteInfo({ + VoteType? type, + $core.String? voter, + $core.String? blockHash, + $core.int? round, + $core.int? cpRound, + $core.int? cpValue, + }) { + final _result = create(); + if (type != null) { + _result.type = type; + } + if (voter != null) { + _result.voter = voter; + } + if (blockHash != null) { + _result.blockHash = blockHash; + } + if (round != null) { + _result.round = round; + } + if (cpRound != null) { + _result.cpRound = cpRound; + } + if (cpValue != null) { + _result.cpValue = cpValue; + } + return _result; + } + factory VoteInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory VoteInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + VoteInfo clone() => VoteInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + VoteInfo copyWith(void Function(VoteInfo) updates) => super.copyWith((message) => updates(message as VoteInfo)) as VoteInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static VoteInfo create() => VoteInfo._(); + VoteInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static VoteInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static VoteInfo? _defaultInstance; + + @$pb.TagNumber(1) + VoteType get type => $_getN(0); + @$pb.TagNumber(1) + set type(VoteType v) { setField(1, v); } + @$pb.TagNumber(1) + $core.bool hasType() => $_has(0); + @$pb.TagNumber(1) + void clearType() => clearField(1); + + @$pb.TagNumber(2) + $core.String get voter => $_getSZ(1); + @$pb.TagNumber(2) + set voter($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasVoter() => $_has(1); + @$pb.TagNumber(2) + void clearVoter() => clearField(2); + + @$pb.TagNumber(3) + $core.String get blockHash => $_getSZ(2); + @$pb.TagNumber(3) + set blockHash($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasBlockHash() => $_has(2); + @$pb.TagNumber(3) + void clearBlockHash() => clearField(3); + + @$pb.TagNumber(4) + $core.int get round => $_getIZ(3); + @$pb.TagNumber(4) + set round($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasRound() => $_has(3); + @$pb.TagNumber(4) + void clearRound() => clearField(4); + + @$pb.TagNumber(5) + $core.int get cpRound => $_getIZ(4); + @$pb.TagNumber(5) + set cpRound($core.int v) { $_setSignedInt32(4, v); } + @$pb.TagNumber(5) + $core.bool hasCpRound() => $_has(4); + @$pb.TagNumber(5) + void clearCpRound() => clearField(5); + + @$pb.TagNumber(6) + $core.int get cpValue => $_getIZ(5); + @$pb.TagNumber(6) + set cpValue($core.int v) { $_setSignedInt32(5, v); } + @$pb.TagNumber(6) + $core.bool hasCpValue() => $_has(5); + @$pb.TagNumber(6) + void clearCpValue() => clearField(6); +} + +class ConsensusInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ConsensusInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..aOB(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'active') + ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) + ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'round', $pb.PbFieldType.O3) + ..pc(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'votes', $pb.PbFieldType.PM, subBuilder: VoteInfo.create) + ..hasRequiredFields = false + ; + + ConsensusInfo._() : super(); + factory ConsensusInfo({ + $core.String? address, + $core.bool? active, + $core.int? height, + $core.int? round, + $core.Iterable? votes, + }) { + final _result = create(); + if (address != null) { + _result.address = address; + } + if (active != null) { + _result.active = active; + } + if (height != null) { + _result.height = height; + } + if (round != null) { + _result.round = round; + } + if (votes != null) { + _result.votes.addAll(votes); + } + return _result; + } + factory ConsensusInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ConsensusInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ConsensusInfo clone() => ConsensusInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ConsensusInfo copyWith(void Function(ConsensusInfo) updates) => super.copyWith((message) => updates(message as ConsensusInfo)) as ConsensusInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static ConsensusInfo create() => ConsensusInfo._(); + ConsensusInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ConsensusInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ConsensusInfo? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get address => $_getSZ(0); + @$pb.TagNumber(1) + set address($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasAddress() => $_has(0); + @$pb.TagNumber(1) + void clearAddress() => clearField(1); + + @$pb.TagNumber(2) + $core.bool get active => $_getBF(1); + @$pb.TagNumber(2) + set active($core.bool v) { $_setBool(1, v); } + @$pb.TagNumber(2) + $core.bool hasActive() => $_has(1); + @$pb.TagNumber(2) + void clearActive() => clearField(2); + + @$pb.TagNumber(3) + $core.int get height => $_getIZ(2); + @$pb.TagNumber(3) + set height($core.int v) { $_setUnsignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasHeight() => $_has(2); + @$pb.TagNumber(3) + void clearHeight() => clearField(3); + + @$pb.TagNumber(4) + $core.int get round => $_getIZ(3); + @$pb.TagNumber(4) + set round($core.int v) { $_setSignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasRound() => $_has(3); + @$pb.TagNumber(4) + void clearRound() => clearField(4); + + @$pb.TagNumber(5) + $core.List get votes => $_getList(4); +} + +class Proposal extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'Proposal', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) + ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'round', $pb.PbFieldType.O3) + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockData') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signatureData') + ..hasRequiredFields = false + ; + + Proposal._() : super(); + factory Proposal({ + $core.int? height, + $core.int? round, + $core.String? blockData, + $core.String? signatureData, + }) { + final _result = create(); + if (height != null) { + _result.height = height; + } + if (round != null) { + _result.round = round; + } + if (blockData != null) { + _result.blockData = blockData; + } + if (signatureData != null) { + _result.signatureData = signatureData; + } + return _result; + } + factory Proposal.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory Proposal.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + Proposal clone() => Proposal()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + Proposal copyWith(void Function(Proposal) updates) => super.copyWith((message) => updates(message as Proposal)) as Proposal; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static Proposal create() => Proposal._(); + Proposal createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static Proposal getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static Proposal? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get height => $_getIZ(0); + @$pb.TagNumber(1) + set height($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasHeight() => $_has(0); + @$pb.TagNumber(1) + void clearHeight() => clearField(1); + + @$pb.TagNumber(2) + $core.int get round => $_getIZ(1); + @$pb.TagNumber(2) + set round($core.int v) { $_setSignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasRound() => $_has(1); + @$pb.TagNumber(2) + void clearRound() => clearField(2); + + @$pb.TagNumber(3) + $core.String get blockData => $_getSZ(2); + @$pb.TagNumber(3) + set blockData($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasBlockData() => $_has(2); + @$pb.TagNumber(3) + void clearBlockData() => clearField(3); + + @$pb.TagNumber(4) + $core.String get signatureData => $_getSZ(3); + @$pb.TagNumber(4) + set signatureData($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasSignatureData() => $_has(3); + @$pb.TagNumber(4) + void clearSignatureData() => clearField(4); +} + +class BlockchainApi { + $pb.RpcClient _client; + BlockchainApi(this._client); + + $async.Future getBlock($pb.ClientContext? ctx, GetBlockRequest request) { + var emptyResponse = GetBlockResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetBlock', request, emptyResponse); + } + $async.Future getBlockHash($pb.ClientContext? ctx, GetBlockHashRequest request) { + var emptyResponse = GetBlockHashResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetBlockHash', request, emptyResponse); + } + $async.Future getBlockHeight($pb.ClientContext? ctx, GetBlockHeightRequest request) { + var emptyResponse = GetBlockHeightResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetBlockHeight', request, emptyResponse); + } + $async.Future getBlockchainInfo($pb.ClientContext? ctx, GetBlockchainInfoRequest request) { + var emptyResponse = GetBlockchainInfoResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetBlockchainInfo', request, emptyResponse); + } + $async.Future getConsensusInfo($pb.ClientContext? ctx, GetConsensusInfoRequest request) { + var emptyResponse = GetConsensusInfoResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetConsensusInfo', request, emptyResponse); + } + $async.Future getAccount($pb.ClientContext? ctx, GetAccountRequest request) { + var emptyResponse = GetAccountResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetAccount', request, emptyResponse); + } + $async.Future getValidator($pb.ClientContext? ctx, GetValidatorRequest request) { + var emptyResponse = GetValidatorResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetValidator', request, emptyResponse); + } + $async.Future getValidatorByNumber($pb.ClientContext? ctx, GetValidatorByNumberRequest request) { + var emptyResponse = GetValidatorResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetValidatorByNumber', request, emptyResponse); + } + $async.Future getValidatorAddresses($pb.ClientContext? ctx, GetValidatorAddressesRequest request) { + var emptyResponse = GetValidatorAddressesResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetValidatorAddresses', request, emptyResponse); + } + $async.Future getPublicKey($pb.ClientContext? ctx, GetPublicKeyRequest request) { + var emptyResponse = GetPublicKeyResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetPublicKey', request, emptyResponse); + } + $async.Future getTxPoolContent($pb.ClientContext? ctx, GetTxPoolContentRequest request) { + var emptyResponse = GetTxPoolContentResponse(); + return _client.invoke(ctx, 'Blockchain', 'GetTxPoolContent', request, emptyResponse); + } +} + diff --git a/www/grpc/gen/dart/blockchain.pbenum.dart b/www/grpc/gen/dart/blockchain.pbenum.dart new file mode 100644 index 000000000..0d609fd6f --- /dev/null +++ b/www/grpc/gen/dart/blockchain.pbenum.dart @@ -0,0 +1,47 @@ +/// +// Generated code. Do not modify. +// source: blockchain.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// ignore_for_file: UNDEFINED_SHOWN_NAME +import 'dart:core' as $core; +import 'package:protobuf/protobuf.dart' as $pb; + +class BlockVerbosity extends $pb.ProtobufEnum { + static const BlockVerbosity BLOCK_DATA = BlockVerbosity._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'BLOCK_DATA'); + static const BlockVerbosity BLOCK_INFO = BlockVerbosity._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'BLOCK_INFO'); + static const BlockVerbosity BLOCK_TRANSACTIONS = BlockVerbosity._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'BLOCK_TRANSACTIONS'); + + static const $core.List values = [ + BLOCK_DATA, + BLOCK_INFO, + BLOCK_TRANSACTIONS, + ]; + + static final $core.Map<$core.int, BlockVerbosity> _byValue = $pb.ProtobufEnum.initByValue(values); + static BlockVerbosity? valueOf($core.int value) => _byValue[value]; + + const BlockVerbosity._($core.int v, $core.String n) : super(v, n); +} + +class VoteType extends $pb.ProtobufEnum { + static const VoteType VOTE_UNKNOWN = VoteType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_UNKNOWN'); + static const VoteType VOTE_PREPARE = VoteType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_PREPARE'); + static const VoteType VOTE_PRECOMMIT = VoteType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_PRECOMMIT'); + static const VoteType VOTE_CHANGE_PROPOSER = VoteType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CHANGE_PROPOSER'); + + static const $core.List values = [ + VOTE_UNKNOWN, + VOTE_PREPARE, + VOTE_PRECOMMIT, + VOTE_CHANGE_PROPOSER, + ]; + + static final $core.Map<$core.int, VoteType> _byValue = $pb.ProtobufEnum.initByValue(values); + static VoteType? valueOf($core.int value) => _byValue[value]; + + const VoteType._($core.int v, $core.String n) : super(v, n); +} + diff --git a/www/grpc/gen/dart/blockchain.pbjson.dart b/www/grpc/gen/dart/blockchain.pbjson.dart new file mode 100644 index 000000000..4203fb851 --- /dev/null +++ b/www/grpc/gen/dart/blockchain.pbjson.dart @@ -0,0 +1,415 @@ +/// +// Generated code. Do not modify. +// source: blockchain.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +import 'transaction.pbjson.dart' as $0; + +@$core.Deprecated('Use blockVerbosityDescriptor instead') +const BlockVerbosity$json = const { + '1': 'BlockVerbosity', + '2': const [ + const {'1': 'BLOCK_DATA', '2': 0}, + const {'1': 'BLOCK_INFO', '2': 1}, + const {'1': 'BLOCK_TRANSACTIONS', '2': 2}, + ], +}; + +/// Descriptor for `BlockVerbosity`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List blockVerbosityDescriptor = $convert.base64Decode('Cg5CbG9ja1ZlcmJvc2l0eRIOCgpCTE9DS19EQVRBEAASDgoKQkxPQ0tfSU5GTxABEhYKEkJMT0NLX1RSQU5TQUNUSU9OUxAC'); +@$core.Deprecated('Use voteTypeDescriptor instead') +const VoteType$json = const { + '1': 'VoteType', + '2': const [ + const {'1': 'VOTE_UNKNOWN', '2': 0}, + const {'1': 'VOTE_PREPARE', '2': 1}, + const {'1': 'VOTE_PRECOMMIT', '2': 2}, + const {'1': 'VOTE_CHANGE_PROPOSER', '2': 3}, + ], +}; + +/// Descriptor for `VoteType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List voteTypeDescriptor = $convert.base64Decode('CghWb3RlVHlwZRIQCgxWT1RFX1VOS05PV04QABIQCgxWT1RFX1BSRVBBUkUQARISCg5WT1RFX1BSRUNPTU1JVBACEhgKFFZPVEVfQ0hBTkdFX1BST1BPU0VSEAM='); +@$core.Deprecated('Use getAccountRequestDescriptor instead') +const GetAccountRequest$json = const { + '1': 'GetAccountRequest', + '2': const [ + const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, + ], +}; + +/// Descriptor for `GetAccountRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getAccountRequestDescriptor = $convert.base64Decode('ChFHZXRBY2NvdW50UmVxdWVzdBIYCgdhZGRyZXNzGAEgASgJUgdhZGRyZXNz'); +@$core.Deprecated('Use getAccountResponseDescriptor instead') +const GetAccountResponse$json = const { + '1': 'GetAccountResponse', + '2': const [ + const {'1': 'account', '3': 1, '4': 1, '5': 11, '6': '.pactus.AccountInfo', '10': 'account'}, + ], +}; + +/// Descriptor for `GetAccountResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getAccountResponseDescriptor = $convert.base64Decode('ChJHZXRBY2NvdW50UmVzcG9uc2USLQoHYWNjb3VudBgBIAEoCzITLnBhY3R1cy5BY2NvdW50SW5mb1IHYWNjb3VudA=='); +@$core.Deprecated('Use getValidatorAddressesRequestDescriptor instead') +const GetValidatorAddressesRequest$json = const { + '1': 'GetValidatorAddressesRequest', +}; + +/// Descriptor for `GetValidatorAddressesRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getValidatorAddressesRequestDescriptor = $convert.base64Decode('ChxHZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXF1ZXN0'); +@$core.Deprecated('Use getValidatorAddressesResponseDescriptor instead') +const GetValidatorAddressesResponse$json = const { + '1': 'GetValidatorAddressesResponse', + '2': const [ + const {'1': 'addresses', '3': 1, '4': 3, '5': 9, '10': 'addresses'}, + ], +}; + +/// Descriptor for `GetValidatorAddressesResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getValidatorAddressesResponseDescriptor = $convert.base64Decode('Ch1HZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXNwb25zZRIcCglhZGRyZXNzZXMYASADKAlSCWFkZHJlc3Nlcw=='); +@$core.Deprecated('Use getValidatorRequestDescriptor instead') +const GetValidatorRequest$json = const { + '1': 'GetValidatorRequest', + '2': const [ + const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, + ], +}; + +/// Descriptor for `GetValidatorRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getValidatorRequestDescriptor = $convert.base64Decode('ChNHZXRWYWxpZGF0b3JSZXF1ZXN0EhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3M='); +@$core.Deprecated('Use getValidatorByNumberRequestDescriptor instead') +const GetValidatorByNumberRequest$json = const { + '1': 'GetValidatorByNumberRequest', + '2': const [ + const {'1': 'number', '3': 1, '4': 1, '5': 5, '10': 'number'}, + ], +}; + +/// Descriptor for `GetValidatorByNumberRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getValidatorByNumberRequestDescriptor = $convert.base64Decode('ChtHZXRWYWxpZGF0b3JCeU51bWJlclJlcXVlc3QSFgoGbnVtYmVyGAEgASgFUgZudW1iZXI='); +@$core.Deprecated('Use getValidatorResponseDescriptor instead') +const GetValidatorResponse$json = const { + '1': 'GetValidatorResponse', + '2': const [ + const {'1': 'validator', '3': 1, '4': 1, '5': 11, '6': '.pactus.ValidatorInfo', '10': 'validator'}, + ], +}; + +/// Descriptor for `GetValidatorResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getValidatorResponseDescriptor = $convert.base64Decode('ChRHZXRWYWxpZGF0b3JSZXNwb25zZRIzCgl2YWxpZGF0b3IYASABKAsyFS5wYWN0dXMuVmFsaWRhdG9ySW5mb1IJdmFsaWRhdG9y'); +@$core.Deprecated('Use getPublicKeyRequestDescriptor instead') +const GetPublicKeyRequest$json = const { + '1': 'GetPublicKeyRequest', + '2': const [ + const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, + ], +}; + +/// Descriptor for `GetPublicKeyRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPublicKeyRequestDescriptor = $convert.base64Decode('ChNHZXRQdWJsaWNLZXlSZXF1ZXN0EhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3M='); +@$core.Deprecated('Use getPublicKeyResponseDescriptor instead') +const GetPublicKeyResponse$json = const { + '1': 'GetPublicKeyResponse', + '2': const [ + const {'1': 'public_key', '3': 1, '4': 1, '5': 9, '10': 'publicKey'}, + ], +}; + +/// Descriptor for `GetPublicKeyResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getPublicKeyResponseDescriptor = $convert.base64Decode('ChRHZXRQdWJsaWNLZXlSZXNwb25zZRIdCgpwdWJsaWNfa2V5GAEgASgJUglwdWJsaWNLZXk='); +@$core.Deprecated('Use getBlockRequestDescriptor instead') +const GetBlockRequest$json = const { + '1': 'GetBlockRequest', + '2': const [ + const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, + const {'1': 'verbosity', '3': 2, '4': 1, '5': 14, '6': '.pactus.BlockVerbosity', '10': 'verbosity'}, + ], +}; + +/// Descriptor for `GetBlockRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBlockRequestDescriptor = $convert.base64Decode('Cg9HZXRCbG9ja1JlcXVlc3QSFgoGaGVpZ2h0GAEgASgNUgZoZWlnaHQSNAoJdmVyYm9zaXR5GAIgASgOMhYucGFjdHVzLkJsb2NrVmVyYm9zaXR5Ugl2ZXJib3NpdHk='); +@$core.Deprecated('Use getBlockResponseDescriptor instead') +const GetBlockResponse$json = const { + '1': 'GetBlockResponse', + '2': const [ + const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, + const {'1': 'hash', '3': 2, '4': 1, '5': 9, '10': 'hash'}, + const {'1': 'data', '3': 3, '4': 1, '5': 9, '10': 'data'}, + const {'1': 'block_time', '3': 4, '4': 1, '5': 13, '10': 'blockTime'}, + const {'1': 'header', '3': 5, '4': 1, '5': 11, '6': '.pactus.BlockHeaderInfo', '10': 'header'}, + const {'1': 'prev_cert', '3': 6, '4': 1, '5': 11, '6': '.pactus.CertificateInfo', '10': 'prevCert'}, + const {'1': 'txs', '3': 7, '4': 3, '5': 11, '6': '.pactus.TransactionInfo', '10': 'txs'}, + ], +}; + +/// Descriptor for `GetBlockResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBlockResponseDescriptor = $convert.base64Decode('ChBHZXRCbG9ja1Jlc3BvbnNlEhYKBmhlaWdodBgBIAEoDVIGaGVpZ2h0EhIKBGhhc2gYAiABKAlSBGhhc2gSEgoEZGF0YRgDIAEoCVIEZGF0YRIdCgpibG9ja190aW1lGAQgASgNUglibG9ja1RpbWUSLwoGaGVhZGVyGAUgASgLMhcucGFjdHVzLkJsb2NrSGVhZGVySW5mb1IGaGVhZGVyEjQKCXByZXZfY2VydBgGIAEoCzIXLnBhY3R1cy5DZXJ0aWZpY2F0ZUluZm9SCHByZXZDZXJ0EikKA3R4cxgHIAMoCzIXLnBhY3R1cy5UcmFuc2FjdGlvbkluZm9SA3R4cw=='); +@$core.Deprecated('Use getBlockHashRequestDescriptor instead') +const GetBlockHashRequest$json = const { + '1': 'GetBlockHashRequest', + '2': const [ + const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, + ], +}; + +/// Descriptor for `GetBlockHashRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBlockHashRequestDescriptor = $convert.base64Decode('ChNHZXRCbG9ja0hhc2hSZXF1ZXN0EhYKBmhlaWdodBgBIAEoDVIGaGVpZ2h0'); +@$core.Deprecated('Use getBlockHashResponseDescriptor instead') +const GetBlockHashResponse$json = const { + '1': 'GetBlockHashResponse', + '2': const [ + const {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'}, + ], +}; + +/// Descriptor for `GetBlockHashResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBlockHashResponseDescriptor = $convert.base64Decode('ChRHZXRCbG9ja0hhc2hSZXNwb25zZRISCgRoYXNoGAEgASgJUgRoYXNo'); +@$core.Deprecated('Use getBlockHeightRequestDescriptor instead') +const GetBlockHeightRequest$json = const { + '1': 'GetBlockHeightRequest', + '2': const [ + const {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'}, + ], +}; + +/// Descriptor for `GetBlockHeightRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBlockHeightRequestDescriptor = $convert.base64Decode('ChVHZXRCbG9ja0hlaWdodFJlcXVlc3QSEgoEaGFzaBgBIAEoCVIEaGFzaA=='); +@$core.Deprecated('Use getBlockHeightResponseDescriptor instead') +const GetBlockHeightResponse$json = const { + '1': 'GetBlockHeightResponse', + '2': const [ + const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, + ], +}; + +/// Descriptor for `GetBlockHeightResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBlockHeightResponseDescriptor = $convert.base64Decode('ChZHZXRCbG9ja0hlaWdodFJlc3BvbnNlEhYKBmhlaWdodBgBIAEoDVIGaGVpZ2h0'); +@$core.Deprecated('Use getBlockchainInfoRequestDescriptor instead') +const GetBlockchainInfoRequest$json = const { + '1': 'GetBlockchainInfoRequest', +}; + +/// Descriptor for `GetBlockchainInfoRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBlockchainInfoRequestDescriptor = $convert.base64Decode('ChhHZXRCbG9ja2NoYWluSW5mb1JlcXVlc3Q='); +@$core.Deprecated('Use getBlockchainInfoResponseDescriptor instead') +const GetBlockchainInfoResponse$json = const { + '1': 'GetBlockchainInfoResponse', + '2': const [ + const {'1': 'last_block_height', '3': 1, '4': 1, '5': 13, '10': 'lastBlockHeight'}, + const {'1': 'last_block_hash', '3': 2, '4': 1, '5': 9, '10': 'lastBlockHash'}, + const {'1': 'total_accounts', '3': 3, '4': 1, '5': 5, '10': 'totalAccounts'}, + const {'1': 'total_validators', '3': 4, '4': 1, '5': 5, '10': 'totalValidators'}, + const {'1': 'total_power', '3': 5, '4': 1, '5': 3, '10': 'totalPower'}, + const {'1': 'committee_power', '3': 6, '4': 1, '5': 3, '10': 'committeePower'}, + const {'1': 'committee_validators', '3': 7, '4': 3, '5': 11, '6': '.pactus.ValidatorInfo', '10': 'committeeValidators'}, + const {'1': 'is_pruned', '3': 8, '4': 1, '5': 8, '10': 'isPruned'}, + const {'1': 'pruning_height', '3': 9, '4': 1, '5': 13, '10': 'pruningHeight'}, + const {'1': 'last_block_time', '3': 10, '4': 1, '5': 3, '10': 'lastBlockTime'}, + ], +}; + +/// Descriptor for `GetBlockchainInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getBlockchainInfoResponseDescriptor = $convert.base64Decode('ChlHZXRCbG9ja2NoYWluSW5mb1Jlc3BvbnNlEioKEWxhc3RfYmxvY2tfaGVpZ2h0GAEgASgNUg9sYXN0QmxvY2tIZWlnaHQSJgoPbGFzdF9ibG9ja19oYXNoGAIgASgJUg1sYXN0QmxvY2tIYXNoEiUKDnRvdGFsX2FjY291bnRzGAMgASgFUg10b3RhbEFjY291bnRzEikKEHRvdGFsX3ZhbGlkYXRvcnMYBCABKAVSD3RvdGFsVmFsaWRhdG9ycxIfCgt0b3RhbF9wb3dlchgFIAEoA1IKdG90YWxQb3dlchInCg9jb21taXR0ZWVfcG93ZXIYBiABKANSDmNvbW1pdHRlZVBvd2VyEkgKFGNvbW1pdHRlZV92YWxpZGF0b3JzGAcgAygLMhUucGFjdHVzLlZhbGlkYXRvckluZm9SE2NvbW1pdHRlZVZhbGlkYXRvcnMSGwoJaXNfcHJ1bmVkGAggASgIUghpc1BydW5lZBIlCg5wcnVuaW5nX2hlaWdodBgJIAEoDVINcHJ1bmluZ0hlaWdodBImCg9sYXN0X2Jsb2NrX3RpbWUYCiABKANSDWxhc3RCbG9ja1RpbWU='); +@$core.Deprecated('Use getConsensusInfoRequestDescriptor instead') +const GetConsensusInfoRequest$json = const { + '1': 'GetConsensusInfoRequest', +}; + +/// Descriptor for `GetConsensusInfoRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getConsensusInfoRequestDescriptor = $convert.base64Decode('ChdHZXRDb25zZW5zdXNJbmZvUmVxdWVzdA=='); +@$core.Deprecated('Use getConsensusInfoResponseDescriptor instead') +const GetConsensusInfoResponse$json = const { + '1': 'GetConsensusInfoResponse', + '2': const [ + const {'1': 'proposal', '3': 1, '4': 1, '5': 11, '6': '.pactus.Proposal', '10': 'proposal'}, + const {'1': 'instances', '3': 2, '4': 3, '5': 11, '6': '.pactus.ConsensusInfo', '10': 'instances'}, + ], +}; + +/// Descriptor for `GetConsensusInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getConsensusInfoResponseDescriptor = $convert.base64Decode('ChhHZXRDb25zZW5zdXNJbmZvUmVzcG9uc2USLAoIcHJvcG9zYWwYASABKAsyEC5wYWN0dXMuUHJvcG9zYWxSCHByb3Bvc2FsEjMKCWluc3RhbmNlcxgCIAMoCzIVLnBhY3R1cy5Db25zZW5zdXNJbmZvUglpbnN0YW5jZXM='); +@$core.Deprecated('Use getTxPoolContentRequestDescriptor instead') +const GetTxPoolContentRequest$json = const { + '1': 'GetTxPoolContentRequest', + '2': const [ + const {'1': 'payload_type', '3': 1, '4': 1, '5': 14, '6': '.pactus.PayloadType', '10': 'payloadType'}, + ], +}; + +/// Descriptor for `GetTxPoolContentRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getTxPoolContentRequestDescriptor = $convert.base64Decode('ChdHZXRUeFBvb2xDb250ZW50UmVxdWVzdBI2CgxwYXlsb2FkX3R5cGUYASABKA4yEy5wYWN0dXMuUGF5bG9hZFR5cGVSC3BheWxvYWRUeXBl'); +@$core.Deprecated('Use getTxPoolContentResponseDescriptor instead') +const GetTxPoolContentResponse$json = const { + '1': 'GetTxPoolContentResponse', + '2': const [ + const {'1': 'txs', '3': 1, '4': 3, '5': 11, '6': '.pactus.TransactionInfo', '10': 'txs'}, + ], +}; + +/// Descriptor for `GetTxPoolContentResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getTxPoolContentResponseDescriptor = $convert.base64Decode('ChhHZXRUeFBvb2xDb250ZW50UmVzcG9uc2USKQoDdHhzGAEgAygLMhcucGFjdHVzLlRyYW5zYWN0aW9uSW5mb1IDdHhz'); +@$core.Deprecated('Use validatorInfoDescriptor instead') +const ValidatorInfo$json = const { + '1': 'ValidatorInfo', + '2': const [ + const {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'}, + const {'1': 'data', '3': 2, '4': 1, '5': 9, '10': 'data'}, + const {'1': 'public_key', '3': 3, '4': 1, '5': 9, '10': 'publicKey'}, + const {'1': 'number', '3': 4, '4': 1, '5': 5, '10': 'number'}, + const {'1': 'stake', '3': 5, '4': 1, '5': 3, '10': 'stake'}, + const {'1': 'last_bonding_height', '3': 6, '4': 1, '5': 13, '10': 'lastBondingHeight'}, + const {'1': 'last_sortition_height', '3': 7, '4': 1, '5': 13, '10': 'lastSortitionHeight'}, + const {'1': 'unbonding_height', '3': 8, '4': 1, '5': 13, '10': 'unbondingHeight'}, + const {'1': 'address', '3': 9, '4': 1, '5': 9, '10': 'address'}, + const {'1': 'availability_score', '3': 10, '4': 1, '5': 1, '10': 'availabilityScore'}, + ], +}; + +/// Descriptor for `ValidatorInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List validatorInfoDescriptor = $convert.base64Decode('Cg1WYWxpZGF0b3JJbmZvEhIKBGhhc2gYASABKAlSBGhhc2gSEgoEZGF0YRgCIAEoCVIEZGF0YRIdCgpwdWJsaWNfa2V5GAMgASgJUglwdWJsaWNLZXkSFgoGbnVtYmVyGAQgASgFUgZudW1iZXISFAoFc3Rha2UYBSABKANSBXN0YWtlEi4KE2xhc3RfYm9uZGluZ19oZWlnaHQYBiABKA1SEWxhc3RCb25kaW5nSGVpZ2h0EjIKFWxhc3Rfc29ydGl0aW9uX2hlaWdodBgHIAEoDVITbGFzdFNvcnRpdGlvbkhlaWdodBIpChB1bmJvbmRpbmdfaGVpZ2h0GAggASgNUg91bmJvbmRpbmdIZWlnaHQSGAoHYWRkcmVzcxgJIAEoCVIHYWRkcmVzcxItChJhdmFpbGFiaWxpdHlfc2NvcmUYCiABKAFSEWF2YWlsYWJpbGl0eVNjb3Jl'); +@$core.Deprecated('Use accountInfoDescriptor instead') +const AccountInfo$json = const { + '1': 'AccountInfo', + '2': const [ + const {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'}, + const {'1': 'data', '3': 2, '4': 1, '5': 9, '10': 'data'}, + const {'1': 'number', '3': 3, '4': 1, '5': 5, '10': 'number'}, + const {'1': 'balance', '3': 4, '4': 1, '5': 3, '10': 'balance'}, + const {'1': 'address', '3': 5, '4': 1, '5': 9, '10': 'address'}, + ], +}; + +/// Descriptor for `AccountInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List accountInfoDescriptor = $convert.base64Decode('CgtBY2NvdW50SW5mbxISCgRoYXNoGAEgASgJUgRoYXNoEhIKBGRhdGEYAiABKAlSBGRhdGESFgoGbnVtYmVyGAMgASgFUgZudW1iZXISGAoHYmFsYW5jZRgEIAEoA1IHYmFsYW5jZRIYCgdhZGRyZXNzGAUgASgJUgdhZGRyZXNz'); +@$core.Deprecated('Use blockHeaderInfoDescriptor instead') +const BlockHeaderInfo$json = const { + '1': 'BlockHeaderInfo', + '2': const [ + const {'1': 'version', '3': 1, '4': 1, '5': 5, '10': 'version'}, + const {'1': 'prev_block_hash', '3': 2, '4': 1, '5': 9, '10': 'prevBlockHash'}, + const {'1': 'state_root', '3': 3, '4': 1, '5': 9, '10': 'stateRoot'}, + const {'1': 'sortition_seed', '3': 4, '4': 1, '5': 9, '10': 'sortitionSeed'}, + const {'1': 'proposer_address', '3': 5, '4': 1, '5': 9, '10': 'proposerAddress'}, + ], +}; + +/// Descriptor for `BlockHeaderInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List blockHeaderInfoDescriptor = $convert.base64Decode('Cg9CbG9ja0hlYWRlckluZm8SGAoHdmVyc2lvbhgBIAEoBVIHdmVyc2lvbhImCg9wcmV2X2Jsb2NrX2hhc2gYAiABKAlSDXByZXZCbG9ja0hhc2gSHQoKc3RhdGVfcm9vdBgDIAEoCVIJc3RhdGVSb290EiUKDnNvcnRpdGlvbl9zZWVkGAQgASgJUg1zb3J0aXRpb25TZWVkEikKEHByb3Bvc2VyX2FkZHJlc3MYBSABKAlSD3Byb3Bvc2VyQWRkcmVzcw=='); +@$core.Deprecated('Use certificateInfoDescriptor instead') +const CertificateInfo$json = const { + '1': 'CertificateInfo', + '2': const [ + const {'1': 'hash', '3': 1, '4': 1, '5': 9, '10': 'hash'}, + const {'1': 'round', '3': 2, '4': 1, '5': 5, '10': 'round'}, + const {'1': 'committers', '3': 3, '4': 3, '5': 5, '10': 'committers'}, + const {'1': 'absentees', '3': 4, '4': 3, '5': 5, '10': 'absentees'}, + const {'1': 'signature', '3': 5, '4': 1, '5': 9, '10': 'signature'}, + ], +}; + +/// Descriptor for `CertificateInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List certificateInfoDescriptor = $convert.base64Decode('Cg9DZXJ0aWZpY2F0ZUluZm8SEgoEaGFzaBgBIAEoCVIEaGFzaBIUCgVyb3VuZBgCIAEoBVIFcm91bmQSHgoKY29tbWl0dGVycxgDIAMoBVIKY29tbWl0dGVycxIcCglhYnNlbnRlZXMYBCADKAVSCWFic2VudGVlcxIcCglzaWduYXR1cmUYBSABKAlSCXNpZ25hdHVyZQ=='); +@$core.Deprecated('Use voteInfoDescriptor instead') +const VoteInfo$json = const { + '1': 'VoteInfo', + '2': const [ + const {'1': 'type', '3': 1, '4': 1, '5': 14, '6': '.pactus.VoteType', '10': 'type'}, + const {'1': 'voter', '3': 2, '4': 1, '5': 9, '10': 'voter'}, + const {'1': 'block_hash', '3': 3, '4': 1, '5': 9, '10': 'blockHash'}, + const {'1': 'round', '3': 4, '4': 1, '5': 5, '10': 'round'}, + const {'1': 'cp_round', '3': 5, '4': 1, '5': 5, '10': 'cpRound'}, + const {'1': 'cp_value', '3': 6, '4': 1, '5': 5, '10': 'cpValue'}, + ], +}; + +/// Descriptor for `VoteInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List voteInfoDescriptor = $convert.base64Decode('CghWb3RlSW5mbxIkCgR0eXBlGAEgASgOMhAucGFjdHVzLlZvdGVUeXBlUgR0eXBlEhQKBXZvdGVyGAIgASgJUgV2b3RlchIdCgpibG9ja19oYXNoGAMgASgJUglibG9ja0hhc2gSFAoFcm91bmQYBCABKAVSBXJvdW5kEhkKCGNwX3JvdW5kGAUgASgFUgdjcFJvdW5kEhkKCGNwX3ZhbHVlGAYgASgFUgdjcFZhbHVl'); +@$core.Deprecated('Use consensusInfoDescriptor instead') +const ConsensusInfo$json = const { + '1': 'ConsensusInfo', + '2': const [ + const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, + const {'1': 'active', '3': 2, '4': 1, '5': 8, '10': 'active'}, + const {'1': 'height', '3': 3, '4': 1, '5': 13, '10': 'height'}, + const {'1': 'round', '3': 4, '4': 1, '5': 5, '10': 'round'}, + const {'1': 'votes', '3': 5, '4': 3, '5': 11, '6': '.pactus.VoteInfo', '10': 'votes'}, + ], +}; + +/// Descriptor for `ConsensusInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List consensusInfoDescriptor = $convert.base64Decode('Cg1Db25zZW5zdXNJbmZvEhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3MSFgoGYWN0aXZlGAIgASgIUgZhY3RpdmUSFgoGaGVpZ2h0GAMgASgNUgZoZWlnaHQSFAoFcm91bmQYBCABKAVSBXJvdW5kEiYKBXZvdGVzGAUgAygLMhAucGFjdHVzLlZvdGVJbmZvUgV2b3Rlcw=='); +@$core.Deprecated('Use proposalDescriptor instead') +const Proposal$json = const { + '1': 'Proposal', + '2': const [ + const {'1': 'height', '3': 1, '4': 1, '5': 13, '10': 'height'}, + const {'1': 'round', '3': 2, '4': 1, '5': 5, '10': 'round'}, + const {'1': 'block_data', '3': 3, '4': 1, '5': 9, '10': 'blockData'}, + const {'1': 'signature_data', '3': 4, '4': 1, '5': 9, '10': 'signatureData'}, + ], +}; + +/// Descriptor for `Proposal`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List proposalDescriptor = $convert.base64Decode('CghQcm9wb3NhbBIWCgZoZWlnaHQYASABKA1SBmhlaWdodBIUCgVyb3VuZBgCIAEoBVIFcm91bmQSHQoKYmxvY2tfZGF0YRgDIAEoCVIJYmxvY2tEYXRhEiUKDnNpZ25hdHVyZV9kYXRhGAQgASgJUg1zaWduYXR1cmVEYXRh'); +const $core.Map<$core.String, $core.dynamic> BlockchainServiceBase$json = const { + '1': 'Blockchain', + '2': const [ + const {'1': 'GetBlock', '2': '.pactus.GetBlockRequest', '3': '.pactus.GetBlockResponse'}, + const {'1': 'GetBlockHash', '2': '.pactus.GetBlockHashRequest', '3': '.pactus.GetBlockHashResponse'}, + const {'1': 'GetBlockHeight', '2': '.pactus.GetBlockHeightRequest', '3': '.pactus.GetBlockHeightResponse'}, + const {'1': 'GetBlockchainInfo', '2': '.pactus.GetBlockchainInfoRequest', '3': '.pactus.GetBlockchainInfoResponse'}, + const {'1': 'GetConsensusInfo', '2': '.pactus.GetConsensusInfoRequest', '3': '.pactus.GetConsensusInfoResponse'}, + const {'1': 'GetAccount', '2': '.pactus.GetAccountRequest', '3': '.pactus.GetAccountResponse'}, + const {'1': 'GetValidator', '2': '.pactus.GetValidatorRequest', '3': '.pactus.GetValidatorResponse'}, + const {'1': 'GetValidatorByNumber', '2': '.pactus.GetValidatorByNumberRequest', '3': '.pactus.GetValidatorResponse'}, + const {'1': 'GetValidatorAddresses', '2': '.pactus.GetValidatorAddressesRequest', '3': '.pactus.GetValidatorAddressesResponse'}, + const {'1': 'GetPublicKey', '2': '.pactus.GetPublicKeyRequest', '3': '.pactus.GetPublicKeyResponse'}, + const {'1': 'GetTxPoolContent', '2': '.pactus.GetTxPoolContentRequest', '3': '.pactus.GetTxPoolContentResponse'}, + ], +}; + +@$core.Deprecated('Use blockchainServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> BlockchainServiceBase$messageJson = const { + '.pactus.GetBlockRequest': GetBlockRequest$json, + '.pactus.GetBlockResponse': GetBlockResponse$json, + '.pactus.BlockHeaderInfo': BlockHeaderInfo$json, + '.pactus.CertificateInfo': CertificateInfo$json, + '.pactus.TransactionInfo': $0.TransactionInfo$json, + '.pactus.PayloadTransfer': $0.PayloadTransfer$json, + '.pactus.PayloadBond': $0.PayloadBond$json, + '.pactus.PayloadSortition': $0.PayloadSortition$json, + '.pactus.PayloadUnbond': $0.PayloadUnbond$json, + '.pactus.PayloadWithdraw': $0.PayloadWithdraw$json, + '.pactus.GetBlockHashRequest': GetBlockHashRequest$json, + '.pactus.GetBlockHashResponse': GetBlockHashResponse$json, + '.pactus.GetBlockHeightRequest': GetBlockHeightRequest$json, + '.pactus.GetBlockHeightResponse': GetBlockHeightResponse$json, + '.pactus.GetBlockchainInfoRequest': GetBlockchainInfoRequest$json, + '.pactus.GetBlockchainInfoResponse': GetBlockchainInfoResponse$json, + '.pactus.ValidatorInfo': ValidatorInfo$json, + '.pactus.GetConsensusInfoRequest': GetConsensusInfoRequest$json, + '.pactus.GetConsensusInfoResponse': GetConsensusInfoResponse$json, + '.pactus.Proposal': Proposal$json, + '.pactus.ConsensusInfo': ConsensusInfo$json, + '.pactus.VoteInfo': VoteInfo$json, + '.pactus.GetAccountRequest': GetAccountRequest$json, + '.pactus.GetAccountResponse': GetAccountResponse$json, + '.pactus.AccountInfo': AccountInfo$json, + '.pactus.GetValidatorRequest': GetValidatorRequest$json, + '.pactus.GetValidatorResponse': GetValidatorResponse$json, + '.pactus.GetValidatorByNumberRequest': GetValidatorByNumberRequest$json, + '.pactus.GetValidatorAddressesRequest': GetValidatorAddressesRequest$json, + '.pactus.GetValidatorAddressesResponse': GetValidatorAddressesResponse$json, + '.pactus.GetPublicKeyRequest': GetPublicKeyRequest$json, + '.pactus.GetPublicKeyResponse': GetPublicKeyResponse$json, + '.pactus.GetTxPoolContentRequest': GetTxPoolContentRequest$json, + '.pactus.GetTxPoolContentResponse': GetTxPoolContentResponse$json, +}; + +/// Descriptor for `Blockchain`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List blockchainServiceDescriptor = $convert.base64Decode('CgpCbG9ja2NoYWluEj0KCEdldEJsb2NrEhcucGFjdHVzLkdldEJsb2NrUmVxdWVzdBoYLnBhY3R1cy5HZXRCbG9ja1Jlc3BvbnNlEkkKDEdldEJsb2NrSGFzaBIbLnBhY3R1cy5HZXRCbG9ja0hhc2hSZXF1ZXN0GhwucGFjdHVzLkdldEJsb2NrSGFzaFJlc3BvbnNlEk8KDkdldEJsb2NrSGVpZ2h0Eh0ucGFjdHVzLkdldEJsb2NrSGVpZ2h0UmVxdWVzdBoeLnBhY3R1cy5HZXRCbG9ja0hlaWdodFJlc3BvbnNlElgKEUdldEJsb2NrY2hhaW5JbmZvEiAucGFjdHVzLkdldEJsb2NrY2hhaW5JbmZvUmVxdWVzdBohLnBhY3R1cy5HZXRCbG9ja2NoYWluSW5mb1Jlc3BvbnNlElUKEEdldENvbnNlbnN1c0luZm8SHy5wYWN0dXMuR2V0Q29uc2Vuc3VzSW5mb1JlcXVlc3QaIC5wYWN0dXMuR2V0Q29uc2Vuc3VzSW5mb1Jlc3BvbnNlEkMKCkdldEFjY291bnQSGS5wYWN0dXMuR2V0QWNjb3VudFJlcXVlc3QaGi5wYWN0dXMuR2V0QWNjb3VudFJlc3BvbnNlEkkKDEdldFZhbGlkYXRvchIbLnBhY3R1cy5HZXRWYWxpZGF0b3JSZXF1ZXN0GhwucGFjdHVzLkdldFZhbGlkYXRvclJlc3BvbnNlElkKFEdldFZhbGlkYXRvckJ5TnVtYmVyEiMucGFjdHVzLkdldFZhbGlkYXRvckJ5TnVtYmVyUmVxdWVzdBocLnBhY3R1cy5HZXRWYWxpZGF0b3JSZXNwb25zZRJkChVHZXRWYWxpZGF0b3JBZGRyZXNzZXMSJC5wYWN0dXMuR2V0VmFsaWRhdG9yQWRkcmVzc2VzUmVxdWVzdBolLnBhY3R1cy5HZXRWYWxpZGF0b3JBZGRyZXNzZXNSZXNwb25zZRJJCgxHZXRQdWJsaWNLZXkSGy5wYWN0dXMuR2V0UHVibGljS2V5UmVxdWVzdBocLnBhY3R1cy5HZXRQdWJsaWNLZXlSZXNwb25zZRJVChBHZXRUeFBvb2xDb250ZW50Eh8ucGFjdHVzLkdldFR4UG9vbENvbnRlbnRSZXF1ZXN0GiAucGFjdHVzLkdldFR4UG9vbENvbnRlbnRSZXNwb25zZQ=='); diff --git a/www/grpc/gen/dart/blockchain.pbserver.dart b/www/grpc/gen/dart/blockchain.pbserver.dart new file mode 100644 index 000000000..7cfa896f3 --- /dev/null +++ b/www/grpc/gen/dart/blockchain.pbserver.dart @@ -0,0 +1,68 @@ +/// +// Generated code. Do not modify. +// source: blockchain.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'dart:core' as $core; +import 'blockchain.pb.dart' as $1; +import 'blockchain.pbjson.dart'; + +export 'blockchain.pb.dart'; + +abstract class BlockchainServiceBase extends $pb.GeneratedService { + $async.Future<$1.GetBlockResponse> getBlock($pb.ServerContext ctx, $1.GetBlockRequest request); + $async.Future<$1.GetBlockHashResponse> getBlockHash($pb.ServerContext ctx, $1.GetBlockHashRequest request); + $async.Future<$1.GetBlockHeightResponse> getBlockHeight($pb.ServerContext ctx, $1.GetBlockHeightRequest request); + $async.Future<$1.GetBlockchainInfoResponse> getBlockchainInfo($pb.ServerContext ctx, $1.GetBlockchainInfoRequest request); + $async.Future<$1.GetConsensusInfoResponse> getConsensusInfo($pb.ServerContext ctx, $1.GetConsensusInfoRequest request); + $async.Future<$1.GetAccountResponse> getAccount($pb.ServerContext ctx, $1.GetAccountRequest request); + $async.Future<$1.GetValidatorResponse> getValidator($pb.ServerContext ctx, $1.GetValidatorRequest request); + $async.Future<$1.GetValidatorResponse> getValidatorByNumber($pb.ServerContext ctx, $1.GetValidatorByNumberRequest request); + $async.Future<$1.GetValidatorAddressesResponse> getValidatorAddresses($pb.ServerContext ctx, $1.GetValidatorAddressesRequest request); + $async.Future<$1.GetPublicKeyResponse> getPublicKey($pb.ServerContext ctx, $1.GetPublicKeyRequest request); + $async.Future<$1.GetTxPoolContentResponse> getTxPoolContent($pb.ServerContext ctx, $1.GetTxPoolContentRequest request); + + $pb.GeneratedMessage createRequest($core.String method) { + switch (method) { + case 'GetBlock': return $1.GetBlockRequest(); + case 'GetBlockHash': return $1.GetBlockHashRequest(); + case 'GetBlockHeight': return $1.GetBlockHeightRequest(); + case 'GetBlockchainInfo': return $1.GetBlockchainInfoRequest(); + case 'GetConsensusInfo': return $1.GetConsensusInfoRequest(); + case 'GetAccount': return $1.GetAccountRequest(); + case 'GetValidator': return $1.GetValidatorRequest(); + case 'GetValidatorByNumber': return $1.GetValidatorByNumberRequest(); + case 'GetValidatorAddresses': return $1.GetValidatorAddressesRequest(); + case 'GetPublicKey': return $1.GetPublicKeyRequest(); + case 'GetTxPoolContent': return $1.GetTxPoolContentRequest(); + default: throw $core.ArgumentError('Unknown method: $method'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) { + switch (method) { + case 'GetBlock': return this.getBlock(ctx, request as $1.GetBlockRequest); + case 'GetBlockHash': return this.getBlockHash(ctx, request as $1.GetBlockHashRequest); + case 'GetBlockHeight': return this.getBlockHeight(ctx, request as $1.GetBlockHeightRequest); + case 'GetBlockchainInfo': return this.getBlockchainInfo(ctx, request as $1.GetBlockchainInfoRequest); + case 'GetConsensusInfo': return this.getConsensusInfo(ctx, request as $1.GetConsensusInfoRequest); + case 'GetAccount': return this.getAccount(ctx, request as $1.GetAccountRequest); + case 'GetValidator': return this.getValidator(ctx, request as $1.GetValidatorRequest); + case 'GetValidatorByNumber': return this.getValidatorByNumber(ctx, request as $1.GetValidatorByNumberRequest); + case 'GetValidatorAddresses': return this.getValidatorAddresses(ctx, request as $1.GetValidatorAddressesRequest); + case 'GetPublicKey': return this.getPublicKey(ctx, request as $1.GetPublicKeyRequest); + case 'GetTxPoolContent': return this.getTxPoolContent(ctx, request as $1.GetTxPoolContentRequest); + default: throw $core.ArgumentError('Unknown method: $method'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => BlockchainServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => BlockchainServiceBase$messageJson; +} + diff --git a/www/grpc/gen/dart/network.pb.dart b/www/grpc/gen/dart/network.pb.dart new file mode 100644 index 000000000..caff37258 --- /dev/null +++ b/www/grpc/gen/dart/network.pb.dart @@ -0,0 +1,751 @@ +/// +// Generated code. Do not modify. +// source: network.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +class GetNetworkInfoRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNetworkInfoRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOB(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'onlyConnected') + ..hasRequiredFields = false + ; + + GetNetworkInfoRequest._() : super(); + factory GetNetworkInfoRequest({ + $core.bool? onlyConnected, + }) { + final _result = create(); + if (onlyConnected != null) { + _result.onlyConnected = onlyConnected; + } + return _result; + } + factory GetNetworkInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetNetworkInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetNetworkInfoRequest clone() => GetNetworkInfoRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetNetworkInfoRequest copyWith(void Function(GetNetworkInfoRequest) updates) => super.copyWith((message) => updates(message as GetNetworkInfoRequest)) as GetNetworkInfoRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetNetworkInfoRequest create() => GetNetworkInfoRequest._(); + GetNetworkInfoRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetNetworkInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetNetworkInfoRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get onlyConnected => $_getBF(0); + @$pb.TagNumber(1) + set onlyConnected($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasOnlyConnected() => $_has(0); + @$pb.TagNumber(1) + void clearOnlyConnected() => clearField(1); +} + +class GetNetworkInfoResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNetworkInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'networkName') + ..aInt64(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalSentBytes') + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalReceivedBytes') + ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connectedPeersCount', $pb.PbFieldType.OU3) + ..pc(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connectedPeers', $pb.PbFieldType.PM, subBuilder: PeerInfo.create) + ..m<$core.int, $fixnum.Int64>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sentBytes', entryClassName: 'GetNetworkInfoResponse.SentBytesEntry', keyFieldType: $pb.PbFieldType.O3, valueFieldType: $pb.PbFieldType.O6, packageName: const $pb.PackageName('pactus')) + ..m<$core.int, $fixnum.Int64>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receivedBytes', entryClassName: 'GetNetworkInfoResponse.ReceivedBytesEntry', keyFieldType: $pb.PbFieldType.O3, valueFieldType: $pb.PbFieldType.O6, packageName: const $pb.PackageName('pactus')) + ..hasRequiredFields = false + ; + + GetNetworkInfoResponse._() : super(); + factory GetNetworkInfoResponse({ + $core.String? networkName, + $fixnum.Int64? totalSentBytes, + $fixnum.Int64? totalReceivedBytes, + $core.int? connectedPeersCount, + $core.Iterable? connectedPeers, + $core.Map<$core.int, $fixnum.Int64>? sentBytes, + $core.Map<$core.int, $fixnum.Int64>? receivedBytes, + }) { + final _result = create(); + if (networkName != null) { + _result.networkName = networkName; + } + if (totalSentBytes != null) { + _result.totalSentBytes = totalSentBytes; + } + if (totalReceivedBytes != null) { + _result.totalReceivedBytes = totalReceivedBytes; + } + if (connectedPeersCount != null) { + _result.connectedPeersCount = connectedPeersCount; + } + if (connectedPeers != null) { + _result.connectedPeers.addAll(connectedPeers); + } + if (sentBytes != null) { + _result.sentBytes.addAll(sentBytes); + } + if (receivedBytes != null) { + _result.receivedBytes.addAll(receivedBytes); + } + return _result; + } + factory GetNetworkInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetNetworkInfoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetNetworkInfoResponse clone() => GetNetworkInfoResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetNetworkInfoResponse copyWith(void Function(GetNetworkInfoResponse) updates) => super.copyWith((message) => updates(message as GetNetworkInfoResponse)) as GetNetworkInfoResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetNetworkInfoResponse create() => GetNetworkInfoResponse._(); + GetNetworkInfoResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetNetworkInfoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetNetworkInfoResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get networkName => $_getSZ(0); + @$pb.TagNumber(1) + set networkName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasNetworkName() => $_has(0); + @$pb.TagNumber(1) + void clearNetworkName() => clearField(1); + + @$pb.TagNumber(2) + $fixnum.Int64 get totalSentBytes => $_getI64(1); + @$pb.TagNumber(2) + set totalSentBytes($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasTotalSentBytes() => $_has(1); + @$pb.TagNumber(2) + void clearTotalSentBytes() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get totalReceivedBytes => $_getI64(2); + @$pb.TagNumber(3) + set totalReceivedBytes($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasTotalReceivedBytes() => $_has(2); + @$pb.TagNumber(3) + void clearTotalReceivedBytes() => clearField(3); + + @$pb.TagNumber(4) + $core.int get connectedPeersCount => $_getIZ(3); + @$pb.TagNumber(4) + set connectedPeersCount($core.int v) { $_setUnsignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasConnectedPeersCount() => $_has(3); + @$pb.TagNumber(4) + void clearConnectedPeersCount() => clearField(4); + + @$pb.TagNumber(5) + $core.List get connectedPeers => $_getList(4); + + @$pb.TagNumber(6) + $core.Map<$core.int, $fixnum.Int64> get sentBytes => $_getMap(5); + + @$pb.TagNumber(7) + $core.Map<$core.int, $fixnum.Int64> get receivedBytes => $_getMap(6); +} + +class GetNodeInfoRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNodeInfoRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..hasRequiredFields = false + ; + + GetNodeInfoRequest._() : super(); + factory GetNodeInfoRequest() => create(); + factory GetNodeInfoRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetNodeInfoRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetNodeInfoRequest clone() => GetNodeInfoRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetNodeInfoRequest copyWith(void Function(GetNodeInfoRequest) updates) => super.copyWith((message) => updates(message as GetNodeInfoRequest)) as GetNodeInfoRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetNodeInfoRequest create() => GetNodeInfoRequest._(); + GetNodeInfoRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetNodeInfoRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetNodeInfoRequest? _defaultInstance; +} + +class GetNodeInfoResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNodeInfoResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'moniker') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'agent') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'peerId') + ..a<$fixnum.Int64>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'startedAt', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'reachability') + ..a<$core.int>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'services', $pb.PbFieldType.O3) + ..aOS(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'servicesNames') + ..pPS(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'localAddrs') + ..pPS(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'protocols') + ..a<$core.double>(13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'clockOffset', $pb.PbFieldType.OD) + ..aOM(14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connectionInfo', subBuilder: ConnectionInfo.create) + ..hasRequiredFields = false + ; + + GetNodeInfoResponse._() : super(); + factory GetNodeInfoResponse({ + $core.String? moniker, + $core.String? agent, + $core.String? peerId, + $fixnum.Int64? startedAt, + $core.String? reachability, + $core.int? services, + $core.String? servicesNames, + $core.Iterable<$core.String>? localAddrs, + $core.Iterable<$core.String>? protocols, + $core.double? clockOffset, + ConnectionInfo? connectionInfo, + }) { + final _result = create(); + if (moniker != null) { + _result.moniker = moniker; + } + if (agent != null) { + _result.agent = agent; + } + if (peerId != null) { + _result.peerId = peerId; + } + if (startedAt != null) { + _result.startedAt = startedAt; + } + if (reachability != null) { + _result.reachability = reachability; + } + if (services != null) { + _result.services = services; + } + if (servicesNames != null) { + _result.servicesNames = servicesNames; + } + if (localAddrs != null) { + _result.localAddrs.addAll(localAddrs); + } + if (protocols != null) { + _result.protocols.addAll(protocols); + } + if (clockOffset != null) { + _result.clockOffset = clockOffset; + } + if (connectionInfo != null) { + _result.connectionInfo = connectionInfo; + } + return _result; + } + factory GetNodeInfoResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetNodeInfoResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetNodeInfoResponse clone() => GetNodeInfoResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetNodeInfoResponse copyWith(void Function(GetNodeInfoResponse) updates) => super.copyWith((message) => updates(message as GetNodeInfoResponse)) as GetNodeInfoResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetNodeInfoResponse create() => GetNodeInfoResponse._(); + GetNodeInfoResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetNodeInfoResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetNodeInfoResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get moniker => $_getSZ(0); + @$pb.TagNumber(1) + set moniker($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasMoniker() => $_has(0); + @$pb.TagNumber(1) + void clearMoniker() => clearField(1); + + @$pb.TagNumber(2) + $core.String get agent => $_getSZ(1); + @$pb.TagNumber(2) + set agent($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasAgent() => $_has(1); + @$pb.TagNumber(2) + void clearAgent() => clearField(2); + + @$pb.TagNumber(3) + $core.String get peerId => $_getSZ(2); + @$pb.TagNumber(3) + set peerId($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPeerId() => $_has(2); + @$pb.TagNumber(3) + void clearPeerId() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get startedAt => $_getI64(3); + @$pb.TagNumber(4) + set startedAt($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasStartedAt() => $_has(3); + @$pb.TagNumber(4) + void clearStartedAt() => clearField(4); + + @$pb.TagNumber(5) + $core.String get reachability => $_getSZ(4); + @$pb.TagNumber(5) + set reachability($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasReachability() => $_has(4); + @$pb.TagNumber(5) + void clearReachability() => clearField(5); + + @$pb.TagNumber(6) + $core.int get services => $_getIZ(5); + @$pb.TagNumber(6) + set services($core.int v) { $_setSignedInt32(5, v); } + @$pb.TagNumber(6) + $core.bool hasServices() => $_has(5); + @$pb.TagNumber(6) + void clearServices() => clearField(6); + + @$pb.TagNumber(7) + $core.String get servicesNames => $_getSZ(6); + @$pb.TagNumber(7) + set servicesNames($core.String v) { $_setString(6, v); } + @$pb.TagNumber(7) + $core.bool hasServicesNames() => $_has(6); + @$pb.TagNumber(7) + void clearServicesNames() => clearField(7); + + @$pb.TagNumber(8) + $core.List<$core.String> get localAddrs => $_getList(7); + + @$pb.TagNumber(9) + $core.List<$core.String> get protocols => $_getList(8); + + @$pb.TagNumber(13) + $core.double get clockOffset => $_getN(9); + @$pb.TagNumber(13) + set clockOffset($core.double v) { $_setDouble(9, v); } + @$pb.TagNumber(13) + $core.bool hasClockOffset() => $_has(9); + @$pb.TagNumber(13) + void clearClockOffset() => clearField(13); + + @$pb.TagNumber(14) + ConnectionInfo get connectionInfo => $_getN(10); + @$pb.TagNumber(14) + set connectionInfo(ConnectionInfo v) { setField(14, v); } + @$pb.TagNumber(14) + $core.bool hasConnectionInfo() => $_has(10); + @$pb.TagNumber(14) + void clearConnectionInfo() => clearField(14); + @$pb.TagNumber(14) + ConnectionInfo ensureConnectionInfo() => $_ensure(10); +} + +class PeerInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PeerInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'status', $pb.PbFieldType.O3) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'moniker') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'agent') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'peerId') + ..pPS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'consensusKeys') + ..pPS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'consensusAddresses') + ..a<$core.int>(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'services', $pb.PbFieldType.OU3) + ..aOS(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastBlockHash') + ..a<$core.int>(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'height', $pb.PbFieldType.OU3) + ..a<$core.int>(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receivedBundles', $pb.PbFieldType.O3) + ..a<$core.int>(11, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'invalidBundles', $pb.PbFieldType.O3) + ..aInt64(12, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastSent') + ..aInt64(13, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lastReceived') + ..m<$core.int, $fixnum.Int64>(14, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sentBytes', entryClassName: 'PeerInfo.SentBytesEntry', keyFieldType: $pb.PbFieldType.O3, valueFieldType: $pb.PbFieldType.O6, packageName: const $pb.PackageName('pactus')) + ..m<$core.int, $fixnum.Int64>(15, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receivedBytes', entryClassName: 'PeerInfo.ReceivedBytesEntry', keyFieldType: $pb.PbFieldType.O3, valueFieldType: $pb.PbFieldType.O6, packageName: const $pb.PackageName('pactus')) + ..aOS(16, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..aOS(17, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'direction') + ..pPS(18, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'protocols') + ..a<$core.int>(19, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalSessions', $pb.PbFieldType.O3) + ..a<$core.int>(20, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'completedSessions', $pb.PbFieldType.O3) + ..hasRequiredFields = false + ; + + PeerInfo._() : super(); + factory PeerInfo({ + $core.int? status, + $core.String? moniker, + $core.String? agent, + $core.String? peerId, + $core.Iterable<$core.String>? consensusKeys, + $core.Iterable<$core.String>? consensusAddresses, + $core.int? services, + $core.String? lastBlockHash, + $core.int? height, + $core.int? receivedBundles, + $core.int? invalidBundles, + $fixnum.Int64? lastSent, + $fixnum.Int64? lastReceived, + $core.Map<$core.int, $fixnum.Int64>? sentBytes, + $core.Map<$core.int, $fixnum.Int64>? receivedBytes, + $core.String? address, + $core.String? direction, + $core.Iterable<$core.String>? protocols, + $core.int? totalSessions, + $core.int? completedSessions, + }) { + final _result = create(); + if (status != null) { + _result.status = status; + } + if (moniker != null) { + _result.moniker = moniker; + } + if (agent != null) { + _result.agent = agent; + } + if (peerId != null) { + _result.peerId = peerId; + } + if (consensusKeys != null) { + _result.consensusKeys.addAll(consensusKeys); + } + if (consensusAddresses != null) { + _result.consensusAddresses.addAll(consensusAddresses); + } + if (services != null) { + _result.services = services; + } + if (lastBlockHash != null) { + _result.lastBlockHash = lastBlockHash; + } + if (height != null) { + _result.height = height; + } + if (receivedBundles != null) { + _result.receivedBundles = receivedBundles; + } + if (invalidBundles != null) { + _result.invalidBundles = invalidBundles; + } + if (lastSent != null) { + _result.lastSent = lastSent; + } + if (lastReceived != null) { + _result.lastReceived = lastReceived; + } + if (sentBytes != null) { + _result.sentBytes.addAll(sentBytes); + } + if (receivedBytes != null) { + _result.receivedBytes.addAll(receivedBytes); + } + if (address != null) { + _result.address = address; + } + if (direction != null) { + _result.direction = direction; + } + if (protocols != null) { + _result.protocols.addAll(protocols); + } + if (totalSessions != null) { + _result.totalSessions = totalSessions; + } + if (completedSessions != null) { + _result.completedSessions = completedSessions; + } + return _result; + } + factory PeerInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PeerInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PeerInfo clone() => PeerInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PeerInfo copyWith(void Function(PeerInfo) updates) => super.copyWith((message) => updates(message as PeerInfo)) as PeerInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static PeerInfo create() => PeerInfo._(); + PeerInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PeerInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PeerInfo? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get status => $_getIZ(0); + @$pb.TagNumber(1) + set status($core.int v) { $_setSignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasStatus() => $_has(0); + @$pb.TagNumber(1) + void clearStatus() => clearField(1); + + @$pb.TagNumber(2) + $core.String get moniker => $_getSZ(1); + @$pb.TagNumber(2) + set moniker($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasMoniker() => $_has(1); + @$pb.TagNumber(2) + void clearMoniker() => clearField(2); + + @$pb.TagNumber(3) + $core.String get agent => $_getSZ(2); + @$pb.TagNumber(3) + set agent($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasAgent() => $_has(2); + @$pb.TagNumber(3) + void clearAgent() => clearField(3); + + @$pb.TagNumber(4) + $core.String get peerId => $_getSZ(3); + @$pb.TagNumber(4) + set peerId($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPeerId() => $_has(3); + @$pb.TagNumber(4) + void clearPeerId() => clearField(4); + + @$pb.TagNumber(5) + $core.List<$core.String> get consensusKeys => $_getList(4); + + @$pb.TagNumber(6) + $core.List<$core.String> get consensusAddresses => $_getList(5); + + @$pb.TagNumber(7) + $core.int get services => $_getIZ(6); + @$pb.TagNumber(7) + set services($core.int v) { $_setUnsignedInt32(6, v); } + @$pb.TagNumber(7) + $core.bool hasServices() => $_has(6); + @$pb.TagNumber(7) + void clearServices() => clearField(7); + + @$pb.TagNumber(8) + $core.String get lastBlockHash => $_getSZ(7); + @$pb.TagNumber(8) + set lastBlockHash($core.String v) { $_setString(7, v); } + @$pb.TagNumber(8) + $core.bool hasLastBlockHash() => $_has(7); + @$pb.TagNumber(8) + void clearLastBlockHash() => clearField(8); + + @$pb.TagNumber(9) + $core.int get height => $_getIZ(8); + @$pb.TagNumber(9) + set height($core.int v) { $_setUnsignedInt32(8, v); } + @$pb.TagNumber(9) + $core.bool hasHeight() => $_has(8); + @$pb.TagNumber(9) + void clearHeight() => clearField(9); + + @$pb.TagNumber(10) + $core.int get receivedBundles => $_getIZ(9); + @$pb.TagNumber(10) + set receivedBundles($core.int v) { $_setSignedInt32(9, v); } + @$pb.TagNumber(10) + $core.bool hasReceivedBundles() => $_has(9); + @$pb.TagNumber(10) + void clearReceivedBundles() => clearField(10); + + @$pb.TagNumber(11) + $core.int get invalidBundles => $_getIZ(10); + @$pb.TagNumber(11) + set invalidBundles($core.int v) { $_setSignedInt32(10, v); } + @$pb.TagNumber(11) + $core.bool hasInvalidBundles() => $_has(10); + @$pb.TagNumber(11) + void clearInvalidBundles() => clearField(11); + + @$pb.TagNumber(12) + $fixnum.Int64 get lastSent => $_getI64(11); + @$pb.TagNumber(12) + set lastSent($fixnum.Int64 v) { $_setInt64(11, v); } + @$pb.TagNumber(12) + $core.bool hasLastSent() => $_has(11); + @$pb.TagNumber(12) + void clearLastSent() => clearField(12); + + @$pb.TagNumber(13) + $fixnum.Int64 get lastReceived => $_getI64(12); + @$pb.TagNumber(13) + set lastReceived($fixnum.Int64 v) { $_setInt64(12, v); } + @$pb.TagNumber(13) + $core.bool hasLastReceived() => $_has(12); + @$pb.TagNumber(13) + void clearLastReceived() => clearField(13); + + @$pb.TagNumber(14) + $core.Map<$core.int, $fixnum.Int64> get sentBytes => $_getMap(13); + + @$pb.TagNumber(15) + $core.Map<$core.int, $fixnum.Int64> get receivedBytes => $_getMap(14); + + @$pb.TagNumber(16) + $core.String get address => $_getSZ(15); + @$pb.TagNumber(16) + set address($core.String v) { $_setString(15, v); } + @$pb.TagNumber(16) + $core.bool hasAddress() => $_has(15); + @$pb.TagNumber(16) + void clearAddress() => clearField(16); + + @$pb.TagNumber(17) + $core.String get direction => $_getSZ(16); + @$pb.TagNumber(17) + set direction($core.String v) { $_setString(16, v); } + @$pb.TagNumber(17) + $core.bool hasDirection() => $_has(16); + @$pb.TagNumber(17) + void clearDirection() => clearField(17); + + @$pb.TagNumber(18) + $core.List<$core.String> get protocols => $_getList(17); + + @$pb.TagNumber(19) + $core.int get totalSessions => $_getIZ(18); + @$pb.TagNumber(19) + set totalSessions($core.int v) { $_setSignedInt32(18, v); } + @$pb.TagNumber(19) + $core.bool hasTotalSessions() => $_has(18); + @$pb.TagNumber(19) + void clearTotalSessions() => clearField(19); + + @$pb.TagNumber(20) + $core.int get completedSessions => $_getIZ(19); + @$pb.TagNumber(20) + set completedSessions($core.int v) { $_setSignedInt32(19, v); } + @$pb.TagNumber(20) + $core.bool hasCompletedSessions() => $_has(19); + @$pb.TagNumber(20) + void clearCompletedSessions() => clearField(20); +} + +class ConnectionInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'ConnectionInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$fixnum.Int64>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'connections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..a<$fixnum.Int64>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'inboundConnections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..a<$fixnum.Int64>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'outboundConnections', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..hasRequiredFields = false + ; + + ConnectionInfo._() : super(); + factory ConnectionInfo({ + $fixnum.Int64? connections, + $fixnum.Int64? inboundConnections, + $fixnum.Int64? outboundConnections, + }) { + final _result = create(); + if (connections != null) { + _result.connections = connections; + } + if (inboundConnections != null) { + _result.inboundConnections = inboundConnections; + } + if (outboundConnections != null) { + _result.outboundConnections = outboundConnections; + } + return _result; + } + factory ConnectionInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory ConnectionInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + ConnectionInfo clone() => ConnectionInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + ConnectionInfo copyWith(void Function(ConnectionInfo) updates) => super.copyWith((message) => updates(message as ConnectionInfo)) as ConnectionInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static ConnectionInfo create() => ConnectionInfo._(); + ConnectionInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static ConnectionInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static ConnectionInfo? _defaultInstance; + + @$pb.TagNumber(1) + $fixnum.Int64 get connections => $_getI64(0); + @$pb.TagNumber(1) + set connections($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasConnections() => $_has(0); + @$pb.TagNumber(1) + void clearConnections() => clearField(1); + + @$pb.TagNumber(2) + $fixnum.Int64 get inboundConnections => $_getI64(1); + @$pb.TagNumber(2) + set inboundConnections($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasInboundConnections() => $_has(1); + @$pb.TagNumber(2) + void clearInboundConnections() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get outboundConnections => $_getI64(2); + @$pb.TagNumber(3) + set outboundConnections($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasOutboundConnections() => $_has(2); + @$pb.TagNumber(3) + void clearOutboundConnections() => clearField(3); +} + +class NetworkApi { + $pb.RpcClient _client; + NetworkApi(this._client); + + $async.Future getNetworkInfo($pb.ClientContext? ctx, GetNetworkInfoRequest request) { + var emptyResponse = GetNetworkInfoResponse(); + return _client.invoke(ctx, 'Network', 'GetNetworkInfo', request, emptyResponse); + } + $async.Future getNodeInfo($pb.ClientContext? ctx, GetNodeInfoRequest request) { + var emptyResponse = GetNodeInfoResponse(); + return _client.invoke(ctx, 'Network', 'GetNodeInfo', request, emptyResponse); + } +} + diff --git a/www/grpc/gen/dart/network.pbenum.dart b/www/grpc/gen/dart/network.pbenum.dart new file mode 100644 index 000000000..781e22185 --- /dev/null +++ b/www/grpc/gen/dart/network.pbenum.dart @@ -0,0 +1,7 @@ +/// +// Generated code. Do not modify. +// source: network.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + diff --git a/www/grpc/gen/dart/network.pbjson.dart b/www/grpc/gen/dart/network.pbjson.dart new file mode 100644 index 000000000..c8a708dcf --- /dev/null +++ b/www/grpc/gen/dart/network.pbjson.dart @@ -0,0 +1,170 @@ +/// +// Generated code. Do not modify. +// source: network.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use getNetworkInfoRequestDescriptor instead') +const GetNetworkInfoRequest$json = const { + '1': 'GetNetworkInfoRequest', + '2': const [ + const {'1': 'only_connected', '3': 1, '4': 1, '5': 8, '10': 'onlyConnected'}, + ], +}; + +/// Descriptor for `GetNetworkInfoRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getNetworkInfoRequestDescriptor = $convert.base64Decode('ChVHZXROZXR3b3JrSW5mb1JlcXVlc3QSJQoOb25seV9jb25uZWN0ZWQYASABKAhSDW9ubHlDb25uZWN0ZWQ='); +@$core.Deprecated('Use getNetworkInfoResponseDescriptor instead') +const GetNetworkInfoResponse$json = const { + '1': 'GetNetworkInfoResponse', + '2': const [ + const {'1': 'network_name', '3': 1, '4': 1, '5': 9, '10': 'networkName'}, + const {'1': 'total_sent_bytes', '3': 2, '4': 1, '5': 3, '10': 'totalSentBytes'}, + const {'1': 'total_received_bytes', '3': 3, '4': 1, '5': 3, '10': 'totalReceivedBytes'}, + const {'1': 'connected_peers_count', '3': 4, '4': 1, '5': 13, '10': 'connectedPeersCount'}, + const {'1': 'connected_peers', '3': 5, '4': 3, '5': 11, '6': '.pactus.PeerInfo', '10': 'connectedPeers'}, + const {'1': 'sent_bytes', '3': 6, '4': 3, '5': 11, '6': '.pactus.GetNetworkInfoResponse.SentBytesEntry', '10': 'sentBytes'}, + const {'1': 'received_bytes', '3': 7, '4': 3, '5': 11, '6': '.pactus.GetNetworkInfoResponse.ReceivedBytesEntry', '10': 'receivedBytes'}, + ], + '3': const [GetNetworkInfoResponse_SentBytesEntry$json, GetNetworkInfoResponse_ReceivedBytesEntry$json], +}; + +@$core.Deprecated('Use getNetworkInfoResponseDescriptor instead') +const GetNetworkInfoResponse_SentBytesEntry$json = const { + '1': 'SentBytesEntry', + '2': const [ + const {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, + const {'1': 'value', '3': 2, '4': 1, '5': 3, '10': 'value'}, + ], + '7': const {'7': true}, +}; + +@$core.Deprecated('Use getNetworkInfoResponseDescriptor instead') +const GetNetworkInfoResponse_ReceivedBytesEntry$json = const { + '1': 'ReceivedBytesEntry', + '2': const [ + const {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, + const {'1': 'value', '3': 2, '4': 1, '5': 3, '10': 'value'}, + ], + '7': const {'7': true}, +}; + +/// Descriptor for `GetNetworkInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getNetworkInfoResponseDescriptor = $convert.base64Decode('ChZHZXROZXR3b3JrSW5mb1Jlc3BvbnNlEiEKDG5ldHdvcmtfbmFtZRgBIAEoCVILbmV0d29ya05hbWUSKAoQdG90YWxfc2VudF9ieXRlcxgCIAEoA1IOdG90YWxTZW50Qnl0ZXMSMAoUdG90YWxfcmVjZWl2ZWRfYnl0ZXMYAyABKANSEnRvdGFsUmVjZWl2ZWRCeXRlcxIyChVjb25uZWN0ZWRfcGVlcnNfY291bnQYBCABKA1SE2Nvbm5lY3RlZFBlZXJzQ291bnQSOQoPY29ubmVjdGVkX3BlZXJzGAUgAygLMhAucGFjdHVzLlBlZXJJbmZvUg5jb25uZWN0ZWRQZWVycxJMCgpzZW50X2J5dGVzGAYgAygLMi0ucGFjdHVzLkdldE5ldHdvcmtJbmZvUmVzcG9uc2UuU2VudEJ5dGVzRW50cnlSCXNlbnRCeXRlcxJYCg5yZWNlaXZlZF9ieXRlcxgHIAMoCzIxLnBhY3R1cy5HZXROZXR3b3JrSW5mb1Jlc3BvbnNlLlJlY2VpdmVkQnl0ZXNFbnRyeVINcmVjZWl2ZWRCeXRlcxo8Cg5TZW50Qnl0ZXNFbnRyeRIQCgNrZXkYASABKAVSA2tleRIUCgV2YWx1ZRgCIAEoA1IFdmFsdWU6AjgBGkAKElJlY2VpdmVkQnl0ZXNFbnRyeRIQCgNrZXkYASABKAVSA2tleRIUCgV2YWx1ZRgCIAEoA1IFdmFsdWU6AjgB'); +@$core.Deprecated('Use getNodeInfoRequestDescriptor instead') +const GetNodeInfoRequest$json = const { + '1': 'GetNodeInfoRequest', +}; + +/// Descriptor for `GetNodeInfoRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getNodeInfoRequestDescriptor = $convert.base64Decode('ChJHZXROb2RlSW5mb1JlcXVlc3Q='); +@$core.Deprecated('Use getNodeInfoResponseDescriptor instead') +const GetNodeInfoResponse$json = const { + '1': 'GetNodeInfoResponse', + '2': const [ + const {'1': 'moniker', '3': 1, '4': 1, '5': 9, '10': 'moniker'}, + const {'1': 'agent', '3': 2, '4': 1, '5': 9, '10': 'agent'}, + const {'1': 'peer_id', '3': 3, '4': 1, '5': 9, '10': 'peerId'}, + const {'1': 'started_at', '3': 4, '4': 1, '5': 4, '10': 'startedAt'}, + const {'1': 'reachability', '3': 5, '4': 1, '5': 9, '10': 'reachability'}, + const {'1': 'services', '3': 6, '4': 1, '5': 5, '10': 'services'}, + const {'1': 'services_names', '3': 7, '4': 1, '5': 9, '10': 'servicesNames'}, + const {'1': 'local_addrs', '3': 8, '4': 3, '5': 9, '10': 'localAddrs'}, + const {'1': 'protocols', '3': 9, '4': 3, '5': 9, '10': 'protocols'}, + const {'1': 'clock_offset', '3': 13, '4': 1, '5': 1, '10': 'clockOffset'}, + const {'1': 'connection_info', '3': 14, '4': 1, '5': 11, '6': '.pactus.ConnectionInfo', '10': 'connectionInfo'}, + ], +}; + +/// Descriptor for `GetNodeInfoResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getNodeInfoResponseDescriptor = $convert.base64Decode('ChNHZXROb2RlSW5mb1Jlc3BvbnNlEhgKB21vbmlrZXIYASABKAlSB21vbmlrZXISFAoFYWdlbnQYAiABKAlSBWFnZW50EhcKB3BlZXJfaWQYAyABKAlSBnBlZXJJZBIdCgpzdGFydGVkX2F0GAQgASgEUglzdGFydGVkQXQSIgoMcmVhY2hhYmlsaXR5GAUgASgJUgxyZWFjaGFiaWxpdHkSGgoIc2VydmljZXMYBiABKAVSCHNlcnZpY2VzEiUKDnNlcnZpY2VzX25hbWVzGAcgASgJUg1zZXJ2aWNlc05hbWVzEh8KC2xvY2FsX2FkZHJzGAggAygJUgpsb2NhbEFkZHJzEhwKCXByb3RvY29scxgJIAMoCVIJcHJvdG9jb2xzEiEKDGNsb2NrX29mZnNldBgNIAEoAVILY2xvY2tPZmZzZXQSPwoPY29ubmVjdGlvbl9pbmZvGA4gASgLMhYucGFjdHVzLkNvbm5lY3Rpb25JbmZvUg5jb25uZWN0aW9uSW5mbw=='); +@$core.Deprecated('Use peerInfoDescriptor instead') +const PeerInfo$json = const { + '1': 'PeerInfo', + '2': const [ + const {'1': 'status', '3': 1, '4': 1, '5': 5, '10': 'status'}, + const {'1': 'moniker', '3': 2, '4': 1, '5': 9, '10': 'moniker'}, + const {'1': 'agent', '3': 3, '4': 1, '5': 9, '10': 'agent'}, + const {'1': 'peer_id', '3': 4, '4': 1, '5': 9, '10': 'peerId'}, + const {'1': 'consensus_keys', '3': 5, '4': 3, '5': 9, '10': 'consensusKeys'}, + const {'1': 'consensus_addresses', '3': 6, '4': 3, '5': 9, '10': 'consensusAddresses'}, + const {'1': 'services', '3': 7, '4': 1, '5': 13, '10': 'services'}, + const {'1': 'last_block_hash', '3': 8, '4': 1, '5': 9, '10': 'lastBlockHash'}, + const {'1': 'height', '3': 9, '4': 1, '5': 13, '10': 'height'}, + const {'1': 'received_bundles', '3': 10, '4': 1, '5': 5, '10': 'receivedBundles'}, + const {'1': 'invalid_bundles', '3': 11, '4': 1, '5': 5, '10': 'invalidBundles'}, + const {'1': 'last_sent', '3': 12, '4': 1, '5': 3, '10': 'lastSent'}, + const {'1': 'last_received', '3': 13, '4': 1, '5': 3, '10': 'lastReceived'}, + const {'1': 'sent_bytes', '3': 14, '4': 3, '5': 11, '6': '.pactus.PeerInfo.SentBytesEntry', '10': 'sentBytes'}, + const {'1': 'received_bytes', '3': 15, '4': 3, '5': 11, '6': '.pactus.PeerInfo.ReceivedBytesEntry', '10': 'receivedBytes'}, + const {'1': 'address', '3': 16, '4': 1, '5': 9, '10': 'address'}, + const {'1': 'direction', '3': 17, '4': 1, '5': 9, '10': 'direction'}, + const {'1': 'protocols', '3': 18, '4': 3, '5': 9, '10': 'protocols'}, + const {'1': 'total_sessions', '3': 19, '4': 1, '5': 5, '10': 'totalSessions'}, + const {'1': 'completed_sessions', '3': 20, '4': 1, '5': 5, '10': 'completedSessions'}, + ], + '3': const [PeerInfo_SentBytesEntry$json, PeerInfo_ReceivedBytesEntry$json], +}; + +@$core.Deprecated('Use peerInfoDescriptor instead') +const PeerInfo_SentBytesEntry$json = const { + '1': 'SentBytesEntry', + '2': const [ + const {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, + const {'1': 'value', '3': 2, '4': 1, '5': 3, '10': 'value'}, + ], + '7': const {'7': true}, +}; + +@$core.Deprecated('Use peerInfoDescriptor instead') +const PeerInfo_ReceivedBytesEntry$json = const { + '1': 'ReceivedBytesEntry', + '2': const [ + const {'1': 'key', '3': 1, '4': 1, '5': 5, '10': 'key'}, + const {'1': 'value', '3': 2, '4': 1, '5': 3, '10': 'value'}, + ], + '7': const {'7': true}, +}; + +/// Descriptor for `PeerInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List peerInfoDescriptor = $convert.base64Decode('CghQZWVySW5mbxIWCgZzdGF0dXMYASABKAVSBnN0YXR1cxIYCgdtb25pa2VyGAIgASgJUgdtb25pa2VyEhQKBWFnZW50GAMgASgJUgVhZ2VudBIXCgdwZWVyX2lkGAQgASgJUgZwZWVySWQSJQoOY29uc2Vuc3VzX2tleXMYBSADKAlSDWNvbnNlbnN1c0tleXMSLwoTY29uc2Vuc3VzX2FkZHJlc3NlcxgGIAMoCVISY29uc2Vuc3VzQWRkcmVzc2VzEhoKCHNlcnZpY2VzGAcgASgNUghzZXJ2aWNlcxImCg9sYXN0X2Jsb2NrX2hhc2gYCCABKAlSDWxhc3RCbG9ja0hhc2gSFgoGaGVpZ2h0GAkgASgNUgZoZWlnaHQSKQoQcmVjZWl2ZWRfYnVuZGxlcxgKIAEoBVIPcmVjZWl2ZWRCdW5kbGVzEicKD2ludmFsaWRfYnVuZGxlcxgLIAEoBVIOaW52YWxpZEJ1bmRsZXMSGwoJbGFzdF9zZW50GAwgASgDUghsYXN0U2VudBIjCg1sYXN0X3JlY2VpdmVkGA0gASgDUgxsYXN0UmVjZWl2ZWQSPgoKc2VudF9ieXRlcxgOIAMoCzIfLnBhY3R1cy5QZWVySW5mby5TZW50Qnl0ZXNFbnRyeVIJc2VudEJ5dGVzEkoKDnJlY2VpdmVkX2J5dGVzGA8gAygLMiMucGFjdHVzLlBlZXJJbmZvLlJlY2VpdmVkQnl0ZXNFbnRyeVINcmVjZWl2ZWRCeXRlcxIYCgdhZGRyZXNzGBAgASgJUgdhZGRyZXNzEhwKCWRpcmVjdGlvbhgRIAEoCVIJZGlyZWN0aW9uEhwKCXByb3RvY29scxgSIAMoCVIJcHJvdG9jb2xzEiUKDnRvdGFsX3Nlc3Npb25zGBMgASgFUg10b3RhbFNlc3Npb25zEi0KEmNvbXBsZXRlZF9zZXNzaW9ucxgUIAEoBVIRY29tcGxldGVkU2Vzc2lvbnMaPAoOU2VudEJ5dGVzRW50cnkSEAoDa2V5GAEgASgFUgNrZXkSFAoFdmFsdWUYAiABKANSBXZhbHVlOgI4ARpAChJSZWNlaXZlZEJ5dGVzRW50cnkSEAoDa2V5GAEgASgFUgNrZXkSFAoFdmFsdWUYAiABKANSBXZhbHVlOgI4AQ=='); +@$core.Deprecated('Use connectionInfoDescriptor instead') +const ConnectionInfo$json = const { + '1': 'ConnectionInfo', + '2': const [ + const {'1': 'connections', '3': 1, '4': 1, '5': 4, '10': 'connections'}, + const {'1': 'inbound_connections', '3': 2, '4': 1, '5': 4, '10': 'inboundConnections'}, + const {'1': 'outbound_connections', '3': 3, '4': 1, '5': 4, '10': 'outboundConnections'}, + ], +}; + +/// Descriptor for `ConnectionInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List connectionInfoDescriptor = $convert.base64Decode('Cg5Db25uZWN0aW9uSW5mbxIgCgtjb25uZWN0aW9ucxgBIAEoBFILY29ubmVjdGlvbnMSLwoTaW5ib3VuZF9jb25uZWN0aW9ucxgCIAEoBFISaW5ib3VuZENvbm5lY3Rpb25zEjEKFG91dGJvdW5kX2Nvbm5lY3Rpb25zGAMgASgEUhNvdXRib3VuZENvbm5lY3Rpb25z'); +const $core.Map<$core.String, $core.dynamic> NetworkServiceBase$json = const { + '1': 'Network', + '2': const [ + const {'1': 'GetNetworkInfo', '2': '.pactus.GetNetworkInfoRequest', '3': '.pactus.GetNetworkInfoResponse'}, + const {'1': 'GetNodeInfo', '2': '.pactus.GetNodeInfoRequest', '3': '.pactus.GetNodeInfoResponse'}, + ], +}; + +@$core.Deprecated('Use networkServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> NetworkServiceBase$messageJson = const { + '.pactus.GetNetworkInfoRequest': GetNetworkInfoRequest$json, + '.pactus.GetNetworkInfoResponse': GetNetworkInfoResponse$json, + '.pactus.PeerInfo': PeerInfo$json, + '.pactus.PeerInfo.SentBytesEntry': PeerInfo_SentBytesEntry$json, + '.pactus.PeerInfo.ReceivedBytesEntry': PeerInfo_ReceivedBytesEntry$json, + '.pactus.GetNetworkInfoResponse.SentBytesEntry': GetNetworkInfoResponse_SentBytesEntry$json, + '.pactus.GetNetworkInfoResponse.ReceivedBytesEntry': GetNetworkInfoResponse_ReceivedBytesEntry$json, + '.pactus.GetNodeInfoRequest': GetNodeInfoRequest$json, + '.pactus.GetNodeInfoResponse': GetNodeInfoResponse$json, + '.pactus.ConnectionInfo': ConnectionInfo$json, +}; + +/// Descriptor for `Network`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List networkServiceDescriptor = $convert.base64Decode('CgdOZXR3b3JrEk8KDkdldE5ldHdvcmtJbmZvEh0ucGFjdHVzLkdldE5ldHdvcmtJbmZvUmVxdWVzdBoeLnBhY3R1cy5HZXROZXR3b3JrSW5mb1Jlc3BvbnNlEkYKC0dldE5vZGVJbmZvEhoucGFjdHVzLkdldE5vZGVJbmZvUmVxdWVzdBobLnBhY3R1cy5HZXROb2RlSW5mb1Jlc3BvbnNl'); diff --git a/www/grpc/gen/dart/network.pbserver.dart b/www/grpc/gen/dart/network.pbserver.dart new file mode 100644 index 000000000..7224d070b --- /dev/null +++ b/www/grpc/gen/dart/network.pbserver.dart @@ -0,0 +1,41 @@ +/// +// Generated code. Do not modify. +// source: network.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'dart:core' as $core; +import 'network.pb.dart' as $2; +import 'network.pbjson.dart'; + +export 'network.pb.dart'; + +abstract class NetworkServiceBase extends $pb.GeneratedService { + $async.Future<$2.GetNetworkInfoResponse> getNetworkInfo($pb.ServerContext ctx, $2.GetNetworkInfoRequest request); + $async.Future<$2.GetNodeInfoResponse> getNodeInfo($pb.ServerContext ctx, $2.GetNodeInfoRequest request); + + $pb.GeneratedMessage createRequest($core.String method) { + switch (method) { + case 'GetNetworkInfo': return $2.GetNetworkInfoRequest(); + case 'GetNodeInfo': return $2.GetNodeInfoRequest(); + default: throw $core.ArgumentError('Unknown method: $method'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) { + switch (method) { + case 'GetNetworkInfo': return this.getNetworkInfo(ctx, request as $2.GetNetworkInfoRequest); + case 'GetNodeInfo': return this.getNodeInfo(ctx, request as $2.GetNodeInfoRequest); + default: throw $core.ArgumentError('Unknown method: $method'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => NetworkServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => NetworkServiceBase$messageJson; +} + diff --git a/www/grpc/gen/dart/transaction.pb.dart b/www/grpc/gen/dart/transaction.pb.dart new file mode 100644 index 000000000..843730af4 --- /dev/null +++ b/www/grpc/gen/dart/transaction.pb.dart @@ -0,0 +1,1533 @@ +/// +// Generated code. Do not modify. +// source: transaction.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'transaction.pbenum.dart'; + +export 'transaction.pbenum.dart'; + +class GetTransactionRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') + ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'verbosity', $pb.PbFieldType.OE, defaultOrMaker: TransactionVerbosity.TRANSACTION_DATA, valueOf: TransactionVerbosity.valueOf, enumValues: TransactionVerbosity.values) + ..hasRequiredFields = false + ; + + GetTransactionRequest._() : super(); + factory GetTransactionRequest({ + $core.String? id, + TransactionVerbosity? verbosity, + }) { + final _result = create(); + if (id != null) { + _result.id = id; + } + if (verbosity != null) { + _result.verbosity = verbosity; + } + return _result; + } + factory GetTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetTransactionRequest clone() => GetTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetTransactionRequest copyWith(void Function(GetTransactionRequest) updates) => super.copyWith((message) => updates(message as GetTransactionRequest)) as GetTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetTransactionRequest create() => GetTransactionRequest._(); + GetTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetTransactionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + TransactionVerbosity get verbosity => $_getN(1); + @$pb.TagNumber(2) + set verbosity(TransactionVerbosity v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasVerbosity() => $_has(1); + @$pb.TagNumber(2) + void clearVerbosity() => clearField(2); +} + +class GetTransactionResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTransactionResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockHeight', $pb.PbFieldType.OU3) + ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'blockTime', $pb.PbFieldType.OU3) + ..aOM(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transaction', subBuilder: TransactionInfo.create) + ..hasRequiredFields = false + ; + + GetTransactionResponse._() : super(); + factory GetTransactionResponse({ + $core.int? blockHeight, + $core.int? blockTime, + TransactionInfo? transaction, + }) { + final _result = create(); + if (blockHeight != null) { + _result.blockHeight = blockHeight; + } + if (blockTime != null) { + _result.blockTime = blockTime; + } + if (transaction != null) { + _result.transaction = transaction; + } + return _result; + } + factory GetTransactionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetTransactionResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetTransactionResponse clone() => GetTransactionResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetTransactionResponse copyWith(void Function(GetTransactionResponse) updates) => super.copyWith((message) => updates(message as GetTransactionResponse)) as GetTransactionResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetTransactionResponse create() => GetTransactionResponse._(); + GetTransactionResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetTransactionResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetTransactionResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get blockHeight => $_getIZ(0); + @$pb.TagNumber(1) + set blockHeight($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasBlockHeight() => $_has(0); + @$pb.TagNumber(1) + void clearBlockHeight() => clearField(1); + + @$pb.TagNumber(2) + $core.int get blockTime => $_getIZ(1); + @$pb.TagNumber(2) + set blockTime($core.int v) { $_setUnsignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasBlockTime() => $_has(1); + @$pb.TagNumber(2) + void clearBlockTime() => clearField(2); + + @$pb.TagNumber(3) + TransactionInfo get transaction => $_getN(2); + @$pb.TagNumber(3) + set transaction(TransactionInfo v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasTransaction() => $_has(2); + @$pb.TagNumber(3) + void clearTransaction() => clearField(3); + @$pb.TagNumber(3) + TransactionInfo ensureTransaction() => $_ensure(2); +} + +class CalculateFeeRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CalculateFeeRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aInt64(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payloadType', $pb.PbFieldType.OE, defaultOrMaker: PayloadType.UNKNOWN, valueOf: PayloadType.valueOf, enumValues: PayloadType.values) + ..aOB(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fixedAmount') + ..hasRequiredFields = false + ; + + CalculateFeeRequest._() : super(); + factory CalculateFeeRequest({ + $fixnum.Int64? amount, + PayloadType? payloadType, + $core.bool? fixedAmount, + }) { + final _result = create(); + if (amount != null) { + _result.amount = amount; + } + if (payloadType != null) { + _result.payloadType = payloadType; + } + if (fixedAmount != null) { + _result.fixedAmount = fixedAmount; + } + return _result; + } + factory CalculateFeeRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CalculateFeeRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CalculateFeeRequest clone() => CalculateFeeRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CalculateFeeRequest copyWith(void Function(CalculateFeeRequest) updates) => super.copyWith((message) => updates(message as CalculateFeeRequest)) as CalculateFeeRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CalculateFeeRequest create() => CalculateFeeRequest._(); + CalculateFeeRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CalculateFeeRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CalculateFeeRequest? _defaultInstance; + + @$pb.TagNumber(1) + $fixnum.Int64 get amount => $_getI64(0); + @$pb.TagNumber(1) + set amount($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasAmount() => $_has(0); + @$pb.TagNumber(1) + void clearAmount() => clearField(1); + + @$pb.TagNumber(2) + PayloadType get payloadType => $_getN(1); + @$pb.TagNumber(2) + set payloadType(PayloadType v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasPayloadType() => $_has(1); + @$pb.TagNumber(2) + void clearPayloadType() => clearField(2); + + @$pb.TagNumber(3) + $core.bool get fixedAmount => $_getBF(2); + @$pb.TagNumber(3) + set fixedAmount($core.bool v) { $_setBool(2, v); } + @$pb.TagNumber(3) + $core.bool hasFixedAmount() => $_has(2); + @$pb.TagNumber(3) + void clearFixedAmount() => clearField(3); +} + +class CalculateFeeResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CalculateFeeResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aInt64(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..aInt64(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..hasRequiredFields = false + ; + + CalculateFeeResponse._() : super(); + factory CalculateFeeResponse({ + $fixnum.Int64? amount, + $fixnum.Int64? fee, + }) { + final _result = create(); + if (amount != null) { + _result.amount = amount; + } + if (fee != null) { + _result.fee = fee; + } + return _result; + } + factory CalculateFeeResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CalculateFeeResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CalculateFeeResponse clone() => CalculateFeeResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CalculateFeeResponse copyWith(void Function(CalculateFeeResponse) updates) => super.copyWith((message) => updates(message as CalculateFeeResponse)) as CalculateFeeResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CalculateFeeResponse create() => CalculateFeeResponse._(); + CalculateFeeResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CalculateFeeResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CalculateFeeResponse? _defaultInstance; + + @$pb.TagNumber(1) + $fixnum.Int64 get amount => $_getI64(0); + @$pb.TagNumber(1) + set amount($fixnum.Int64 v) { $_setInt64(0, v); } + @$pb.TagNumber(1) + $core.bool hasAmount() => $_has(0); + @$pb.TagNumber(1) + void clearAmount() => clearField(1); + + @$pb.TagNumber(2) + $fixnum.Int64 get fee => $_getI64(1); + @$pb.TagNumber(2) + set fee($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasFee() => $_has(1); + @$pb.TagNumber(2) + void clearFee() => clearField(2); +} + +class BroadcastTransactionRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BroadcastTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signedRawTransaction') + ..hasRequiredFields = false + ; + + BroadcastTransactionRequest._() : super(); + factory BroadcastTransactionRequest({ + $core.String? signedRawTransaction, + }) { + final _result = create(); + if (signedRawTransaction != null) { + _result.signedRawTransaction = signedRawTransaction; + } + return _result; + } + factory BroadcastTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BroadcastTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + BroadcastTransactionRequest clone() => BroadcastTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + BroadcastTransactionRequest copyWith(void Function(BroadcastTransactionRequest) updates) => super.copyWith((message) => updates(message as BroadcastTransactionRequest)) as BroadcastTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static BroadcastTransactionRequest create() => BroadcastTransactionRequest._(); + BroadcastTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BroadcastTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BroadcastTransactionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get signedRawTransaction => $_getSZ(0); + @$pb.TagNumber(1) + set signedRawTransaction($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasSignedRawTransaction() => $_has(0); + @$pb.TagNumber(1) + void clearSignedRawTransaction() => clearField(1); +} + +class BroadcastTransactionResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BroadcastTransactionResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') + ..hasRequiredFields = false + ; + + BroadcastTransactionResponse._() : super(); + factory BroadcastTransactionResponse({ + $core.String? id, + }) { + final _result = create(); + if (id != null) { + _result.id = id; + } + return _result; + } + factory BroadcastTransactionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BroadcastTransactionResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + BroadcastTransactionResponse clone() => BroadcastTransactionResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + BroadcastTransactionResponse copyWith(void Function(BroadcastTransactionResponse) updates) => super.copyWith((message) => updates(message as BroadcastTransactionResponse)) as BroadcastTransactionResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static BroadcastTransactionResponse create() => BroadcastTransactionResponse._(); + BroadcastTransactionResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static BroadcastTransactionResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BroadcastTransactionResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); +} + +enum GetRawTransactionRequest_Transaction { + transfer, + bond, + unbond, + withdraw, + notSet +} + +class GetRawTransactionRequest extends $pb.GeneratedMessage { + static const $core.Map<$core.int, GetRawTransactionRequest_Transaction> _GetRawTransactionRequest_TransactionByTag = { + 3 : GetRawTransactionRequest_Transaction.transfer, + 4 : GetRawTransactionRequest_Transaction.bond, + 5 : GetRawTransactionRequest_Transaction.unbond, + 6 : GetRawTransactionRequest_Transaction.withdraw, + 0 : GetRawTransactionRequest_Transaction.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..oo(0, [3, 4, 5, 6]) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') + ..aOM(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: GetRawTransferTransactionRequest.create) + ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: GetRawBondTransactionRequest.create) + ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: GetRawUnbondTransactionRequest.create) + ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: GetRawWithdrawTransactionRequest.create) + ..hasRequiredFields = false + ; + + GetRawTransactionRequest._() : super(); + factory GetRawTransactionRequest({ + $core.int? lockTime, + $core.String? memo, + GetRawTransferTransactionRequest? transfer, + GetRawBondTransactionRequest? bond, + GetRawUnbondTransactionRequest? unbond, + GetRawWithdrawTransactionRequest? withdraw, + }) { + final _result = create(); + if (lockTime != null) { + _result.lockTime = lockTime; + } + if (memo != null) { + _result.memo = memo; + } + if (transfer != null) { + _result.transfer = transfer; + } + if (bond != null) { + _result.bond = bond; + } + if (unbond != null) { + _result.unbond = unbond; + } + if (withdraw != null) { + _result.withdraw = withdraw; + } + return _result; + } + factory GetRawTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRawTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRawTransactionRequest clone() => GetRawTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRawTransactionRequest copyWith(void Function(GetRawTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawTransactionRequest)) as GetRawTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRawTransactionRequest create() => GetRawTransactionRequest._(); + GetRawTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRawTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRawTransactionRequest? _defaultInstance; + + GetRawTransactionRequest_Transaction whichTransaction() => _GetRawTransactionRequest_TransactionByTag[$_whichOneof(0)]!; + void clearTransaction() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $core.int get lockTime => $_getIZ(0); + @$pb.TagNumber(1) + set lockTime($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasLockTime() => $_has(0); + @$pb.TagNumber(1) + void clearLockTime() => clearField(1); + + @$pb.TagNumber(2) + $core.String get memo => $_getSZ(1); + @$pb.TagNumber(2) + set memo($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasMemo() => $_has(1); + @$pb.TagNumber(2) + void clearMemo() => clearField(2); + + @$pb.TagNumber(3) + GetRawTransferTransactionRequest get transfer => $_getN(2); + @$pb.TagNumber(3) + set transfer(GetRawTransferTransactionRequest v) { setField(3, v); } + @$pb.TagNumber(3) + $core.bool hasTransfer() => $_has(2); + @$pb.TagNumber(3) + void clearTransfer() => clearField(3); + @$pb.TagNumber(3) + GetRawTransferTransactionRequest ensureTransfer() => $_ensure(2); + + @$pb.TagNumber(4) + GetRawBondTransactionRequest get bond => $_getN(3); + @$pb.TagNumber(4) + set bond(GetRawBondTransactionRequest v) { setField(4, v); } + @$pb.TagNumber(4) + $core.bool hasBond() => $_has(3); + @$pb.TagNumber(4) + void clearBond() => clearField(4); + @$pb.TagNumber(4) + GetRawBondTransactionRequest ensureBond() => $_ensure(3); + + @$pb.TagNumber(5) + GetRawUnbondTransactionRequest get unbond => $_getN(4); + @$pb.TagNumber(5) + set unbond(GetRawUnbondTransactionRequest v) { setField(5, v); } + @$pb.TagNumber(5) + $core.bool hasUnbond() => $_has(4); + @$pb.TagNumber(5) + void clearUnbond() => clearField(5); + @$pb.TagNumber(5) + GetRawUnbondTransactionRequest ensureUnbond() => $_ensure(4); + + @$pb.TagNumber(6) + GetRawWithdrawTransactionRequest get withdraw => $_getN(5); + @$pb.TagNumber(6) + set withdraw(GetRawWithdrawTransactionRequest v) { setField(6, v); } + @$pb.TagNumber(6) + $core.bool hasWithdraw() => $_has(5); + @$pb.TagNumber(6) + void clearWithdraw() => clearField(6); + @$pb.TagNumber(6) + GetRawWithdrawTransactionRequest ensureWithdraw() => $_ensure(5); +} + +class GetRawTransferTransactionRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawTransferTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..hasRequiredFields = false + ; + + GetRawTransferTransactionRequest._() : super(); + factory GetRawTransferTransactionRequest({ + $core.String? sender, + $core.String? receiver, + $fixnum.Int64? amount, + $fixnum.Int64? fee, + }) { + final _result = create(); + if (sender != null) { + _result.sender = sender; + } + if (receiver != null) { + _result.receiver = receiver; + } + if (amount != null) { + _result.amount = amount; + } + if (fee != null) { + _result.fee = fee; + } + return _result; + } + factory GetRawTransferTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRawTransferTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRawTransferTransactionRequest clone() => GetRawTransferTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRawTransferTransactionRequest copyWith(void Function(GetRawTransferTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawTransferTransactionRequest)) as GetRawTransferTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRawTransferTransactionRequest create() => GetRawTransferTransactionRequest._(); + GetRawTransferTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRawTransferTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRawTransferTransactionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get sender => $_getSZ(0); + @$pb.TagNumber(1) + set sender($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasSender() => $_has(0); + @$pb.TagNumber(1) + void clearSender() => clearField(1); + + @$pb.TagNumber(2) + $core.String get receiver => $_getSZ(1); + @$pb.TagNumber(2) + set receiver($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasReceiver() => $_has(1); + @$pb.TagNumber(2) + void clearReceiver() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get amount => $_getI64(2); + @$pb.TagNumber(3) + set amount($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasAmount() => $_has(2); + @$pb.TagNumber(3) + void clearAmount() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get fee => $_getI64(3); + @$pb.TagNumber(4) + set fee($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasFee() => $_has(3); + @$pb.TagNumber(4) + void clearFee() => clearField(4); +} + +class GetRawBondTransactionRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawBondTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') + ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..hasRequiredFields = false + ; + + GetRawBondTransactionRequest._() : super(); + factory GetRawBondTransactionRequest({ + $core.String? sender, + $core.String? receiver, + $fixnum.Int64? stake, + $core.String? publicKey, + $fixnum.Int64? fee, + }) { + final _result = create(); + if (sender != null) { + _result.sender = sender; + } + if (receiver != null) { + _result.receiver = receiver; + } + if (stake != null) { + _result.stake = stake; + } + if (publicKey != null) { + _result.publicKey = publicKey; + } + if (fee != null) { + _result.fee = fee; + } + return _result; + } + factory GetRawBondTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRawBondTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRawBondTransactionRequest clone() => GetRawBondTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRawBondTransactionRequest copyWith(void Function(GetRawBondTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawBondTransactionRequest)) as GetRawBondTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRawBondTransactionRequest create() => GetRawBondTransactionRequest._(); + GetRawBondTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRawBondTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRawBondTransactionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get sender => $_getSZ(0); + @$pb.TagNumber(1) + set sender($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasSender() => $_has(0); + @$pb.TagNumber(1) + void clearSender() => clearField(1); + + @$pb.TagNumber(2) + $core.String get receiver => $_getSZ(1); + @$pb.TagNumber(2) + set receiver($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasReceiver() => $_has(1); + @$pb.TagNumber(2) + void clearReceiver() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get stake => $_getI64(2); + @$pb.TagNumber(3) + set stake($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasStake() => $_has(2); + @$pb.TagNumber(3) + void clearStake() => clearField(3); + + @$pb.TagNumber(4) + $core.String get publicKey => $_getSZ(3); + @$pb.TagNumber(4) + set publicKey($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPublicKey() => $_has(3); + @$pb.TagNumber(4) + void clearPublicKey() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get fee => $_getI64(4); + @$pb.TagNumber(5) + set fee($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasFee() => $_has(4); + @$pb.TagNumber(5) + void clearFee() => clearField(5); +} + +class GetRawUnbondTransactionRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawUnbondTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') + ..hasRequiredFields = false + ; + + GetRawUnbondTransactionRequest._() : super(); + factory GetRawUnbondTransactionRequest({ + $core.String? validatorAddress, + }) { + final _result = create(); + if (validatorAddress != null) { + _result.validatorAddress = validatorAddress; + } + return _result; + } + factory GetRawUnbondTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRawUnbondTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRawUnbondTransactionRequest clone() => GetRawUnbondTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRawUnbondTransactionRequest copyWith(void Function(GetRawUnbondTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawUnbondTransactionRequest)) as GetRawUnbondTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRawUnbondTransactionRequest create() => GetRawUnbondTransactionRequest._(); + GetRawUnbondTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRawUnbondTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRawUnbondTransactionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get validatorAddress => $_getSZ(0); + @$pb.TagNumber(1) + set validatorAddress($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasValidatorAddress() => $_has(0); + @$pb.TagNumber(1) + void clearValidatorAddress() => clearField(1); +} + +class GetRawWithdrawTransactionRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawWithdrawTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'accountAddress') + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..hasRequiredFields = false + ; + + GetRawWithdrawTransactionRequest._() : super(); + factory GetRawWithdrawTransactionRequest({ + $core.String? validatorAddress, + $core.String? accountAddress, + $fixnum.Int64? amount, + $fixnum.Int64? fee, + }) { + final _result = create(); + if (validatorAddress != null) { + _result.validatorAddress = validatorAddress; + } + if (accountAddress != null) { + _result.accountAddress = accountAddress; + } + if (amount != null) { + _result.amount = amount; + } + if (fee != null) { + _result.fee = fee; + } + return _result; + } + factory GetRawWithdrawTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRawWithdrawTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRawWithdrawTransactionRequest clone() => GetRawWithdrawTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRawWithdrawTransactionRequest copyWith(void Function(GetRawWithdrawTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawWithdrawTransactionRequest)) as GetRawWithdrawTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRawWithdrawTransactionRequest create() => GetRawWithdrawTransactionRequest._(); + GetRawWithdrawTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRawWithdrawTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRawWithdrawTransactionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get validatorAddress => $_getSZ(0); + @$pb.TagNumber(1) + set validatorAddress($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasValidatorAddress() => $_has(0); + @$pb.TagNumber(1) + void clearValidatorAddress() => clearField(1); + + @$pb.TagNumber(2) + $core.String get accountAddress => $_getSZ(1); + @$pb.TagNumber(2) + set accountAddress($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasAccountAddress() => $_has(1); + @$pb.TagNumber(2) + void clearAccountAddress() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get amount => $_getI64(2); + @$pb.TagNumber(3) + set amount($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasAmount() => $_has(2); + @$pb.TagNumber(3) + void clearAmount() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get fee => $_getI64(3); + @$pb.TagNumber(4) + set fee($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasFee() => $_has(3); + @$pb.TagNumber(4) + void clearFee() => clearField(4); +} + +class GetRawTransactionResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawTransactionResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'rawTransaction') + ..hasRequiredFields = false + ; + + GetRawTransactionResponse._() : super(); + factory GetRawTransactionResponse({ + $core.String? rawTransaction, + }) { + final _result = create(); + if (rawTransaction != null) { + _result.rawTransaction = rawTransaction; + } + return _result; + } + factory GetRawTransactionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRawTransactionResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRawTransactionResponse clone() => GetRawTransactionResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRawTransactionResponse copyWith(void Function(GetRawTransactionResponse) updates) => super.copyWith((message) => updates(message as GetRawTransactionResponse)) as GetRawTransactionResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRawTransactionResponse create() => GetRawTransactionResponse._(); + GetRawTransactionResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRawTransactionResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRawTransactionResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get rawTransaction => $_getSZ(0); + @$pb.TagNumber(1) + set rawTransaction($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasRawTransaction() => $_has(0); + @$pb.TagNumber(1) + void clearRawTransaction() => clearField(1); +} + +class PayloadTransfer extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadTransfer', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..hasRequiredFields = false + ; + + PayloadTransfer._() : super(); + factory PayloadTransfer({ + $core.String? sender, + $core.String? receiver, + $fixnum.Int64? amount, + }) { + final _result = create(); + if (sender != null) { + _result.sender = sender; + } + if (receiver != null) { + _result.receiver = receiver; + } + if (amount != null) { + _result.amount = amount; + } + return _result; + } + factory PayloadTransfer.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PayloadTransfer.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PayloadTransfer clone() => PayloadTransfer()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PayloadTransfer copyWith(void Function(PayloadTransfer) updates) => super.copyWith((message) => updates(message as PayloadTransfer)) as PayloadTransfer; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static PayloadTransfer create() => PayloadTransfer._(); + PayloadTransfer createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PayloadTransfer getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PayloadTransfer? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get sender => $_getSZ(0); + @$pb.TagNumber(1) + set sender($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasSender() => $_has(0); + @$pb.TagNumber(1) + void clearSender() => clearField(1); + + @$pb.TagNumber(2) + $core.String get receiver => $_getSZ(1); + @$pb.TagNumber(2) + set receiver($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasReceiver() => $_has(1); + @$pb.TagNumber(2) + void clearReceiver() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get amount => $_getI64(2); + @$pb.TagNumber(3) + set amount($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasAmount() => $_has(2); + @$pb.TagNumber(3) + void clearAmount() => clearField(3); +} + +class PayloadBond extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadBond', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') + ..hasRequiredFields = false + ; + + PayloadBond._() : super(); + factory PayloadBond({ + $core.String? sender, + $core.String? receiver, + $fixnum.Int64? stake, + }) { + final _result = create(); + if (sender != null) { + _result.sender = sender; + } + if (receiver != null) { + _result.receiver = receiver; + } + if (stake != null) { + _result.stake = stake; + } + return _result; + } + factory PayloadBond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PayloadBond.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PayloadBond clone() => PayloadBond()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PayloadBond copyWith(void Function(PayloadBond) updates) => super.copyWith((message) => updates(message as PayloadBond)) as PayloadBond; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static PayloadBond create() => PayloadBond._(); + PayloadBond createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PayloadBond getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PayloadBond? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get sender => $_getSZ(0); + @$pb.TagNumber(1) + set sender($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasSender() => $_has(0); + @$pb.TagNumber(1) + void clearSender() => clearField(1); + + @$pb.TagNumber(2) + $core.String get receiver => $_getSZ(1); + @$pb.TagNumber(2) + set receiver($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasReceiver() => $_has(1); + @$pb.TagNumber(2) + void clearReceiver() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get stake => $_getI64(2); + @$pb.TagNumber(3) + set stake($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasStake() => $_has(2); + @$pb.TagNumber(3) + void clearStake() => clearField(3); +} + +class PayloadSortition extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadSortition', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'proof') + ..hasRequiredFields = false + ; + + PayloadSortition._() : super(); + factory PayloadSortition({ + $core.String? address, + $core.String? proof, + }) { + final _result = create(); + if (address != null) { + _result.address = address; + } + if (proof != null) { + _result.proof = proof; + } + return _result; + } + factory PayloadSortition.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PayloadSortition.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PayloadSortition clone() => PayloadSortition()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PayloadSortition copyWith(void Function(PayloadSortition) updates) => super.copyWith((message) => updates(message as PayloadSortition)) as PayloadSortition; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static PayloadSortition create() => PayloadSortition._(); + PayloadSortition createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PayloadSortition getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PayloadSortition? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get address => $_getSZ(0); + @$pb.TagNumber(1) + set address($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasAddress() => $_has(0); + @$pb.TagNumber(1) + void clearAddress() => clearField(1); + + @$pb.TagNumber(2) + $core.String get proof => $_getSZ(1); + @$pb.TagNumber(2) + set proof($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasProof() => $_has(1); + @$pb.TagNumber(2) + void clearProof() => clearField(2); +} + +class PayloadUnbond extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadUnbond', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validator') + ..hasRequiredFields = false + ; + + PayloadUnbond._() : super(); + factory PayloadUnbond({ + $core.String? validator, + }) { + final _result = create(); + if (validator != null) { + _result.validator = validator; + } + return _result; + } + factory PayloadUnbond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PayloadUnbond.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PayloadUnbond clone() => PayloadUnbond()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PayloadUnbond copyWith(void Function(PayloadUnbond) updates) => super.copyWith((message) => updates(message as PayloadUnbond)) as PayloadUnbond; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static PayloadUnbond create() => PayloadUnbond._(); + PayloadUnbond createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PayloadUnbond getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PayloadUnbond? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get validator => $_getSZ(0); + @$pb.TagNumber(1) + set validator($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasValidator() => $_has(0); + @$pb.TagNumber(1) + void clearValidator() => clearField(1); +} + +class PayloadWithdraw extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadWithdraw', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'from') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'to') + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..hasRequiredFields = false + ; + + PayloadWithdraw._() : super(); + factory PayloadWithdraw({ + $core.String? from, + $core.String? to, + $fixnum.Int64? amount, + }) { + final _result = create(); + if (from != null) { + _result.from = from; + } + if (to != null) { + _result.to = to; + } + if (amount != null) { + _result.amount = amount; + } + return _result; + } + factory PayloadWithdraw.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory PayloadWithdraw.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + PayloadWithdraw clone() => PayloadWithdraw()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + PayloadWithdraw copyWith(void Function(PayloadWithdraw) updates) => super.copyWith((message) => updates(message as PayloadWithdraw)) as PayloadWithdraw; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static PayloadWithdraw create() => PayloadWithdraw._(); + PayloadWithdraw createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static PayloadWithdraw getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static PayloadWithdraw? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get from => $_getSZ(0); + @$pb.TagNumber(1) + set from($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasFrom() => $_has(0); + @$pb.TagNumber(1) + void clearFrom() => clearField(1); + + @$pb.TagNumber(2) + $core.String get to => $_getSZ(1); + @$pb.TagNumber(2) + set to($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasTo() => $_has(1); + @$pb.TagNumber(2) + void clearTo() => clearField(2); + + @$pb.TagNumber(3) + $fixnum.Int64 get amount => $_getI64(2); + @$pb.TagNumber(3) + set amount($fixnum.Int64 v) { $_setInt64(2, v); } + @$pb.TagNumber(3) + $core.bool hasAmount() => $_has(2); + @$pb.TagNumber(3) + void clearAmount() => clearField(3); +} + +enum TransactionInfo_Payload { + transfer, + bond, + sortition, + unbond, + withdraw, + notSet +} + +class TransactionInfo extends $pb.GeneratedMessage { + static const $core.Map<$core.int, TransactionInfo_Payload> _TransactionInfo_PayloadByTag = { + 30 : TransactionInfo_Payload.transfer, + 31 : TransactionInfo_Payload.bond, + 32 : TransactionInfo_Payload.sortition, + 33 : TransactionInfo_Payload.unbond, + 34 : TransactionInfo_Payload.withdraw, + 0 : TransactionInfo_Payload.notSet + }; + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'TransactionInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..oo(0, [30, 31, 32, 33, 34]) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'data') + ..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'version', $pb.PbFieldType.O3) + ..a<$core.int>(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) + ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'value') + ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..e(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payloadType', $pb.PbFieldType.OE, defaultOrMaker: PayloadType.UNKNOWN, valueOf: PayloadType.valueOf, enumValues: PayloadType.values) + ..aOS(8, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') + ..aOS(9, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') + ..aOS(10, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature') + ..aOM(30, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: PayloadTransfer.create) + ..aOM(31, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: PayloadBond.create) + ..aOM(32, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sortition', subBuilder: PayloadSortition.create) + ..aOM(33, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: PayloadUnbond.create) + ..aOM(34, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: PayloadWithdraw.create) + ..hasRequiredFields = false + ; + + TransactionInfo._() : super(); + factory TransactionInfo({ + $core.String? id, + $core.String? data, + $core.int? version, + $core.int? lockTime, + $fixnum.Int64? value, + $fixnum.Int64? fee, + PayloadType? payloadType, + $core.String? memo, + $core.String? publicKey, + $core.String? signature, + PayloadTransfer? transfer, + PayloadBond? bond, + PayloadSortition? sortition, + PayloadUnbond? unbond, + PayloadWithdraw? withdraw, + }) { + final _result = create(); + if (id != null) { + _result.id = id; + } + if (data != null) { + _result.data = data; + } + if (version != null) { + _result.version = version; + } + if (lockTime != null) { + _result.lockTime = lockTime; + } + if (value != null) { + _result.value = value; + } + if (fee != null) { + _result.fee = fee; + } + if (payloadType != null) { + _result.payloadType = payloadType; + } + if (memo != null) { + _result.memo = memo; + } + if (publicKey != null) { + _result.publicKey = publicKey; + } + if (signature != null) { + _result.signature = signature; + } + if (transfer != null) { + _result.transfer = transfer; + } + if (bond != null) { + _result.bond = bond; + } + if (sortition != null) { + _result.sortition = sortition; + } + if (unbond != null) { + _result.unbond = unbond; + } + if (withdraw != null) { + _result.withdraw = withdraw; + } + return _result; + } + factory TransactionInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TransactionInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + TransactionInfo clone() => TransactionInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + TransactionInfo copyWith(void Function(TransactionInfo) updates) => super.copyWith((message) => updates(message as TransactionInfo)) as TransactionInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static TransactionInfo create() => TransactionInfo._(); + TransactionInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static TransactionInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TransactionInfo? _defaultInstance; + + TransactionInfo_Payload whichPayload() => _TransactionInfo_PayloadByTag[$_whichOneof(0)]!; + void clearPayload() => clearField($_whichOneof(0)); + + @$pb.TagNumber(1) + $core.String get id => $_getSZ(0); + @$pb.TagNumber(1) + set id($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasId() => $_has(0); + @$pb.TagNumber(1) + void clearId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get data => $_getSZ(1); + @$pb.TagNumber(2) + set data($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasData() => $_has(1); + @$pb.TagNumber(2) + void clearData() => clearField(2); + + @$pb.TagNumber(3) + $core.int get version => $_getIZ(2); + @$pb.TagNumber(3) + set version($core.int v) { $_setSignedInt32(2, v); } + @$pb.TagNumber(3) + $core.bool hasVersion() => $_has(2); + @$pb.TagNumber(3) + void clearVersion() => clearField(3); + + @$pb.TagNumber(4) + $core.int get lockTime => $_getIZ(3); + @$pb.TagNumber(4) + set lockTime($core.int v) { $_setUnsignedInt32(3, v); } + @$pb.TagNumber(4) + $core.bool hasLockTime() => $_has(3); + @$pb.TagNumber(4) + void clearLockTime() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get value => $_getI64(4); + @$pb.TagNumber(5) + set value($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasValue() => $_has(4); + @$pb.TagNumber(5) + void clearValue() => clearField(5); + + @$pb.TagNumber(6) + $fixnum.Int64 get fee => $_getI64(5); + @$pb.TagNumber(6) + set fee($fixnum.Int64 v) { $_setInt64(5, v); } + @$pb.TagNumber(6) + $core.bool hasFee() => $_has(5); + @$pb.TagNumber(6) + void clearFee() => clearField(6); + + @$pb.TagNumber(7) + PayloadType get payloadType => $_getN(6); + @$pb.TagNumber(7) + set payloadType(PayloadType v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasPayloadType() => $_has(6); + @$pb.TagNumber(7) + void clearPayloadType() => clearField(7); + + @$pb.TagNumber(8) + $core.String get memo => $_getSZ(7); + @$pb.TagNumber(8) + set memo($core.String v) { $_setString(7, v); } + @$pb.TagNumber(8) + $core.bool hasMemo() => $_has(7); + @$pb.TagNumber(8) + void clearMemo() => clearField(8); + + @$pb.TagNumber(9) + $core.String get publicKey => $_getSZ(8); + @$pb.TagNumber(9) + set publicKey($core.String v) { $_setString(8, v); } + @$pb.TagNumber(9) + $core.bool hasPublicKey() => $_has(8); + @$pb.TagNumber(9) + void clearPublicKey() => clearField(9); + + @$pb.TagNumber(10) + $core.String get signature => $_getSZ(9); + @$pb.TagNumber(10) + set signature($core.String v) { $_setString(9, v); } + @$pb.TagNumber(10) + $core.bool hasSignature() => $_has(9); + @$pb.TagNumber(10) + void clearSignature() => clearField(10); + + @$pb.TagNumber(30) + PayloadTransfer get transfer => $_getN(10); + @$pb.TagNumber(30) + set transfer(PayloadTransfer v) { setField(30, v); } + @$pb.TagNumber(30) + $core.bool hasTransfer() => $_has(10); + @$pb.TagNumber(30) + void clearTransfer() => clearField(30); + @$pb.TagNumber(30) + PayloadTransfer ensureTransfer() => $_ensure(10); + + @$pb.TagNumber(31) + PayloadBond get bond => $_getN(11); + @$pb.TagNumber(31) + set bond(PayloadBond v) { setField(31, v); } + @$pb.TagNumber(31) + $core.bool hasBond() => $_has(11); + @$pb.TagNumber(31) + void clearBond() => clearField(31); + @$pb.TagNumber(31) + PayloadBond ensureBond() => $_ensure(11); + + @$pb.TagNumber(32) + PayloadSortition get sortition => $_getN(12); + @$pb.TagNumber(32) + set sortition(PayloadSortition v) { setField(32, v); } + @$pb.TagNumber(32) + $core.bool hasSortition() => $_has(12); + @$pb.TagNumber(32) + void clearSortition() => clearField(32); + @$pb.TagNumber(32) + PayloadSortition ensureSortition() => $_ensure(12); + + @$pb.TagNumber(33) + PayloadUnbond get unbond => $_getN(13); + @$pb.TagNumber(33) + set unbond(PayloadUnbond v) { setField(33, v); } + @$pb.TagNumber(33) + $core.bool hasUnbond() => $_has(13); + @$pb.TagNumber(33) + void clearUnbond() => clearField(33); + @$pb.TagNumber(33) + PayloadUnbond ensureUnbond() => $_ensure(13); + + @$pb.TagNumber(34) + PayloadWithdraw get withdraw => $_getN(14); + @$pb.TagNumber(34) + set withdraw(PayloadWithdraw v) { setField(34, v); } + @$pb.TagNumber(34) + $core.bool hasWithdraw() => $_has(14); + @$pb.TagNumber(34) + void clearWithdraw() => clearField(34); + @$pb.TagNumber(34) + PayloadWithdraw ensureWithdraw() => $_ensure(14); +} + +class TransactionApi { + $pb.RpcClient _client; + TransactionApi(this._client); + + $async.Future getTransaction($pb.ClientContext? ctx, GetTransactionRequest request) { + var emptyResponse = GetTransactionResponse(); + return _client.invoke(ctx, 'Transaction', 'GetTransaction', request, emptyResponse); + } + $async.Future calculateFee($pb.ClientContext? ctx, CalculateFeeRequest request) { + var emptyResponse = CalculateFeeResponse(); + return _client.invoke(ctx, 'Transaction', 'CalculateFee', request, emptyResponse); + } + $async.Future broadcastTransaction($pb.ClientContext? ctx, BroadcastTransactionRequest request) { + var emptyResponse = BroadcastTransactionResponse(); + return _client.invoke(ctx, 'Transaction', 'BroadcastTransaction', request, emptyResponse); + } + $async.Future getRawTransaction($pb.ClientContext? ctx, GetRawTransactionRequest request) { + var emptyResponse = GetRawTransactionResponse(); + return _client.invoke(ctx, 'Transaction', 'GetRawTransaction', request, emptyResponse); + } +} + diff --git a/www/grpc/gen/dart/transaction.pbenum.dart b/www/grpc/gen/dart/transaction.pbenum.dart new file mode 100644 index 000000000..4830d517d --- /dev/null +++ b/www/grpc/gen/dart/transaction.pbenum.dart @@ -0,0 +1,49 @@ +/// +// Generated code. Do not modify. +// source: transaction.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// ignore_for_file: UNDEFINED_SHOWN_NAME +import 'dart:core' as $core; +import 'package:protobuf/protobuf.dart' as $pb; + +class PayloadType extends $pb.ProtobufEnum { + static const PayloadType UNKNOWN = PayloadType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UNKNOWN'); + static const PayloadType TRANSFER_PAYLOAD = PayloadType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TRANSFER_PAYLOAD'); + static const PayloadType BOND_PAYLOAD = PayloadType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'BOND_PAYLOAD'); + static const PayloadType SORTITION_PAYLOAD = PayloadType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SORTITION_PAYLOAD'); + static const PayloadType UNBOND_PAYLOAD = PayloadType._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'UNBOND_PAYLOAD'); + static const PayloadType WITHDRAW_PAYLOAD = PayloadType._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'WITHDRAW_PAYLOAD'); + + static const $core.List values = [ + UNKNOWN, + TRANSFER_PAYLOAD, + BOND_PAYLOAD, + SORTITION_PAYLOAD, + UNBOND_PAYLOAD, + WITHDRAW_PAYLOAD, + ]; + + static final $core.Map<$core.int, PayloadType> _byValue = $pb.ProtobufEnum.initByValue(values); + static PayloadType? valueOf($core.int value) => _byValue[value]; + + const PayloadType._($core.int v, $core.String n) : super(v, n); +} + +class TransactionVerbosity extends $pb.ProtobufEnum { + static const TransactionVerbosity TRANSACTION_DATA = TransactionVerbosity._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TRANSACTION_DATA'); + static const TransactionVerbosity TRANSACTION_INFO = TransactionVerbosity._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TRANSACTION_INFO'); + + static const $core.List values = [ + TRANSACTION_DATA, + TRANSACTION_INFO, + ]; + + static final $core.Map<$core.int, TransactionVerbosity> _byValue = $pb.ProtobufEnum.initByValue(values); + static TransactionVerbosity? valueOf($core.int value) => _byValue[value]; + + const TransactionVerbosity._($core.int v, $core.String n) : super(v, n); +} + diff --git a/www/grpc/gen/dart/transaction.pbjson.dart b/www/grpc/gen/dart/transaction.pbjson.dart new file mode 100644 index 000000000..218bdb1a2 --- /dev/null +++ b/www/grpc/gen/dart/transaction.pbjson.dart @@ -0,0 +1,298 @@ +/// +// Generated code. Do not modify. +// source: transaction.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use payloadTypeDescriptor instead') +const PayloadType$json = const { + '1': 'PayloadType', + '2': const [ + const {'1': 'UNKNOWN', '2': 0}, + const {'1': 'TRANSFER_PAYLOAD', '2': 1}, + const {'1': 'BOND_PAYLOAD', '2': 2}, + const {'1': 'SORTITION_PAYLOAD', '2': 3}, + const {'1': 'UNBOND_PAYLOAD', '2': 4}, + const {'1': 'WITHDRAW_PAYLOAD', '2': 5}, + ], +}; + +/// Descriptor for `PayloadType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List payloadTypeDescriptor = $convert.base64Decode('CgtQYXlsb2FkVHlwZRILCgdVTktOT1dOEAASFAoQVFJBTlNGRVJfUEFZTE9BRBABEhAKDEJPTkRfUEFZTE9BRBACEhUKEVNPUlRJVElPTl9QQVlMT0FEEAMSEgoOVU5CT05EX1BBWUxPQUQQBBIUChBXSVRIRFJBV19QQVlMT0FEEAU='); +@$core.Deprecated('Use transactionVerbosityDescriptor instead') +const TransactionVerbosity$json = const { + '1': 'TransactionVerbosity', + '2': const [ + const {'1': 'TRANSACTION_DATA', '2': 0}, + const {'1': 'TRANSACTION_INFO', '2': 1}, + ], +}; + +/// Descriptor for `TransactionVerbosity`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List transactionVerbosityDescriptor = $convert.base64Decode('ChRUcmFuc2FjdGlvblZlcmJvc2l0eRIUChBUUkFOU0FDVElPTl9EQVRBEAASFAoQVFJBTlNBQ1RJT05fSU5GTxAB'); +@$core.Deprecated('Use getTransactionRequestDescriptor instead') +const GetTransactionRequest$json = const { + '1': 'GetTransactionRequest', + '2': const [ + const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + const {'1': 'verbosity', '3': 2, '4': 1, '5': 14, '6': '.pactus.TransactionVerbosity', '10': 'verbosity'}, + ], +}; + +/// Descriptor for `GetTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getTransactionRequestDescriptor = $convert.base64Decode('ChVHZXRUcmFuc2FjdGlvblJlcXVlc3QSDgoCaWQYASABKAlSAmlkEjoKCXZlcmJvc2l0eRgCIAEoDjIcLnBhY3R1cy5UcmFuc2FjdGlvblZlcmJvc2l0eVIJdmVyYm9zaXR5'); +@$core.Deprecated('Use getTransactionResponseDescriptor instead') +const GetTransactionResponse$json = const { + '1': 'GetTransactionResponse', + '2': const [ + const {'1': 'block_height', '3': 1, '4': 1, '5': 13, '10': 'blockHeight'}, + const {'1': 'block_time', '3': 2, '4': 1, '5': 13, '10': 'blockTime'}, + const {'1': 'transaction', '3': 3, '4': 1, '5': 11, '6': '.pactus.TransactionInfo', '10': 'transaction'}, + ], +}; + +/// Descriptor for `GetTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getTransactionResponseDescriptor = $convert.base64Decode('ChZHZXRUcmFuc2FjdGlvblJlc3BvbnNlEiEKDGJsb2NrX2hlaWdodBgBIAEoDVILYmxvY2tIZWlnaHQSHQoKYmxvY2tfdGltZRgCIAEoDVIJYmxvY2tUaW1lEjkKC3RyYW5zYWN0aW9uGAMgASgLMhcucGFjdHVzLlRyYW5zYWN0aW9uSW5mb1ILdHJhbnNhY3Rpb24='); +@$core.Deprecated('Use calculateFeeRequestDescriptor instead') +const CalculateFeeRequest$json = const { + '1': 'CalculateFeeRequest', + '2': const [ + const {'1': 'amount', '3': 1, '4': 1, '5': 3, '10': 'amount'}, + const {'1': 'payload_type', '3': 2, '4': 1, '5': 14, '6': '.pactus.PayloadType', '10': 'payloadType'}, + const {'1': 'fixed_amount', '3': 3, '4': 1, '5': 8, '10': 'fixedAmount'}, + ], +}; + +/// Descriptor for `CalculateFeeRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List calculateFeeRequestDescriptor = $convert.base64Decode('ChNDYWxjdWxhdGVGZWVSZXF1ZXN0EhYKBmFtb3VudBgBIAEoA1IGYW1vdW50EjYKDHBheWxvYWRfdHlwZRgCIAEoDjITLnBhY3R1cy5QYXlsb2FkVHlwZVILcGF5bG9hZFR5cGUSIQoMZml4ZWRfYW1vdW50GAMgASgIUgtmaXhlZEFtb3VudA=='); +@$core.Deprecated('Use calculateFeeResponseDescriptor instead') +const CalculateFeeResponse$json = const { + '1': 'CalculateFeeResponse', + '2': const [ + const {'1': 'amount', '3': 1, '4': 1, '5': 3, '10': 'amount'}, + const {'1': 'fee', '3': 2, '4': 1, '5': 3, '10': 'fee'}, + ], +}; + +/// Descriptor for `CalculateFeeResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List calculateFeeResponseDescriptor = $convert.base64Decode('ChRDYWxjdWxhdGVGZWVSZXNwb25zZRIWCgZhbW91bnQYASABKANSBmFtb3VudBIQCgNmZWUYAiABKANSA2ZlZQ=='); +@$core.Deprecated('Use broadcastTransactionRequestDescriptor instead') +const BroadcastTransactionRequest$json = const { + '1': 'BroadcastTransactionRequest', + '2': const [ + const {'1': 'signed_raw_transaction', '3': 1, '4': 1, '5': 9, '10': 'signedRawTransaction'}, + ], +}; + +/// Descriptor for `BroadcastTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List broadcastTransactionRequestDescriptor = $convert.base64Decode('ChtCcm9hZGNhc3RUcmFuc2FjdGlvblJlcXVlc3QSNAoWc2lnbmVkX3Jhd190cmFuc2FjdGlvbhgBIAEoCVIUc2lnbmVkUmF3VHJhbnNhY3Rpb24='); +@$core.Deprecated('Use broadcastTransactionResponseDescriptor instead') +const BroadcastTransactionResponse$json = const { + '1': 'BroadcastTransactionResponse', + '2': const [ + const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + ], +}; + +/// Descriptor for `BroadcastTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List broadcastTransactionResponseDescriptor = $convert.base64Decode('ChxCcm9hZGNhc3RUcmFuc2FjdGlvblJlc3BvbnNlEg4KAmlkGAEgASgJUgJpZA=='); +@$core.Deprecated('Use getRawTransactionRequestDescriptor instead') +const GetRawTransactionRequest$json = const { + '1': 'GetRawTransactionRequest', + '2': const [ + const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, + const {'1': 'memo', '3': 2, '4': 1, '5': 9, '10': 'memo'}, + const {'1': 'transfer', '3': 3, '4': 1, '5': 11, '6': '.pactus.GetRawTransferTransactionRequest', '9': 0, '10': 'transfer'}, + const {'1': 'bond', '3': 4, '4': 1, '5': 11, '6': '.pactus.GetRawBondTransactionRequest', '9': 0, '10': 'bond'}, + const {'1': 'unbond', '3': 5, '4': 1, '5': 11, '6': '.pactus.GetRawUnbondTransactionRequest', '9': 0, '10': 'unbond'}, + const {'1': 'withdraw', '3': 6, '4': 1, '5': 11, '6': '.pactus.GetRawWithdrawTransactionRequest', '9': 0, '10': 'withdraw'}, + ], + '8': const [ + const {'1': 'transaction'}, + ], +}; + +/// Descriptor for `GetRawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRawTransactionRequestDescriptor = $convert.base64Decode('ChhHZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRISCgRtZW1vGAIgASgJUgRtZW1vEkYKCHRyYW5zZmVyGAMgASgLMigucGFjdHVzLkdldFJhd1RyYW5zZmVyVHJhbnNhY3Rpb25SZXF1ZXN0SABSCHRyYW5zZmVyEjoKBGJvbmQYBCABKAsyJC5wYWN0dXMuR2V0UmF3Qm9uZFRyYW5zYWN0aW9uUmVxdWVzdEgAUgRib25kEkAKBnVuYm9uZBgFIAEoCzImLnBhY3R1cy5HZXRSYXdVbmJvbmRUcmFuc2FjdGlvblJlcXVlc3RIAFIGdW5ib25kEkYKCHdpdGhkcmF3GAYgASgLMigucGFjdHVzLkdldFJhd1dpdGhkcmF3VHJhbnNhY3Rpb25SZXF1ZXN0SABSCHdpdGhkcmF3Qg0KC3RyYW5zYWN0aW9u'); +@$core.Deprecated('Use getRawTransferTransactionRequestDescriptor instead') +const GetRawTransferTransactionRequest$json = const { + '1': 'GetRawTransferTransactionRequest', + '2': const [ + const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, + const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, + const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, + const {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'}, + ], +}; + +/// Descriptor for `GetRawTransferTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRawTransferTransactionRequestDescriptor = $convert.base64Decode('CiBHZXRSYXdUcmFuc2ZlclRyYW5zYWN0aW9uUmVxdWVzdBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFgoGYW1vdW50GAMgASgDUgZhbW91bnQSEAoDZmVlGAQgASgDUgNmZWU='); +@$core.Deprecated('Use getRawBondTransactionRequestDescriptor instead') +const GetRawBondTransactionRequest$json = const { + '1': 'GetRawBondTransactionRequest', + '2': const [ + const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, + const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, + const {'1': 'stake', '3': 3, '4': 1, '5': 3, '10': 'stake'}, + const {'1': 'public_key', '3': 4, '4': 1, '5': 9, '10': 'publicKey'}, + const {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'}, + ], +}; + +/// Descriptor for `GetRawBondTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRawBondTransactionRequestDescriptor = $convert.base64Decode('ChxHZXRSYXdCb25kVHJhbnNhY3Rpb25SZXF1ZXN0EhYKBnNlbmRlchgBIAEoCVIGc2VuZGVyEhoKCHJlY2VpdmVyGAIgASgJUghyZWNlaXZlchIUCgVzdGFrZRgDIAEoA1IFc3Rha2USHQoKcHVibGljX2tleRgEIAEoCVIJcHVibGljS2V5EhAKA2ZlZRgFIAEoA1IDZmVl'); +@$core.Deprecated('Use getRawUnbondTransactionRequestDescriptor instead') +const GetRawUnbondTransactionRequest$json = const { + '1': 'GetRawUnbondTransactionRequest', + '2': const [ + const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, + ], +}; + +/// Descriptor for `GetRawUnbondTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRawUnbondTransactionRequestDescriptor = $convert.base64Decode('Ch5HZXRSYXdVbmJvbmRUcmFuc2FjdGlvblJlcXVlc3QSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvckFkZHJlc3M='); +@$core.Deprecated('Use getRawWithdrawTransactionRequestDescriptor instead') +const GetRawWithdrawTransactionRequest$json = const { + '1': 'GetRawWithdrawTransactionRequest', + '2': const [ + const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, + const {'1': 'account_address', '3': 2, '4': 1, '5': 9, '10': 'accountAddress'}, + const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, + const {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'}, + ], +}; + +/// Descriptor for `GetRawWithdrawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRawWithdrawTransactionRequestDescriptor = $convert.base64Decode('CiBHZXRSYXdXaXRoZHJhd1RyYW5zYWN0aW9uUmVxdWVzdBIrChF2YWxpZGF0b3JfYWRkcmVzcxgBIAEoCVIQdmFsaWRhdG9yQWRkcmVzcxInCg9hY2NvdW50X2FkZHJlc3MYAiABKAlSDmFjY291bnRBZGRyZXNzEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50EhAKA2ZlZRgEIAEoA1IDZmVl'); +@$core.Deprecated('Use getRawTransactionResponseDescriptor instead') +const GetRawTransactionResponse$json = const { + '1': 'GetRawTransactionResponse', + '2': const [ + const {'1': 'raw_transaction', '3': 1, '4': 1, '5': 9, '10': 'rawTransaction'}, + ], +}; + +/// Descriptor for `GetRawTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRawTransactionResponseDescriptor = $convert.base64Decode('ChlHZXRSYXdUcmFuc2FjdGlvblJlc3BvbnNlEicKD3Jhd190cmFuc2FjdGlvbhgBIAEoCVIOcmF3VHJhbnNhY3Rpb24='); +@$core.Deprecated('Use payloadTransferDescriptor instead') +const PayloadTransfer$json = const { + '1': 'PayloadTransfer', + '2': const [ + const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, + const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, + const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, + ], +}; + +/// Descriptor for `PayloadTransfer`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List payloadTransferDescriptor = $convert.base64Decode('Cg9QYXlsb2FkVHJhbnNmZXISFgoGc2VuZGVyGAEgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAiABKAlSCHJlY2VpdmVyEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50'); +@$core.Deprecated('Use payloadBondDescriptor instead') +const PayloadBond$json = const { + '1': 'PayloadBond', + '2': const [ + const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, + const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, + const {'1': 'stake', '3': 3, '4': 1, '5': 3, '10': 'stake'}, + ], +}; + +/// Descriptor for `PayloadBond`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List payloadBondDescriptor = $convert.base64Decode('CgtQYXlsb2FkQm9uZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtl'); +@$core.Deprecated('Use payloadSortitionDescriptor instead') +const PayloadSortition$json = const { + '1': 'PayloadSortition', + '2': const [ + const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, + const {'1': 'proof', '3': 2, '4': 1, '5': 9, '10': 'proof'}, + ], +}; + +/// Descriptor for `PayloadSortition`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List payloadSortitionDescriptor = $convert.base64Decode('ChBQYXlsb2FkU29ydGl0aW9uEhgKB2FkZHJlc3MYASABKAlSB2FkZHJlc3MSFAoFcHJvb2YYAiABKAlSBXByb29m'); +@$core.Deprecated('Use payloadUnbondDescriptor instead') +const PayloadUnbond$json = const { + '1': 'PayloadUnbond', + '2': const [ + const {'1': 'validator', '3': 1, '4': 1, '5': 9, '10': 'validator'}, + ], +}; + +/// Descriptor for `PayloadUnbond`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List payloadUnbondDescriptor = $convert.base64Decode('Cg1QYXlsb2FkVW5ib25kEhwKCXZhbGlkYXRvchgBIAEoCVIJdmFsaWRhdG9y'); +@$core.Deprecated('Use payloadWithdrawDescriptor instead') +const PayloadWithdraw$json = const { + '1': 'PayloadWithdraw', + '2': const [ + const {'1': 'from', '3': 1, '4': 1, '5': 9, '10': 'from'}, + const {'1': 'to', '3': 2, '4': 1, '5': 9, '10': 'to'}, + const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, + ], +}; + +/// Descriptor for `PayloadWithdraw`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List payloadWithdrawDescriptor = $convert.base64Decode('Cg9QYXlsb2FkV2l0aGRyYXcSEgoEZnJvbRgBIAEoCVIEZnJvbRIOCgJ0bxgCIAEoCVICdG8SFgoGYW1vdW50GAMgASgDUgZhbW91bnQ='); +@$core.Deprecated('Use transactionInfoDescriptor instead') +const TransactionInfo$json = const { + '1': 'TransactionInfo', + '2': const [ + const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, + const {'1': 'data', '3': 2, '4': 1, '5': 9, '10': 'data'}, + const {'1': 'version', '3': 3, '4': 1, '5': 5, '10': 'version'}, + const {'1': 'lock_time', '3': 4, '4': 1, '5': 13, '10': 'lockTime'}, + const {'1': 'value', '3': 5, '4': 1, '5': 3, '10': 'value'}, + const {'1': 'fee', '3': 6, '4': 1, '5': 3, '10': 'fee'}, + const {'1': 'payload_type', '3': 7, '4': 1, '5': 14, '6': '.pactus.PayloadType', '10': 'payloadType'}, + const {'1': 'transfer', '3': 30, '4': 1, '5': 11, '6': '.pactus.PayloadTransfer', '9': 0, '10': 'transfer'}, + const {'1': 'bond', '3': 31, '4': 1, '5': 11, '6': '.pactus.PayloadBond', '9': 0, '10': 'bond'}, + const {'1': 'sortition', '3': 32, '4': 1, '5': 11, '6': '.pactus.PayloadSortition', '9': 0, '10': 'sortition'}, + const {'1': 'unbond', '3': 33, '4': 1, '5': 11, '6': '.pactus.PayloadUnbond', '9': 0, '10': 'unbond'}, + const {'1': 'withdraw', '3': 34, '4': 1, '5': 11, '6': '.pactus.PayloadWithdraw', '9': 0, '10': 'withdraw'}, + const {'1': 'memo', '3': 8, '4': 1, '5': 9, '10': 'memo'}, + const {'1': 'public_key', '3': 9, '4': 1, '5': 9, '10': 'publicKey'}, + const {'1': 'signature', '3': 10, '4': 1, '5': 9, '10': 'signature'}, + ], + '8': const [ + const {'1': 'payload'}, + ], +}; + +/// Descriptor for `TransactionInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List transactionInfoDescriptor = $convert.base64Decode('Cg9UcmFuc2FjdGlvbkluZm8SDgoCaWQYASABKAlSAmlkEhIKBGRhdGEYAiABKAlSBGRhdGESGAoHdmVyc2lvbhgDIAEoBVIHdmVyc2lvbhIbCglsb2NrX3RpbWUYBCABKA1SCGxvY2tUaW1lEhQKBXZhbHVlGAUgASgDUgV2YWx1ZRIQCgNmZWUYBiABKANSA2ZlZRI2CgxwYXlsb2FkX3R5cGUYByABKA4yEy5wYWN0dXMuUGF5bG9hZFR5cGVSC3BheWxvYWRUeXBlEjUKCHRyYW5zZmVyGB4gASgLMhcucGFjdHVzLlBheWxvYWRUcmFuc2ZlckgAUgh0cmFuc2ZlchIpCgRib25kGB8gASgLMhMucGFjdHVzLlBheWxvYWRCb25kSABSBGJvbmQSOAoJc29ydGl0aW9uGCAgASgLMhgucGFjdHVzLlBheWxvYWRTb3J0aXRpb25IAFIJc29ydGl0aW9uEi8KBnVuYm9uZBghIAEoCzIVLnBhY3R1cy5QYXlsb2FkVW5ib25kSABSBnVuYm9uZBI1Cgh3aXRoZHJhdxgiIAEoCzIXLnBhY3R1cy5QYXlsb2FkV2l0aGRyYXdIAFIId2l0aGRyYXcSEgoEbWVtbxgIIAEoCVIEbWVtbxIdCgpwdWJsaWNfa2V5GAkgASgJUglwdWJsaWNLZXkSHAoJc2lnbmF0dXJlGAogASgJUglzaWduYXR1cmVCCQoHcGF5bG9hZA=='); +const $core.Map<$core.String, $core.dynamic> TransactionServiceBase$json = const { + '1': 'Transaction', + '2': const [ + const {'1': 'GetTransaction', '2': '.pactus.GetTransactionRequest', '3': '.pactus.GetTransactionResponse'}, + const {'1': 'CalculateFee', '2': '.pactus.CalculateFeeRequest', '3': '.pactus.CalculateFeeResponse'}, + const {'1': 'BroadcastTransaction', '2': '.pactus.BroadcastTransactionRequest', '3': '.pactus.BroadcastTransactionResponse'}, + const {'1': 'GetRawTransaction', '2': '.pactus.GetRawTransactionRequest', '3': '.pactus.GetRawTransactionResponse'}, + ], +}; + +@$core.Deprecated('Use transactionServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> TransactionServiceBase$messageJson = const { + '.pactus.GetTransactionRequest': GetTransactionRequest$json, + '.pactus.GetTransactionResponse': GetTransactionResponse$json, + '.pactus.TransactionInfo': TransactionInfo$json, + '.pactus.PayloadTransfer': PayloadTransfer$json, + '.pactus.PayloadBond': PayloadBond$json, + '.pactus.PayloadSortition': PayloadSortition$json, + '.pactus.PayloadUnbond': PayloadUnbond$json, + '.pactus.PayloadWithdraw': PayloadWithdraw$json, + '.pactus.CalculateFeeRequest': CalculateFeeRequest$json, + '.pactus.CalculateFeeResponse': CalculateFeeResponse$json, + '.pactus.BroadcastTransactionRequest': BroadcastTransactionRequest$json, + '.pactus.BroadcastTransactionResponse': BroadcastTransactionResponse$json, + '.pactus.GetRawTransactionRequest': GetRawTransactionRequest$json, + '.pactus.GetRawTransferTransactionRequest': GetRawTransferTransactionRequest$json, + '.pactus.GetRawBondTransactionRequest': GetRawBondTransactionRequest$json, + '.pactus.GetRawUnbondTransactionRequest': GetRawUnbondTransactionRequest$json, + '.pactus.GetRawWithdrawTransactionRequest': GetRawWithdrawTransactionRequest$json, + '.pactus.GetRawTransactionResponse': GetRawTransactionResponse$json, +}; + +/// Descriptor for `Transaction`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List transactionServiceDescriptor = $convert.base64Decode('CgtUcmFuc2FjdGlvbhJPCg5HZXRUcmFuc2FjdGlvbhIdLnBhY3R1cy5HZXRUcmFuc2FjdGlvblJlcXVlc3QaHi5wYWN0dXMuR2V0VHJhbnNhY3Rpb25SZXNwb25zZRJJCgxDYWxjdWxhdGVGZWUSGy5wYWN0dXMuQ2FsY3VsYXRlRmVlUmVxdWVzdBocLnBhY3R1cy5DYWxjdWxhdGVGZWVSZXNwb25zZRJhChRCcm9hZGNhc3RUcmFuc2FjdGlvbhIjLnBhY3R1cy5Ccm9hZGNhc3RUcmFuc2FjdGlvblJlcXVlc3QaJC5wYWN0dXMuQnJvYWRjYXN0VHJhbnNhY3Rpb25SZXNwb25zZRJYChFHZXRSYXdUcmFuc2FjdGlvbhIgLnBhY3R1cy5HZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QaIS5wYWN0dXMuR2V0UmF3VHJhbnNhY3Rpb25SZXNwb25zZQ=='); diff --git a/www/grpc/gen/dart/transaction.pbserver.dart b/www/grpc/gen/dart/transaction.pbserver.dart new file mode 100644 index 000000000..fc888b971 --- /dev/null +++ b/www/grpc/gen/dart/transaction.pbserver.dart @@ -0,0 +1,47 @@ +/// +// Generated code. Do not modify. +// source: transaction.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'dart:core' as $core; +import 'transaction.pb.dart' as $0; +import 'transaction.pbjson.dart'; + +export 'transaction.pb.dart'; + +abstract class TransactionServiceBase extends $pb.GeneratedService { + $async.Future<$0.GetTransactionResponse> getTransaction($pb.ServerContext ctx, $0.GetTransactionRequest request); + $async.Future<$0.CalculateFeeResponse> calculateFee($pb.ServerContext ctx, $0.CalculateFeeRequest request); + $async.Future<$0.BroadcastTransactionResponse> broadcastTransaction($pb.ServerContext ctx, $0.BroadcastTransactionRequest request); + $async.Future<$0.GetRawTransactionResponse> getRawTransaction($pb.ServerContext ctx, $0.GetRawTransactionRequest request); + + $pb.GeneratedMessage createRequest($core.String method) { + switch (method) { + case 'GetTransaction': return $0.GetTransactionRequest(); + case 'CalculateFee': return $0.CalculateFeeRequest(); + case 'BroadcastTransaction': return $0.BroadcastTransactionRequest(); + case 'GetRawTransaction': return $0.GetRawTransactionRequest(); + default: throw $core.ArgumentError('Unknown method: $method'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) { + switch (method) { + case 'GetTransaction': return this.getTransaction(ctx, request as $0.GetTransactionRequest); + case 'CalculateFee': return this.calculateFee(ctx, request as $0.CalculateFeeRequest); + case 'BroadcastTransaction': return this.broadcastTransaction(ctx, request as $0.BroadcastTransactionRequest); + case 'GetRawTransaction': return this.getRawTransaction(ctx, request as $0.GetRawTransactionRequest); + default: throw $core.ArgumentError('Unknown method: $method'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => TransactionServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => TransactionServiceBase$messageJson; +} + diff --git a/www/grpc/gen/dart/utils.pb.dart b/www/grpc/gen/dart/utils.pb.dart new file mode 100644 index 000000000..b44ff7e68 --- /dev/null +++ b/www/grpc/gen/dart/utils.pb.dart @@ -0,0 +1,256 @@ +/// +// Generated code. Do not modify. +// source: utils.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:protobuf/protobuf.dart' as $pb; + +class SignMessageWithPrivateKeyRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignMessageWithPrivateKeyRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'privateKey') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'message') + ..hasRequiredFields = false + ; + + SignMessageWithPrivateKeyRequest._() : super(); + factory SignMessageWithPrivateKeyRequest({ + $core.String? privateKey, + $core.String? message, + }) { + final _result = create(); + if (privateKey != null) { + _result.privateKey = privateKey; + } + if (message != null) { + _result.message = message; + } + return _result; + } + factory SignMessageWithPrivateKeyRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SignMessageWithPrivateKeyRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SignMessageWithPrivateKeyRequest clone() => SignMessageWithPrivateKeyRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SignMessageWithPrivateKeyRequest copyWith(void Function(SignMessageWithPrivateKeyRequest) updates) => super.copyWith((message) => updates(message as SignMessageWithPrivateKeyRequest)) as SignMessageWithPrivateKeyRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SignMessageWithPrivateKeyRequest create() => SignMessageWithPrivateKeyRequest._(); + SignMessageWithPrivateKeyRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SignMessageWithPrivateKeyRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SignMessageWithPrivateKeyRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get privateKey => $_getSZ(0); + @$pb.TagNumber(1) + set privateKey($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPrivateKey() => $_has(0); + @$pb.TagNumber(1) + void clearPrivateKey() => clearField(1); + + @$pb.TagNumber(2) + $core.String get message => $_getSZ(1); + @$pb.TagNumber(2) + set message($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasMessage() => $_has(1); + @$pb.TagNumber(2) + void clearMessage() => clearField(2); +} + +class SignMessageWithPrivateKeyResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignMessageWithPrivateKeyResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature') + ..hasRequiredFields = false + ; + + SignMessageWithPrivateKeyResponse._() : super(); + factory SignMessageWithPrivateKeyResponse({ + $core.String? signature, + }) { + final _result = create(); + if (signature != null) { + _result.signature = signature; + } + return _result; + } + factory SignMessageWithPrivateKeyResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SignMessageWithPrivateKeyResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SignMessageWithPrivateKeyResponse clone() => SignMessageWithPrivateKeyResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SignMessageWithPrivateKeyResponse copyWith(void Function(SignMessageWithPrivateKeyResponse) updates) => super.copyWith((message) => updates(message as SignMessageWithPrivateKeyResponse)) as SignMessageWithPrivateKeyResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SignMessageWithPrivateKeyResponse create() => SignMessageWithPrivateKeyResponse._(); + SignMessageWithPrivateKeyResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SignMessageWithPrivateKeyResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SignMessageWithPrivateKeyResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get signature => $_getSZ(0); + @$pb.TagNumber(1) + set signature($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasSignature() => $_has(0); + @$pb.TagNumber(1) + void clearSignature() => clearField(1); +} + +class VerifyMessageRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'VerifyMessageRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'message') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') + ..hasRequiredFields = false + ; + + VerifyMessageRequest._() : super(); + factory VerifyMessageRequest({ + $core.String? message, + $core.String? signature, + $core.String? publicKey, + }) { + final _result = create(); + if (message != null) { + _result.message = message; + } + if (signature != null) { + _result.signature = signature; + } + if (publicKey != null) { + _result.publicKey = publicKey; + } + return _result; + } + factory VerifyMessageRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory VerifyMessageRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + VerifyMessageRequest clone() => VerifyMessageRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + VerifyMessageRequest copyWith(void Function(VerifyMessageRequest) updates) => super.copyWith((message) => updates(message as VerifyMessageRequest)) as VerifyMessageRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static VerifyMessageRequest create() => VerifyMessageRequest._(); + VerifyMessageRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static VerifyMessageRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static VerifyMessageRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get message => $_getSZ(0); + @$pb.TagNumber(1) + set message($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasMessage() => $_has(0); + @$pb.TagNumber(1) + void clearMessage() => clearField(1); + + @$pb.TagNumber(2) + $core.String get signature => $_getSZ(1); + @$pb.TagNumber(2) + set signature($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasSignature() => $_has(1); + @$pb.TagNumber(2) + void clearSignature() => clearField(2); + + @$pb.TagNumber(3) + $core.String get publicKey => $_getSZ(2); + @$pb.TagNumber(3) + set publicKey($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPublicKey() => $_has(2); + @$pb.TagNumber(3) + void clearPublicKey() => clearField(3); +} + +class VerifyMessageResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'VerifyMessageResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOB(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'isValid') + ..hasRequiredFields = false + ; + + VerifyMessageResponse._() : super(); + factory VerifyMessageResponse({ + $core.bool? isValid, + }) { + final _result = create(); + if (isValid != null) { + _result.isValid = isValid; + } + return _result; + } + factory VerifyMessageResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory VerifyMessageResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + VerifyMessageResponse clone() => VerifyMessageResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + VerifyMessageResponse copyWith(void Function(VerifyMessageResponse) updates) => super.copyWith((message) => updates(message as VerifyMessageResponse)) as VerifyMessageResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static VerifyMessageResponse create() => VerifyMessageResponse._(); + VerifyMessageResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static VerifyMessageResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static VerifyMessageResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.bool get isValid => $_getBF(0); + @$pb.TagNumber(1) + set isValid($core.bool v) { $_setBool(0, v); } + @$pb.TagNumber(1) + $core.bool hasIsValid() => $_has(0); + @$pb.TagNumber(1) + void clearIsValid() => clearField(1); +} + +class UtilsApi { + $pb.RpcClient _client; + UtilsApi(this._client); + + $async.Future signMessageWithPrivateKey($pb.ClientContext? ctx, SignMessageWithPrivateKeyRequest request) { + var emptyResponse = SignMessageWithPrivateKeyResponse(); + return _client.invoke(ctx, 'Utils', 'SignMessageWithPrivateKey', request, emptyResponse); + } + $async.Future verifyMessage($pb.ClientContext? ctx, VerifyMessageRequest request) { + var emptyResponse = VerifyMessageResponse(); + return _client.invoke(ctx, 'Utils', 'VerifyMessage', request, emptyResponse); + } +} + diff --git a/www/grpc/gen/dart/utils.pbenum.dart b/www/grpc/gen/dart/utils.pbenum.dart new file mode 100644 index 000000000..e5fa14ccf --- /dev/null +++ b/www/grpc/gen/dart/utils.pbenum.dart @@ -0,0 +1,7 @@ +/// +// Generated code. Do not modify. +// source: utils.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + diff --git a/www/grpc/gen/dart/utils.pbjson.dart b/www/grpc/gen/dart/utils.pbjson.dart new file mode 100644 index 000000000..1ce27d7a4 --- /dev/null +++ b/www/grpc/gen/dart/utils.pbjson.dart @@ -0,0 +1,71 @@ +/// +// Generated code. Do not modify. +// source: utils.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use signMessageWithPrivateKeyRequestDescriptor instead') +const SignMessageWithPrivateKeyRequest$json = const { + '1': 'SignMessageWithPrivateKeyRequest', + '2': const [ + const {'1': 'private_key', '3': 1, '4': 1, '5': 9, '10': 'privateKey'}, + const {'1': 'message', '3': 2, '4': 1, '5': 9, '10': 'message'}, + ], +}; + +/// Descriptor for `SignMessageWithPrivateKeyRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List signMessageWithPrivateKeyRequestDescriptor = $convert.base64Decode('CiBTaWduTWVzc2FnZVdpdGhQcml2YXRlS2V5UmVxdWVzdBIfCgtwcml2YXRlX2tleRgBIAEoCVIKcHJpdmF0ZUtleRIYCgdtZXNzYWdlGAIgASgJUgdtZXNzYWdl'); +@$core.Deprecated('Use signMessageWithPrivateKeyResponseDescriptor instead') +const SignMessageWithPrivateKeyResponse$json = const { + '1': 'SignMessageWithPrivateKeyResponse', + '2': const [ + const {'1': 'signature', '3': 1, '4': 1, '5': 9, '10': 'signature'}, + ], +}; + +/// Descriptor for `SignMessageWithPrivateKeyResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List signMessageWithPrivateKeyResponseDescriptor = $convert.base64Decode('CiFTaWduTWVzc2FnZVdpdGhQcml2YXRlS2V5UmVzcG9uc2USHAoJc2lnbmF0dXJlGAEgASgJUglzaWduYXR1cmU='); +@$core.Deprecated('Use verifyMessageRequestDescriptor instead') +const VerifyMessageRequest$json = const { + '1': 'VerifyMessageRequest', + '2': const [ + const {'1': 'message', '3': 1, '4': 1, '5': 9, '10': 'message'}, + const {'1': 'signature', '3': 2, '4': 1, '5': 9, '10': 'signature'}, + const {'1': 'public_key', '3': 3, '4': 1, '5': 9, '10': 'publicKey'}, + ], +}; + +/// Descriptor for `VerifyMessageRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List verifyMessageRequestDescriptor = $convert.base64Decode('ChRWZXJpZnlNZXNzYWdlUmVxdWVzdBIYCgdtZXNzYWdlGAEgASgJUgdtZXNzYWdlEhwKCXNpZ25hdHVyZRgCIAEoCVIJc2lnbmF0dXJlEh0KCnB1YmxpY19rZXkYAyABKAlSCXB1YmxpY0tleQ=='); +@$core.Deprecated('Use verifyMessageResponseDescriptor instead') +const VerifyMessageResponse$json = const { + '1': 'VerifyMessageResponse', + '2': const [ + const {'1': 'is_valid', '3': 1, '4': 1, '5': 8, '10': 'isValid'}, + ], +}; + +/// Descriptor for `VerifyMessageResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List verifyMessageResponseDescriptor = $convert.base64Decode('ChVWZXJpZnlNZXNzYWdlUmVzcG9uc2USGQoIaXNfdmFsaWQYASABKAhSB2lzVmFsaWQ='); +const $core.Map<$core.String, $core.dynamic> UtilsServiceBase$json = const { + '1': 'Utils', + '2': const [ + const {'1': 'SignMessageWithPrivateKey', '2': '.pactus.SignMessageWithPrivateKeyRequest', '3': '.pactus.SignMessageWithPrivateKeyResponse'}, + const {'1': 'VerifyMessage', '2': '.pactus.VerifyMessageRequest', '3': '.pactus.VerifyMessageResponse'}, + ], +}; + +@$core.Deprecated('Use utilsServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> UtilsServiceBase$messageJson = const { + '.pactus.SignMessageWithPrivateKeyRequest': SignMessageWithPrivateKeyRequest$json, + '.pactus.SignMessageWithPrivateKeyResponse': SignMessageWithPrivateKeyResponse$json, + '.pactus.VerifyMessageRequest': VerifyMessageRequest$json, + '.pactus.VerifyMessageResponse': VerifyMessageResponse$json, +}; + +/// Descriptor for `Utils`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List utilsServiceDescriptor = $convert.base64Decode('CgVVdGlscxJwChlTaWduTWVzc2FnZVdpdGhQcml2YXRlS2V5EigucGFjdHVzLlNpZ25NZXNzYWdlV2l0aFByaXZhdGVLZXlSZXF1ZXN0GikucGFjdHVzLlNpZ25NZXNzYWdlV2l0aFByaXZhdGVLZXlSZXNwb25zZRJMCg1WZXJpZnlNZXNzYWdlEhwucGFjdHVzLlZlcmlmeU1lc3NhZ2VSZXF1ZXN0Gh0ucGFjdHVzLlZlcmlmeU1lc3NhZ2VSZXNwb25zZQ=='); diff --git a/www/grpc/gen/dart/utils.pbserver.dart b/www/grpc/gen/dart/utils.pbserver.dart new file mode 100644 index 000000000..083835287 --- /dev/null +++ b/www/grpc/gen/dart/utils.pbserver.dart @@ -0,0 +1,41 @@ +/// +// Generated code. Do not modify. +// source: utils.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'dart:core' as $core; +import 'utils.pb.dart' as $3; +import 'utils.pbjson.dart'; + +export 'utils.pb.dart'; + +abstract class UtilsServiceBase extends $pb.GeneratedService { + $async.Future<$3.SignMessageWithPrivateKeyResponse> signMessageWithPrivateKey($pb.ServerContext ctx, $3.SignMessageWithPrivateKeyRequest request); + $async.Future<$3.VerifyMessageResponse> verifyMessage($pb.ServerContext ctx, $3.VerifyMessageRequest request); + + $pb.GeneratedMessage createRequest($core.String method) { + switch (method) { + case 'SignMessageWithPrivateKey': return $3.SignMessageWithPrivateKeyRequest(); + case 'VerifyMessage': return $3.VerifyMessageRequest(); + default: throw $core.ArgumentError('Unknown method: $method'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) { + switch (method) { + case 'SignMessageWithPrivateKey': return this.signMessageWithPrivateKey(ctx, request as $3.SignMessageWithPrivateKeyRequest); + case 'VerifyMessage': return this.verifyMessage(ctx, request as $3.VerifyMessageRequest); + default: throw $core.ArgumentError('Unknown method: $method'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => UtilsServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => UtilsServiceBase$messageJson; +} + diff --git a/www/grpc/gen/dart/wallet.pb.dart b/www/grpc/gen/dart/wallet.pb.dart new file mode 100644 index 000000000..779f3ee1c --- /dev/null +++ b/www/grpc/gen/dart/wallet.pb.dart @@ -0,0 +1,1401 @@ +/// +// Generated code. Do not modify. +// source: wallet.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; +import 'dart:core' as $core; + +import 'package:fixnum/fixnum.dart' as $fixnum; +import 'package:protobuf/protobuf.dart' as $pb; + +import 'wallet.pbenum.dart'; + +export 'wallet.pbenum.dart'; + +class AddressInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'AddressInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'label') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'path') + ..hasRequiredFields = false + ; + + AddressInfo._() : super(); + factory AddressInfo({ + $core.String? address, + $core.String? publicKey, + $core.String? label, + $core.String? path, + }) { + final _result = create(); + if (address != null) { + _result.address = address; + } + if (publicKey != null) { + _result.publicKey = publicKey; + } + if (label != null) { + _result.label = label; + } + if (path != null) { + _result.path = path; + } + return _result; + } + factory AddressInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory AddressInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + AddressInfo clone() => AddressInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + AddressInfo copyWith(void Function(AddressInfo) updates) => super.copyWith((message) => updates(message as AddressInfo)) as AddressInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static AddressInfo create() => AddressInfo._(); + AddressInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static AddressInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static AddressInfo? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get address => $_getSZ(0); + @$pb.TagNumber(1) + set address($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasAddress() => $_has(0); + @$pb.TagNumber(1) + void clearAddress() => clearField(1); + + @$pb.TagNumber(2) + $core.String get publicKey => $_getSZ(1); + @$pb.TagNumber(2) + set publicKey($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPublicKey() => $_has(1); + @$pb.TagNumber(2) + void clearPublicKey() => clearField(2); + + @$pb.TagNumber(3) + $core.String get label => $_getSZ(2); + @$pb.TagNumber(3) + set label($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasLabel() => $_has(2); + @$pb.TagNumber(3) + void clearLabel() => clearField(3); + + @$pb.TagNumber(4) + $core.String get path => $_getSZ(3); + @$pb.TagNumber(4) + set path($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPath() => $_has(3); + @$pb.TagNumber(4) + void clearPath() => clearField(4); +} + +class HistoryInfo extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'HistoryInfo', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transactionId') + ..a<$core.int>(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'time', $pb.PbFieldType.OU3) + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'payloadType') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'description') + ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..hasRequiredFields = false + ; + + HistoryInfo._() : super(); + factory HistoryInfo({ + $core.String? transactionId, + $core.int? time, + $core.String? payloadType, + $core.String? description, + $fixnum.Int64? amount, + }) { + final _result = create(); + if (transactionId != null) { + _result.transactionId = transactionId; + } + if (time != null) { + _result.time = time; + } + if (payloadType != null) { + _result.payloadType = payloadType; + } + if (description != null) { + _result.description = description; + } + if (amount != null) { + _result.amount = amount; + } + return _result; + } + factory HistoryInfo.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory HistoryInfo.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + HistoryInfo clone() => HistoryInfo()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + HistoryInfo copyWith(void Function(HistoryInfo) updates) => super.copyWith((message) => updates(message as HistoryInfo)) as HistoryInfo; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static HistoryInfo create() => HistoryInfo._(); + HistoryInfo createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static HistoryInfo getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static HistoryInfo? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get transactionId => $_getSZ(0); + @$pb.TagNumber(1) + set transactionId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasTransactionId() => $_has(0); + @$pb.TagNumber(1) + void clearTransactionId() => clearField(1); + + @$pb.TagNumber(2) + $core.int get time => $_getIZ(1); + @$pb.TagNumber(2) + set time($core.int v) { $_setUnsignedInt32(1, v); } + @$pb.TagNumber(2) + $core.bool hasTime() => $_has(1); + @$pb.TagNumber(2) + void clearTime() => clearField(2); + + @$pb.TagNumber(3) + $core.String get payloadType => $_getSZ(2); + @$pb.TagNumber(3) + set payloadType($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPayloadType() => $_has(2); + @$pb.TagNumber(3) + void clearPayloadType() => clearField(3); + + @$pb.TagNumber(4) + $core.String get description => $_getSZ(3); + @$pb.TagNumber(4) + set description($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasDescription() => $_has(3); + @$pb.TagNumber(4) + void clearDescription() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get amount => $_getI64(4); + @$pb.TagNumber(5) + set amount($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasAmount() => $_has(4); + @$pb.TagNumber(5) + void clearAmount() => clearField(5); +} + +class GetAddressHistoryRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetAddressHistoryRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..hasRequiredFields = false + ; + + GetAddressHistoryRequest._() : super(); + factory GetAddressHistoryRequest({ + $core.String? walletName, + $core.String? address, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + if (address != null) { + _result.address = address; + } + return _result; + } + factory GetAddressHistoryRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetAddressHistoryRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetAddressHistoryRequest clone() => GetAddressHistoryRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetAddressHistoryRequest copyWith(void Function(GetAddressHistoryRequest) updates) => super.copyWith((message) => updates(message as GetAddressHistoryRequest)) as GetAddressHistoryRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetAddressHistoryRequest create() => GetAddressHistoryRequest._(); + GetAddressHistoryRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetAddressHistoryRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetAddressHistoryRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); + + @$pb.TagNumber(2) + $core.String get address => $_getSZ(1); + @$pb.TagNumber(2) + set address($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasAddress() => $_has(1); + @$pb.TagNumber(2) + void clearAddress() => clearField(2); +} + +class GetAddressHistoryResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetAddressHistoryResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..pc(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'historyInfo', $pb.PbFieldType.PM, subBuilder: HistoryInfo.create) + ..hasRequiredFields = false + ; + + GetAddressHistoryResponse._() : super(); + factory GetAddressHistoryResponse({ + $core.Iterable? historyInfo, + }) { + final _result = create(); + if (historyInfo != null) { + _result.historyInfo.addAll(historyInfo); + } + return _result; + } + factory GetAddressHistoryResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetAddressHistoryResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetAddressHistoryResponse clone() => GetAddressHistoryResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetAddressHistoryResponse copyWith(void Function(GetAddressHistoryResponse) updates) => super.copyWith((message) => updates(message as GetAddressHistoryResponse)) as GetAddressHistoryResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetAddressHistoryResponse create() => GetAddressHistoryResponse._(); + GetAddressHistoryResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetAddressHistoryResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetAddressHistoryResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.List get historyInfo => $_getList(0); +} + +class GetNewAddressRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNewAddressRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..e(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'addressType', $pb.PbFieldType.OE, defaultOrMaker: AddressType.ADDRESS_TYPE_TREASURY, valueOf: AddressType.valueOf, enumValues: AddressType.values) + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'label') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password') + ..hasRequiredFields = false + ; + + GetNewAddressRequest._() : super(); + factory GetNewAddressRequest({ + $core.String? walletName, + AddressType? addressType, + $core.String? label, + $core.String? password, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + if (addressType != null) { + _result.addressType = addressType; + } + if (label != null) { + _result.label = label; + } + if (password != null) { + _result.password = password; + } + return _result; + } + factory GetNewAddressRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetNewAddressRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetNewAddressRequest clone() => GetNewAddressRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetNewAddressRequest copyWith(void Function(GetNewAddressRequest) updates) => super.copyWith((message) => updates(message as GetNewAddressRequest)) as GetNewAddressRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetNewAddressRequest create() => GetNewAddressRequest._(); + GetNewAddressRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetNewAddressRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetNewAddressRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); + + @$pb.TagNumber(2) + AddressType get addressType => $_getN(1); + @$pb.TagNumber(2) + set addressType(AddressType v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasAddressType() => $_has(1); + @$pb.TagNumber(2) + void clearAddressType() => clearField(2); + + @$pb.TagNumber(3) + $core.String get label => $_getSZ(2); + @$pb.TagNumber(3) + set label($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasLabel() => $_has(2); + @$pb.TagNumber(3) + void clearLabel() => clearField(3); + + @$pb.TagNumber(4) + $core.String get password => $_getSZ(3); + @$pb.TagNumber(4) + set password($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPassword() => $_has(3); + @$pb.TagNumber(4) + void clearPassword() => clearField(4); +} + +class GetNewAddressResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetNewAddressResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..aOM(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'addressInfo', subBuilder: AddressInfo.create) + ..hasRequiredFields = false + ; + + GetNewAddressResponse._() : super(); + factory GetNewAddressResponse({ + $core.String? walletName, + AddressInfo? addressInfo, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + if (addressInfo != null) { + _result.addressInfo = addressInfo; + } + return _result; + } + factory GetNewAddressResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetNewAddressResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetNewAddressResponse clone() => GetNewAddressResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetNewAddressResponse copyWith(void Function(GetNewAddressResponse) updates) => super.copyWith((message) => updates(message as GetNewAddressResponse)) as GetNewAddressResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetNewAddressResponse create() => GetNewAddressResponse._(); + GetNewAddressResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetNewAddressResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetNewAddressResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); + + @$pb.TagNumber(2) + AddressInfo get addressInfo => $_getN(1); + @$pb.TagNumber(2) + set addressInfo(AddressInfo v) { setField(2, v); } + @$pb.TagNumber(2) + $core.bool hasAddressInfo() => $_has(1); + @$pb.TagNumber(2) + void clearAddressInfo() => clearField(2); + @$pb.TagNumber(2) + AddressInfo ensureAddressInfo() => $_ensure(1); +} + +class RestoreWalletRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RestoreWalletRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'mnemonic') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password') + ..hasRequiredFields = false + ; + + RestoreWalletRequest._() : super(); + factory RestoreWalletRequest({ + $core.String? walletName, + $core.String? mnemonic, + $core.String? password, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + if (mnemonic != null) { + _result.mnemonic = mnemonic; + } + if (password != null) { + _result.password = password; + } + return _result; + } + factory RestoreWalletRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RestoreWalletRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + RestoreWalletRequest clone() => RestoreWalletRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RestoreWalletRequest copyWith(void Function(RestoreWalletRequest) updates) => super.copyWith((message) => updates(message as RestoreWalletRequest)) as RestoreWalletRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static RestoreWalletRequest create() => RestoreWalletRequest._(); + RestoreWalletRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RestoreWalletRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RestoreWalletRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); + + @$pb.TagNumber(2) + $core.String get mnemonic => $_getSZ(1); + @$pb.TagNumber(2) + set mnemonic($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasMnemonic() => $_has(1); + @$pb.TagNumber(2) + void clearMnemonic() => clearField(2); + + @$pb.TagNumber(3) + $core.String get password => $_getSZ(2); + @$pb.TagNumber(3) + set password($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPassword() => $_has(2); + @$pb.TagNumber(3) + void clearPassword() => clearField(3); +} + +class RestoreWalletResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RestoreWalletResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..hasRequiredFields = false + ; + + RestoreWalletResponse._() : super(); + factory RestoreWalletResponse({ + $core.String? walletName, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + return _result; + } + factory RestoreWalletResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RestoreWalletResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + RestoreWalletResponse clone() => RestoreWalletResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RestoreWalletResponse copyWith(void Function(RestoreWalletResponse) updates) => super.copyWith((message) => updates(message as RestoreWalletResponse)) as RestoreWalletResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static RestoreWalletResponse create() => RestoreWalletResponse._(); + RestoreWalletResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RestoreWalletResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RestoreWalletResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); +} + +class CreateWalletRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateWalletRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password') + ..hasRequiredFields = false + ; + + CreateWalletRequest._() : super(); + factory CreateWalletRequest({ + $core.String? walletName, + $core.String? password, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + if (password != null) { + _result.password = password; + } + return _result; + } + factory CreateWalletRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateWalletRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateWalletRequest clone() => CreateWalletRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateWalletRequest copyWith(void Function(CreateWalletRequest) updates) => super.copyWith((message) => updates(message as CreateWalletRequest)) as CreateWalletRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CreateWalletRequest create() => CreateWalletRequest._(); + CreateWalletRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateWalletRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateWalletRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); + + @$pb.TagNumber(4) + $core.String get password => $_getSZ(1); + @$pb.TagNumber(4) + set password($core.String v) { $_setString(1, v); } + @$pb.TagNumber(4) + $core.bool hasPassword() => $_has(1); + @$pb.TagNumber(4) + void clearPassword() => clearField(4); +} + +class CreateWalletResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'CreateWalletResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'mnemonic') + ..hasRequiredFields = false + ; + + CreateWalletResponse._() : super(); + factory CreateWalletResponse({ + $core.String? mnemonic, + }) { + final _result = create(); + if (mnemonic != null) { + _result.mnemonic = mnemonic; + } + return _result; + } + factory CreateWalletResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory CreateWalletResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + CreateWalletResponse clone() => CreateWalletResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + CreateWalletResponse copyWith(void Function(CreateWalletResponse) updates) => super.copyWith((message) => updates(message as CreateWalletResponse)) as CreateWalletResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static CreateWalletResponse create() => CreateWalletResponse._(); + CreateWalletResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static CreateWalletResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static CreateWalletResponse? _defaultInstance; + + @$pb.TagNumber(2) + $core.String get mnemonic => $_getSZ(0); + @$pb.TagNumber(2) + set mnemonic($core.String v) { $_setString(0, v); } + @$pb.TagNumber(2) + $core.bool hasMnemonic() => $_has(0); + @$pb.TagNumber(2) + void clearMnemonic() => clearField(2); +} + +class LoadWalletRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'LoadWalletRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..hasRequiredFields = false + ; + + LoadWalletRequest._() : super(); + factory LoadWalletRequest({ + $core.String? walletName, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + return _result; + } + factory LoadWalletRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory LoadWalletRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + LoadWalletRequest clone() => LoadWalletRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + LoadWalletRequest copyWith(void Function(LoadWalletRequest) updates) => super.copyWith((message) => updates(message as LoadWalletRequest)) as LoadWalletRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static LoadWalletRequest create() => LoadWalletRequest._(); + LoadWalletRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static LoadWalletRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static LoadWalletRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); +} + +class LoadWalletResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'LoadWalletResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..hasRequiredFields = false + ; + + LoadWalletResponse._() : super(); + factory LoadWalletResponse({ + $core.String? walletName, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + return _result; + } + factory LoadWalletResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory LoadWalletResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + LoadWalletResponse clone() => LoadWalletResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + LoadWalletResponse copyWith(void Function(LoadWalletResponse) updates) => super.copyWith((message) => updates(message as LoadWalletResponse)) as LoadWalletResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static LoadWalletResponse create() => LoadWalletResponse._(); + LoadWalletResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static LoadWalletResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static LoadWalletResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); +} + +class UnloadWalletRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UnloadWalletRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..hasRequiredFields = false + ; + + UnloadWalletRequest._() : super(); + factory UnloadWalletRequest({ + $core.String? walletName, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + return _result; + } + factory UnloadWalletRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UnloadWalletRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UnloadWalletRequest clone() => UnloadWalletRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UnloadWalletRequest copyWith(void Function(UnloadWalletRequest) updates) => super.copyWith((message) => updates(message as UnloadWalletRequest)) as UnloadWalletRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static UnloadWalletRequest create() => UnloadWalletRequest._(); + UnloadWalletRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UnloadWalletRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UnloadWalletRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); +} + +class UnloadWalletResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UnloadWalletResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..hasRequiredFields = false + ; + + UnloadWalletResponse._() : super(); + factory UnloadWalletResponse({ + $core.String? walletName, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + return _result; + } + factory UnloadWalletResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UnloadWalletResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + UnloadWalletResponse clone() => UnloadWalletResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + UnloadWalletResponse copyWith(void Function(UnloadWalletResponse) updates) => super.copyWith((message) => updates(message as UnloadWalletResponse)) as UnloadWalletResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static UnloadWalletResponse create() => UnloadWalletResponse._(); + UnloadWalletResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static UnloadWalletResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UnloadWalletResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); +} + +class GetValidatorAddressRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorAddressRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') + ..hasRequiredFields = false + ; + + GetValidatorAddressRequest._() : super(); + factory GetValidatorAddressRequest({ + $core.String? publicKey, + }) { + final _result = create(); + if (publicKey != null) { + _result.publicKey = publicKey; + } + return _result; + } + factory GetValidatorAddressRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidatorAddressRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidatorAddressRequest clone() => GetValidatorAddressRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidatorAddressRequest copyWith(void Function(GetValidatorAddressRequest) updates) => super.copyWith((message) => updates(message as GetValidatorAddressRequest)) as GetValidatorAddressRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetValidatorAddressRequest create() => GetValidatorAddressRequest._(); + GetValidatorAddressRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetValidatorAddressRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetValidatorAddressRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get publicKey => $_getSZ(0); + @$pb.TagNumber(1) + set publicKey($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasPublicKey() => $_has(0); + @$pb.TagNumber(1) + void clearPublicKey() => clearField(1); +} + +class GetValidatorAddressResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorAddressResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..hasRequiredFields = false + ; + + GetValidatorAddressResponse._() : super(); + factory GetValidatorAddressResponse({ + $core.String? address, + }) { + final _result = create(); + if (address != null) { + _result.address = address; + } + return _result; + } + factory GetValidatorAddressResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetValidatorAddressResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetValidatorAddressResponse clone() => GetValidatorAddressResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetValidatorAddressResponse copyWith(void Function(GetValidatorAddressResponse) updates) => super.copyWith((message) => updates(message as GetValidatorAddressResponse)) as GetValidatorAddressResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetValidatorAddressResponse create() => GetValidatorAddressResponse._(); + GetValidatorAddressResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetValidatorAddressResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetValidatorAddressResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get address => $_getSZ(0); + @$pb.TagNumber(1) + set address($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasAddress() => $_has(0); + @$pb.TagNumber(1) + void clearAddress() => clearField(1); +} + +class SignRawTransactionRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignRawTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'rawTransaction') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password') + ..hasRequiredFields = false + ; + + SignRawTransactionRequest._() : super(); + factory SignRawTransactionRequest({ + $core.String? walletName, + $core.String? rawTransaction, + $core.String? password, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + if (rawTransaction != null) { + _result.rawTransaction = rawTransaction; + } + if (password != null) { + _result.password = password; + } + return _result; + } + factory SignRawTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SignRawTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SignRawTransactionRequest clone() => SignRawTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SignRawTransactionRequest copyWith(void Function(SignRawTransactionRequest) updates) => super.copyWith((message) => updates(message as SignRawTransactionRequest)) as SignRawTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SignRawTransactionRequest create() => SignRawTransactionRequest._(); + SignRawTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SignRawTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SignRawTransactionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); + + @$pb.TagNumber(2) + $core.String get rawTransaction => $_getSZ(1); + @$pb.TagNumber(2) + set rawTransaction($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasRawTransaction() => $_has(1); + @$pb.TagNumber(2) + void clearRawTransaction() => clearField(2); + + @$pb.TagNumber(3) + $core.String get password => $_getSZ(2); + @$pb.TagNumber(3) + set password($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasPassword() => $_has(2); + @$pb.TagNumber(3) + void clearPassword() => clearField(3); +} + +class SignRawTransactionResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignRawTransactionResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transactionId') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signedRawTransaction') + ..hasRequiredFields = false + ; + + SignRawTransactionResponse._() : super(); + factory SignRawTransactionResponse({ + $core.String? transactionId, + $core.String? signedRawTransaction, + }) { + final _result = create(); + if (transactionId != null) { + _result.transactionId = transactionId; + } + if (signedRawTransaction != null) { + _result.signedRawTransaction = signedRawTransaction; + } + return _result; + } + factory SignRawTransactionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SignRawTransactionResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SignRawTransactionResponse clone() => SignRawTransactionResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SignRawTransactionResponse copyWith(void Function(SignRawTransactionResponse) updates) => super.copyWith((message) => updates(message as SignRawTransactionResponse)) as SignRawTransactionResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SignRawTransactionResponse create() => SignRawTransactionResponse._(); + SignRawTransactionResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SignRawTransactionResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SignRawTransactionResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get transactionId => $_getSZ(0); + @$pb.TagNumber(1) + set transactionId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasTransactionId() => $_has(0); + @$pb.TagNumber(1) + void clearTransactionId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get signedRawTransaction => $_getSZ(1); + @$pb.TagNumber(2) + set signedRawTransaction($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasSignedRawTransaction() => $_has(1); + @$pb.TagNumber(2) + void clearSignedRawTransaction() => clearField(2); +} + +class GetTotalBalanceRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTotalBalanceRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..hasRequiredFields = false + ; + + GetTotalBalanceRequest._() : super(); + factory GetTotalBalanceRequest({ + $core.String? walletName, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + return _result; + } + factory GetTotalBalanceRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetTotalBalanceRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetTotalBalanceRequest clone() => GetTotalBalanceRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetTotalBalanceRequest copyWith(void Function(GetTotalBalanceRequest) updates) => super.copyWith((message) => updates(message as GetTotalBalanceRequest)) as GetTotalBalanceRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetTotalBalanceRequest create() => GetTotalBalanceRequest._(); + GetTotalBalanceRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetTotalBalanceRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetTotalBalanceRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); +} + +class GetTotalBalanceResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTotalBalanceResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..aInt64(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totalBalance') + ..hasRequiredFields = false + ; + + GetTotalBalanceResponse._() : super(); + factory GetTotalBalanceResponse({ + $core.String? walletName, + $fixnum.Int64? totalBalance, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + if (totalBalance != null) { + _result.totalBalance = totalBalance; + } + return _result; + } + factory GetTotalBalanceResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetTotalBalanceResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetTotalBalanceResponse clone() => GetTotalBalanceResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetTotalBalanceResponse copyWith(void Function(GetTotalBalanceResponse) updates) => super.copyWith((message) => updates(message as GetTotalBalanceResponse)) as GetTotalBalanceResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetTotalBalanceResponse create() => GetTotalBalanceResponse._(); + GetTotalBalanceResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetTotalBalanceResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetTotalBalanceResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); + + @$pb.TagNumber(2) + $fixnum.Int64 get totalBalance => $_getI64(1); + @$pb.TagNumber(2) + set totalBalance($fixnum.Int64 v) { $_setInt64(1, v); } + @$pb.TagNumber(2) + $core.bool hasTotalBalance() => $_has(1); + @$pb.TagNumber(2) + void clearTotalBalance() => clearField(2); +} + +class SignMessageRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignMessageRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'address') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'message') + ..hasRequiredFields = false + ; + + SignMessageRequest._() : super(); + factory SignMessageRequest({ + $core.String? walletName, + $core.String? password, + $core.String? address, + $core.String? message, + }) { + final _result = create(); + if (walletName != null) { + _result.walletName = walletName; + } + if (password != null) { + _result.password = password; + } + if (address != null) { + _result.address = address; + } + if (message != null) { + _result.message = message; + } + return _result; + } + factory SignMessageRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SignMessageRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SignMessageRequest clone() => SignMessageRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SignMessageRequest copyWith(void Function(SignMessageRequest) updates) => super.copyWith((message) => updates(message as SignMessageRequest)) as SignMessageRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SignMessageRequest create() => SignMessageRequest._(); + SignMessageRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SignMessageRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SignMessageRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get walletName => $_getSZ(0); + @$pb.TagNumber(1) + set walletName($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWalletName() => $_has(0); + @$pb.TagNumber(1) + void clearWalletName() => clearField(1); + + @$pb.TagNumber(2) + $core.String get password => $_getSZ(1); + @$pb.TagNumber(2) + set password($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasPassword() => $_has(1); + @$pb.TagNumber(2) + void clearPassword() => clearField(2); + + @$pb.TagNumber(3) + $core.String get address => $_getSZ(2); + @$pb.TagNumber(3) + set address($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasAddress() => $_has(2); + @$pb.TagNumber(3) + void clearAddress() => clearField(3); + + @$pb.TagNumber(4) + $core.String get message => $_getSZ(3); + @$pb.TagNumber(4) + set message($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasMessage() => $_has(3); + @$pb.TagNumber(4) + void clearMessage() => clearField(4); +} + +class SignMessageResponse extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignMessageResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'signature') + ..hasRequiredFields = false + ; + + SignMessageResponse._() : super(); + factory SignMessageResponse({ + $core.String? signature, + }) { + final _result = create(); + if (signature != null) { + _result.signature = signature; + } + return _result; + } + factory SignMessageResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory SignMessageResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + SignMessageResponse clone() => SignMessageResponse()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + SignMessageResponse copyWith(void Function(SignMessageResponse) updates) => super.copyWith((message) => updates(message as SignMessageResponse)) as SignMessageResponse; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static SignMessageResponse create() => SignMessageResponse._(); + SignMessageResponse createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static SignMessageResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static SignMessageResponse? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get signature => $_getSZ(0); + @$pb.TagNumber(1) + set signature($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasSignature() => $_has(0); + @$pb.TagNumber(1) + void clearSignature() => clearField(1); +} + +class WalletApi { + $pb.RpcClient _client; + WalletApi(this._client); + + $async.Future createWallet($pb.ClientContext? ctx, CreateWalletRequest request) { + var emptyResponse = CreateWalletResponse(); + return _client.invoke(ctx, 'Wallet', 'CreateWallet', request, emptyResponse); + } + $async.Future restoreWallet($pb.ClientContext? ctx, RestoreWalletRequest request) { + var emptyResponse = RestoreWalletResponse(); + return _client.invoke(ctx, 'Wallet', 'RestoreWallet', request, emptyResponse); + } + $async.Future loadWallet($pb.ClientContext? ctx, LoadWalletRequest request) { + var emptyResponse = LoadWalletResponse(); + return _client.invoke(ctx, 'Wallet', 'LoadWallet', request, emptyResponse); + } + $async.Future unloadWallet($pb.ClientContext? ctx, UnloadWalletRequest request) { + var emptyResponse = UnloadWalletResponse(); + return _client.invoke(ctx, 'Wallet', 'UnloadWallet', request, emptyResponse); + } + $async.Future getTotalBalance($pb.ClientContext? ctx, GetTotalBalanceRequest request) { + var emptyResponse = GetTotalBalanceResponse(); + return _client.invoke(ctx, 'Wallet', 'GetTotalBalance', request, emptyResponse); + } + $async.Future signRawTransaction($pb.ClientContext? ctx, SignRawTransactionRequest request) { + var emptyResponse = SignRawTransactionResponse(); + return _client.invoke(ctx, 'Wallet', 'SignRawTransaction', request, emptyResponse); + } + $async.Future getValidatorAddress($pb.ClientContext? ctx, GetValidatorAddressRequest request) { + var emptyResponse = GetValidatorAddressResponse(); + return _client.invoke(ctx, 'Wallet', 'GetValidatorAddress', request, emptyResponse); + } + $async.Future getNewAddress($pb.ClientContext? ctx, GetNewAddressRequest request) { + var emptyResponse = GetNewAddressResponse(); + return _client.invoke(ctx, 'Wallet', 'GetNewAddress', request, emptyResponse); + } + $async.Future getAddressHistory($pb.ClientContext? ctx, GetAddressHistoryRequest request) { + var emptyResponse = GetAddressHistoryResponse(); + return _client.invoke(ctx, 'Wallet', 'GetAddressHistory', request, emptyResponse); + } + $async.Future signMessage($pb.ClientContext? ctx, SignMessageRequest request) { + var emptyResponse = SignMessageResponse(); + return _client.invoke(ctx, 'Wallet', 'SignMessage', request, emptyResponse); + } +} + diff --git a/www/grpc/gen/dart/wallet.pbenum.dart b/www/grpc/gen/dart/wallet.pbenum.dart new file mode 100644 index 000000000..bc78ae45d --- /dev/null +++ b/www/grpc/gen/dart/wallet.pbenum.dart @@ -0,0 +1,30 @@ +/// +// Generated code. Do not modify. +// source: wallet.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +// ignore_for_file: UNDEFINED_SHOWN_NAME +import 'dart:core' as $core; +import 'package:protobuf/protobuf.dart' as $pb; + +class AddressType extends $pb.ProtobufEnum { + static const AddressType ADDRESS_TYPE_TREASURY = AddressType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ADDRESS_TYPE_TREASURY'); + static const AddressType ADDRESS_TYPE_VALIDATOR = AddressType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ADDRESS_TYPE_VALIDATOR'); + static const AddressType ADDRESS_TYPE_BLS_ACCOUNT = AddressType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ADDRESS_TYPE_BLS_ACCOUNT'); + static const AddressType ADDRESS_TYPE_ED25519_ACCOUNT = AddressType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ADDRESS_TYPE_ED25519_ACCOUNT'); + + static const $core.List values = [ + ADDRESS_TYPE_TREASURY, + ADDRESS_TYPE_VALIDATOR, + ADDRESS_TYPE_BLS_ACCOUNT, + ADDRESS_TYPE_ED25519_ACCOUNT, + ]; + + static final $core.Map<$core.int, AddressType> _byValue = $pb.ProtobufEnum.initByValue(values); + static AddressType? valueOf($core.int value) => _byValue[value]; + + const AddressType._($core.int v, $core.String n) : super(v, n); +} + diff --git a/www/grpc/gen/dart/wallet.pbjson.dart b/www/grpc/gen/dart/wallet.pbjson.dart new file mode 100644 index 000000000..64d87bbeb --- /dev/null +++ b/www/grpc/gen/dart/wallet.pbjson.dart @@ -0,0 +1,309 @@ +/// +// Generated code. Do not modify. +// source: wallet.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:core' as $core; +import 'dart:convert' as $convert; +import 'dart:typed_data' as $typed_data; +@$core.Deprecated('Use addressTypeDescriptor instead') +const AddressType$json = const { + '1': 'AddressType', + '2': const [ + const {'1': 'ADDRESS_TYPE_TREASURY', '2': 0}, + const {'1': 'ADDRESS_TYPE_VALIDATOR', '2': 1}, + const {'1': 'ADDRESS_TYPE_BLS_ACCOUNT', '2': 2}, + const {'1': 'ADDRESS_TYPE_ED25519_ACCOUNT', '2': 3}, + ], +}; + +/// Descriptor for `AddressType`. Decode as a `google.protobuf.EnumDescriptorProto`. +final $typed_data.Uint8List addressTypeDescriptor = $convert.base64Decode('CgtBZGRyZXNzVHlwZRIZChVBRERSRVNTX1RZUEVfVFJFQVNVUlkQABIaChZBRERSRVNTX1RZUEVfVkFMSURBVE9SEAESHAoYQUREUkVTU19UWVBFX0JMU19BQ0NPVU5UEAISIAocQUREUkVTU19UWVBFX0VEMjU1MTlfQUNDT1VOVBAD'); +@$core.Deprecated('Use addressInfoDescriptor instead') +const AddressInfo$json = const { + '1': 'AddressInfo', + '2': const [ + const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, + const {'1': 'public_key', '3': 2, '4': 1, '5': 9, '10': 'publicKey'}, + const {'1': 'label', '3': 3, '4': 1, '5': 9, '10': 'label'}, + const {'1': 'path', '3': 4, '4': 1, '5': 9, '10': 'path'}, + ], +}; + +/// Descriptor for `AddressInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List addressInfoDescriptor = $convert.base64Decode('CgtBZGRyZXNzSW5mbxIYCgdhZGRyZXNzGAEgASgJUgdhZGRyZXNzEh0KCnB1YmxpY19rZXkYAiABKAlSCXB1YmxpY0tleRIUCgVsYWJlbBgDIAEoCVIFbGFiZWwSEgoEcGF0aBgEIAEoCVIEcGF0aA=='); +@$core.Deprecated('Use historyInfoDescriptor instead') +const HistoryInfo$json = const { + '1': 'HistoryInfo', + '2': const [ + const {'1': 'transaction_id', '3': 1, '4': 1, '5': 9, '10': 'transactionId'}, + const {'1': 'time', '3': 2, '4': 1, '5': 13, '10': 'time'}, + const {'1': 'payload_type', '3': 3, '4': 1, '5': 9, '10': 'payloadType'}, + const {'1': 'description', '3': 4, '4': 1, '5': 9, '10': 'description'}, + const {'1': 'amount', '3': 5, '4': 1, '5': 3, '10': 'amount'}, + ], +}; + +/// Descriptor for `HistoryInfo`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List historyInfoDescriptor = $convert.base64Decode('CgtIaXN0b3J5SW5mbxIlCg50cmFuc2FjdGlvbl9pZBgBIAEoCVINdHJhbnNhY3Rpb25JZBISCgR0aW1lGAIgASgNUgR0aW1lEiEKDHBheWxvYWRfdHlwZRgDIAEoCVILcGF5bG9hZFR5cGUSIAoLZGVzY3JpcHRpb24YBCABKAlSC2Rlc2NyaXB0aW9uEhYKBmFtb3VudBgFIAEoA1IGYW1vdW50'); +@$core.Deprecated('Use getAddressHistoryRequestDescriptor instead') +const GetAddressHistoryRequest$json = const { + '1': 'GetAddressHistoryRequest', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + const {'1': 'address', '3': 2, '4': 1, '5': 9, '10': 'address'}, + ], +}; + +/// Descriptor for `GetAddressHistoryRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getAddressHistoryRequestDescriptor = $convert.base64Decode('ChhHZXRBZGRyZXNzSGlzdG9yeVJlcXVlc3QSHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWUSGAoHYWRkcmVzcxgCIAEoCVIHYWRkcmVzcw=='); +@$core.Deprecated('Use getAddressHistoryResponseDescriptor instead') +const GetAddressHistoryResponse$json = const { + '1': 'GetAddressHistoryResponse', + '2': const [ + const {'1': 'history_info', '3': 1, '4': 3, '5': 11, '6': '.pactus.HistoryInfo', '10': 'historyInfo'}, + ], +}; + +/// Descriptor for `GetAddressHistoryResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getAddressHistoryResponseDescriptor = $convert.base64Decode('ChlHZXRBZGRyZXNzSGlzdG9yeVJlc3BvbnNlEjYKDGhpc3RvcnlfaW5mbxgBIAMoCzITLnBhY3R1cy5IaXN0b3J5SW5mb1ILaGlzdG9yeUluZm8='); +@$core.Deprecated('Use getNewAddressRequestDescriptor instead') +const GetNewAddressRequest$json = const { + '1': 'GetNewAddressRequest', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + const {'1': 'address_type', '3': 2, '4': 1, '5': 14, '6': '.pactus.AddressType', '10': 'addressType'}, + const {'1': 'label', '3': 3, '4': 1, '5': 9, '10': 'label'}, + const {'1': 'password', '3': 4, '4': 1, '5': 9, '10': 'password'}, + ], +}; + +/// Descriptor for `GetNewAddressRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getNewAddressRequestDescriptor = $convert.base64Decode('ChRHZXROZXdBZGRyZXNzUmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZRI2CgxhZGRyZXNzX3R5cGUYAiABKA4yEy5wYWN0dXMuQWRkcmVzc1R5cGVSC2FkZHJlc3NUeXBlEhQKBWxhYmVsGAMgASgJUgVsYWJlbBIaCghwYXNzd29yZBgEIAEoCVIIcGFzc3dvcmQ='); +@$core.Deprecated('Use getNewAddressResponseDescriptor instead') +const GetNewAddressResponse$json = const { + '1': 'GetNewAddressResponse', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + const {'1': 'address_info', '3': 2, '4': 1, '5': 11, '6': '.pactus.AddressInfo', '10': 'addressInfo'}, + ], +}; + +/// Descriptor for `GetNewAddressResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getNewAddressResponseDescriptor = $convert.base64Decode('ChVHZXROZXdBZGRyZXNzUmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWUSNgoMYWRkcmVzc19pbmZvGAIgASgLMhMucGFjdHVzLkFkZHJlc3NJbmZvUgthZGRyZXNzSW5mbw=='); +@$core.Deprecated('Use restoreWalletRequestDescriptor instead') +const RestoreWalletRequest$json = const { + '1': 'RestoreWalletRequest', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + const {'1': 'mnemonic', '3': 2, '4': 1, '5': 9, '10': 'mnemonic'}, + const {'1': 'password', '3': 3, '4': 1, '5': 9, '10': 'password'}, + ], +}; + +/// Descriptor for `RestoreWalletRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List restoreWalletRequestDescriptor = $convert.base64Decode('ChRSZXN0b3JlV2FsbGV0UmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZRIaCghtbmVtb25pYxgCIAEoCVIIbW5lbW9uaWMSGgoIcGFzc3dvcmQYAyABKAlSCHBhc3N3b3Jk'); +@$core.Deprecated('Use restoreWalletResponseDescriptor instead') +const RestoreWalletResponse$json = const { + '1': 'RestoreWalletResponse', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + ], +}; + +/// Descriptor for `RestoreWalletResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List restoreWalletResponseDescriptor = $convert.base64Decode('ChVSZXN0b3JlV2FsbGV0UmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWU='); +@$core.Deprecated('Use createWalletRequestDescriptor instead') +const CreateWalletRequest$json = const { + '1': 'CreateWalletRequest', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + const {'1': 'password', '3': 4, '4': 1, '5': 9, '10': 'password'}, + ], +}; + +/// Descriptor for `CreateWalletRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createWalletRequestDescriptor = $convert.base64Decode('ChNDcmVhdGVXYWxsZXRSZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW1lEhoKCHBhc3N3b3JkGAQgASgJUghwYXNzd29yZA=='); +@$core.Deprecated('Use createWalletResponseDescriptor instead') +const CreateWalletResponse$json = const { + '1': 'CreateWalletResponse', + '2': const [ + const {'1': 'mnemonic', '3': 2, '4': 1, '5': 9, '10': 'mnemonic'}, + ], +}; + +/// Descriptor for `CreateWalletResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List createWalletResponseDescriptor = $convert.base64Decode('ChRDcmVhdGVXYWxsZXRSZXNwb25zZRIaCghtbmVtb25pYxgCIAEoCVIIbW5lbW9uaWM='); +@$core.Deprecated('Use loadWalletRequestDescriptor instead') +const LoadWalletRequest$json = const { + '1': 'LoadWalletRequest', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + ], +}; + +/// Descriptor for `LoadWalletRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List loadWalletRequestDescriptor = $convert.base64Decode('ChFMb2FkV2FsbGV0UmVxdWVzdBIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZQ=='); +@$core.Deprecated('Use loadWalletResponseDescriptor instead') +const LoadWalletResponse$json = const { + '1': 'LoadWalletResponse', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + ], +}; + +/// Descriptor for `LoadWalletResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List loadWalletResponseDescriptor = $convert.base64Decode('ChJMb2FkV2FsbGV0UmVzcG9uc2USHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWU='); +@$core.Deprecated('Use unloadWalletRequestDescriptor instead') +const UnloadWalletRequest$json = const { + '1': 'UnloadWalletRequest', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + ], +}; + +/// Descriptor for `UnloadWalletRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List unloadWalletRequestDescriptor = $convert.base64Decode('ChNVbmxvYWRXYWxsZXRSZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW1l'); +@$core.Deprecated('Use unloadWalletResponseDescriptor instead') +const UnloadWalletResponse$json = const { + '1': 'UnloadWalletResponse', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + ], +}; + +/// Descriptor for `UnloadWalletResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List unloadWalletResponseDescriptor = $convert.base64Decode('ChRVbmxvYWRXYWxsZXRSZXNwb25zZRIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZQ=='); +@$core.Deprecated('Use getValidatorAddressRequestDescriptor instead') +const GetValidatorAddressRequest$json = const { + '1': 'GetValidatorAddressRequest', + '2': const [ + const {'1': 'public_key', '3': 1, '4': 1, '5': 9, '10': 'publicKey'}, + ], +}; + +/// Descriptor for `GetValidatorAddressRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getValidatorAddressRequestDescriptor = $convert.base64Decode('ChpHZXRWYWxpZGF0b3JBZGRyZXNzUmVxdWVzdBIdCgpwdWJsaWNfa2V5GAEgASgJUglwdWJsaWNLZXk='); +@$core.Deprecated('Use getValidatorAddressResponseDescriptor instead') +const GetValidatorAddressResponse$json = const { + '1': 'GetValidatorAddressResponse', + '2': const [ + const {'1': 'address', '3': 1, '4': 1, '5': 9, '10': 'address'}, + ], +}; + +/// Descriptor for `GetValidatorAddressResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getValidatorAddressResponseDescriptor = $convert.base64Decode('ChtHZXRWYWxpZGF0b3JBZGRyZXNzUmVzcG9uc2USGAoHYWRkcmVzcxgBIAEoCVIHYWRkcmVzcw=='); +@$core.Deprecated('Use signRawTransactionRequestDescriptor instead') +const SignRawTransactionRequest$json = const { + '1': 'SignRawTransactionRequest', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + const {'1': 'raw_transaction', '3': 2, '4': 1, '5': 9, '10': 'rawTransaction'}, + const {'1': 'password', '3': 3, '4': 1, '5': 9, '10': 'password'}, + ], +}; + +/// Descriptor for `SignRawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List signRawTransactionRequestDescriptor = $convert.base64Decode('ChlTaWduUmF3VHJhbnNhY3Rpb25SZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW1lEicKD3Jhd190cmFuc2FjdGlvbhgCIAEoCVIOcmF3VHJhbnNhY3Rpb24SGgoIcGFzc3dvcmQYAyABKAlSCHBhc3N3b3Jk'); +@$core.Deprecated('Use signRawTransactionResponseDescriptor instead') +const SignRawTransactionResponse$json = const { + '1': 'SignRawTransactionResponse', + '2': const [ + const {'1': 'transaction_id', '3': 1, '4': 1, '5': 9, '10': 'transactionId'}, + const {'1': 'signed_raw_transaction', '3': 2, '4': 1, '5': 9, '10': 'signedRawTransaction'}, + ], +}; + +/// Descriptor for `SignRawTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List signRawTransactionResponseDescriptor = $convert.base64Decode('ChpTaWduUmF3VHJhbnNhY3Rpb25SZXNwb25zZRIlCg50cmFuc2FjdGlvbl9pZBgBIAEoCVINdHJhbnNhY3Rpb25JZBI0ChZzaWduZWRfcmF3X3RyYW5zYWN0aW9uGAIgASgJUhRzaWduZWRSYXdUcmFuc2FjdGlvbg=='); +@$core.Deprecated('Use getTotalBalanceRequestDescriptor instead') +const GetTotalBalanceRequest$json = const { + '1': 'GetTotalBalanceRequest', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + ], +}; + +/// Descriptor for `GetTotalBalanceRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getTotalBalanceRequestDescriptor = $convert.base64Decode('ChZHZXRUb3RhbEJhbGFuY2VSZXF1ZXN0Eh8KC3dhbGxldF9uYW1lGAEgASgJUgp3YWxsZXROYW1l'); +@$core.Deprecated('Use getTotalBalanceResponseDescriptor instead') +const GetTotalBalanceResponse$json = const { + '1': 'GetTotalBalanceResponse', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + const {'1': 'total_balance', '3': 2, '4': 1, '5': 3, '10': 'totalBalance'}, + ], +}; + +/// Descriptor for `GetTotalBalanceResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getTotalBalanceResponseDescriptor = $convert.base64Decode('ChdHZXRUb3RhbEJhbGFuY2VSZXNwb25zZRIfCgt3YWxsZXRfbmFtZRgBIAEoCVIKd2FsbGV0TmFtZRIjCg10b3RhbF9iYWxhbmNlGAIgASgDUgx0b3RhbEJhbGFuY2U='); +@$core.Deprecated('Use signMessageRequestDescriptor instead') +const SignMessageRequest$json = const { + '1': 'SignMessageRequest', + '2': const [ + const {'1': 'wallet_name', '3': 1, '4': 1, '5': 9, '10': 'walletName'}, + const {'1': 'password', '3': 2, '4': 1, '5': 9, '10': 'password'}, + const {'1': 'address', '3': 3, '4': 1, '5': 9, '10': 'address'}, + const {'1': 'message', '3': 4, '4': 1, '5': 9, '10': 'message'}, + ], +}; + +/// Descriptor for `SignMessageRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List signMessageRequestDescriptor = $convert.base64Decode('ChJTaWduTWVzc2FnZVJlcXVlc3QSHwoLd2FsbGV0X25hbWUYASABKAlSCndhbGxldE5hbWUSGgoIcGFzc3dvcmQYAiABKAlSCHBhc3N3b3JkEhgKB2FkZHJlc3MYAyABKAlSB2FkZHJlc3MSGAoHbWVzc2FnZRgEIAEoCVIHbWVzc2FnZQ=='); +@$core.Deprecated('Use signMessageResponseDescriptor instead') +const SignMessageResponse$json = const { + '1': 'SignMessageResponse', + '2': const [ + const {'1': 'signature', '3': 1, '4': 1, '5': 9, '10': 'signature'}, + ], +}; + +/// Descriptor for `SignMessageResponse`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List signMessageResponseDescriptor = $convert.base64Decode('ChNTaWduTWVzc2FnZVJlc3BvbnNlEhwKCXNpZ25hdHVyZRgBIAEoCVIJc2lnbmF0dXJl'); +const $core.Map<$core.String, $core.dynamic> WalletServiceBase$json = const { + '1': 'Wallet', + '2': const [ + const {'1': 'CreateWallet', '2': '.pactus.CreateWalletRequest', '3': '.pactus.CreateWalletResponse'}, + const {'1': 'RestoreWallet', '2': '.pactus.RestoreWalletRequest', '3': '.pactus.RestoreWalletResponse'}, + const {'1': 'LoadWallet', '2': '.pactus.LoadWalletRequest', '3': '.pactus.LoadWalletResponse'}, + const {'1': 'UnloadWallet', '2': '.pactus.UnloadWalletRequest', '3': '.pactus.UnloadWalletResponse'}, + const {'1': 'GetTotalBalance', '2': '.pactus.GetTotalBalanceRequest', '3': '.pactus.GetTotalBalanceResponse'}, + const {'1': 'SignRawTransaction', '2': '.pactus.SignRawTransactionRequest', '3': '.pactus.SignRawTransactionResponse'}, + const {'1': 'GetValidatorAddress', '2': '.pactus.GetValidatorAddressRequest', '3': '.pactus.GetValidatorAddressResponse'}, + const {'1': 'GetNewAddress', '2': '.pactus.GetNewAddressRequest', '3': '.pactus.GetNewAddressResponse'}, + const {'1': 'GetAddressHistory', '2': '.pactus.GetAddressHistoryRequest', '3': '.pactus.GetAddressHistoryResponse'}, + const {'1': 'SignMessage', '2': '.pactus.SignMessageRequest', '3': '.pactus.SignMessageResponse'}, + ], +}; + +@$core.Deprecated('Use walletServiceDescriptor instead') +const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> WalletServiceBase$messageJson = const { + '.pactus.CreateWalletRequest': CreateWalletRequest$json, + '.pactus.CreateWalletResponse': CreateWalletResponse$json, + '.pactus.RestoreWalletRequest': RestoreWalletRequest$json, + '.pactus.RestoreWalletResponse': RestoreWalletResponse$json, + '.pactus.LoadWalletRequest': LoadWalletRequest$json, + '.pactus.LoadWalletResponse': LoadWalletResponse$json, + '.pactus.UnloadWalletRequest': UnloadWalletRequest$json, + '.pactus.UnloadWalletResponse': UnloadWalletResponse$json, + '.pactus.GetTotalBalanceRequest': GetTotalBalanceRequest$json, + '.pactus.GetTotalBalanceResponse': GetTotalBalanceResponse$json, + '.pactus.SignRawTransactionRequest': SignRawTransactionRequest$json, + '.pactus.SignRawTransactionResponse': SignRawTransactionResponse$json, + '.pactus.GetValidatorAddressRequest': GetValidatorAddressRequest$json, + '.pactus.GetValidatorAddressResponse': GetValidatorAddressResponse$json, + '.pactus.GetNewAddressRequest': GetNewAddressRequest$json, + '.pactus.GetNewAddressResponse': GetNewAddressResponse$json, + '.pactus.AddressInfo': AddressInfo$json, + '.pactus.GetAddressHistoryRequest': GetAddressHistoryRequest$json, + '.pactus.GetAddressHistoryResponse': GetAddressHistoryResponse$json, + '.pactus.HistoryInfo': HistoryInfo$json, + '.pactus.SignMessageRequest': SignMessageRequest$json, + '.pactus.SignMessageResponse': SignMessageResponse$json, +}; + +/// Descriptor for `Wallet`. Decode as a `google.protobuf.ServiceDescriptorProto`. +final $typed_data.Uint8List walletServiceDescriptor = $convert.base64Decode('CgZXYWxsZXQSSQoMQ3JlYXRlV2FsbGV0EhsucGFjdHVzLkNyZWF0ZVdhbGxldFJlcXVlc3QaHC5wYWN0dXMuQ3JlYXRlV2FsbGV0UmVzcG9uc2USTAoNUmVzdG9yZVdhbGxldBIcLnBhY3R1cy5SZXN0b3JlV2FsbGV0UmVxdWVzdBodLnBhY3R1cy5SZXN0b3JlV2FsbGV0UmVzcG9uc2USQwoKTG9hZFdhbGxldBIZLnBhY3R1cy5Mb2FkV2FsbGV0UmVxdWVzdBoaLnBhY3R1cy5Mb2FkV2FsbGV0UmVzcG9uc2USSQoMVW5sb2FkV2FsbGV0EhsucGFjdHVzLlVubG9hZFdhbGxldFJlcXVlc3QaHC5wYWN0dXMuVW5sb2FkV2FsbGV0UmVzcG9uc2USUgoPR2V0VG90YWxCYWxhbmNlEh4ucGFjdHVzLkdldFRvdGFsQmFsYW5jZVJlcXVlc3QaHy5wYWN0dXMuR2V0VG90YWxCYWxhbmNlUmVzcG9uc2USWwoSU2lnblJhd1RyYW5zYWN0aW9uEiEucGFjdHVzLlNpZ25SYXdUcmFuc2FjdGlvblJlcXVlc3QaIi5wYWN0dXMuU2lnblJhd1RyYW5zYWN0aW9uUmVzcG9uc2USXgoTR2V0VmFsaWRhdG9yQWRkcmVzcxIiLnBhY3R1cy5HZXRWYWxpZGF0b3JBZGRyZXNzUmVxdWVzdBojLnBhY3R1cy5HZXRWYWxpZGF0b3JBZGRyZXNzUmVzcG9uc2USTAoNR2V0TmV3QWRkcmVzcxIcLnBhY3R1cy5HZXROZXdBZGRyZXNzUmVxdWVzdBodLnBhY3R1cy5HZXROZXdBZGRyZXNzUmVzcG9uc2USWAoRR2V0QWRkcmVzc0hpc3RvcnkSIC5wYWN0dXMuR2V0QWRkcmVzc0hpc3RvcnlSZXF1ZXN0GiEucGFjdHVzLkdldEFkZHJlc3NIaXN0b3J5UmVzcG9uc2USRgoLU2lnbk1lc3NhZ2USGi5wYWN0dXMuU2lnbk1lc3NhZ2VSZXF1ZXN0GhsucGFjdHVzLlNpZ25NZXNzYWdlUmVzcG9uc2U='); diff --git a/www/grpc/gen/dart/wallet.pbserver.dart b/www/grpc/gen/dart/wallet.pbserver.dart new file mode 100644 index 000000000..dd38d8997 --- /dev/null +++ b/www/grpc/gen/dart/wallet.pbserver.dart @@ -0,0 +1,65 @@ +/// +// Generated code. Do not modify. +// source: wallet.proto +// +// @dart = 2.12 +// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name + +import 'dart:async' as $async; + +import 'package:protobuf/protobuf.dart' as $pb; + +import 'dart:core' as $core; +import 'wallet.pb.dart' as $4; +import 'wallet.pbjson.dart'; + +export 'wallet.pb.dart'; + +abstract class WalletServiceBase extends $pb.GeneratedService { + $async.Future<$4.CreateWalletResponse> createWallet($pb.ServerContext ctx, $4.CreateWalletRequest request); + $async.Future<$4.RestoreWalletResponse> restoreWallet($pb.ServerContext ctx, $4.RestoreWalletRequest request); + $async.Future<$4.LoadWalletResponse> loadWallet($pb.ServerContext ctx, $4.LoadWalletRequest request); + $async.Future<$4.UnloadWalletResponse> unloadWallet($pb.ServerContext ctx, $4.UnloadWalletRequest request); + $async.Future<$4.GetTotalBalanceResponse> getTotalBalance($pb.ServerContext ctx, $4.GetTotalBalanceRequest request); + $async.Future<$4.SignRawTransactionResponse> signRawTransaction($pb.ServerContext ctx, $4.SignRawTransactionRequest request); + $async.Future<$4.GetValidatorAddressResponse> getValidatorAddress($pb.ServerContext ctx, $4.GetValidatorAddressRequest request); + $async.Future<$4.GetNewAddressResponse> getNewAddress($pb.ServerContext ctx, $4.GetNewAddressRequest request); + $async.Future<$4.GetAddressHistoryResponse> getAddressHistory($pb.ServerContext ctx, $4.GetAddressHistoryRequest request); + $async.Future<$4.SignMessageResponse> signMessage($pb.ServerContext ctx, $4.SignMessageRequest request); + + $pb.GeneratedMessage createRequest($core.String method) { + switch (method) { + case 'CreateWallet': return $4.CreateWalletRequest(); + case 'RestoreWallet': return $4.RestoreWalletRequest(); + case 'LoadWallet': return $4.LoadWalletRequest(); + case 'UnloadWallet': return $4.UnloadWalletRequest(); + case 'GetTotalBalance': return $4.GetTotalBalanceRequest(); + case 'SignRawTransaction': return $4.SignRawTransactionRequest(); + case 'GetValidatorAddress': return $4.GetValidatorAddressRequest(); + case 'GetNewAddress': return $4.GetNewAddressRequest(); + case 'GetAddressHistory': return $4.GetAddressHistoryRequest(); + case 'SignMessage': return $4.SignMessageRequest(); + default: throw $core.ArgumentError('Unknown method: $method'); + } + } + + $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) { + switch (method) { + case 'CreateWallet': return this.createWallet(ctx, request as $4.CreateWalletRequest); + case 'RestoreWallet': return this.restoreWallet(ctx, request as $4.RestoreWalletRequest); + case 'LoadWallet': return this.loadWallet(ctx, request as $4.LoadWalletRequest); + case 'UnloadWallet': return this.unloadWallet(ctx, request as $4.UnloadWalletRequest); + case 'GetTotalBalance': return this.getTotalBalance(ctx, request as $4.GetTotalBalanceRequest); + case 'SignRawTransaction': return this.signRawTransaction(ctx, request as $4.SignRawTransactionRequest); + case 'GetValidatorAddress': return this.getValidatorAddress(ctx, request as $4.GetValidatorAddressRequest); + case 'GetNewAddress': return this.getNewAddress(ctx, request as $4.GetNewAddressRequest); + case 'GetAddressHistory': return this.getAddressHistory(ctx, request as $4.GetAddressHistoryRequest); + case 'SignMessage': return this.signMessage(ctx, request as $4.SignMessageRequest); + default: throw $core.ArgumentError('Unknown method: $method'); + } + } + + $core.Map<$core.String, $core.dynamic> get $json => WalletServiceBase$json; + $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => WalletServiceBase$messageJson; +} + diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md new file mode 100644 index 000000000..581d2f17a --- /dev/null +++ b/www/grpc/gen/docs/grpc.md @@ -0,0 +1,3063 @@ +--- +title: GRPC API Reference +weight: 1 +--- + +Each node in the Pactus network can be configured to use the [gRPC](https://grpc.io/) protocol for communication. +Here you can find the list of all gRPC methods and messages. + +All the amounts and values in gRPC endpoints are in NanoPAC units, which are atomic and the smallest unit in the Pactus blockchain. +Each PAC is equivalent to 1,000,000,000 or 109 NanoPACs. + +

gRPC Services

+ + + +
+ +## Transaction Service + +

Transaction service defines various RPC methods for interacting with +transactions.

+ +### GetTransaction + +

GetTransaction retrieves transaction details based on the provided request +parameters.

+ +

GetTransactionRequest Request

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
id string + The unique ID of the transaction to retrieve. +
verbosity TransactionVerbosity + (Enum) The verbosity level for transaction details. +
Available values:
    +
  • TRANSACTION_DATA = 0 (Request transaction data only.)
  • +
  • TRANSACTION_INFO = 1 (Request detailed transaction information.)
  • +
+
+

GetTransactionResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
block_height uint32 + The height of the block containing the transaction. +
block_time uint32 + The UNIX timestamp of the block containing the transaction. +
transaction TransactionInfo + Detailed information about the transaction. +
transaction.id string + The unique ID of the transaction. +
transaction.data string + The raw transaction data. +
transaction.version int32 + The version of the transaction. +
transaction.lock_time uint32 + The lock time for the transaction. +
transaction.value int64 + The value of the transaction in NanoPAC. +
transaction.fee int64 + The fee for the transaction in NanoPAC. +
transaction.payload_type PayloadType + (Enum) The type of transaction payload. +
Available values:
    +
  • UNKNOWN = 0 (Unknown payload type.)
  • +
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • +
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • +
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • +
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • +
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • +
+
transaction.transfer PayloadTransfer + (OneOf) Transfer transaction payload. +
transaction.transfer.sender string + The sender's address. +
transaction.transfer.receiver string + The receiver's address. +
transaction.transfer.amount int64 + The amount to be transferred in NanoPAC. +
transaction.bond PayloadBond + (OneOf) Bond transaction payload. +
transaction.bond.sender string + The sender's address. +
transaction.bond.receiver string + The receiver's address. +
transaction.bond.stake int64 + The stake amount in NanoPAC. +
transaction.sortition PayloadSortition + (OneOf) Sortition transaction payload. +
transaction.sortition.address string + The validator address associated with the sortition proof. +
transaction.sortition.proof string + The proof for the sortition. +
transaction.unbond PayloadUnbond + (OneOf) Unbond transaction payload. +
transaction.unbond.validator string + The address of the validator to unbond from. +
transaction.withdraw PayloadWithdraw + (OneOf) Withdraw transaction payload. +
transaction.withdraw.from string + The address to withdraw from. +
transaction.withdraw.to string + The address to withdraw to. +
transaction.withdraw.amount int64 + The withdrawal amount in NanoPAC. +
transaction.memo string + A memo string for the transaction. +
transaction.public_key string + The public key associated with the transaction. +
transaction.signature string + The signature for the transaction. +
+ +### CalculateFee + +

CalculateFee calculates the transaction fee based on the specified amount +and payload type.

+ +

CalculateFeeRequest Request

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
amount int64 + The amount involved in the transaction, specified in NanoPAC. +
payload_type PayloadType + (Enum) The type of transaction payload. +
Available values:
    +
  • UNKNOWN = 0 (Unknown payload type.)
  • +
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • +
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • +
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • +
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • +
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • +
+
fixed_amount bool + Indicates if the amount should be fixed and include the fee. +
+

CalculateFeeResponse Response

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
amount int64 + The calculated amount in NanoPAC. +
fee int64 + The calculated transaction fee in NanoPAC. +
+ +### BroadcastTransaction + +

BroadcastTransaction broadcasts a signed transaction to the network.

+ +

BroadcastTransactionRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
signed_raw_transaction string + The signed raw transaction data to be broadcasted. +
+

BroadcastTransactionResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
id string + The unique ID of the broadcasted transaction. +
+ +### GetRawTransaction + +

GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.

+ +

GetRawTransactionRequest Request

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
lock_time uint32 + The lock time for the transaction. If not set, defaults to the last block +height. +
memo string + A memo string for the transaction. +
transfer GetRawTransferTransactionRequest + (OneOf) +
bond GetRawBondTransactionRequest + (OneOf) +
unbond GetRawUnbondTransactionRequest + (OneOf) +
withdraw GetRawWithdrawTransactionRequest + (OneOf) +
+

GetRawTransactionResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
raw_transaction string + The raw transaction data. +
+ +## Blockchain Service + +

Blockchain service defines RPC methods for interacting with the blockchain.

+ +### GetBlock + +

GetBlock retrieves information about a block based on the provided request +parameters.

+ +

GetBlockRequest Request

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
height uint32 + The height of the block to retrieve. +
verbosity BlockVerbosity + (Enum) The verbosity level for block information. +
Available values:
    +
  • BLOCK_DATA = 0 (Request only block data.)
  • +
  • BLOCK_INFO = 1 (Request block information and transaction IDs.)
  • +
  • BLOCK_TRANSACTIONS = 2 (Request block information and detailed transaction data.)
  • +
+
+

GetBlockResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
height uint32 + The height of the block. +
hash string + The hash of the block. +
data string + Block data, available only if verbosity level is set to BLOCK_DATA. +
block_time uint32 + The timestamp of the block. +
header BlockHeaderInfo + Header information of the block. +
header.version int32 + The version of the block. +
header.prev_block_hash string + The hash of the previous block. +
header.state_root string + The state root hash of the blockchain. +
header.sortition_seed string + The sortition seed of the block. +
header.proposer_address string + The address of the proposer of the block. +
prev_cert CertificateInfo + Certificate information of the previous block. +
prev_cert.hash string + The hash of the certificate. +
prev_cert.round int32 + The round of the certificate. +
prev_cert.committersrepeated int32 + List of committers in the certificate. +
prev_cert.absenteesrepeated int32 + List of absentees in the certificate. +
prev_cert.signature string + The signature of the certificate. +
txsrepeated TransactionInfo + List of transactions in the block, available when verbosity level is set to +BLOCK_TRANSACTIONS. +
txs[].id string + The unique ID of the transaction. +
txs[].data string + The raw transaction data. +
txs[].version int32 + The version of the transaction. +
txs[].lock_time uint32 + The lock time for the transaction. +
txs[].value int64 + The value of the transaction in NanoPAC. +
txs[].fee int64 + The fee for the transaction in NanoPAC. +
txs[].payload_type PayloadType + (Enum) The type of transaction payload. +
Available values:
    +
  • UNKNOWN = 0 (Unknown payload type.)
  • +
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • +
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • +
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • +
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • +
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • +
+
txs[].transfer PayloadTransfer + (OneOf) Transfer transaction payload. +
txs[].transfer.sender string + The sender's address. +
txs[].transfer.receiver string + The receiver's address. +
txs[].transfer.amount int64 + The amount to be transferred in NanoPAC. +
txs[].bond PayloadBond + (OneOf) Bond transaction payload. +
txs[].bond.sender string + The sender's address. +
txs[].bond.receiver string + The receiver's address. +
txs[].bond.stake int64 + The stake amount in NanoPAC. +
txs[].sortition PayloadSortition + (OneOf) Sortition transaction payload. +
txs[].sortition.address string + The validator address associated with the sortition proof. +
txs[].sortition.proof string + The proof for the sortition. +
txs[].unbond PayloadUnbond + (OneOf) Unbond transaction payload. +
txs[].unbond.validator string + The address of the validator to unbond from. +
txs[].withdraw PayloadWithdraw + (OneOf) Withdraw transaction payload. +
txs[].withdraw.from string + The address to withdraw from. +
txs[].withdraw.to string + The address to withdraw to. +
txs[].withdraw.amount int64 + The withdrawal amount in NanoPAC. +
txs[].memo string + A memo string for the transaction. +
txs[].public_key string + The public key associated with the transaction. +
txs[].signature string + The signature for the transaction. +
+ +### GetBlockHash + +

GetBlockHash retrieves the hash of a block at the specified height.

+ +

GetBlockHashRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
height uint32 + The height of the block to retrieve the hash for. +
+

GetBlockHashResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
hash string + The hash of the block. +
+ +### GetBlockHeight + +

GetBlockHeight retrieves the height of a block with the specified hash.

+ +

GetBlockHeightRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
hash string + The hash of the block to retrieve the height for. +
+

GetBlockHeightResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
height uint32 + The height of the block. +
+ +### GetBlockchainInfo + +

GetBlockchainInfo retrieves general information about the blockchain.

+ +

GetBlockchainInfoRequest Request

+ +Message has no fields. +

GetBlockchainInfoResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
last_block_height uint32 + The height of the last block in the blockchain. +
last_block_hash string + The hash of the last block in the blockchain. +
total_accounts int32 + The total number of accounts in the blockchain. +
total_validators int32 + The total number of validators in the blockchain. +
total_power int64 + The total power of the blockchain. +
committee_power int64 + The power of the committee. +
committee_validatorsrepeated ValidatorInfo + List of committee validators. +
committee_validators[].hash string + The hash of the validator. +
committee_validators[].data string + The serialized data of the validator. +
committee_validators[].public_key string + The public key of the validator. +
committee_validators[].number int32 + The unique number assigned to the validator. +
committee_validators[].stake int64 + The stake of the validator in NanoPAC. +
committee_validators[].last_bonding_height uint32 + The height at which the validator last bonded. +
committee_validators[].last_sortition_height uint32 + The height at which the validator last participated in sortition. +
committee_validators[].unbonding_height uint32 + The height at which the validator will unbond. +
committee_validators[].address string + The address of the validator. +
committee_validators[].availability_score double + The availability score of the validator. +
is_pruned bool + If the blocks are subject to pruning. +
pruning_height uint32 + Lowest-height block stored (only present if pruning is enabled) +
last_block_time int64 + Timestamp of the last block in Unix format +
+ +### GetConsensusInfo + +

GetConsensusInfo retrieves information about the consensus instances.

+ +

GetConsensusInfoRequest Request

+ +Message has no fields. +

GetConsensusInfoResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
proposal Proposal + The proposal of the consensus info. +
proposal.height uint32 + The height of the proposal. +
proposal.round int32 + The round of the proposal. +
proposal.block_data string + The block data of the proposal. +
proposal.signature_data string + The signature data of the proposal. +
instancesrepeated ConsensusInfo + List of consensus instances. +
instances[].address string + The address of the consensus instance. +
instances[].active bool + Indicates whether the consensus instance is active and part of the +committee. +
instances[].height uint32 + The height of the consensus instance. +
instances[].round int32 + The round of the consensus instance. +
instances[].votesrepeated VoteInfo + List of votes in the consensus instance. +
instances[].votes[].type VoteType + (Enum) The type of the vote. +
Available values:
    +
  • VOTE_UNKNOWN = 0 (Unknown vote type.)
  • +
  • VOTE_PREPARE = 1 (Prepare vote type.)
  • +
  • VOTE_PRECOMMIT = 2 (Precommit vote type.)
  • +
  • VOTE_CHANGE_PROPOSER = 3 (Change proposer vote type.)
  • +
+
instances[].votes[].voter string + The address of the voter. +
instances[].votes[].block_hash string + The hash of the block being voted on. +
instances[].votes[].round int32 + The consensus round of the vote. +
instances[].votes[].cp_round int32 + The change-proposer round of the vote. +
instances[].votes[].cp_value int32 + The change-proposer value of the vote. +
+ +### GetAccount + +

GetAccount retrieves information about an account based on the provided +address.

+ +

GetAccountRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
address string + The address of the account to retrieve information for. +
+

GetAccountResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
account AccountInfo + Detailed information about the account. +
account.hash string + The hash of the account. +
account.data string + The serialized data of the account. +
account.number int32 + The unique number assigned to the account. +
account.balance int64 + The balance of the account in NanoPAC. +
account.address string + The address of the account. +
+ +### GetValidator + +

GetValidator retrieves information about a validator based on the provided +address.

+ +

GetValidatorRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
address string + The address of the validator to retrieve information for. +
+

GetValidatorResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
validator ValidatorInfo + Detailed information about the validator. +
validator.hash string + The hash of the validator. +
validator.data string + The serialized data of the validator. +
validator.public_key string + The public key of the validator. +
validator.number int32 + The unique number assigned to the validator. +
validator.stake int64 + The stake of the validator in NanoPAC. +
validator.last_bonding_height uint32 + The height at which the validator last bonded. +
validator.last_sortition_height uint32 + The height at which the validator last participated in sortition. +
validator.unbonding_height uint32 + The height at which the validator will unbond. +
validator.address string + The address of the validator. +
validator.availability_score double + The availability score of the validator. +
+ +### GetValidatorByNumber + +

GetValidatorByNumber retrieves information about a validator based on the +provided number.

+ +

GetValidatorByNumberRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
number int32 + The unique number of the validator to retrieve information for. +
+

GetValidatorResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
validator ValidatorInfo + Detailed information about the validator. +
validator.hash string + The hash of the validator. +
validator.data string + The serialized data of the validator. +
validator.public_key string + The public key of the validator. +
validator.number int32 + The unique number assigned to the validator. +
validator.stake int64 + The stake of the validator in NanoPAC. +
validator.last_bonding_height uint32 + The height at which the validator last bonded. +
validator.last_sortition_height uint32 + The height at which the validator last participated in sortition. +
validator.unbonding_height uint32 + The height at which the validator will unbond. +
validator.address string + The address of the validator. +
validator.availability_score double + The availability score of the validator. +
+ +### GetValidatorAddresses + +

GetValidatorAddresses retrieves a list of all validator addresses.

+ +

GetValidatorAddressesRequest Request

+ +Message has no fields. +

GetValidatorAddressesResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
addressesrepeated string + List of validator addresses. +
+ +### GetPublicKey + +

GetPublicKey retrieves the public key of an account based on the provided +address.

+ +

GetPublicKeyRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
address string + The address for which to retrieve the public key. +
+

GetPublicKeyResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
public_key string + The public key associated with the provided address. +
+ +### GetTxPoolContent + +

GetTxPoolContent retrieves current transactions in the transaction pool.

+ +

GetTxPoolContentRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
payload_type PayloadType + (Enum) The type of transactions to retrieve from the transaction pool. 0 means all +types. +
Available values:
    +
  • UNKNOWN = 0 (Unknown payload type.)
  • +
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • +
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • +
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • +
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • +
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • +
+
+

GetTxPoolContentResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
txsrepeated TransactionInfo + List of transactions currently in the pool. +
txs[].id string + The unique ID of the transaction. +
txs[].data string + The raw transaction data. +
txs[].version int32 + The version of the transaction. +
txs[].lock_time uint32 + The lock time for the transaction. +
txs[].value int64 + The value of the transaction in NanoPAC. +
txs[].fee int64 + The fee for the transaction in NanoPAC. +
txs[].payload_type PayloadType + (Enum) The type of transaction payload. +
Available values:
    +
  • UNKNOWN = 0 (Unknown payload type.)
  • +
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • +
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • +
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • +
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • +
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • +
+
txs[].transfer PayloadTransfer + (OneOf) Transfer transaction payload. +
txs[].transfer.sender string + The sender's address. +
txs[].transfer.receiver string + The receiver's address. +
txs[].transfer.amount int64 + The amount to be transferred in NanoPAC. +
txs[].bond PayloadBond + (OneOf) Bond transaction payload. +
txs[].bond.sender string + The sender's address. +
txs[].bond.receiver string + The receiver's address. +
txs[].bond.stake int64 + The stake amount in NanoPAC. +
txs[].sortition PayloadSortition + (OneOf) Sortition transaction payload. +
txs[].sortition.address string + The validator address associated with the sortition proof. +
txs[].sortition.proof string + The proof for the sortition. +
txs[].unbond PayloadUnbond + (OneOf) Unbond transaction payload. +
txs[].unbond.validator string + The address of the validator to unbond from. +
txs[].withdraw PayloadWithdraw + (OneOf) Withdraw transaction payload. +
txs[].withdraw.from string + The address to withdraw from. +
txs[].withdraw.to string + The address to withdraw to. +
txs[].withdraw.amount int64 + The withdrawal amount in NanoPAC. +
txs[].memo string + A memo string for the transaction. +
txs[].public_key string + The public key associated with the transaction. +
txs[].signature string + The signature for the transaction. +
+ +## Network Service + +

Network service provides RPCs for retrieving information about the network.

+ +### GetNetworkInfo + +

GetNetworkInfo retrieves information about the overall network.

+ +

GetNetworkInfoRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
only_connected bool + If true, only returns peers with connected status. +
+

GetNetworkInfoResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
network_name string + Name of the network. +
total_sent_bytes int64 + Total bytes sent across the network. +
total_received_bytes int64 + Total bytes received across the network. +
connected_peers_count uint32 + Number of connected peers. +
connected_peersrepeated PeerInfo + List of connected peers. +
connected_peers[].status int32 + Status of the peer. +
connected_peers[].moniker string + Moniker of the peer. +
connected_peers[].agent string + Agent information of the peer. +
connected_peers[].peer_id string + Peer ID of the peer. +
connected_peers[].consensus_keysrepeated string + Consensus keys used by the peer. +
connected_peers[].consensus_addressesrepeated string + Consensus addresses of the peer. +
connected_peers[].services uint32 + Services provided by the peer. +
connected_peers[].last_block_hash string + Hash of the last block the peer knows. +
connected_peers[].height uint32 + Blockchain height of the peer. +
connected_peers[].received_bundles int32 + Number of received bundles. +
connected_peers[].invalid_bundles int32 + Number of invalid bundles received. +
connected_peers[].last_sent int64 + Timestamp of the last sent bundle. +
connected_peers[].last_received int64 + Timestamp of the last received bundle. +
connected_peers[].sent_bytes map<int32, int64> + Bytes sent per message type. +
connected_peers[].received_bytes map<int32, int64> + Bytes received per message type. +
connected_peers[].address string + Network address of the peer. +
connected_peers[].direction string + Direction of connection with the peer. +
connected_peers[].protocolsrepeated string + List of protocols supported by the peer. +
connected_peers[].total_sessions int32 + Total download sessions with the peer. +
connected_peers[].completed_sessions int32 + Completed download sessions with the peer. +
sent_bytes map<int32, int64> + Bytes sent per peer ID. +
received_bytes map<int32, int64> + Bytes received per peer ID. +
+ +### GetNodeInfo + +

GetNodeInfo retrieves information about a specific node in the network.

+ +

GetNodeInfoRequest Request

+ +Message has no fields. +

GetNodeInfoResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
moniker string + Moniker of the node. +
agent string + Agent information of the node. +
peer_id string + Peer ID of the node. +
started_at uint64 + Timestamp when the node started. +
reachability string + Reachability status of the node. +
services int32 + A bitfield indicating the services provided by the node. +
services_names string + Names of services provided by the node. +
local_addrsrepeated string + List of addresses associated with the node. +
protocolsrepeated string + List of protocols supported by the node. +
clock_offset double + Clock offset of the node. +
connection_info ConnectionInfo + Information about the node's connections. +
connection_info.connections uint64 + Total number of connections. +
connection_info.inbound_connections uint64 + Number of inbound connections. +
connection_info.outbound_connections uint64 + Number of outbound connections. +
+ +## Utils Service + +

Utils service defines RPC methods for utility functions such as message +signing and verification.

+ +### SignMessageWithPrivateKey + +

SignMessageWithPrivateKey sign message with provided private key.

+ +

SignMessageWithPrivateKeyRequest Request

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
private_key string + The private key to sign the message. +
message string + The message to sign. +
+

SignMessageWithPrivateKeyResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
signature string + The signature of the message. +
+ +### VerifyMessage + +

VerifyMessage verify signature with public key and message

+ +

VerifyMessageRequest Request

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
message string + The signed message. +
signature string + The signature of the message. +
public_key string + The public key of the signer. +
+

VerifyMessageResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
is_valid bool + Indicates if the signature is valid (true) or not (false). +
+ +## Wallet Service + +

Define the Wallet service with various RPC methods for wallet management.

+ +### CreateWallet + +

CreateWallet creates a new wallet with the specified parameters.

+ +

CreateWalletRequest Request

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the new wallet. +
password string + The password for securing the wallet. +
+

CreateWalletResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
mnemonic string + The mnemonic for wallet recovery. +
+ +### RestoreWallet + +

RestoreWallet restores an existing wallet with the given mnemonic.

+ +

RestoreWalletRequest Request

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet to restore. +
mnemonic string + The mnemonic for wallet recovery. +
password string + The password for securing the wallet. +
+

RestoreWalletResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the restored wallet. +
+ +### LoadWallet + +

LoadWallet loads an existing wallet with the given name.

+ +

LoadWalletRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet to load. +
+

LoadWalletResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the loaded wallet. +
+ +### UnloadWallet + +

UnloadWallet unloads a currently loaded wallet with the specified name.

+ +

UnloadWalletRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet to unload. +
+

UnloadWalletResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the unloaded wallet. +
+ +### GetTotalBalance + +

GetTotalBalance returns the total available balance of the wallet.

+ +

GetTotalBalanceRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet to get the total balance. +
+

GetTotalBalanceResponse Response

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet. +
total_balance int64 + The total balance of the wallet in NanoPAC. +
+ +### SignRawTransaction + +

SignRawTransaction signs a raw transaction for a specified wallet.

+ +

SignRawTransactionRequest Request

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet used for signing. +
raw_transaction string + The raw transaction data to be signed. +
password string + The password for unlocking the wallet for signing. +
+

SignRawTransactionResponse Response

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
transaction_id string + The ID of the signed transaction. +
signed_raw_transaction string + The signed raw transaction data. +
+ +### GetValidatorAddress + +

GetValidatorAddress retrieves the validator address associated with a +public key.

+ +

GetValidatorAddressRequest Request

+ + + + + + + + + + + + +
FieldTypeDescription
public_key string + The public key for which the validator address is requested. +
+

GetValidatorAddressResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
address string + The validator address associated with the public key. +
+ +### GetNewAddress + +

GetNewAddress generates a new address for the specified wallet.

+ +

GetNewAddressRequest Request

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet to generate a new address. +
address_type AddressType + (Enum) The type of address to generate. +
Available values:
    +
  • ADDRESS_TYPE_TREASURY = 0 (Treasury address type. +Should not be used to generate new addresses.)
  • +
  • ADDRESS_TYPE_VALIDATOR = 1 (Validator address type.)
  • +
  • ADDRESS_TYPE_BLS_ACCOUNT = 2 (Account address type with BLS signature scheme.)
  • +
  • ADDRESS_TYPE_ED25519_ACCOUNT = 3 (Account address type with Ed25519 signature scheme. +Note: Generating a new Ed25519 address requires the wallet password.)
  • +
+
label string + A label for the new address. +
password string + Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. +
+

GetNewAddressResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet from which the address is generated. +
address_info AddressInfo + Information about the newly generated address. +
address_info.address string + The address string. +
address_info.public_key string + The public key associated with the address. +
address_info.label string + A label associated with the address. +
address_info.path string + The Hierarchical Deterministic path of the address within the wallet. +
+ +### GetAddressHistory + +

GetAddressHistory retrieves the transaction history of an address.

+ +

GetAddressHistoryRequest Request

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet. +
address string + The address to retrieve the transaction history for. +
+

GetAddressHistoryResponse Response

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
history_inforepeated HistoryInfo + Array of history information for the address. +
history_info[].transaction_id string + The transaction ID hash. +
history_info[].time uint32 + The timestamp of the transaction. +
history_info[].payload_type string + The payload type of the transaction. +
history_info[].description string + A description of the transaction. +
history_info[].amount int64 + The amount involved in the transaction. +
+ +### SignMessage + +

SignMessage signs an arbitrary message.

+ +

SignMessageRequest Request

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet. +
password string + The password for unlocking the wallet for signing. +
address string + The account address associated with the private key. +
message string + The arbitrary message to be signed. +
+

SignMessageResponse Response

+ + + + + + + + + + + + +
FieldTypeDescription
signature string + Signature of the message. +
+ +## Scalar Value Types + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
.proto TypeGoC++RustJavaPythonC#
doublefloat64doublef64doublefloatdouble
floatfloat32floatf32floatfloatfloat
int32int32int32i32intintint
int64int64int64i64longint/longlong
uint32uint32uint32u32intint/longuint
uint64uint64uint64u64longint/longulong
sint32int32int32i32intintint
sint64int64int64i64longint/longlong
fixed32uint32uint32u64intintuint
fixed64uint64uint64u64longint/longulong
sfixed32int32int32i32intintint
sfixed64int64int64i64longint/longlong
boolboolboolboolbooleanbooleanbool
stringstringstringStringStringstr/unicodestring
bytes[]bytestringVecByteStringstrByteString
diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md new file mode 100644 index 000000000..fa2d83435 --- /dev/null +++ b/www/grpc/gen/docs/json-rpc.md @@ -0,0 +1,2969 @@ +--- +title: JSON-RPC API Reference +weight: 2 +--- + +Each node in the Pactus network can be configured to use the [gRPC](https://grpc.io/) protocol for communication. +Here, you can find the list of all gRPC methods and messages. + +All the amounts and values in gRPC endpoints are in NanoPAC units, +which are atomic and the smallest unit in the Pactus blockchain. +Each PAC is equivalent to 1,000,000,000 or 109 NanoPACs. + +## Example + +To call JSON-RPC methods, you need to create the JSON-RPC request: + +```json +{ + "jsonrpc": "2.0", + "id": 1, + "method": "pactus.network.get_node_info", + "params": {} +} +``` + +> Make sure you always add the `params` field, even if no parameters are needed, and ensure you use curly braces. + +Then you use the `curl` command to send the request to the node: + +```bash +curl --location 'http://localhost:8545/' \ +--header 'Content-Type: application/json' \ +--data '{ + "jsonrpc": "2.0", + "id": 1, + "method": "pactus.network.get_node_info", + "params": {} +}' +``` + +> Before sending the request, you need to enable the JSON-RPC service inside the +> [configuration](/get-started/configuration/). + +### Using Basic Auth + +If you have enabled the [gRPC Basic Authentication](/tutorials/grpc-sign-transactions/), +then you need to set the `Authorization` header. + +```bash +curl --location 'http://localhost:8545/' \ +--header 'Content-Type: application/json' \ +--header 'Authorization: Basic ' \ +--data '{ + "jsonrpc": "2.0", + "id": 1, + "method": "pactus.blockchain.get_account", + "params": { + "address": "pc1z2r0fmu8sg2ffa0tgrr08gnefcxl2kq7wvquf8z" + } +}' +``` + +

JSON-RPC Methods

+ + + +
+ +## Transaction Service + +

Transaction service defines various RPC methods for interacting with +transactions.

+ +### pactus.transaction.get_transaction + +

GetTransaction retrieves transaction details based on the provided request +parameters.

+ +

Parameters

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
id string + The unique ID of the transaction to retrieve. +
verbosity string + (Enum) The verbosity level for transaction details. +
Available values:
    +
  • TRANSACTION_DATA = 0 (Request transaction data only.)
  • +
  • TRANSACTION_INFO = 1 (Request detailed transaction information.)
  • +
+
+

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
block_height numeric + The height of the block containing the transaction. +
block_time numeric + The UNIX timestamp of the block containing the transaction. +
transaction object + Detailed information about the transaction. +
transaction.id string + The unique ID of the transaction. +
transaction.data string + The raw transaction data. +
transaction.version numeric + The version of the transaction. +
transaction.lock_time numeric + The lock time for the transaction. +
transaction.value numeric + The value of the transaction in NanoPAC. +
transaction.fee numeric + The fee for the transaction in NanoPAC. +
transaction.payload_type string + (Enum) The type of transaction payload. +
Available values:
    +
  • UNKNOWN = 0 (Unknown payload type.)
  • +
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • +
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • +
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • +
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • +
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • +
+
transaction.transfer object + (OneOf) Transfer transaction payload. +
transaction.transfer.sender string + The sender's address. +
transaction.transfer.receiver string + The receiver's address. +
transaction.transfer.amount numeric + The amount to be transferred in NanoPAC. +
transaction.bond object + (OneOf) Bond transaction payload. +
transaction.bond.sender string + The sender's address. +
transaction.bond.receiver string + The receiver's address. +
transaction.bond.stake numeric + The stake amount in NanoPAC. +
transaction.sortition object + (OneOf) Sortition transaction payload. +
transaction.sortition.address string + The validator address associated with the sortition proof. +
transaction.sortition.proof string + The proof for the sortition. +
transaction.unbond object + (OneOf) Unbond transaction payload. +
transaction.unbond.validator string + The address of the validator to unbond from. +
transaction.withdraw object + (OneOf) Withdraw transaction payload. +
transaction.withdraw.from string + The address to withdraw from. +
transaction.withdraw.to string + The address to withdraw to. +
transaction.withdraw.amount numeric + The withdrawal amount in NanoPAC. +
transaction.memo string + A memo string for the transaction. +
transaction.public_key string + The public key associated with the transaction. +
transaction.signature string + The signature for the transaction. +
+ +### pactus.transaction.calculate_fee + +

CalculateFee calculates the transaction fee based on the specified amount +and payload type.

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
amount numeric + The amount involved in the transaction, specified in NanoPAC. +
payload_type string + (Enum) The type of transaction payload. +
Available values:
    +
  • UNKNOWN = 0 (Unknown payload type.)
  • +
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • +
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • +
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • +
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • +
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • +
+
fixed_amount boolean + Indicates if the amount should be fixed and include the fee. +
+

Result

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
amount numeric + The calculated amount in NanoPAC. +
fee numeric + The calculated transaction fee in NanoPAC. +
+ +### pactus.transaction.broadcast_transaction + +

BroadcastTransaction broadcasts a signed transaction to the network.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
signed_raw_transaction string + The signed raw transaction data to be broadcasted. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
id string + The unique ID of the broadcasted transaction. +
+ +### pactus.transaction.get_raw_transaction + +

GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
lock_time numeric + The lock time for the transaction. If not set, defaults to the last block +height. +
memo string + A memo string for the transaction. +
transfer object + (OneOf) +
bond object + (OneOf) +
unbond object + (OneOf) +
withdraw object + (OneOf) +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
raw_transaction string + The raw transaction data. +
+ +## Blockchain Service + +

Blockchain service defines RPC methods for interacting with the blockchain.

+ +### pactus.blockchain.get_block + +

GetBlock retrieves information about a block based on the provided request +parameters.

+ +

Parameters

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
height numeric + The height of the block to retrieve. +
verbosity string + (Enum) The verbosity level for block information. +
Available values:
    +
  • BLOCK_DATA = 0 (Request only block data.)
  • +
  • BLOCK_INFO = 1 (Request block information and transaction IDs.)
  • +
  • BLOCK_TRANSACTIONS = 2 (Request block information and detailed transaction data.)
  • +
+
+

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
height numeric + The height of the block. +
hash string + The hash of the block. +
data string + Block data, available only if verbosity level is set to BLOCK_DATA. +
block_time numeric + The timestamp of the block. +
header object + Header information of the block. +
header.version numeric + The version of the block. +
header.prev_block_hash string + The hash of the previous block. +
header.state_root string + The state root hash of the blockchain. +
header.sortition_seed string + The sortition seed of the block. +
header.proposer_address string + The address of the proposer of the block. +
prev_cert object + Certificate information of the previous block. +
prev_cert.hash string + The hash of the certificate. +
prev_cert.round numeric + The round of the certificate. +
prev_cert.committersrepeated numeric + List of committers in the certificate. +
prev_cert.absenteesrepeated numeric + List of absentees in the certificate. +
prev_cert.signature string + The signature of the certificate. +
txsrepeated object + List of transactions in the block, available when verbosity level is set to +BLOCK_TRANSACTIONS. +
txs[].id string + The unique ID of the transaction. +
txs[].data string + The raw transaction data. +
txs[].version numeric + The version of the transaction. +
txs[].lock_time numeric + The lock time for the transaction. +
txs[].value numeric + The value of the transaction in NanoPAC. +
txs[].fee numeric + The fee for the transaction in NanoPAC. +
txs[].payload_type string + (Enum) The type of transaction payload. +
Available values:
    +
  • UNKNOWN = 0 (Unknown payload type.)
  • +
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • +
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • +
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • +
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • +
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • +
+
txs[].transfer object + (OneOf) Transfer transaction payload. +
txs[].transfer.sender string + The sender's address. +
txs[].transfer.receiver string + The receiver's address. +
txs[].transfer.amount numeric + The amount to be transferred in NanoPAC. +
txs[].bond object + (OneOf) Bond transaction payload. +
txs[].bond.sender string + The sender's address. +
txs[].bond.receiver string + The receiver's address. +
txs[].bond.stake numeric + The stake amount in NanoPAC. +
txs[].sortition object + (OneOf) Sortition transaction payload. +
txs[].sortition.address string + The validator address associated with the sortition proof. +
txs[].sortition.proof string + The proof for the sortition. +
txs[].unbond object + (OneOf) Unbond transaction payload. +
txs[].unbond.validator string + The address of the validator to unbond from. +
txs[].withdraw object + (OneOf) Withdraw transaction payload. +
txs[].withdraw.from string + The address to withdraw from. +
txs[].withdraw.to string + The address to withdraw to. +
txs[].withdraw.amount numeric + The withdrawal amount in NanoPAC. +
txs[].memo string + A memo string for the transaction. +
txs[].public_key string + The public key associated with the transaction. +
txs[].signature string + The signature for the transaction. +
+ +### pactus.blockchain.get_block_hash + +

GetBlockHash retrieves the hash of a block at the specified height.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
height numeric + The height of the block to retrieve the hash for. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
hash string + The hash of the block. +
+ +### pactus.blockchain.get_block_height + +

GetBlockHeight retrieves the height of a block with the specified hash.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
hash string + The hash of the block to retrieve the height for. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
height numeric + The height of the block. +
+ +### pactus.blockchain.get_blockchain_info + +

GetBlockchainInfo retrieves general information about the blockchain.

+ +

Parameters

+ +Parameters has no fields. +

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
last_block_height numeric + The height of the last block in the blockchain. +
last_block_hash string + The hash of the last block in the blockchain. +
total_accounts numeric + The total number of accounts in the blockchain. +
total_validators numeric + The total number of validators in the blockchain. +
total_power numeric + The total power of the blockchain. +
committee_power numeric + The power of the committee. +
committee_validatorsrepeated object + List of committee validators. +
committee_validators[].hash string + The hash of the validator. +
committee_validators[].data string + The serialized data of the validator. +
committee_validators[].public_key string + The public key of the validator. +
committee_validators[].number numeric + The unique number assigned to the validator. +
committee_validators[].stake numeric + The stake of the validator in NanoPAC. +
committee_validators[].last_bonding_height numeric + The height at which the validator last bonded. +
committee_validators[].last_sortition_height numeric + The height at which the validator last participated in sortition. +
committee_validators[].unbonding_height numeric + The height at which the validator will unbond. +
committee_validators[].address string + The address of the validator. +
committee_validators[].availability_score numeric + The availability score of the validator. +
is_pruned boolean + If the blocks are subject to pruning. +
pruning_height numeric + Lowest-height block stored (only present if pruning is enabled) +
last_block_time numeric + Timestamp of the last block in Unix format +
+ +### pactus.blockchain.get_consensus_info + +

GetConsensusInfo retrieves information about the consensus instances.

+ +

Parameters

+ +Parameters has no fields. +

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
proposal object + The proposal of the consensus info. +
proposal.height numeric + The height of the proposal. +
proposal.round numeric + The round of the proposal. +
proposal.block_data string + The block data of the proposal. +
proposal.signature_data string + The signature data of the proposal. +
instancesrepeated object + List of consensus instances. +
instances[].address string + The address of the consensus instance. +
instances[].active boolean + Indicates whether the consensus instance is active and part of the +committee. +
instances[].height numeric + The height of the consensus instance. +
instances[].round numeric + The round of the consensus instance. +
instances[].votesrepeated object + List of votes in the consensus instance. +
instances[].votes[].type string + (Enum) The type of the vote. +
Available values:
    +
  • VOTE_UNKNOWN = 0 (Unknown vote type.)
  • +
  • VOTE_PREPARE = 1 (Prepare vote type.)
  • +
  • VOTE_PRECOMMIT = 2 (Precommit vote type.)
  • +
  • VOTE_CHANGE_PROPOSER = 3 (Change proposer vote type.)
  • +
+
instances[].votes[].voter string + The address of the voter. +
instances[].votes[].block_hash string + The hash of the block being voted on. +
instances[].votes[].round numeric + The consensus round of the vote. +
instances[].votes[].cp_round numeric + The change-proposer round of the vote. +
instances[].votes[].cp_value numeric + The change-proposer value of the vote. +
+ +### pactus.blockchain.get_account + +

GetAccount retrieves information about an account based on the provided +address.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
address string + The address of the account to retrieve information for. +
+

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
account object + Detailed information about the account. +
account.hash string + The hash of the account. +
account.data string + The serialized data of the account. +
account.number numeric + The unique number assigned to the account. +
account.balance numeric + The balance of the account in NanoPAC. +
account.address string + The address of the account. +
+ +### pactus.blockchain.get_validator + +

GetValidator retrieves information about a validator based on the provided +address.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
address string + The address of the validator to retrieve information for. +
+

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
validator object + Detailed information about the validator. +
validator.hash string + The hash of the validator. +
validator.data string + The serialized data of the validator. +
validator.public_key string + The public key of the validator. +
validator.number numeric + The unique number assigned to the validator. +
validator.stake numeric + The stake of the validator in NanoPAC. +
validator.last_bonding_height numeric + The height at which the validator last bonded. +
validator.last_sortition_height numeric + The height at which the validator last participated in sortition. +
validator.unbonding_height numeric + The height at which the validator will unbond. +
validator.address string + The address of the validator. +
validator.availability_score numeric + The availability score of the validator. +
+ +### pactus.blockchain.get_validator_by_number + +

GetValidatorByNumber retrieves information about a validator based on the +provided number.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
number numeric + The unique number of the validator to retrieve information for. +
+

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
validator object + Detailed information about the validator. +
validator.hash string + The hash of the validator. +
validator.data string + The serialized data of the validator. +
validator.public_key string + The public key of the validator. +
validator.number numeric + The unique number assigned to the validator. +
validator.stake numeric + The stake of the validator in NanoPAC. +
validator.last_bonding_height numeric + The height at which the validator last bonded. +
validator.last_sortition_height numeric + The height at which the validator last participated in sortition. +
validator.unbonding_height numeric + The height at which the validator will unbond. +
validator.address string + The address of the validator. +
validator.availability_score numeric + The availability score of the validator. +
+ +### pactus.blockchain.get_validator_addresses + +

GetValidatorAddresses retrieves a list of all validator addresses.

+ +

Parameters

+ +Parameters has no fields. +

Result

+ + + + + + + + + + + + +
FieldTypeDescription
addressesrepeated string + List of validator addresses. +
+ +### pactus.blockchain.get_public_key + +

GetPublicKey retrieves the public key of an account based on the provided +address.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
address string + The address for which to retrieve the public key. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
public_key string + The public key associated with the provided address. +
+ +### pactus.blockchain.get_tx_pool_content + +

GetTxPoolContent retrieves current transactions in the transaction pool.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
payload_type string + (Enum) The type of transactions to retrieve from the transaction pool. 0 means all +types. +
Available values:
    +
  • UNKNOWN = 0 (Unknown payload type.)
  • +
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • +
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • +
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • +
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • +
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • +
+
+

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
txsrepeated object + List of transactions currently in the pool. +
txs[].id string + The unique ID of the transaction. +
txs[].data string + The raw transaction data. +
txs[].version numeric + The version of the transaction. +
txs[].lock_time numeric + The lock time for the transaction. +
txs[].value numeric + The value of the transaction in NanoPAC. +
txs[].fee numeric + The fee for the transaction in NanoPAC. +
txs[].payload_type string + (Enum) The type of transaction payload. +
Available values:
    +
  • UNKNOWN = 0 (Unknown payload type.)
  • +
  • TRANSFER_PAYLOAD = 1 (Transfer payload type.)
  • +
  • BOND_PAYLOAD = 2 (Bond payload type.)
  • +
  • SORTITION_PAYLOAD = 3 (Sortition payload type.)
  • +
  • UNBOND_PAYLOAD = 4 (Unbond payload type.)
  • +
  • WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
  • +
+
txs[].transfer object + (OneOf) Transfer transaction payload. +
txs[].transfer.sender string + The sender's address. +
txs[].transfer.receiver string + The receiver's address. +
txs[].transfer.amount numeric + The amount to be transferred in NanoPAC. +
txs[].bond object + (OneOf) Bond transaction payload. +
txs[].bond.sender string + The sender's address. +
txs[].bond.receiver string + The receiver's address. +
txs[].bond.stake numeric + The stake amount in NanoPAC. +
txs[].sortition object + (OneOf) Sortition transaction payload. +
txs[].sortition.address string + The validator address associated with the sortition proof. +
txs[].sortition.proof string + The proof for the sortition. +
txs[].unbond object + (OneOf) Unbond transaction payload. +
txs[].unbond.validator string + The address of the validator to unbond from. +
txs[].withdraw object + (OneOf) Withdraw transaction payload. +
txs[].withdraw.from string + The address to withdraw from. +
txs[].withdraw.to string + The address to withdraw to. +
txs[].withdraw.amount numeric + The withdrawal amount in NanoPAC. +
txs[].memo string + A memo string for the transaction. +
txs[].public_key string + The public key associated with the transaction. +
txs[].signature string + The signature for the transaction. +
+ +## Network Service + +

Network service provides RPCs for retrieving information about the network.

+ +### pactus.network.get_network_info + +

GetNetworkInfo retrieves information about the overall network.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
only_connected boolean + If true, only returns peers with connected status. +
+

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
network_name string + Name of the network. +
total_sent_bytes numeric + Total bytes sent across the network. +
total_received_bytes numeric + Total bytes received across the network. +
connected_peers_count numeric + Number of connected peers. +
connected_peersrepeated object + List of connected peers. +
connected_peers[].status numeric + Status of the peer. +
connected_peers[].moniker string + Moniker of the peer. +
connected_peers[].agent string + Agent information of the peer. +
connected_peers[].peer_id string + Peer ID of the peer. +
connected_peers[].consensus_keysrepeated string + Consensus keys used by the peer. +
connected_peers[].consensus_addressesrepeated string + Consensus addresses of the peer. +
connected_peers[].services numeric + Services provided by the peer. +
connected_peers[].last_block_hash string + Hash of the last block the peer knows. +
connected_peers[].height numeric + Blockchain height of the peer. +
connected_peers[].received_bundles numeric + Number of received bundles. +
connected_peers[].invalid_bundles numeric + Number of invalid bundles received. +
connected_peers[].last_sent numeric + Timestamp of the last sent bundle. +
connected_peers[].last_received numeric + Timestamp of the last received bundle. +
connected_peers[].sent_bytes object + Bytes sent per message type. +
connected_peers[].received_bytes object + Bytes received per message type. +
connected_peers[].address string + Network address of the peer. +
connected_peers[].direction string + Direction of connection with the peer. +
connected_peers[].protocolsrepeated string + List of protocols supported by the peer. +
connected_peers[].total_sessions numeric + Total download sessions with the peer. +
connected_peers[].completed_sessions numeric + Completed download sessions with the peer. +
sent_bytes object + Bytes sent per peer ID. +
received_bytes object + Bytes received per peer ID. +
+ +### pactus.network.get_node_info + +

GetNodeInfo retrieves information about a specific node in the network.

+ +

Parameters

+ +Parameters has no fields. +

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
moniker string + Moniker of the node. +
agent string + Agent information of the node. +
peer_id string + Peer ID of the node. +
started_at numeric + Timestamp when the node started. +
reachability string + Reachability status of the node. +
services numeric + A bitfield indicating the services provided by the node. +
services_names string + Names of services provided by the node. +
local_addrsrepeated string + List of addresses associated with the node. +
protocolsrepeated string + List of protocols supported by the node. +
clock_offset numeric + Clock offset of the node. +
connection_info object + Information about the node's connections. +
connection_info.connections numeric + Total number of connections. +
connection_info.inbound_connections numeric + Number of inbound connections. +
connection_info.outbound_connections numeric + Number of outbound connections. +
+ +## Utils Service + +

Utils service defines RPC methods for utility functions such as message +signing and verification.

+ +### pactus.utils.sign_message_with_private_key + +

SignMessageWithPrivateKey sign message with provided private key.

+ +

Parameters

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
private_key string + The private key to sign the message. +
message string + The message to sign. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
signature string + The signature of the message. +
+ +### pactus.utils.verify_message + +

VerifyMessage verify signature with public key and message

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
message string + The signed message. +
signature string + The signature of the message. +
public_key string + The public key of the signer. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
is_valid boolean + Indicates if the signature is valid (true) or not (false). +
+ +## Wallet Service + +

Define the Wallet service with various RPC methods for wallet management.

+ +### pactus.wallet.create_wallet + +

CreateWallet creates a new wallet with the specified parameters.

+ +

Parameters

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the new wallet. +
password string + The password for securing the wallet. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
mnemonic string + The mnemonic for wallet recovery. +
+ +### pactus.wallet.restore_wallet + +

RestoreWallet restores an existing wallet with the given mnemonic.

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet to restore. +
mnemonic string + The mnemonic for wallet recovery. +
password string + The password for securing the wallet. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the restored wallet. +
+ +### pactus.wallet.load_wallet + +

LoadWallet loads an existing wallet with the given name.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet to load. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the loaded wallet. +
+ +### pactus.wallet.unload_wallet + +

UnloadWallet unloads a currently loaded wallet with the specified name.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet to unload. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the unloaded wallet. +
+ +### pactus.wallet.get_total_balance + +

GetTotalBalance returns the total available balance of the wallet.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet to get the total balance. +
+

Result

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet. +
total_balance numeric + The total balance of the wallet in NanoPAC. +
+ +### pactus.wallet.sign_raw_transaction + +

SignRawTransaction signs a raw transaction for a specified wallet.

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet used for signing. +
raw_transaction string + The raw transaction data to be signed. +
password string + The password for unlocking the wallet for signing. +
+

Result

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
transaction_id string + The ID of the signed transaction. +
signed_raw_transaction string + The signed raw transaction data. +
+ +### pactus.wallet.get_validator_address + +

GetValidatorAddress retrieves the validator address associated with a +public key.

+ +

Parameters

+ + + + + + + + + + + + +
FieldTypeDescription
public_key string + The public key for which the validator address is requested. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
address string + The validator address associated with the public key. +
+ +### pactus.wallet.get_new_address + +

GetNewAddress generates a new address for the specified wallet.

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet to generate a new address. +
address_type string + (Enum) The type of address to generate. +
Available values:
    +
  • ADDRESS_TYPE_TREASURY = 0 (Treasury address type. +Should not be used to generate new addresses.)
  • +
  • ADDRESS_TYPE_VALIDATOR = 1 (Validator address type.)
  • +
  • ADDRESS_TYPE_BLS_ACCOUNT = 2 (Account address type with BLS signature scheme.)
  • +
  • ADDRESS_TYPE_ED25519_ACCOUNT = 3 (Account address type with Ed25519 signature scheme. +Note: Generating a new Ed25519 address requires the wallet password.)
  • +
+
label string + A label for the new address. +
password string + Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. +
+

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet from which the address is generated. +
address_info object + Information about the newly generated address. +
address_info.address string + The address string. +
address_info.public_key string + The public key associated with the address. +
address_info.label string + A label associated with the address. +
address_info.path string + The Hierarchical Deterministic path of the address within the wallet. +
+ +### pactus.wallet.get_address_history + +

GetAddressHistory retrieves the transaction history of an address.

+ +

Parameters

+ + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet. +
address string + The address to retrieve the transaction history for. +
+

Result

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
history_inforepeated object + Array of history information for the address. +
history_info[].transaction_id string + The transaction ID hash. +
history_info[].time numeric + The timestamp of the transaction. +
history_info[].payload_type string + The payload type of the transaction. +
history_info[].description string + A description of the transaction. +
history_info[].amount numeric + The amount involved in the transaction. +
+ +### pactus.wallet.sign_message + +

SignMessage signs an arbitrary message.

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
wallet_name string + The name of the wallet. +
password string + The password for unlocking the wallet for signing. +
address string + The account address associated with the private key. +
message string + The arbitrary message to be signed. +
+

Result

+ + + + + + + + + + + + +
FieldTypeDescription
signature string + Signature of the message. +
diff --git a/www/grpc/gen/go/blockchain.cobra.pb.go b/www/grpc/gen/go/blockchain.cobra.pb.go new file mode 100644 index 000000000..eefb6b270 --- /dev/null +++ b/www/grpc/gen/go/blockchain.cobra.pb.go @@ -0,0 +1,493 @@ +// Code generated by protoc-gen-cobra. DO NOT EDIT. + +package pactus + +import ( + client "github.com/NathanBaulch/protoc-gen-cobra/client" + flag "github.com/NathanBaulch/protoc-gen-cobra/flag" + iocodec "github.com/NathanBaulch/protoc-gen-cobra/iocodec" + cobra "github.com/spf13/cobra" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func BlockchainClientCommand(options ...client.Option) *cobra.Command { + cfg := client.NewConfig(options...) + cmd := &cobra.Command{ + Use: cfg.CommandNamer("Blockchain"), + Short: "Blockchain service client", + Long: "Blockchain service defines RPC methods for interacting with the blockchain.", + } + cfg.BindFlags(cmd.PersistentFlags()) + cmd.AddCommand( + _BlockchainGetBlockCommand(cfg), + _BlockchainGetBlockHashCommand(cfg), + _BlockchainGetBlockHeightCommand(cfg), + _BlockchainGetBlockchainInfoCommand(cfg), + _BlockchainGetConsensusInfoCommand(cfg), + _BlockchainGetAccountCommand(cfg), + _BlockchainGetValidatorCommand(cfg), + _BlockchainGetValidatorByNumberCommand(cfg), + _BlockchainGetValidatorAddressesCommand(cfg), + _BlockchainGetPublicKeyCommand(cfg), + _BlockchainGetTxPoolContentCommand(cfg), + ) + return cmd +} + +func _BlockchainGetBlockCommand(cfg *client.Config) *cobra.Command { + req := &GetBlockRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetBlock"), + Short: "GetBlock RPC client", + Long: "GetBlock retrieves information about a block based on the provided request\n parameters.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetBlock"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetBlockRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetBlock(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().Uint32Var(&req.Height, cfg.FlagNamer("Height"), 0, "The height of the block to retrieve.") + flag.EnumVar(cmd.PersistentFlags(), &req.Verbosity, cfg.FlagNamer("Verbosity"), "The verbosity level for block information.") + + return cmd +} + +func _BlockchainGetBlockHashCommand(cfg *client.Config) *cobra.Command { + req := &GetBlockHashRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetBlockHash"), + Short: "GetBlockHash RPC client", + Long: "GetBlockHash retrieves the hash of a block at the specified height.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetBlockHash"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetBlockHashRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetBlockHash(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().Uint32Var(&req.Height, cfg.FlagNamer("Height"), 0, "The height of the block to retrieve the hash for.") + + return cmd +} + +func _BlockchainGetBlockHeightCommand(cfg *client.Config) *cobra.Command { + req := &GetBlockHeightRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetBlockHeight"), + Short: "GetBlockHeight RPC client", + Long: "GetBlockHeight retrieves the height of a block with the specified hash.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetBlockHeight"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetBlockHeightRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetBlockHeight(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.Hash, cfg.FlagNamer("Hash"), "", "The hash of the block to retrieve the height for.") + + return cmd +} + +func _BlockchainGetBlockchainInfoCommand(cfg *client.Config) *cobra.Command { + req := &GetBlockchainInfoRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetBlockchainInfo"), + Short: "GetBlockchainInfo RPC client", + Long: "GetBlockchainInfo retrieves general information about the blockchain.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetBlockchainInfo"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetBlockchainInfoRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetBlockchainInfo(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + return cmd +} + +func _BlockchainGetConsensusInfoCommand(cfg *client.Config) *cobra.Command { + req := &GetConsensusInfoRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetConsensusInfo"), + Short: "GetConsensusInfo RPC client", + Long: "GetConsensusInfo retrieves information about the consensus instances.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetConsensusInfo"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetConsensusInfoRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetConsensusInfo(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + return cmd +} + +func _BlockchainGetAccountCommand(cfg *client.Config) *cobra.Command { + req := &GetAccountRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetAccount"), + Short: "GetAccount RPC client", + Long: "GetAccount retrieves information about an account based on the provided\n address.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetAccount"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetAccountRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetAccount(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer("Address"), "", "The address of the account to retrieve information for.") + + return cmd +} + +func _BlockchainGetValidatorCommand(cfg *client.Config) *cobra.Command { + req := &GetValidatorRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetValidator"), + Short: "GetValidator RPC client", + Long: "GetValidator retrieves information about a validator based on the provided\n address.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetValidator"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetValidatorRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetValidator(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer("Address"), "", "The address of the validator to retrieve information for.") + + return cmd +} + +func _BlockchainGetValidatorByNumberCommand(cfg *client.Config) *cobra.Command { + req := &GetValidatorByNumberRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetValidatorByNumber"), + Short: "GetValidatorByNumber RPC client", + Long: "GetValidatorByNumber retrieves information about a validator based on the\n provided number.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetValidatorByNumber"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetValidatorByNumberRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetValidatorByNumber(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().Int32Var(&req.Number, cfg.FlagNamer("Number"), 0, "The unique number of the validator to retrieve information for.") + + return cmd +} + +func _BlockchainGetValidatorAddressesCommand(cfg *client.Config) *cobra.Command { + req := &GetValidatorAddressesRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetValidatorAddresses"), + Short: "GetValidatorAddresses RPC client", + Long: "GetValidatorAddresses retrieves a list of all validator addresses.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetValidatorAddresses"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetValidatorAddressesRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetValidatorAddresses(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + return cmd +} + +func _BlockchainGetPublicKeyCommand(cfg *client.Config) *cobra.Command { + req := &GetPublicKeyRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetPublicKey"), + Short: "GetPublicKey RPC client", + Long: "GetPublicKey retrieves the public key of an account based on the provided\n address.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetPublicKey"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetPublicKeyRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetPublicKey(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer("Address"), "", "The address for which to retrieve the public key.") + + return cmd +} + +func _BlockchainGetTxPoolContentCommand(cfg *client.Config) *cobra.Command { + req := &GetTxPoolContentRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetTxPoolContent"), + Short: "GetTxPoolContent RPC client", + Long: "GetTxPoolContent retrieves current transactions in the transaction pool.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Blockchain", "GetTxPoolContent"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewBlockchainClient(cc) + v := &GetTxPoolContentRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetTxPoolContent(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + flag.EnumVar(cmd.PersistentFlags(), &req.PayloadType, cfg.FlagNamer("PayloadType"), "The type of transactions to retrieve from the transaction pool. 0 means all\n types.") + + return cmd +} diff --git a/www/grpc/gen/go/blockchain.pb.go b/www/grpc/gen/go/blockchain.pb.go new file mode 100644 index 000000000..70d8f6336 --- /dev/null +++ b/www/grpc/gen/go/blockchain.pb.go @@ -0,0 +1,2658 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: blockchain.proto + +package pactus + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enumeration for verbosity levels when requesting block information. +type BlockVerbosity int32 + +const ( + // Request only block data. + BlockVerbosity_BLOCK_DATA BlockVerbosity = 0 + // Request block information and transaction IDs. + BlockVerbosity_BLOCK_INFO BlockVerbosity = 1 + // Request block information and detailed transaction data. + BlockVerbosity_BLOCK_TRANSACTIONS BlockVerbosity = 2 +) + +// Enum value maps for BlockVerbosity. +var ( + BlockVerbosity_name = map[int32]string{ + 0: "BLOCK_DATA", + 1: "BLOCK_INFO", + 2: "BLOCK_TRANSACTIONS", + } + BlockVerbosity_value = map[string]int32{ + "BLOCK_DATA": 0, + "BLOCK_INFO": 1, + "BLOCK_TRANSACTIONS": 2, + } +) + +func (x BlockVerbosity) Enum() *BlockVerbosity { + p := new(BlockVerbosity) + *p = x + return p +} + +func (x BlockVerbosity) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BlockVerbosity) Descriptor() protoreflect.EnumDescriptor { + return file_blockchain_proto_enumTypes[0].Descriptor() +} + +func (BlockVerbosity) Type() protoreflect.EnumType { + return &file_blockchain_proto_enumTypes[0] +} + +func (x BlockVerbosity) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BlockVerbosity.Descriptor instead. +func (BlockVerbosity) EnumDescriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{0} +} + +// Enumeration for types of votes. +type VoteType int32 + +const ( + // Unknown vote type. + VoteType_VOTE_UNKNOWN VoteType = 0 + // Prepare vote type. + VoteType_VOTE_PREPARE VoteType = 1 + // Precommit vote type. + VoteType_VOTE_PRECOMMIT VoteType = 2 + // Change proposer vote type. + VoteType_VOTE_CHANGE_PROPOSER VoteType = 3 +) + +// Enum value maps for VoteType. +var ( + VoteType_name = map[int32]string{ + 0: "VOTE_UNKNOWN", + 1: "VOTE_PREPARE", + 2: "VOTE_PRECOMMIT", + 3: "VOTE_CHANGE_PROPOSER", + } + VoteType_value = map[string]int32{ + "VOTE_UNKNOWN": 0, + "VOTE_PREPARE": 1, + "VOTE_PRECOMMIT": 2, + "VOTE_CHANGE_PROPOSER": 3, + } +) + +func (x VoteType) Enum() *VoteType { + p := new(VoteType) + *p = x + return p +} + +func (x VoteType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (VoteType) Descriptor() protoreflect.EnumDescriptor { + return file_blockchain_proto_enumTypes[1].Descriptor() +} + +func (VoteType) Type() protoreflect.EnumType { + return &file_blockchain_proto_enumTypes[1] +} + +func (x VoteType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use VoteType.Descriptor instead. +func (VoteType) EnumDescriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{1} +} + +// Message to request account information based on an address. +type GetAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the account to retrieve information for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *GetAccountRequest) Reset() { + *x = GetAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountRequest) ProtoMessage() {} + +func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[0] + 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 GetAccountRequest.ProtoReflect.Descriptor instead. +func (*GetAccountRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{0} +} + +func (x *GetAccountRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// Message containing the response with account information. +type GetAccountResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Detailed information about the account. + Account *AccountInfo `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` +} + +func (x *GetAccountResponse) Reset() { + *x = GetAccountResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountResponse) ProtoMessage() {} + +func (x *GetAccountResponse) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[1] + 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 GetAccountResponse.ProtoReflect.Descriptor instead. +func (*GetAccountResponse) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{1} +} + +func (x *GetAccountResponse) GetAccount() *AccountInfo { + if x != nil { + return x.Account + } + return nil +} + +// Message to request validator addresses. +type GetValidatorAddressesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetValidatorAddressesRequest) Reset() { + *x = GetValidatorAddressesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetValidatorAddressesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetValidatorAddressesRequest) ProtoMessage() {} + +func (x *GetValidatorAddressesRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[2] + 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 GetValidatorAddressesRequest.ProtoReflect.Descriptor instead. +func (*GetValidatorAddressesRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{2} +} + +// Message containing the response with a list of validator addresses. +type GetValidatorAddressesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of validator addresses. + Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` +} + +func (x *GetValidatorAddressesResponse) Reset() { + *x = GetValidatorAddressesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetValidatorAddressesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetValidatorAddressesResponse) ProtoMessage() {} + +func (x *GetValidatorAddressesResponse) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[3] + 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 GetValidatorAddressesResponse.ProtoReflect.Descriptor instead. +func (*GetValidatorAddressesResponse) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{3} +} + +func (x *GetValidatorAddressesResponse) GetAddresses() []string { + if x != nil { + return x.Addresses + } + return nil +} + +// Message to request validator information based on an address. +type GetValidatorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the validator to retrieve information for. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *GetValidatorRequest) Reset() { + *x = GetValidatorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetValidatorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetValidatorRequest) ProtoMessage() {} + +func (x *GetValidatorRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[4] + 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 GetValidatorRequest.ProtoReflect.Descriptor instead. +func (*GetValidatorRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{4} +} + +func (x *GetValidatorRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// Message to request validator information based on a validator number. +type GetValidatorByNumberRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique number of the validator to retrieve information for. + Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` +} + +func (x *GetValidatorByNumberRequest) Reset() { + *x = GetValidatorByNumberRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetValidatorByNumberRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetValidatorByNumberRequest) ProtoMessage() {} + +func (x *GetValidatorByNumberRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[5] + 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 GetValidatorByNumberRequest.ProtoReflect.Descriptor instead. +func (*GetValidatorByNumberRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{5} +} + +func (x *GetValidatorByNumberRequest) GetNumber() int32 { + if x != nil { + return x.Number + } + return 0 +} + +// Message containing the response with validator information. +type GetValidatorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Detailed information about the validator. + Validator *ValidatorInfo `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` +} + +func (x *GetValidatorResponse) Reset() { + *x = GetValidatorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetValidatorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetValidatorResponse) ProtoMessage() {} + +func (x *GetValidatorResponse) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[6] + 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 GetValidatorResponse.ProtoReflect.Descriptor instead. +func (*GetValidatorResponse) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{6} +} + +func (x *GetValidatorResponse) GetValidator() *ValidatorInfo { + if x != nil { + return x.Validator + } + return nil +} + +// Message to request public key based on an address. +type GetPublicKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address for which to retrieve the public key. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *GetPublicKeyRequest) Reset() { + *x = GetPublicKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPublicKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPublicKeyRequest) ProtoMessage() {} + +func (x *GetPublicKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[7] + 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 GetPublicKeyRequest.ProtoReflect.Descriptor instead. +func (*GetPublicKeyRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{7} +} + +func (x *GetPublicKeyRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// Message containing the response with the public key. +type GetPublicKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The public key associated with the provided address. + PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (x *GetPublicKeyResponse) Reset() { + *x = GetPublicKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetPublicKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetPublicKeyResponse) ProtoMessage() {} + +func (x *GetPublicKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[8] + 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 GetPublicKeyResponse.ProtoReflect.Descriptor instead. +func (*GetPublicKeyResponse) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{8} +} + +func (x *GetPublicKeyResponse) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +// Message to request block information based on height and verbosity level. +type GetBlockRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The height of the block to retrieve. + Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + // The verbosity level for block information. + Verbosity BlockVerbosity `protobuf:"varint,2,opt,name=verbosity,proto3,enum=pactus.BlockVerbosity" json:"verbosity,omitempty"` +} + +func (x *GetBlockRequest) Reset() { + *x = GetBlockRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockRequest) ProtoMessage() {} + +func (x *GetBlockRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[9] + 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 GetBlockRequest.ProtoReflect.Descriptor instead. +func (*GetBlockRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{9} +} + +func (x *GetBlockRequest) GetHeight() uint32 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *GetBlockRequest) GetVerbosity() BlockVerbosity { + if x != nil { + return x.Verbosity + } + return BlockVerbosity_BLOCK_DATA +} + +// Message containing the response with block information. +type GetBlockResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The height of the block. + Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + // The hash of the block. + Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` + // Block data, available only if verbosity level is set to BLOCK_DATA. + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + // The timestamp of the block. + BlockTime uint32 `protobuf:"varint,4,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + // Header information of the block. + Header *BlockHeaderInfo `protobuf:"bytes,5,opt,name=header,proto3" json:"header,omitempty"` + // Certificate information of the previous block. + PrevCert *CertificateInfo `protobuf:"bytes,6,opt,name=prev_cert,json=prevCert,proto3" json:"prev_cert,omitempty"` + // List of transactions in the block, available when verbosity level is set to + // BLOCK_TRANSACTIONS. + Txs []*TransactionInfo `protobuf:"bytes,7,rep,name=txs,proto3" json:"txs,omitempty"` +} + +func (x *GetBlockResponse) Reset() { + *x = GetBlockResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockResponse) ProtoMessage() {} + +func (x *GetBlockResponse) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[10] + 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 GetBlockResponse.ProtoReflect.Descriptor instead. +func (*GetBlockResponse) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{10} +} + +func (x *GetBlockResponse) GetHeight() uint32 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *GetBlockResponse) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *GetBlockResponse) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *GetBlockResponse) GetBlockTime() uint32 { + if x != nil { + return x.BlockTime + } + return 0 +} + +func (x *GetBlockResponse) GetHeader() *BlockHeaderInfo { + if x != nil { + return x.Header + } + return nil +} + +func (x *GetBlockResponse) GetPrevCert() *CertificateInfo { + if x != nil { + return x.PrevCert + } + return nil +} + +func (x *GetBlockResponse) GetTxs() []*TransactionInfo { + if x != nil { + return x.Txs + } + return nil +} + +// Message to request block hash based on height. +type GetBlockHashRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The height of the block to retrieve the hash for. + Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *GetBlockHashRequest) Reset() { + *x = GetBlockHashRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockHashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockHashRequest) ProtoMessage() {} + +func (x *GetBlockHashRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[11] + 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 GetBlockHashRequest.ProtoReflect.Descriptor instead. +func (*GetBlockHashRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{11} +} + +func (x *GetBlockHashRequest) GetHeight() uint32 { + if x != nil { + return x.Height + } + return 0 +} + +// Message containing the response with the block hash. +type GetBlockHashResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash of the block. + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` +} + +func (x *GetBlockHashResponse) Reset() { + *x = GetBlockHashResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockHashResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockHashResponse) ProtoMessage() {} + +func (x *GetBlockHashResponse) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[12] + 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 GetBlockHashResponse.ProtoReflect.Descriptor instead. +func (*GetBlockHashResponse) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{12} +} + +func (x *GetBlockHashResponse) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +// Message to request block height based on hash. +type GetBlockHeightRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash of the block to retrieve the height for. + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` +} + +func (x *GetBlockHeightRequest) Reset() { + *x = GetBlockHeightRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockHeightRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockHeightRequest) ProtoMessage() {} + +func (x *GetBlockHeightRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[13] + 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 GetBlockHeightRequest.ProtoReflect.Descriptor instead. +func (*GetBlockHeightRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{13} +} + +func (x *GetBlockHeightRequest) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +// Message containing the response with the block height. +type GetBlockHeightResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The height of the block. + Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` +} + +func (x *GetBlockHeightResponse) Reset() { + *x = GetBlockHeightResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockHeightResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockHeightResponse) ProtoMessage() {} + +func (x *GetBlockHeightResponse) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[14] + 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 GetBlockHeightResponse.ProtoReflect.Descriptor instead. +func (*GetBlockHeightResponse) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{14} +} + +func (x *GetBlockHeightResponse) GetHeight() uint32 { + if x != nil { + return x.Height + } + return 0 +} + +// Message to request general information about the blockchain. +type GetBlockchainInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetBlockchainInfoRequest) Reset() { + *x = GetBlockchainInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockchainInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockchainInfoRequest) ProtoMessage() {} + +func (x *GetBlockchainInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[15] + 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 GetBlockchainInfoRequest.ProtoReflect.Descriptor instead. +func (*GetBlockchainInfoRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{15} +} + +// Message containing the response with general blockchain information. +type GetBlockchainInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The height of the last block in the blockchain. + LastBlockHeight uint32 `protobuf:"varint,1,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` + // The hash of the last block in the blockchain. + LastBlockHash string `protobuf:"bytes,2,opt,name=last_block_hash,json=lastBlockHash,proto3" json:"last_block_hash,omitempty"` + // The total number of accounts in the blockchain. + TotalAccounts int32 `protobuf:"varint,3,opt,name=total_accounts,json=totalAccounts,proto3" json:"total_accounts,omitempty"` + // The total number of validators in the blockchain. + TotalValidators int32 `protobuf:"varint,4,opt,name=total_validators,json=totalValidators,proto3" json:"total_validators,omitempty"` + // The total power of the blockchain. + TotalPower int64 `protobuf:"varint,5,opt,name=total_power,json=totalPower,proto3" json:"total_power,omitempty"` + // The power of the committee. + CommitteePower int64 `protobuf:"varint,6,opt,name=committee_power,json=committeePower,proto3" json:"committee_power,omitempty"` + // List of committee validators. + CommitteeValidators []*ValidatorInfo `protobuf:"bytes,7,rep,name=committee_validators,json=committeeValidators,proto3" json:"committee_validators,omitempty"` + // If the blocks are subject to pruning. + IsPruned bool `protobuf:"varint,8,opt,name=is_pruned,json=isPruned,proto3" json:"is_pruned,omitempty"` + // Lowest-height block stored (only present if pruning is enabled) + PruningHeight uint32 `protobuf:"varint,9,opt,name=pruning_height,json=pruningHeight,proto3" json:"pruning_height,omitempty"` + // Timestamp of the last block in Unix format + LastBlockTime int64 `protobuf:"varint,10,opt,name=last_block_time,json=lastBlockTime,proto3" json:"last_block_time,omitempty"` +} + +func (x *GetBlockchainInfoResponse) Reset() { + *x = GetBlockchainInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBlockchainInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBlockchainInfoResponse) ProtoMessage() {} + +func (x *GetBlockchainInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[16] + 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 GetBlockchainInfoResponse.ProtoReflect.Descriptor instead. +func (*GetBlockchainInfoResponse) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{16} +} + +func (x *GetBlockchainInfoResponse) GetLastBlockHeight() uint32 { + if x != nil { + return x.LastBlockHeight + } + return 0 +} + +func (x *GetBlockchainInfoResponse) GetLastBlockHash() string { + if x != nil { + return x.LastBlockHash + } + return "" +} + +func (x *GetBlockchainInfoResponse) GetTotalAccounts() int32 { + if x != nil { + return x.TotalAccounts + } + return 0 +} + +func (x *GetBlockchainInfoResponse) GetTotalValidators() int32 { + if x != nil { + return x.TotalValidators + } + return 0 +} + +func (x *GetBlockchainInfoResponse) GetTotalPower() int64 { + if x != nil { + return x.TotalPower + } + return 0 +} + +func (x *GetBlockchainInfoResponse) GetCommitteePower() int64 { + if x != nil { + return x.CommitteePower + } + return 0 +} + +func (x *GetBlockchainInfoResponse) GetCommitteeValidators() []*ValidatorInfo { + if x != nil { + return x.CommitteeValidators + } + return nil +} + +func (x *GetBlockchainInfoResponse) GetIsPruned() bool { + if x != nil { + return x.IsPruned + } + return false +} + +func (x *GetBlockchainInfoResponse) GetPruningHeight() uint32 { + if x != nil { + return x.PruningHeight + } + return 0 +} + +func (x *GetBlockchainInfoResponse) GetLastBlockTime() int64 { + if x != nil { + return x.LastBlockTime + } + return 0 +} + +// Message to request consensus information. +type GetConsensusInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetConsensusInfoRequest) Reset() { + *x = GetConsensusInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConsensusInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConsensusInfoRequest) ProtoMessage() {} + +func (x *GetConsensusInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[17] + 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 GetConsensusInfoRequest.ProtoReflect.Descriptor instead. +func (*GetConsensusInfoRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{17} +} + +// Message containing the response with consensus information. +type GetConsensusInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The proposal of the consensus info. + Proposal *Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"` + // List of consensus instances. + Instances []*ConsensusInfo `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"` +} + +func (x *GetConsensusInfoResponse) Reset() { + *x = GetConsensusInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetConsensusInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConsensusInfoResponse) ProtoMessage() {} + +func (x *GetConsensusInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_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 GetConsensusInfoResponse.ProtoReflect.Descriptor instead. +func (*GetConsensusInfoResponse) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{18} +} + +func (x *GetConsensusInfoResponse) GetProposal() *Proposal { + if x != nil { + return x.Proposal + } + return nil +} + +func (x *GetConsensusInfoResponse) GetInstances() []*ConsensusInfo { + if x != nil { + return x.Instances + } + return nil +} + +// Request message to retrieve transactions in the transaction pool. +type GetTxPoolContentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of transactions to retrieve from the transaction pool. 0 means all + // types. + PayloadType PayloadType `protobuf:"varint,1,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType" json:"payload_type,omitempty"` +} + +func (x *GetTxPoolContentRequest) Reset() { + *x = GetTxPoolContentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTxPoolContentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTxPoolContentRequest) ProtoMessage() {} + +func (x *GetTxPoolContentRequest) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[19] + 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 GetTxPoolContentRequest.ProtoReflect.Descriptor instead. +func (*GetTxPoolContentRequest) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{19} +} + +func (x *GetTxPoolContentRequest) GetPayloadType() PayloadType { + if x != nil { + return x.PayloadType + } + return PayloadType_UNKNOWN +} + +// Response message containing transactions in the transaction pool. +type GetTxPoolContentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of transactions currently in the pool. + Txs []*TransactionInfo `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` +} + +func (x *GetTxPoolContentResponse) Reset() { + *x = GetTxPoolContentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTxPoolContentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTxPoolContentResponse) ProtoMessage() {} + +func (x *GetTxPoolContentResponse) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[20] + 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 GetTxPoolContentResponse.ProtoReflect.Descriptor instead. +func (*GetTxPoolContentResponse) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{20} +} + +func (x *GetTxPoolContentResponse) GetTxs() []*TransactionInfo { + if x != nil { + return x.Txs + } + return nil +} + +// Message containing information about a validator. +type ValidatorInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash of the validator. + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // The serialized data of the validator. + Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + // The public key of the validator. + PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The unique number assigned to the validator. + Number int32 `protobuf:"varint,4,opt,name=number,proto3" json:"number,omitempty"` + // The stake of the validator in NanoPAC. + Stake int64 `protobuf:"varint,5,opt,name=stake,proto3" json:"stake,omitempty"` + // The height at which the validator last bonded. + LastBondingHeight uint32 `protobuf:"varint,6,opt,name=last_bonding_height,json=lastBondingHeight,proto3" json:"last_bonding_height,omitempty"` + // The height at which the validator last participated in sortition. + LastSortitionHeight uint32 `protobuf:"varint,7,opt,name=last_sortition_height,json=lastSortitionHeight,proto3" json:"last_sortition_height,omitempty"` + // The height at which the validator will unbond. + UnbondingHeight uint32 `protobuf:"varint,8,opt,name=unbonding_height,json=unbondingHeight,proto3" json:"unbonding_height,omitempty"` + // The address of the validator. + Address string `protobuf:"bytes,9,opt,name=address,proto3" json:"address,omitempty"` + // The availability score of the validator. + AvailabilityScore float64 `protobuf:"fixed64,10,opt,name=availability_score,json=availabilityScore,proto3" json:"availability_score,omitempty"` +} + +func (x *ValidatorInfo) Reset() { + *x = ValidatorInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorInfo) ProtoMessage() {} + +func (x *ValidatorInfo) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[21] + 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 ValidatorInfo.ProtoReflect.Descriptor instead. +func (*ValidatorInfo) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{21} +} + +func (x *ValidatorInfo) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *ValidatorInfo) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *ValidatorInfo) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *ValidatorInfo) GetNumber() int32 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *ValidatorInfo) GetStake() int64 { + if x != nil { + return x.Stake + } + return 0 +} + +func (x *ValidatorInfo) GetLastBondingHeight() uint32 { + if x != nil { + return x.LastBondingHeight + } + return 0 +} + +func (x *ValidatorInfo) GetLastSortitionHeight() uint32 { + if x != nil { + return x.LastSortitionHeight + } + return 0 +} + +func (x *ValidatorInfo) GetUnbondingHeight() uint32 { + if x != nil { + return x.UnbondingHeight + } + return 0 +} + +func (x *ValidatorInfo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ValidatorInfo) GetAvailabilityScore() float64 { + if x != nil { + return x.AvailabilityScore + } + return 0 +} + +// Message containing information about an account. +type AccountInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash of the account. + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // The serialized data of the account. + Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + // The unique number assigned to the account. + Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` + // The balance of the account in NanoPAC. + Balance int64 `protobuf:"varint,4,opt,name=balance,proto3" json:"balance,omitempty"` + // The address of the account. + Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *AccountInfo) Reset() { + *x = AccountInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountInfo) ProtoMessage() {} + +func (x *AccountInfo) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[22] + 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 AccountInfo.ProtoReflect.Descriptor instead. +func (*AccountInfo) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{22} +} + +func (x *AccountInfo) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *AccountInfo) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *AccountInfo) GetNumber() int32 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *AccountInfo) GetBalance() int64 { + if x != nil { + return x.Balance + } + return 0 +} + +func (x *AccountInfo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// Message containing information about the header of a block. +type BlockHeaderInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The version of the block. + Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + // The hash of the previous block. + PrevBlockHash string `protobuf:"bytes,2,opt,name=prev_block_hash,json=prevBlockHash,proto3" json:"prev_block_hash,omitempty"` + // The state root hash of the blockchain. + StateRoot string `protobuf:"bytes,3,opt,name=state_root,json=stateRoot,proto3" json:"state_root,omitempty"` + // The sortition seed of the block. + SortitionSeed string `protobuf:"bytes,4,opt,name=sortition_seed,json=sortitionSeed,proto3" json:"sortition_seed,omitempty"` + // The address of the proposer of the block. + ProposerAddress string `protobuf:"bytes,5,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` +} + +func (x *BlockHeaderInfo) Reset() { + *x = BlockHeaderInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockHeaderInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockHeaderInfo) ProtoMessage() {} + +func (x *BlockHeaderInfo) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[23] + 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 BlockHeaderInfo.ProtoReflect.Descriptor instead. +func (*BlockHeaderInfo) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{23} +} + +func (x *BlockHeaderInfo) GetVersion() int32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *BlockHeaderInfo) GetPrevBlockHash() string { + if x != nil { + return x.PrevBlockHash + } + return "" +} + +func (x *BlockHeaderInfo) GetStateRoot() string { + if x != nil { + return x.StateRoot + } + return "" +} + +func (x *BlockHeaderInfo) GetSortitionSeed() string { + if x != nil { + return x.SortitionSeed + } + return "" +} + +func (x *BlockHeaderInfo) GetProposerAddress() string { + if x != nil { + return x.ProposerAddress + } + return "" +} + +// Message containing information about a certificate. +type CertificateInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The hash of the certificate. + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + // The round of the certificate. + Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` + // List of committers in the certificate. + Committers []int32 `protobuf:"varint,3,rep,packed,name=committers,proto3" json:"committers,omitempty"` + // List of absentees in the certificate. + Absentees []int32 `protobuf:"varint,4,rep,packed,name=absentees,proto3" json:"absentees,omitempty"` + // The signature of the certificate. + Signature string `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *CertificateInfo) Reset() { + *x = CertificateInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CertificateInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CertificateInfo) ProtoMessage() {} + +func (x *CertificateInfo) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[24] + 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 CertificateInfo.ProtoReflect.Descriptor instead. +func (*CertificateInfo) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{24} +} + +func (x *CertificateInfo) GetHash() string { + if x != nil { + return x.Hash + } + return "" +} + +func (x *CertificateInfo) GetRound() int32 { + if x != nil { + return x.Round + } + return 0 +} + +func (x *CertificateInfo) GetCommitters() []int32 { + if x != nil { + return x.Committers + } + return nil +} + +func (x *CertificateInfo) GetAbsentees() []int32 { + if x != nil { + return x.Absentees + } + return nil +} + +func (x *CertificateInfo) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +// Message containing information about a vote. +type VoteInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The type of the vote. + Type VoteType `protobuf:"varint,1,opt,name=type,proto3,enum=pactus.VoteType" json:"type,omitempty"` + // The address of the voter. + Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` + // The hash of the block being voted on. + BlockHash string `protobuf:"bytes,3,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` + // The consensus round of the vote. + Round int32 `protobuf:"varint,4,opt,name=round,proto3" json:"round,omitempty"` + // The change-proposer round of the vote. + CpRound int32 `protobuf:"varint,5,opt,name=cp_round,json=cpRound,proto3" json:"cp_round,omitempty"` + // The change-proposer value of the vote. + CpValue int32 `protobuf:"varint,6,opt,name=cp_value,json=cpValue,proto3" json:"cp_value,omitempty"` +} + +func (x *VoteInfo) Reset() { + *x = VoteInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VoteInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VoteInfo) ProtoMessage() {} + +func (x *VoteInfo) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[25] + 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 VoteInfo.ProtoReflect.Descriptor instead. +func (*VoteInfo) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{25} +} + +func (x *VoteInfo) GetType() VoteType { + if x != nil { + return x.Type + } + return VoteType_VOTE_UNKNOWN +} + +func (x *VoteInfo) GetVoter() string { + if x != nil { + return x.Voter + } + return "" +} + +func (x *VoteInfo) GetBlockHash() string { + if x != nil { + return x.BlockHash + } + return "" +} + +func (x *VoteInfo) GetRound() int32 { + if x != nil { + return x.Round + } + return 0 +} + +func (x *VoteInfo) GetCpRound() int32 { + if x != nil { + return x.CpRound + } + return 0 +} + +func (x *VoteInfo) GetCpValue() int32 { + if x != nil { + return x.CpValue + } + return 0 +} + +// Message containing information about a consensus instance. +type ConsensusInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the consensus instance. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // Indicates whether the consensus instance is active and part of the + // committee. + Active bool `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"` + // The height of the consensus instance. + Height uint32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` + // The round of the consensus instance. + Round int32 `protobuf:"varint,4,opt,name=round,proto3" json:"round,omitempty"` + // List of votes in the consensus instance. + Votes []*VoteInfo `protobuf:"bytes,5,rep,name=votes,proto3" json:"votes,omitempty"` +} + +func (x *ConsensusInfo) Reset() { + *x = ConsensusInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConsensusInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConsensusInfo) ProtoMessage() {} + +func (x *ConsensusInfo) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[26] + 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 ConsensusInfo.ProtoReflect.Descriptor instead. +func (*ConsensusInfo) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{26} +} + +func (x *ConsensusInfo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *ConsensusInfo) GetActive() bool { + if x != nil { + return x.Active + } + return false +} + +func (x *ConsensusInfo) GetHeight() uint32 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *ConsensusInfo) GetRound() int32 { + if x != nil { + return x.Round + } + return 0 +} + +func (x *ConsensusInfo) GetVotes() []*VoteInfo { + if x != nil { + return x.Votes + } + return nil +} + +// Message containing information about a proposal. +type Proposal struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The height of the proposal. + Height uint32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + // The round of the proposal. + Round int32 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` + // The block data of the proposal. + BlockData string `protobuf:"bytes,3,opt,name=block_data,json=blockData,proto3" json:"block_data,omitempty"` + // The signature data of the proposal. + SignatureData string `protobuf:"bytes,4,opt,name=signature_data,json=signatureData,proto3" json:"signature_data,omitempty"` +} + +func (x *Proposal) Reset() { + *x = Proposal{} + if protoimpl.UnsafeEnabled { + mi := &file_blockchain_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Proposal) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Proposal) ProtoMessage() {} + +func (x *Proposal) ProtoReflect() protoreflect.Message { + mi := &file_blockchain_proto_msgTypes[27] + 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 Proposal.ProtoReflect.Descriptor instead. +func (*Proposal) Descriptor() ([]byte, []int) { + return file_blockchain_proto_rawDescGZIP(), []int{27} +} + +func (x *Proposal) GetHeight() uint32 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *Proposal) GetRound() int32 { + if x != nil { + return x.Round + } + return 0 +} + +func (x *Proposal) GetBlockData() string { + if x != nil { + return x.BlockData + } + return "" +} + +func (x *Proposal) GetSignatureData() string { + if x != nil { + return x.SignatureData + } + return "" +} + +var File_blockchain_proto protoreflect.FileDescriptor + +var file_blockchain_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x06, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x1a, 0x11, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2d, 0x0a, + 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x43, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x3d, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x22, 0x2f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x22, 0x35, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x4b, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x33, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x2f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x35, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x5f, 0x0a, + 0x0f, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x34, 0x0a, 0x09, 0x76, 0x65, 0x72, 0x62, + 0x6f, 0x73, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x62, 0x6f, 0x73, + 0x69, 0x74, 0x79, 0x52, 0x09, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x22, 0x83, + 0x02, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, + 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x63, 0x65, 0x72, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x08, 0x70, 0x72, 0x65, 0x76, 0x43, 0x65, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x03, 0x74, 0x78, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x03, 0x74, 0x78, 0x73, 0x22, 0x2d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x22, 0x2a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, + 0x2b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x30, 0x0a, 0x16, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x1a, + 0x0a, 0x18, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc1, 0x03, 0x0a, 0x19, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, + 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x25, 0x0a, 0x0e, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, + 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, + 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x70, 0x6f, 0x77, + 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x74, 0x65, 0x65, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x74, 0x65, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x13, 0x63, + 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x75, 0x6e, 0x65, 0x64, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x50, 0x72, 0x75, 0x6e, 0x65, 0x64, 0x12, + 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x70, 0x72, 0x75, 0x6e, 0x69, 0x6e, 0x67, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x19, + 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7d, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, + 0x73, 0x61, 0x6c, 0x12, 0x33, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, + 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x22, 0x45, 0x0a, 0x18, 0x47, + 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x74, + 0x78, 0x73, 0x22, 0xdc, 0x02, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6f, 0x6e, 0x64, + 0x69, 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x6f, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x29, 0x0a, + 0x10, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, + 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x63, 0x6f, 0x72, + 0x65, 0x22, 0x81, 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x0f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, + 0x65, 0x76, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6f, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x65, + 0x64, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x97, 0x01, 0x0a, + 0x0f, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x68, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, + 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x62, + 0x73, 0x65, 0x6e, 0x74, 0x65, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x61, + 0x62, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x56, 0x6f, 0x74, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x10, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x6f, 0x74, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, + 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, + 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, + 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x70, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x63, 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x63, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x0d, 0x43, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x26, 0x0a, 0x05, + 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, + 0x6f, 0x74, 0x65, 0x73, 0x22, 0x7e, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, + 0x0e, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x2a, 0x48, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, + 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, + 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, + 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, + 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x02, 0x2a, 0x5c, + 0x0a, 0x08, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x56, 0x4f, + 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, + 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, + 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, + 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x45, 0x52, 0x10, 0x03, 0x32, 0x8b, 0x07, 0x0a, + 0x0a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x3d, 0x0a, 0x08, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, + 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, + 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x79, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, + 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x78, 0x50, 0x6f, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x45, 0x0a, 0x11, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5a, + 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_blockchain_proto_rawDescOnce sync.Once + file_blockchain_proto_rawDescData = file_blockchain_proto_rawDesc +) + +func file_blockchain_proto_rawDescGZIP() []byte { + file_blockchain_proto_rawDescOnce.Do(func() { + file_blockchain_proto_rawDescData = protoimpl.X.CompressGZIP(file_blockchain_proto_rawDescData) + }) + return file_blockchain_proto_rawDescData +} + +var file_blockchain_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_blockchain_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_blockchain_proto_goTypes = []any{ + (BlockVerbosity)(0), // 0: pactus.BlockVerbosity + (VoteType)(0), // 1: pactus.VoteType + (*GetAccountRequest)(nil), // 2: pactus.GetAccountRequest + (*GetAccountResponse)(nil), // 3: pactus.GetAccountResponse + (*GetValidatorAddressesRequest)(nil), // 4: pactus.GetValidatorAddressesRequest + (*GetValidatorAddressesResponse)(nil), // 5: pactus.GetValidatorAddressesResponse + (*GetValidatorRequest)(nil), // 6: pactus.GetValidatorRequest + (*GetValidatorByNumberRequest)(nil), // 7: pactus.GetValidatorByNumberRequest + (*GetValidatorResponse)(nil), // 8: pactus.GetValidatorResponse + (*GetPublicKeyRequest)(nil), // 9: pactus.GetPublicKeyRequest + (*GetPublicKeyResponse)(nil), // 10: pactus.GetPublicKeyResponse + (*GetBlockRequest)(nil), // 11: pactus.GetBlockRequest + (*GetBlockResponse)(nil), // 12: pactus.GetBlockResponse + (*GetBlockHashRequest)(nil), // 13: pactus.GetBlockHashRequest + (*GetBlockHashResponse)(nil), // 14: pactus.GetBlockHashResponse + (*GetBlockHeightRequest)(nil), // 15: pactus.GetBlockHeightRequest + (*GetBlockHeightResponse)(nil), // 16: pactus.GetBlockHeightResponse + (*GetBlockchainInfoRequest)(nil), // 17: pactus.GetBlockchainInfoRequest + (*GetBlockchainInfoResponse)(nil), // 18: pactus.GetBlockchainInfoResponse + (*GetConsensusInfoRequest)(nil), // 19: pactus.GetConsensusInfoRequest + (*GetConsensusInfoResponse)(nil), // 20: pactus.GetConsensusInfoResponse + (*GetTxPoolContentRequest)(nil), // 21: pactus.GetTxPoolContentRequest + (*GetTxPoolContentResponse)(nil), // 22: pactus.GetTxPoolContentResponse + (*ValidatorInfo)(nil), // 23: pactus.ValidatorInfo + (*AccountInfo)(nil), // 24: pactus.AccountInfo + (*BlockHeaderInfo)(nil), // 25: pactus.BlockHeaderInfo + (*CertificateInfo)(nil), // 26: pactus.CertificateInfo + (*VoteInfo)(nil), // 27: pactus.VoteInfo + (*ConsensusInfo)(nil), // 28: pactus.ConsensusInfo + (*Proposal)(nil), // 29: pactus.Proposal + (*TransactionInfo)(nil), // 30: pactus.TransactionInfo + (PayloadType)(0), // 31: pactus.PayloadType +} +var file_blockchain_proto_depIdxs = []int32{ + 24, // 0: pactus.GetAccountResponse.account:type_name -> pactus.AccountInfo + 23, // 1: pactus.GetValidatorResponse.validator:type_name -> pactus.ValidatorInfo + 0, // 2: pactus.GetBlockRequest.verbosity:type_name -> pactus.BlockVerbosity + 25, // 3: pactus.GetBlockResponse.header:type_name -> pactus.BlockHeaderInfo + 26, // 4: pactus.GetBlockResponse.prev_cert:type_name -> pactus.CertificateInfo + 30, // 5: pactus.GetBlockResponse.txs:type_name -> pactus.TransactionInfo + 23, // 6: pactus.GetBlockchainInfoResponse.committee_validators:type_name -> pactus.ValidatorInfo + 29, // 7: pactus.GetConsensusInfoResponse.proposal:type_name -> pactus.Proposal + 28, // 8: pactus.GetConsensusInfoResponse.instances:type_name -> pactus.ConsensusInfo + 31, // 9: pactus.GetTxPoolContentRequest.payload_type:type_name -> pactus.PayloadType + 30, // 10: pactus.GetTxPoolContentResponse.txs:type_name -> pactus.TransactionInfo + 1, // 11: pactus.VoteInfo.type:type_name -> pactus.VoteType + 27, // 12: pactus.ConsensusInfo.votes:type_name -> pactus.VoteInfo + 11, // 13: pactus.Blockchain.GetBlock:input_type -> pactus.GetBlockRequest + 13, // 14: pactus.Blockchain.GetBlockHash:input_type -> pactus.GetBlockHashRequest + 15, // 15: pactus.Blockchain.GetBlockHeight:input_type -> pactus.GetBlockHeightRequest + 17, // 16: pactus.Blockchain.GetBlockchainInfo:input_type -> pactus.GetBlockchainInfoRequest + 19, // 17: pactus.Blockchain.GetConsensusInfo:input_type -> pactus.GetConsensusInfoRequest + 2, // 18: pactus.Blockchain.GetAccount:input_type -> pactus.GetAccountRequest + 6, // 19: pactus.Blockchain.GetValidator:input_type -> pactus.GetValidatorRequest + 7, // 20: pactus.Blockchain.GetValidatorByNumber:input_type -> pactus.GetValidatorByNumberRequest + 4, // 21: pactus.Blockchain.GetValidatorAddresses:input_type -> pactus.GetValidatorAddressesRequest + 9, // 22: pactus.Blockchain.GetPublicKey:input_type -> pactus.GetPublicKeyRequest + 21, // 23: pactus.Blockchain.GetTxPoolContent:input_type -> pactus.GetTxPoolContentRequest + 12, // 24: pactus.Blockchain.GetBlock:output_type -> pactus.GetBlockResponse + 14, // 25: pactus.Blockchain.GetBlockHash:output_type -> pactus.GetBlockHashResponse + 16, // 26: pactus.Blockchain.GetBlockHeight:output_type -> pactus.GetBlockHeightResponse + 18, // 27: pactus.Blockchain.GetBlockchainInfo:output_type -> pactus.GetBlockchainInfoResponse + 20, // 28: pactus.Blockchain.GetConsensusInfo:output_type -> pactus.GetConsensusInfoResponse + 3, // 29: pactus.Blockchain.GetAccount:output_type -> pactus.GetAccountResponse + 8, // 30: pactus.Blockchain.GetValidator:output_type -> pactus.GetValidatorResponse + 8, // 31: pactus.Blockchain.GetValidatorByNumber:output_type -> pactus.GetValidatorResponse + 5, // 32: pactus.Blockchain.GetValidatorAddresses:output_type -> pactus.GetValidatorAddressesResponse + 10, // 33: pactus.Blockchain.GetPublicKey:output_type -> pactus.GetPublicKeyResponse + 22, // 34: pactus.Blockchain.GetTxPoolContent:output_type -> pactus.GetTxPoolContentResponse + 24, // [24:35] is the sub-list for method output_type + 13, // [13:24] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_blockchain_proto_init() } +func file_blockchain_proto_init() { + if File_blockchain_proto != nil { + return + } + file_transaction_proto_init() + if !protoimpl.UnsafeEnabled { + file_blockchain_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetAccountResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorAddressesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorAddressesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorByNumberRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*GetPublicKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*GetPublicKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockHashRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockHashResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockHeightRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockHeightResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockchainInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*GetBlockchainInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*GetConsensusInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*GetConsensusInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*GetTxPoolContentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*GetTxPoolContentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*ValidatorInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[22].Exporter = func(v any, i int) any { + switch v := v.(*AccountInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[23].Exporter = func(v any, i int) any { + switch v := v.(*BlockHeaderInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[24].Exporter = func(v any, i int) any { + switch v := v.(*CertificateInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[25].Exporter = func(v any, i int) any { + switch v := v.(*VoteInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[26].Exporter = func(v any, i int) any { + switch v := v.(*ConsensusInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_blockchain_proto_msgTypes[27].Exporter = func(v any, i int) any { + switch v := v.(*Proposal); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_blockchain_proto_rawDesc, + NumEnums: 2, + NumMessages: 28, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_blockchain_proto_goTypes, + DependencyIndexes: file_blockchain_proto_depIdxs, + EnumInfos: file_blockchain_proto_enumTypes, + MessageInfos: file_blockchain_proto_msgTypes, + }.Build() + File_blockchain_proto = out.File + file_blockchain_proto_rawDesc = nil + file_blockchain_proto_goTypes = nil + file_blockchain_proto_depIdxs = nil +} diff --git a/www/grpc/gen/go/blockchain.pb.gw.go b/www/grpc/gen/go/blockchain.pb.gw.go new file mode 100644 index 000000000..f37d0cb57 --- /dev/null +++ b/www/grpc/gen/go/blockchain.pb.gw.go @@ -0,0 +1,920 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: blockchain.proto + +/* +Package pactus is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package pactus + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_Blockchain_GetBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Blockchain_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBlockRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlock_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Blockchain_GetBlock_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBlockRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlock_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBlock(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Blockchain_GetBlockHash_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Blockchain_GetBlockHash_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBlockHashRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHash_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBlockHash(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Blockchain_GetBlockHash_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBlockHashRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHash_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBlockHash(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Blockchain_GetBlockHeight_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Blockchain_GetBlockHeight_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBlockHeightRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHeight_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetBlockHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Blockchain_GetBlockHeight_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBlockHeightRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetBlockHeight_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetBlockHeight(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Blockchain_GetBlockchainInfo_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBlockchainInfoRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetBlockchainInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Blockchain_GetBlockchainInfo_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBlockchainInfoRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetBlockchainInfo(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Blockchain_GetConsensusInfo_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetConsensusInfoRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetConsensusInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Blockchain_GetConsensusInfo_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetConsensusInfoRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetConsensusInfo(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Blockchain_GetAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Blockchain_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccountRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Blockchain_GetAccount_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAccountRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetAccount(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Blockchain_GetValidator_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Blockchain_GetValidator_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetValidatorRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidator_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetValidator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Blockchain_GetValidator_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetValidatorRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidator_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetValidator(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Blockchain_GetValidatorByNumber_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Blockchain_GetValidatorByNumber_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetValidatorByNumberRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidatorByNumber_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetValidatorByNumber(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Blockchain_GetValidatorByNumber_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetValidatorByNumberRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetValidatorByNumber_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetValidatorByNumber(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Blockchain_GetPublicKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Blockchain_GetPublicKey_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPublicKeyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetPublicKey_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetPublicKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Blockchain_GetPublicKey_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPublicKeyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetPublicKey_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetPublicKey(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Blockchain_GetTxPoolContent_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Blockchain_GetTxPoolContent_0(ctx context.Context, marshaler runtime.Marshaler, client BlockchainClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTxPoolContentRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetTxPoolContent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTxPoolContent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Blockchain_GetTxPoolContent_0(ctx context.Context, marshaler runtime.Marshaler, server BlockchainServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTxPoolContentRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Blockchain_GetTxPoolContent_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTxPoolContent(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterBlockchainHandlerServer registers the http handlers for service Blockchain to "mux". +// UnaryRPC :call BlockchainServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBlockchainHandlerFromEndpoint instead. +func RegisterBlockchainHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockchainServer) error { + + mux.Handle("GET", pattern_Blockchain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetBlock", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Blockchain_GetBlock_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetBlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetBlockHash_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetBlockHash", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block_hash")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Blockchain_GetBlockHash_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetBlockHash_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetBlockHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetBlockHeight", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block_height")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Blockchain_GetBlockHeight_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetBlockHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetBlockchainInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetBlockchainInfo", runtime.WithHTTPPathPattern("/pactus/blockchain/get_blockchain_info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Blockchain_GetBlockchainInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetBlockchainInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetConsensusInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetConsensusInfo", runtime.WithHTTPPathPattern("/pactus/blockchain/get_consensus_info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Blockchain_GetConsensusInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetConsensusInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetAccount", runtime.WithHTTPPathPattern("/pactus/blockchain/get_account")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Blockchain_GetAccount_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetValidator", runtime.WithHTTPPathPattern("/pactus/blockchain/get_validator")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Blockchain_GetValidator_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetValidator_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetValidatorByNumber_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetValidatorByNumber", runtime.WithHTTPPathPattern("/pactus/blockchain/get_validator_by_number")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Blockchain_GetValidatorByNumber_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetValidatorByNumber_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetPublicKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetPublicKey", runtime.WithHTTPPathPattern("/pactus/blockchain/get_public_key")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Blockchain_GetPublicKey_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetPublicKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetTxPoolContent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Blockchain/GetTxPoolContent", runtime.WithHTTPPathPattern("/pactus/blockchain/get_txpool_content")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Blockchain_GetTxPoolContent_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetTxPoolContent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterBlockchainHandlerFromEndpoint is same as RegisterBlockchainHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterBlockchainHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterBlockchainHandler(ctx, mux, conn) +} + +// RegisterBlockchainHandler registers the http handlers for service Blockchain to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterBlockchainHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterBlockchainHandlerClient(ctx, mux, NewBlockchainClient(conn)) +} + +// RegisterBlockchainHandlerClient registers the http handlers for service Blockchain +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlockchainClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlockchainClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "BlockchainClient" to call the correct interceptors. +func RegisterBlockchainHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockchainClient) error { + + mux.Handle("GET", pattern_Blockchain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetBlock", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Blockchain_GetBlock_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetBlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetBlockHash_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetBlockHash", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block_hash")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Blockchain_GetBlockHash_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetBlockHash_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetBlockHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetBlockHeight", runtime.WithHTTPPathPattern("/pactus/blockchain/get_block_height")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Blockchain_GetBlockHeight_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetBlockHeight_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetBlockchainInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetBlockchainInfo", runtime.WithHTTPPathPattern("/pactus/blockchain/get_blockchain_info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Blockchain_GetBlockchainInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetBlockchainInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetConsensusInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetConsensusInfo", runtime.WithHTTPPathPattern("/pactus/blockchain/get_consensus_info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Blockchain_GetConsensusInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetConsensusInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetAccount", runtime.WithHTTPPathPattern("/pactus/blockchain/get_account")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Blockchain_GetAccount_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetAccount_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetValidator", runtime.WithHTTPPathPattern("/pactus/blockchain/get_validator")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Blockchain_GetValidator_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetValidator_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetValidatorByNumber_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetValidatorByNumber", runtime.WithHTTPPathPattern("/pactus/blockchain/get_validator_by_number")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Blockchain_GetValidatorByNumber_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetValidatorByNumber_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetPublicKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetPublicKey", runtime.WithHTTPPathPattern("/pactus/blockchain/get_public_key")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Blockchain_GetPublicKey_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetPublicKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Blockchain_GetTxPoolContent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Blockchain/GetTxPoolContent", runtime.WithHTTPPathPattern("/pactus/blockchain/get_txpool_content")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Blockchain_GetTxPoolContent_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Blockchain_GetTxPoolContent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Blockchain_GetBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_block"}, "")) + + pattern_Blockchain_GetBlockHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_block_hash"}, "")) + + pattern_Blockchain_GetBlockHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_block_height"}, "")) + + pattern_Blockchain_GetBlockchainInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_blockchain_info"}, "")) + + pattern_Blockchain_GetConsensusInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_consensus_info"}, "")) + + pattern_Blockchain_GetAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_account"}, "")) + + pattern_Blockchain_GetValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_validator"}, "")) + + pattern_Blockchain_GetValidatorByNumber_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_validator_by_number"}, "")) + + pattern_Blockchain_GetPublicKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_public_key"}, "")) + + pattern_Blockchain_GetTxPoolContent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "blockchain", "get_txpool_content"}, "")) +) + +var ( + forward_Blockchain_GetBlock_0 = runtime.ForwardResponseMessage + + forward_Blockchain_GetBlockHash_0 = runtime.ForwardResponseMessage + + forward_Blockchain_GetBlockHeight_0 = runtime.ForwardResponseMessage + + forward_Blockchain_GetBlockchainInfo_0 = runtime.ForwardResponseMessage + + forward_Blockchain_GetConsensusInfo_0 = runtime.ForwardResponseMessage + + forward_Blockchain_GetAccount_0 = runtime.ForwardResponseMessage + + forward_Blockchain_GetValidator_0 = runtime.ForwardResponseMessage + + forward_Blockchain_GetValidatorByNumber_0 = runtime.ForwardResponseMessage + + forward_Blockchain_GetPublicKey_0 = runtime.ForwardResponseMessage + + forward_Blockchain_GetTxPoolContent_0 = runtime.ForwardResponseMessage +) diff --git a/www/grpc/gen/go/blockchain_grpc.pb.go b/www/grpc/gen/go/blockchain_grpc.pb.go new file mode 100644 index 000000000..115ac61a4 --- /dev/null +++ b/www/grpc/gen/go/blockchain_grpc.pb.go @@ -0,0 +1,524 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: blockchain.proto + +package pactus + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Blockchain_GetBlock_FullMethodName = "/pactus.Blockchain/GetBlock" + Blockchain_GetBlockHash_FullMethodName = "/pactus.Blockchain/GetBlockHash" + Blockchain_GetBlockHeight_FullMethodName = "/pactus.Blockchain/GetBlockHeight" + Blockchain_GetBlockchainInfo_FullMethodName = "/pactus.Blockchain/GetBlockchainInfo" + Blockchain_GetConsensusInfo_FullMethodName = "/pactus.Blockchain/GetConsensusInfo" + Blockchain_GetAccount_FullMethodName = "/pactus.Blockchain/GetAccount" + Blockchain_GetValidator_FullMethodName = "/pactus.Blockchain/GetValidator" + Blockchain_GetValidatorByNumber_FullMethodName = "/pactus.Blockchain/GetValidatorByNumber" + Blockchain_GetValidatorAddresses_FullMethodName = "/pactus.Blockchain/GetValidatorAddresses" + Blockchain_GetPublicKey_FullMethodName = "/pactus.Blockchain/GetPublicKey" + Blockchain_GetTxPoolContent_FullMethodName = "/pactus.Blockchain/GetTxPoolContent" +) + +// BlockchainClient is the client API for Blockchain 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. +// +// Blockchain service defines RPC methods for interacting with the blockchain. +type BlockchainClient interface { + // GetBlock retrieves information about a block based on the provided request + // parameters. + GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) + // GetBlockHash retrieves the hash of a block at the specified height. + GetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error) + // GetBlockHeight retrieves the height of a block with the specified hash. + GetBlockHeight(ctx context.Context, in *GetBlockHeightRequest, opts ...grpc.CallOption) (*GetBlockHeightResponse, error) + // GetBlockchainInfo retrieves general information about the blockchain. + GetBlockchainInfo(ctx context.Context, in *GetBlockchainInfoRequest, opts ...grpc.CallOption) (*GetBlockchainInfoResponse, error) + // GetConsensusInfo retrieves information about the consensus instances. + GetConsensusInfo(ctx context.Context, in *GetConsensusInfoRequest, opts ...grpc.CallOption) (*GetConsensusInfoResponse, error) + // GetAccount retrieves information about an account based on the provided + // address. + GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) + // GetValidator retrieves information about a validator based on the provided + // address. + GetValidator(ctx context.Context, in *GetValidatorRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) + // GetValidatorByNumber retrieves information about a validator based on the + // provided number. + GetValidatorByNumber(ctx context.Context, in *GetValidatorByNumberRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) + // GetValidatorAddresses retrieves a list of all validator addresses. + GetValidatorAddresses(ctx context.Context, in *GetValidatorAddressesRequest, opts ...grpc.CallOption) (*GetValidatorAddressesResponse, error) + // GetPublicKey retrieves the public key of an account based on the provided + // address. + GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*GetPublicKeyResponse, error) + // GetTxPoolContent retrieves current transactions in the transaction pool. + GetTxPoolContent(ctx context.Context, in *GetTxPoolContentRequest, opts ...grpc.CallOption) (*GetTxPoolContentResponse, error) +} + +type blockchainClient struct { + cc grpc.ClientConnInterface +} + +func NewBlockchainClient(cc grpc.ClientConnInterface) BlockchainClient { + return &blockchainClient{cc} +} + +func (c *blockchainClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBlockResponse) + err := c.cc.Invoke(ctx, Blockchain_GetBlock_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetBlockHash(ctx context.Context, in *GetBlockHashRequest, opts ...grpc.CallOption) (*GetBlockHashResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBlockHashResponse) + err := c.cc.Invoke(ctx, Blockchain_GetBlockHash_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) 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, Blockchain_GetBlockHeight_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetBlockchainInfo(ctx context.Context, in *GetBlockchainInfoRequest, opts ...grpc.CallOption) (*GetBlockchainInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBlockchainInfoResponse) + err := c.cc.Invoke(ctx, Blockchain_GetBlockchainInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetConsensusInfo(ctx context.Context, in *GetConsensusInfoRequest, opts ...grpc.CallOption) (*GetConsensusInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetConsensusInfoResponse) + err := c.cc.Invoke(ctx, Blockchain_GetConsensusInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAccountResponse) + err := c.cc.Invoke(ctx, Blockchain_GetAccount_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetValidator(ctx context.Context, in *GetValidatorRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetValidatorResponse) + err := c.cc.Invoke(ctx, Blockchain_GetValidator_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetValidatorByNumber(ctx context.Context, in *GetValidatorByNumberRequest, opts ...grpc.CallOption) (*GetValidatorResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetValidatorResponse) + err := c.cc.Invoke(ctx, Blockchain_GetValidatorByNumber_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetValidatorAddresses(ctx context.Context, in *GetValidatorAddressesRequest, opts ...grpc.CallOption) (*GetValidatorAddressesResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetValidatorAddressesResponse) + err := c.cc.Invoke(ctx, Blockchain_GetValidatorAddresses_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetPublicKey(ctx context.Context, in *GetPublicKeyRequest, opts ...grpc.CallOption) (*GetPublicKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetPublicKeyResponse) + err := c.cc.Invoke(ctx, Blockchain_GetPublicKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *blockchainClient) GetTxPoolContent(ctx context.Context, in *GetTxPoolContentRequest, opts ...grpc.CallOption) (*GetTxPoolContentResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetTxPoolContentResponse) + err := c.cc.Invoke(ctx, Blockchain_GetTxPoolContent_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BlockchainServer is the server API for Blockchain service. +// All implementations should embed UnimplementedBlockchainServer +// for forward compatibility +// +// Blockchain service defines RPC methods for interacting with the blockchain. +type BlockchainServer interface { + // GetBlock retrieves information about a block based on the provided request + // parameters. + GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) + // GetBlockHash retrieves the hash of a block at the specified height. + GetBlockHash(context.Context, *GetBlockHashRequest) (*GetBlockHashResponse, error) + // GetBlockHeight retrieves the height of a block with the specified hash. + GetBlockHeight(context.Context, *GetBlockHeightRequest) (*GetBlockHeightResponse, error) + // GetBlockchainInfo retrieves general information about the blockchain. + GetBlockchainInfo(context.Context, *GetBlockchainInfoRequest) (*GetBlockchainInfoResponse, error) + // GetConsensusInfo retrieves information about the consensus instances. + GetConsensusInfo(context.Context, *GetConsensusInfoRequest) (*GetConsensusInfoResponse, error) + // GetAccount retrieves information about an account based on the provided + // address. + GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) + // GetValidator retrieves information about a validator based on the provided + // address. + GetValidator(context.Context, *GetValidatorRequest) (*GetValidatorResponse, error) + // GetValidatorByNumber retrieves information about a validator based on the + // provided number. + GetValidatorByNumber(context.Context, *GetValidatorByNumberRequest) (*GetValidatorResponse, error) + // GetValidatorAddresses retrieves a list of all validator addresses. + GetValidatorAddresses(context.Context, *GetValidatorAddressesRequest) (*GetValidatorAddressesResponse, error) + // GetPublicKey retrieves the public key of an account based on the provided + // address. + GetPublicKey(context.Context, *GetPublicKeyRequest) (*GetPublicKeyResponse, error) + // GetTxPoolContent retrieves current transactions in the transaction pool. + GetTxPoolContent(context.Context, *GetTxPoolContentRequest) (*GetTxPoolContentResponse, error) +} + +// UnimplementedBlockchainServer should be embedded to have forward compatible implementations. +type UnimplementedBlockchainServer struct { +} + +func (UnimplementedBlockchainServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") +} +func (UnimplementedBlockchainServer) GetBlockHash(context.Context, *GetBlockHashRequest) (*GetBlockHashResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockHash not implemented") +} +func (UnimplementedBlockchainServer) GetBlockHeight(context.Context, *GetBlockHeightRequest) (*GetBlockHeightResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockHeight not implemented") +} +func (UnimplementedBlockchainServer) GetBlockchainInfo(context.Context, *GetBlockchainInfoRequest) (*GetBlockchainInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockchainInfo not implemented") +} +func (UnimplementedBlockchainServer) GetConsensusInfo(context.Context, *GetConsensusInfoRequest) (*GetConsensusInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetConsensusInfo not implemented") +} +func (UnimplementedBlockchainServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") +} +func (UnimplementedBlockchainServer) GetValidator(context.Context, *GetValidatorRequest) (*GetValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidator not implemented") +} +func (UnimplementedBlockchainServer) GetValidatorByNumber(context.Context, *GetValidatorByNumberRequest) (*GetValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidatorByNumber not implemented") +} +func (UnimplementedBlockchainServer) GetValidatorAddresses(context.Context, *GetValidatorAddressesRequest) (*GetValidatorAddressesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidatorAddresses not implemented") +} +func (UnimplementedBlockchainServer) GetPublicKey(context.Context, *GetPublicKeyRequest) (*GetPublicKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPublicKey not implemented") +} +func (UnimplementedBlockchainServer) GetTxPoolContent(context.Context, *GetTxPoolContentRequest) (*GetTxPoolContentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTxPoolContent not implemented") +} + +// UnsafeBlockchainServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BlockchainServer will +// result in compilation errors. +type UnsafeBlockchainServer interface { + mustEmbedUnimplementedBlockchainServer() +} + +func RegisterBlockchainServer(s grpc.ServiceRegistrar, srv BlockchainServer) { + s.RegisterService(&Blockchain_ServiceDesc, srv) +} + +func _Blockchain_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetBlock_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetBlock(ctx, req.(*GetBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetBlockHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockHashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetBlockHash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetBlockHash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetBlockHash(ctx, req.(*GetBlockHashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetBlockHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockHeightRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetBlockHeight(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetBlockHeight_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetBlockHeight(ctx, req.(*GetBlockHeightRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetBlockchainInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBlockchainInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetBlockchainInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetBlockchainInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetBlockchainInfo(ctx, req.(*GetBlockchainInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetConsensusInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConsensusInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetConsensusInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetConsensusInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetConsensusInfo(ctx, req.(*GetConsensusInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetAccount(ctx, req.(*GetAccountRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetValidatorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetValidator_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetValidator(ctx, req.(*GetValidatorRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetValidatorByNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetValidatorByNumberRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetValidatorByNumber(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetValidatorByNumber_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetValidatorByNumber(ctx, req.(*GetValidatorByNumberRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetValidatorAddresses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetValidatorAddressesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetValidatorAddresses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetValidatorAddresses_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetValidatorAddresses(ctx, req.(*GetValidatorAddressesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPublicKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetPublicKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetPublicKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetPublicKey(ctx, req.(*GetPublicKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Blockchain_GetTxPoolContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTxPoolContentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BlockchainServer).GetTxPoolContent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Blockchain_GetTxPoolContent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BlockchainServer).GetTxPoolContent(ctx, req.(*GetTxPoolContentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Blockchain_ServiceDesc is the grpc.ServiceDesc for Blockchain service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Blockchain_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pactus.Blockchain", + HandlerType: (*BlockchainServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetBlock", + Handler: _Blockchain_GetBlock_Handler, + }, + { + MethodName: "GetBlockHash", + Handler: _Blockchain_GetBlockHash_Handler, + }, + { + MethodName: "GetBlockHeight", + Handler: _Blockchain_GetBlockHeight_Handler, + }, + { + MethodName: "GetBlockchainInfo", + Handler: _Blockchain_GetBlockchainInfo_Handler, + }, + { + MethodName: "GetConsensusInfo", + Handler: _Blockchain_GetConsensusInfo_Handler, + }, + { + MethodName: "GetAccount", + Handler: _Blockchain_GetAccount_Handler, + }, + { + MethodName: "GetValidator", + Handler: _Blockchain_GetValidator_Handler, + }, + { + MethodName: "GetValidatorByNumber", + Handler: _Blockchain_GetValidatorByNumber_Handler, + }, + { + MethodName: "GetValidatorAddresses", + Handler: _Blockchain_GetValidatorAddresses_Handler, + }, + { + MethodName: "GetPublicKey", + Handler: _Blockchain_GetPublicKey_Handler, + }, + { + MethodName: "GetTxPoolContent", + Handler: _Blockchain_GetTxPoolContent_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "blockchain.proto", +} diff --git a/www/grpc/gen/go/blockchain_jgw.pb.go b/www/grpc/gen/go/blockchain_jgw.pb.go new file mode 100644 index 000000000..a6fd8d15e --- /dev/null +++ b/www/grpc/gen/go/blockchain_jgw.pb.go @@ -0,0 +1,227 @@ +// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT. +// source: blockchain.proto + +/* +Package pactus is a reverse proxy. + +It translates gRPC into JSON-RPC 2.0 +*/ +package pactus + +import ( + "context" + "encoding/json" + + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" +) + +type BlockchainJsonRPC struct { + client BlockchainClient +} + +type paramsAndHeadersBlockchain struct { + Headers metadata.MD `json:"headers,omitempty"` + Params json.RawMessage `json:"params"` +} + +// RegisterBlockchainJsonRPC register the grpc client Blockchain for json-rpc. +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterBlockchainJsonRPC(conn *grpc.ClientConn) *BlockchainJsonRPC { + return &BlockchainJsonRPC{ + client: NewBlockchainClient(conn), + } +} + +func (s *BlockchainJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) { + return map[string]func(ctx context.Context, params json.RawMessage) (any, error){ + + "pactus.blockchain.get_block": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetBlockRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetBlock(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.blockchain.get_block_hash": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetBlockHashRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetBlockHash(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.blockchain.get_block_height": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetBlockHeightRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetBlockHeight(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.blockchain.get_blockchain_info": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetBlockchainInfoRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetBlockchainInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.blockchain.get_consensus_info": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetConsensusInfoRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetConsensusInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.blockchain.get_account": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetAccountRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetAccount(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.blockchain.get_validator": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetValidatorRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetValidator(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.blockchain.get_validator_by_number": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetValidatorByNumberRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetValidatorByNumber(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.blockchain.get_validator_addresses": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetValidatorAddressesRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetValidatorAddresses(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.blockchain.get_public_key": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetPublicKeyRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetPublicKey(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.blockchain.get_tx_pool_content": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetTxPoolContentRequest) + + var jrpcData paramsAndHeadersBlockchain + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetTxPoolContent(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + } +} diff --git a/www/grpc/gen/go/network.cobra.pb.go b/www/grpc/gen/go/network.cobra.pb.go new file mode 100644 index 000000000..90d152d8c --- /dev/null +++ b/www/grpc/gen/go/network.cobra.pb.go @@ -0,0 +1,109 @@ +// Code generated by protoc-gen-cobra. DO NOT EDIT. + +package pactus + +import ( + client "github.com/NathanBaulch/protoc-gen-cobra/client" + flag "github.com/NathanBaulch/protoc-gen-cobra/flag" + iocodec "github.com/NathanBaulch/protoc-gen-cobra/iocodec" + cobra "github.com/spf13/cobra" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func NetworkClientCommand(options ...client.Option) *cobra.Command { + cfg := client.NewConfig(options...) + cmd := &cobra.Command{ + Use: cfg.CommandNamer("Network"), + Short: "Network service client", + Long: "Network service provides RPCs for retrieving information about the network.", + } + cfg.BindFlags(cmd.PersistentFlags()) + cmd.AddCommand( + _NetworkGetNetworkInfoCommand(cfg), + _NetworkGetNodeInfoCommand(cfg), + ) + return cmd +} + +func _NetworkGetNetworkInfoCommand(cfg *client.Config) *cobra.Command { + req := &GetNetworkInfoRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetNetworkInfo"), + Short: "GetNetworkInfo RPC client", + Long: "GetNetworkInfo retrieves information about the overall network.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Network"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Network", "GetNetworkInfo"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewNetworkClient(cc) + v := &GetNetworkInfoRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetNetworkInfo(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().BoolVar(&req.OnlyConnected, cfg.FlagNamer("OnlyConnected"), false, "If true, only returns peers with connected status.") + + return cmd +} + +func _NetworkGetNodeInfoCommand(cfg *client.Config) *cobra.Command { + req := &GetNodeInfoRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetNodeInfo"), + Short: "GetNodeInfo RPC client", + Long: "GetNodeInfo retrieves information about a specific node in the network.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Network"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Network", "GetNodeInfo"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewNetworkClient(cc) + v := &GetNodeInfoRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetNodeInfo(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + return cmd +} diff --git a/www/grpc/gen/go/network.pb.go b/www/grpc/gen/go/network.pb.go new file mode 100644 index 000000000..d99205478 --- /dev/null +++ b/www/grpc/gen/go/network.pb.go @@ -0,0 +1,933 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: network.proto + +package pactus + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request message for retrieving overall network information. +type GetNetworkInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If true, only returns peers with connected status. + OnlyConnected bool `protobuf:"varint,1,opt,name=only_connected,json=onlyConnected,proto3" json:"only_connected,omitempty"` +} + +func (x *GetNetworkInfoRequest) Reset() { + *x = GetNetworkInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNetworkInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkInfoRequest) ProtoMessage() {} + +func (x *GetNetworkInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_network_proto_msgTypes[0] + 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 GetNetworkInfoRequest.ProtoReflect.Descriptor instead. +func (*GetNetworkInfoRequest) Descriptor() ([]byte, []int) { + return file_network_proto_rawDescGZIP(), []int{0} +} + +func (x *GetNetworkInfoRequest) GetOnlyConnected() bool { + if x != nil { + return x.OnlyConnected + } + return false +} + +// Response message containing information about the overall network. +type GetNetworkInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name of the network. + NetworkName string `protobuf:"bytes,1,opt,name=network_name,json=networkName,proto3" json:"network_name,omitempty"` + // Total bytes sent across the network. + TotalSentBytes int64 `protobuf:"varint,2,opt,name=total_sent_bytes,json=totalSentBytes,proto3" json:"total_sent_bytes,omitempty"` + // Total bytes received across the network. + TotalReceivedBytes int64 `protobuf:"varint,3,opt,name=total_received_bytes,json=totalReceivedBytes,proto3" json:"total_received_bytes,omitempty"` + // Number of connected peers. + ConnectedPeersCount uint32 `protobuf:"varint,4,opt,name=connected_peers_count,json=connectedPeersCount,proto3" json:"connected_peers_count,omitempty"` + // List of connected peers. + ConnectedPeers []*PeerInfo `protobuf:"bytes,5,rep,name=connected_peers,json=connectedPeers,proto3" json:"connected_peers,omitempty"` + // Bytes sent per peer ID. + SentBytes map[int32]int64 `protobuf:"bytes,6,rep,name=sent_bytes,json=sentBytes,proto3" json:"sent_bytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + // Bytes received per peer ID. + ReceivedBytes map[int32]int64 `protobuf:"bytes,7,rep,name=received_bytes,json=receivedBytes,proto3" json:"received_bytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` +} + +func (x *GetNetworkInfoResponse) Reset() { + *x = GetNetworkInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNetworkInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNetworkInfoResponse) ProtoMessage() {} + +func (x *GetNetworkInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_network_proto_msgTypes[1] + 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 GetNetworkInfoResponse.ProtoReflect.Descriptor instead. +func (*GetNetworkInfoResponse) Descriptor() ([]byte, []int) { + return file_network_proto_rawDescGZIP(), []int{1} +} + +func (x *GetNetworkInfoResponse) GetNetworkName() string { + if x != nil { + return x.NetworkName + } + return "" +} + +func (x *GetNetworkInfoResponse) GetTotalSentBytes() int64 { + if x != nil { + return x.TotalSentBytes + } + return 0 +} + +func (x *GetNetworkInfoResponse) GetTotalReceivedBytes() int64 { + if x != nil { + return x.TotalReceivedBytes + } + return 0 +} + +func (x *GetNetworkInfoResponse) GetConnectedPeersCount() uint32 { + if x != nil { + return x.ConnectedPeersCount + } + return 0 +} + +func (x *GetNetworkInfoResponse) GetConnectedPeers() []*PeerInfo { + if x != nil { + return x.ConnectedPeers + } + return nil +} + +func (x *GetNetworkInfoResponse) GetSentBytes() map[int32]int64 { + if x != nil { + return x.SentBytes + } + return nil +} + +func (x *GetNetworkInfoResponse) GetReceivedBytes() map[int32]int64 { + if x != nil { + return x.ReceivedBytes + } + return nil +} + +// Request message for retrieving information about a specific node in the +// network. +type GetNodeInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetNodeInfoRequest) Reset() { + *x = GetNodeInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodeInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeInfoRequest) ProtoMessage() {} + +func (x *GetNodeInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_network_proto_msgTypes[2] + 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 GetNodeInfoRequest.ProtoReflect.Descriptor instead. +func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { + return file_network_proto_rawDescGZIP(), []int{2} +} + +// Response message containing information about a specific node in the network. +type GetNodeInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Moniker of the node. + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` + // Agent information of the node. + Agent string `protobuf:"bytes,2,opt,name=agent,proto3" json:"agent,omitempty"` + // Peer ID of the node. + PeerId string `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + // Timestamp when the node started. + StartedAt uint64 `protobuf:"varint,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + // Reachability status of the node. + Reachability string `protobuf:"bytes,5,opt,name=reachability,proto3" json:"reachability,omitempty"` + // A bitfield indicating the services provided by the node. + Services int32 `protobuf:"varint,6,opt,name=services,proto3" json:"services,omitempty"` + // Names of services provided by the node. + ServicesNames string `protobuf:"bytes,7,opt,name=services_names,json=servicesNames,proto3" json:"services_names,omitempty"` + // List of addresses associated with the node. + LocalAddrs []string `protobuf:"bytes,8,rep,name=local_addrs,json=localAddrs,proto3" json:"local_addrs,omitempty"` + // List of protocols supported by the node. + Protocols []string `protobuf:"bytes,9,rep,name=protocols,proto3" json:"protocols,omitempty"` + // Clock offset of the node. + ClockOffset float64 `protobuf:"fixed64,13,opt,name=clock_offset,json=clockOffset,proto3" json:"clock_offset,omitempty"` + // Information about the node's connections. + ConnectionInfo *ConnectionInfo `protobuf:"bytes,14,opt,name=connection_info,json=connectionInfo,proto3" json:"connection_info,omitempty"` +} + +func (x *GetNodeInfoResponse) Reset() { + *x = GetNodeInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNodeInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNodeInfoResponse) ProtoMessage() {} + +func (x *GetNodeInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_network_proto_msgTypes[3] + 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 GetNodeInfoResponse.ProtoReflect.Descriptor instead. +func (*GetNodeInfoResponse) Descriptor() ([]byte, []int) { + return file_network_proto_rawDescGZIP(), []int{3} +} + +func (x *GetNodeInfoResponse) GetMoniker() string { + if x != nil { + return x.Moniker + } + return "" +} + +func (x *GetNodeInfoResponse) GetAgent() string { + if x != nil { + return x.Agent + } + return "" +} + +func (x *GetNodeInfoResponse) GetPeerId() string { + if x != nil { + return x.PeerId + } + return "" +} + +func (x *GetNodeInfoResponse) GetStartedAt() uint64 { + if x != nil { + return x.StartedAt + } + return 0 +} + +func (x *GetNodeInfoResponse) GetReachability() string { + if x != nil { + return x.Reachability + } + return "" +} + +func (x *GetNodeInfoResponse) GetServices() int32 { + if x != nil { + return x.Services + } + return 0 +} + +func (x *GetNodeInfoResponse) GetServicesNames() string { + if x != nil { + return x.ServicesNames + } + return "" +} + +func (x *GetNodeInfoResponse) GetLocalAddrs() []string { + if x != nil { + return x.LocalAddrs + } + return nil +} + +func (x *GetNodeInfoResponse) GetProtocols() []string { + if x != nil { + return x.Protocols + } + return nil +} + +func (x *GetNodeInfoResponse) GetClockOffset() float64 { + if x != nil { + return x.ClockOffset + } + return 0 +} + +func (x *GetNodeInfoResponse) GetConnectionInfo() *ConnectionInfo { + if x != nil { + return x.ConnectionInfo + } + return nil +} + +// Information about a peer in the network. +type PeerInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Status of the peer. + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` + // Moniker of the peer. + Moniker string `protobuf:"bytes,2,opt,name=moniker,proto3" json:"moniker,omitempty"` + // Agent information of the peer. + Agent string `protobuf:"bytes,3,opt,name=agent,proto3" json:"agent,omitempty"` + // Peer ID of the peer. + PeerId string `protobuf:"bytes,4,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + // Consensus keys used by the peer. + ConsensusKeys []string `protobuf:"bytes,5,rep,name=consensus_keys,json=consensusKeys,proto3" json:"consensus_keys,omitempty"` + // Consensus addresses of the peer. + ConsensusAddresses []string `protobuf:"bytes,6,rep,name=consensus_addresses,json=consensusAddresses,proto3" json:"consensus_addresses,omitempty"` + // Services provided by the peer. + Services uint32 `protobuf:"varint,7,opt,name=services,proto3" json:"services,omitempty"` + // Hash of the last block the peer knows. + LastBlockHash string `protobuf:"bytes,8,opt,name=last_block_hash,json=lastBlockHash,proto3" json:"last_block_hash,omitempty"` + // Blockchain height of the peer. + Height uint32 `protobuf:"varint,9,opt,name=height,proto3" json:"height,omitempty"` + // Number of received bundles. + ReceivedBundles int32 `protobuf:"varint,10,opt,name=received_bundles,json=receivedBundles,proto3" json:"received_bundles,omitempty"` + // Number of invalid bundles received. + InvalidBundles int32 `protobuf:"varint,11,opt,name=invalid_bundles,json=invalidBundles,proto3" json:"invalid_bundles,omitempty"` + // Timestamp of the last sent bundle. + LastSent int64 `protobuf:"varint,12,opt,name=last_sent,json=lastSent,proto3" json:"last_sent,omitempty"` + // Timestamp of the last received bundle. + LastReceived int64 `protobuf:"varint,13,opt,name=last_received,json=lastReceived,proto3" json:"last_received,omitempty"` + // Bytes sent per message type. + SentBytes map[int32]int64 `protobuf:"bytes,14,rep,name=sent_bytes,json=sentBytes,proto3" json:"sent_bytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + // Bytes received per message type. + ReceivedBytes map[int32]int64 `protobuf:"bytes,15,rep,name=received_bytes,json=receivedBytes,proto3" json:"received_bytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + // Network address of the peer. + Address string `protobuf:"bytes,16,opt,name=address,proto3" json:"address,omitempty"` + // Direction of connection with the peer. + Direction string `protobuf:"bytes,17,opt,name=direction,proto3" json:"direction,omitempty"` + // List of protocols supported by the peer. + Protocols []string `protobuf:"bytes,18,rep,name=protocols,proto3" json:"protocols,omitempty"` + // Total download sessions with the peer. + TotalSessions int32 `protobuf:"varint,19,opt,name=total_sessions,json=totalSessions,proto3" json:"total_sessions,omitempty"` + // Completed download sessions with the peer. + CompletedSessions int32 `protobuf:"varint,20,opt,name=completed_sessions,json=completedSessions,proto3" json:"completed_sessions,omitempty"` +} + +func (x *PeerInfo) Reset() { + *x = PeerInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerInfo) ProtoMessage() {} + +func (x *PeerInfo) ProtoReflect() protoreflect.Message { + mi := &file_network_proto_msgTypes[4] + 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 PeerInfo.ProtoReflect.Descriptor instead. +func (*PeerInfo) Descriptor() ([]byte, []int) { + return file_network_proto_rawDescGZIP(), []int{4} +} + +func (x *PeerInfo) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *PeerInfo) GetMoniker() string { + if x != nil { + return x.Moniker + } + return "" +} + +func (x *PeerInfo) GetAgent() string { + if x != nil { + return x.Agent + } + return "" +} + +func (x *PeerInfo) GetPeerId() string { + if x != nil { + return x.PeerId + } + return "" +} + +func (x *PeerInfo) GetConsensusKeys() []string { + if x != nil { + return x.ConsensusKeys + } + return nil +} + +func (x *PeerInfo) GetConsensusAddresses() []string { + if x != nil { + return x.ConsensusAddresses + } + return nil +} + +func (x *PeerInfo) GetServices() uint32 { + if x != nil { + return x.Services + } + return 0 +} + +func (x *PeerInfo) GetLastBlockHash() string { + if x != nil { + return x.LastBlockHash + } + return "" +} + +func (x *PeerInfo) GetHeight() uint32 { + if x != nil { + return x.Height + } + return 0 +} + +func (x *PeerInfo) GetReceivedBundles() int32 { + if x != nil { + return x.ReceivedBundles + } + return 0 +} + +func (x *PeerInfo) GetInvalidBundles() int32 { + if x != nil { + return x.InvalidBundles + } + return 0 +} + +func (x *PeerInfo) GetLastSent() int64 { + if x != nil { + return x.LastSent + } + return 0 +} + +func (x *PeerInfo) GetLastReceived() int64 { + if x != nil { + return x.LastReceived + } + return 0 +} + +func (x *PeerInfo) GetSentBytes() map[int32]int64 { + if x != nil { + return x.SentBytes + } + return nil +} + +func (x *PeerInfo) GetReceivedBytes() map[int32]int64 { + if x != nil { + return x.ReceivedBytes + } + return nil +} + +func (x *PeerInfo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *PeerInfo) GetDirection() string { + if x != nil { + return x.Direction + } + return "" +} + +func (x *PeerInfo) GetProtocols() []string { + if x != nil { + return x.Protocols + } + return nil +} + +func (x *PeerInfo) GetTotalSessions() int32 { + if x != nil { + return x.TotalSessions + } + return 0 +} + +func (x *PeerInfo) GetCompletedSessions() int32 { + if x != nil { + return x.CompletedSessions + } + return 0 +} + +// ConnectionInfo contains information about the node's connections. +type ConnectionInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Total number of connections. + Connections uint64 `protobuf:"varint,1,opt,name=connections,proto3" json:"connections,omitempty"` + // Number of inbound connections. + InboundConnections uint64 `protobuf:"varint,2,opt,name=inbound_connections,json=inboundConnections,proto3" json:"inbound_connections,omitempty"` + // Number of outbound connections. + OutboundConnections uint64 `protobuf:"varint,3,opt,name=outbound_connections,json=outboundConnections,proto3" json:"outbound_connections,omitempty"` +} + +func (x *ConnectionInfo) Reset() { + *x = ConnectionInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_network_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConnectionInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConnectionInfo) ProtoMessage() {} + +func (x *ConnectionInfo) ProtoReflect() protoreflect.Message { + mi := &file_network_proto_msgTypes[5] + 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 ConnectionInfo.ProtoReflect.Descriptor instead. +func (*ConnectionInfo) Descriptor() ([]byte, []int) { + return file_network_proto_rawDescGZIP(), []int{5} +} + +func (x *ConnectionInfo) GetConnections() uint64 { + if x != nil { + return x.Connections + } + return 0 +} + +func (x *ConnectionInfo) GetInboundConnections() uint64 { + if x != nil { + return x.InboundConnections + } + return 0 +} + +func (x *ConnectionInfo) GetOutboundConnections() uint64 { + if x != nil { + return x.OutboundConnections + } + return 0 +} + +var File_network_proto protoreflect.FileDescriptor + +var file_network_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x06, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x22, 0x3e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x6f, 0x6e, 0x6c, 0x79, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0xae, 0x04, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, + 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x70, + 0x65, 0x65, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x73, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x73, + 0x12, 0x4c, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, + 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x58, + 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x74, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, + 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x87, + 0x03, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, + 0x12, 0x14, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x41, 0x64, 0x64, 0x72, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x63, 0x6c, 0x6f, 0x63, + 0x6b, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x3f, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xed, 0x06, 0x0a, 0x08, 0x50, 0x65, 0x65, + 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x6f, 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, + 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x2f, 0x0a, + 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, + 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x75, + 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, + 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x1b, + 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, + 0x12, 0x3e, 0x0a, 0x0a, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0e, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x65, + 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x53, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x12, 0x4a, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x14, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x74, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x40, 0x0a, 0x12, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, + 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x0a, + 0x13, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x69, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, + 0x0a, 0x14, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6f, 0x75, + 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x32, 0xa2, 0x01, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x4f, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x42, 0x0a, 0x0e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, + 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_network_proto_rawDescOnce sync.Once + file_network_proto_rawDescData = file_network_proto_rawDesc +) + +func file_network_proto_rawDescGZIP() []byte { + file_network_proto_rawDescOnce.Do(func() { + file_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_network_proto_rawDescData) + }) + return file_network_proto_rawDescData +} + +var file_network_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_network_proto_goTypes = []any{ + (*GetNetworkInfoRequest)(nil), // 0: pactus.GetNetworkInfoRequest + (*GetNetworkInfoResponse)(nil), // 1: pactus.GetNetworkInfoResponse + (*GetNodeInfoRequest)(nil), // 2: pactus.GetNodeInfoRequest + (*GetNodeInfoResponse)(nil), // 3: pactus.GetNodeInfoResponse + (*PeerInfo)(nil), // 4: pactus.PeerInfo + (*ConnectionInfo)(nil), // 5: pactus.ConnectionInfo + nil, // 6: pactus.GetNetworkInfoResponse.SentBytesEntry + nil, // 7: pactus.GetNetworkInfoResponse.ReceivedBytesEntry + nil, // 8: pactus.PeerInfo.SentBytesEntry + nil, // 9: pactus.PeerInfo.ReceivedBytesEntry +} +var file_network_proto_depIdxs = []int32{ + 4, // 0: pactus.GetNetworkInfoResponse.connected_peers:type_name -> pactus.PeerInfo + 6, // 1: pactus.GetNetworkInfoResponse.sent_bytes:type_name -> pactus.GetNetworkInfoResponse.SentBytesEntry + 7, // 2: pactus.GetNetworkInfoResponse.received_bytes:type_name -> pactus.GetNetworkInfoResponse.ReceivedBytesEntry + 5, // 3: pactus.GetNodeInfoResponse.connection_info:type_name -> pactus.ConnectionInfo + 8, // 4: pactus.PeerInfo.sent_bytes:type_name -> pactus.PeerInfo.SentBytesEntry + 9, // 5: pactus.PeerInfo.received_bytes:type_name -> pactus.PeerInfo.ReceivedBytesEntry + 0, // 6: pactus.Network.GetNetworkInfo:input_type -> pactus.GetNetworkInfoRequest + 2, // 7: pactus.Network.GetNodeInfo:input_type -> pactus.GetNodeInfoRequest + 1, // 8: pactus.Network.GetNetworkInfo:output_type -> pactus.GetNetworkInfoResponse + 3, // 9: pactus.Network.GetNodeInfo:output_type -> pactus.GetNodeInfoResponse + 8, // [8:10] is the sub-list for method output_type + 6, // [6:8] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_network_proto_init() } +func file_network_proto_init() { + if File_network_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_network_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetNetworkInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetNetworkInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetNodeInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetNodeInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*PeerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_network_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*ConnectionInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_network_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_network_proto_goTypes, + DependencyIndexes: file_network_proto_depIdxs, + MessageInfos: file_network_proto_msgTypes, + }.Build() + File_network_proto = out.File + file_network_proto_rawDesc = nil + file_network_proto_goTypes = nil + file_network_proto_depIdxs = nil +} diff --git a/www/grpc/gen/go/network.pb.gw.go b/www/grpc/gen/go/network.pb.gw.go new file mode 100644 index 000000000..9089b05ab --- /dev/null +++ b/www/grpc/gen/go/network.pb.gw.go @@ -0,0 +1,242 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: network.proto + +/* +Package pactus is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package pactus + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_Network_GetNetworkInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Network_GetNetworkInfo_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNetworkInfoRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Network_GetNetworkInfo_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetNetworkInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Network_GetNetworkInfo_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNetworkInfoRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Network_GetNetworkInfo_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetNetworkInfo(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Network_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client NetworkClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNodeInfoRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetNodeInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Network_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, server NetworkServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNodeInfoRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetNodeInfo(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterNetworkHandlerServer registers the http handlers for service Network to "mux". +// UnaryRPC :call NetworkServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNetworkHandlerFromEndpoint instead. +func RegisterNetworkHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NetworkServer) error { + + mux.Handle("GET", pattern_Network_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Network/GetNetworkInfo", runtime.WithHTTPPathPattern("/pactus/network/get_network_info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Network_GetNetworkInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Network_GetNetworkInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Network_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Network/GetNodeInfo", runtime.WithHTTPPathPattern("/pactus/network/get_node_info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Network_GetNodeInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Network_GetNodeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterNetworkHandlerFromEndpoint is same as RegisterNetworkHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterNetworkHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterNetworkHandler(ctx, mux, conn) +} + +// RegisterNetworkHandler registers the http handlers for service Network to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterNetworkHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterNetworkHandlerClient(ctx, mux, NewNetworkClient(conn)) +} + +// RegisterNetworkHandlerClient registers the http handlers for service Network +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NetworkClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NetworkClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "NetworkClient" to call the correct interceptors. +func RegisterNetworkHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NetworkClient) error { + + mux.Handle("GET", pattern_Network_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Network/GetNetworkInfo", runtime.WithHTTPPathPattern("/pactus/network/get_network_info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Network_GetNetworkInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Network_GetNetworkInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Network_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Network/GetNodeInfo", runtime.WithHTTPPathPattern("/pactus/network/get_node_info")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Network_GetNodeInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Network_GetNodeInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Network_GetNetworkInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "network", "get_network_info"}, "")) + + pattern_Network_GetNodeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "network", "get_node_info"}, "")) +) + +var ( + forward_Network_GetNetworkInfo_0 = runtime.ForwardResponseMessage + + forward_Network_GetNodeInfo_0 = runtime.ForwardResponseMessage +) diff --git a/www/grpc/gen/go/network_grpc.pb.go b/www/grpc/gen/go/network_grpc.pb.go new file mode 100644 index 000000000..19900a7dd --- /dev/null +++ b/www/grpc/gen/go/network_grpc.pb.go @@ -0,0 +1,154 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: network.proto + +package pactus + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Network_GetNetworkInfo_FullMethodName = "/pactus.Network/GetNetworkInfo" + Network_GetNodeInfo_FullMethodName = "/pactus.Network/GetNodeInfo" +) + +// NetworkClient is the client API for Network 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. +// +// Network service provides RPCs for retrieving information about the network. +type NetworkClient interface { + // GetNetworkInfo retrieves information about the overall network. + GetNetworkInfo(ctx context.Context, in *GetNetworkInfoRequest, opts ...grpc.CallOption) (*GetNetworkInfoResponse, error) + // GetNodeInfo retrieves information about a specific node in the network. + GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) +} + +type networkClient struct { + cc grpc.ClientConnInterface +} + +func NewNetworkClient(cc grpc.ClientConnInterface) NetworkClient { + return &networkClient{cc} +} + +func (c *networkClient) GetNetworkInfo(ctx context.Context, in *GetNetworkInfoRequest, opts ...grpc.CallOption) (*GetNetworkInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetNetworkInfoResponse) + err := c.cc.Invoke(ctx, Network_GetNetworkInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *networkClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetNodeInfoResponse) + err := c.cc.Invoke(ctx, Network_GetNodeInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NetworkServer is the server API for Network service. +// All implementations should embed UnimplementedNetworkServer +// for forward compatibility +// +// Network service provides RPCs for retrieving information about the network. +type NetworkServer interface { + // GetNetworkInfo retrieves information about the overall network. + GetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*GetNetworkInfoResponse, error) + // GetNodeInfo retrieves information about a specific node in the network. + GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) +} + +// UnimplementedNetworkServer should be embedded to have forward compatible implementations. +type UnimplementedNetworkServer struct { +} + +func (UnimplementedNetworkServer) GetNetworkInfo(context.Context, *GetNetworkInfoRequest) (*GetNetworkInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNetworkInfo not implemented") +} +func (UnimplementedNetworkServer) GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") +} + +// UnsafeNetworkServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NetworkServer will +// result in compilation errors. +type UnsafeNetworkServer interface { + mustEmbedUnimplementedNetworkServer() +} + +func RegisterNetworkServer(s grpc.ServiceRegistrar, srv NetworkServer) { + s.RegisterService(&Network_ServiceDesc, srv) +} + +func _Network_GetNetworkInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNetworkInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServer).GetNetworkInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Network_GetNetworkInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServer).GetNetworkInfo(ctx, req.(*GetNetworkInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Network_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNodeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServer).GetNodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Network_GetNodeInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Network_ServiceDesc is the grpc.ServiceDesc for Network service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Network_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pactus.Network", + HandlerType: (*NetworkServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetNetworkInfo", + Handler: _Network_GetNetworkInfo_Handler, + }, + { + MethodName: "GetNodeInfo", + Handler: _Network_GetNodeInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "network.proto", +} diff --git a/www/grpc/gen/go/network_jgw.pb.go b/www/grpc/gen/go/network_jgw.pb.go new file mode 100644 index 000000000..fa9d7692f --- /dev/null +++ b/www/grpc/gen/go/network_jgw.pb.go @@ -0,0 +1,74 @@ +// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT. +// source: network.proto + +/* +Package pactus is a reverse proxy. + +It translates gRPC into JSON-RPC 2.0 +*/ +package pactus + +import ( + "context" + "encoding/json" + + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" +) + +type NetworkJsonRPC struct { + client NetworkClient +} + +type paramsAndHeadersNetwork struct { + Headers metadata.MD `json:"headers,omitempty"` + Params json.RawMessage `json:"params"` +} + +// RegisterNetworkJsonRPC register the grpc client Network for json-rpc. +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterNetworkJsonRPC(conn *grpc.ClientConn) *NetworkJsonRPC { + return &NetworkJsonRPC{ + client: NewNetworkClient(conn), + } +} + +func (s *NetworkJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) { + return map[string]func(ctx context.Context, params json.RawMessage) (any, error){ + + "pactus.network.get_network_info": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetNetworkInfoRequest) + + var jrpcData paramsAndHeadersNetwork + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetNetworkInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.network.get_node_info": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetNodeInfoRequest) + + var jrpcData paramsAndHeadersNetwork + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetNodeInfo(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + } +} diff --git a/www/grpc/gen/go/transaction.cobra.pb.go b/www/grpc/gen/go/transaction.cobra.pb.go new file mode 100644 index 000000000..6dfa0acca --- /dev/null +++ b/www/grpc/gen/go/transaction.cobra.pb.go @@ -0,0 +1,241 @@ +// Code generated by protoc-gen-cobra. DO NOT EDIT. + +package pactus + +import ( + client "github.com/NathanBaulch/protoc-gen-cobra/client" + flag "github.com/NathanBaulch/protoc-gen-cobra/flag" + iocodec "github.com/NathanBaulch/protoc-gen-cobra/iocodec" + cobra "github.com/spf13/cobra" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func TransactionClientCommand(options ...client.Option) *cobra.Command { + cfg := client.NewConfig(options...) + cmd := &cobra.Command{ + Use: cfg.CommandNamer("Transaction"), + Short: "Transaction service client", + Long: "Transaction service defines various RPC methods for interacting with\n transactions.", + } + cfg.BindFlags(cmd.PersistentFlags()) + cmd.AddCommand( + _TransactionGetTransactionCommand(cfg), + _TransactionCalculateFeeCommand(cfg), + _TransactionBroadcastTransactionCommand(cfg), + _TransactionGetRawTransactionCommand(cfg), + ) + return cmd +} + +func _TransactionGetTransactionCommand(cfg *client.Config) *cobra.Command { + req := &GetTransactionRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetTransaction"), + Short: "GetTransaction RPC client", + Long: "GetTransaction retrieves transaction details based on the provided request\n parameters.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetTransaction"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewTransactionClient(cc) + v := &GetTransactionRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetTransaction(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.Id, cfg.FlagNamer("Id"), "", "The unique ID of the transaction to retrieve.") + flag.EnumVar(cmd.PersistentFlags(), &req.Verbosity, cfg.FlagNamer("Verbosity"), "The verbosity level for transaction details.") + + return cmd +} + +func _TransactionCalculateFeeCommand(cfg *client.Config) *cobra.Command { + req := &CalculateFeeRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("CalculateFee"), + Short: "CalculateFee RPC client", + Long: "CalculateFee calculates the transaction fee based on the specified amount\n and payload type.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "CalculateFee"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewTransactionClient(cc) + v := &CalculateFeeRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.CalculateFee(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().Int64Var(&req.Amount, cfg.FlagNamer("Amount"), 0, "The amount involved in the transaction, specified in NanoPAC.") + flag.EnumVar(cmd.PersistentFlags(), &req.PayloadType, cfg.FlagNamer("PayloadType"), "The type of transaction payload.") + cmd.PersistentFlags().BoolVar(&req.FixedAmount, cfg.FlagNamer("FixedAmount"), false, "Indicates if the amount should be fixed and include the fee.") + + return cmd +} + +func _TransactionBroadcastTransactionCommand(cfg *client.Config) *cobra.Command { + req := &BroadcastTransactionRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("BroadcastTransaction"), + Short: "BroadcastTransaction RPC client", + Long: "BroadcastTransaction broadcasts a signed transaction to the network.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "BroadcastTransaction"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewTransactionClient(cc) + v := &BroadcastTransactionRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.BroadcastTransaction(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.SignedRawTransaction, cfg.FlagNamer("SignedRawTransaction"), "", "The signed raw transaction data to be broadcasted.") + + return cmd +} + +func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { + req := &GetRawTransactionRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetRawTransaction"), + Short: "GetRawTransaction RPC client", + Long: "GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetRawTransaction"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewTransactionClient(cc) + v := &GetRawTransactionRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetRawTransaction(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") + cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") + _Transfer := &GetRawTransferTransactionRequest{} + cmd.PersistentFlags().Bool(cfg.FlagNamer("Transfer"), false, "") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) + cmd.PersistentFlags().StringVar(&_Transfer.Sender, cfg.FlagNamer("Transfer Sender"), "", "The sender's account address.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Sender"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) + cmd.PersistentFlags().StringVar(&_Transfer.Receiver, cfg.FlagNamer("Transfer Receiver"), "", "The receiver's account address.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Receiver"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) + cmd.PersistentFlags().Int64Var(&_Transfer.Amount, cfg.FlagNamer("Transfer Amount"), 0, "The amount to be transferred, specified in NanoPAC. Must be greater than 0.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Amount"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) + cmd.PersistentFlags().Int64Var(&_Transfer.Fee, cfg.FlagNamer("Transfer Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Fee"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) + _Bond := &GetRawBondTransactionRequest{} + cmd.PersistentFlags().Bool(cfg.FlagNamer("Bond"), false, "") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + cmd.PersistentFlags().StringVar(&_Bond.Sender, cfg.FlagNamer("Bond Sender"), "", "The sender's account address.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Sender"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + cmd.PersistentFlags().StringVar(&_Bond.Receiver, cfg.FlagNamer("Bond Receiver"), "", "The receiver's validator address.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Receiver"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + cmd.PersistentFlags().Int64Var(&_Bond.Stake, cfg.FlagNamer("Bond Stake"), 0, "The stake amount in NanoPAC. Must be greater than 0.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Stake"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + cmd.PersistentFlags().StringVar(&_Bond.PublicKey, cfg.FlagNamer("Bond PublicKey"), "", "The public key of the validator.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond PublicKey"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + cmd.PersistentFlags().Int64Var(&_Bond.Fee, cfg.FlagNamer("Bond Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Fee"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + _Unbond := &GetRawUnbondTransactionRequest{} + cmd.PersistentFlags().Bool(cfg.FlagNamer("Unbond"), false, "") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond"), func() { req.Transaction = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) + cmd.PersistentFlags().StringVar(&_Unbond.ValidatorAddress, cfg.FlagNamer("Unbond ValidatorAddress"), "", "The address of the validator to unbond from.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond ValidatorAddress"), func() { req.Transaction = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) + _Withdraw := &GetRawWithdrawTransactionRequest{} + cmd.PersistentFlags().Bool(cfg.FlagNamer("Withdraw"), false, "") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + cmd.PersistentFlags().StringVar(&_Withdraw.ValidatorAddress, cfg.FlagNamer("Withdraw ValidatorAddress"), "", "The address of the validator to withdraw from.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw ValidatorAddress"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + cmd.PersistentFlags().StringVar(&_Withdraw.AccountAddress, cfg.FlagNamer("Withdraw AccountAddress"), "", "The address of the account to withdraw to.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw AccountAddress"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + cmd.PersistentFlags().Int64Var(&_Withdraw.Amount, cfg.FlagNamer("Withdraw Amount"), 0, "The withdrawal amount in NanoPAC. Must be greater than 0.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Amount"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + cmd.PersistentFlags().Int64Var(&_Withdraw.Fee, cfg.FlagNamer("Withdraw Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Fee"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + + return cmd +} diff --git a/www/grpc/gen/go/transaction.pb.go b/www/grpc/gen/go/transaction.pb.go new file mode 100644 index 000000000..700498f15 --- /dev/null +++ b/www/grpc/gen/go/transaction.pb.go @@ -0,0 +1,1999 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: transaction.proto + +package pactus + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enumeration for different types of transaction payloads. +type PayloadType int32 + +const ( + // Unknown payload type. + PayloadType_UNKNOWN PayloadType = 0 + // Transfer payload type. + PayloadType_TRANSFER_PAYLOAD PayloadType = 1 + // Bond payload type. + PayloadType_BOND_PAYLOAD PayloadType = 2 + // Sortition payload type. + PayloadType_SORTITION_PAYLOAD PayloadType = 3 + // Unbond payload type. + PayloadType_UNBOND_PAYLOAD PayloadType = 4 + // Withdraw payload type. + PayloadType_WITHDRAW_PAYLOAD PayloadType = 5 +) + +// Enum value maps for PayloadType. +var ( + PayloadType_name = map[int32]string{ + 0: "UNKNOWN", + 1: "TRANSFER_PAYLOAD", + 2: "BOND_PAYLOAD", + 3: "SORTITION_PAYLOAD", + 4: "UNBOND_PAYLOAD", + 5: "WITHDRAW_PAYLOAD", + } + PayloadType_value = map[string]int32{ + "UNKNOWN": 0, + "TRANSFER_PAYLOAD": 1, + "BOND_PAYLOAD": 2, + "SORTITION_PAYLOAD": 3, + "UNBOND_PAYLOAD": 4, + "WITHDRAW_PAYLOAD": 5, + } +) + +func (x PayloadType) Enum() *PayloadType { + p := new(PayloadType) + *p = x + return p +} + +func (x PayloadType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PayloadType) Descriptor() protoreflect.EnumDescriptor { + return file_transaction_proto_enumTypes[0].Descriptor() +} + +func (PayloadType) Type() protoreflect.EnumType { + return &file_transaction_proto_enumTypes[0] +} + +func (x PayloadType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PayloadType.Descriptor instead. +func (PayloadType) EnumDescriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{0} +} + +// Enumeration for verbosity levels when requesting transaction details. +type TransactionVerbosity int32 + +const ( + // Request transaction data only. + TransactionVerbosity_TRANSACTION_DATA TransactionVerbosity = 0 + // Request detailed transaction information. + TransactionVerbosity_TRANSACTION_INFO TransactionVerbosity = 1 +) + +// Enum value maps for TransactionVerbosity. +var ( + TransactionVerbosity_name = map[int32]string{ + 0: "TRANSACTION_DATA", + 1: "TRANSACTION_INFO", + } + TransactionVerbosity_value = map[string]int32{ + "TRANSACTION_DATA": 0, + "TRANSACTION_INFO": 1, + } +) + +func (x TransactionVerbosity) Enum() *TransactionVerbosity { + p := new(TransactionVerbosity) + *p = x + return p +} + +func (x TransactionVerbosity) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TransactionVerbosity) Descriptor() protoreflect.EnumDescriptor { + return file_transaction_proto_enumTypes[1].Descriptor() +} + +func (TransactionVerbosity) Type() protoreflect.EnumType { + return &file_transaction_proto_enumTypes[1] +} + +func (x TransactionVerbosity) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TransactionVerbosity.Descriptor instead. +func (TransactionVerbosity) EnumDescriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{1} +} + +// Request message for retrieving transaction details. +type GetTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique ID of the transaction to retrieve. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The verbosity level for transaction details. + Verbosity TransactionVerbosity `protobuf:"varint,2,opt,name=verbosity,proto3,enum=pactus.TransactionVerbosity" json:"verbosity,omitempty"` +} + +func (x *GetTransactionRequest) Reset() { + *x = GetTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTransactionRequest) ProtoMessage() {} + +func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[0] + 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 GetTransactionRequest.ProtoReflect.Descriptor instead. +func (*GetTransactionRequest) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{0} +} + +func (x *GetTransactionRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *GetTransactionRequest) GetVerbosity() TransactionVerbosity { + if x != nil { + return x.Verbosity + } + return TransactionVerbosity_TRANSACTION_DATA +} + +// Response message containing details of a transaction. +type GetTransactionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The height of the block containing the transaction. + BlockHeight uint32 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + // The UNIX timestamp of the block containing the transaction. + BlockTime uint32 `protobuf:"varint,2,opt,name=block_time,json=blockTime,proto3" json:"block_time,omitempty"` + // Detailed information about the transaction. + Transaction *TransactionInfo `protobuf:"bytes,3,opt,name=transaction,proto3" json:"transaction,omitempty"` +} + +func (x *GetTransactionResponse) Reset() { + *x = GetTransactionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTransactionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTransactionResponse) ProtoMessage() {} + +func (x *GetTransactionResponse) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[1] + 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 GetTransactionResponse.ProtoReflect.Descriptor instead. +func (*GetTransactionResponse) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{1} +} + +func (x *GetTransactionResponse) GetBlockHeight() uint32 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *GetTransactionResponse) GetBlockTime() uint32 { + if x != nil { + return x.BlockTime + } + return 0 +} + +func (x *GetTransactionResponse) GetTransaction() *TransactionInfo { + if x != nil { + return x.Transaction + } + return nil +} + +// Request message for calculating transaction fee. +type CalculateFeeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The amount involved in the transaction, specified in NanoPAC. + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + // The type of transaction payload. + PayloadType PayloadType `protobuf:"varint,2,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType" json:"payload_type,omitempty"` + // Indicates if the amount should be fixed and include the fee. + FixedAmount bool `protobuf:"varint,3,opt,name=fixed_amount,json=fixedAmount,proto3" json:"fixed_amount,omitempty"` +} + +func (x *CalculateFeeRequest) Reset() { + *x = CalculateFeeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CalculateFeeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CalculateFeeRequest) ProtoMessage() {} + +func (x *CalculateFeeRequest) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[2] + 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 CalculateFeeRequest.ProtoReflect.Descriptor instead. +func (*CalculateFeeRequest) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{2} +} + +func (x *CalculateFeeRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *CalculateFeeRequest) GetPayloadType() PayloadType { + if x != nil { + return x.PayloadType + } + return PayloadType_UNKNOWN +} + +func (x *CalculateFeeRequest) GetFixedAmount() bool { + if x != nil { + return x.FixedAmount + } + return false +} + +// Response message containing the calculated transaction fee. +type CalculateFeeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The calculated amount in NanoPAC. + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` + // The calculated transaction fee in NanoPAC. + Fee int64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (x *CalculateFeeResponse) Reset() { + *x = CalculateFeeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CalculateFeeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CalculateFeeResponse) ProtoMessage() {} + +func (x *CalculateFeeResponse) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[3] + 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 CalculateFeeResponse.ProtoReflect.Descriptor instead. +func (*CalculateFeeResponse) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{3} +} + +func (x *CalculateFeeResponse) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *CalculateFeeResponse) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Request message for broadcasting a signed transaction. +type BroadcastTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The signed raw transaction data to be broadcasted. + SignedRawTransaction string `protobuf:"bytes,1,opt,name=signed_raw_transaction,json=signedRawTransaction,proto3" json:"signed_raw_transaction,omitempty"` +} + +func (x *BroadcastTransactionRequest) Reset() { + *x = BroadcastTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BroadcastTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BroadcastTransactionRequest) ProtoMessage() {} + +func (x *BroadcastTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[4] + 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 BroadcastTransactionRequest.ProtoReflect.Descriptor instead. +func (*BroadcastTransactionRequest) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{4} +} + +func (x *BroadcastTransactionRequest) GetSignedRawTransaction() string { + if x != nil { + return x.SignedRawTransaction + } + return "" +} + +// Response message containing the ID of the broadcasted transaction. +type BroadcastTransactionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique ID of the broadcasted transaction. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *BroadcastTransactionResponse) Reset() { + *x = BroadcastTransactionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BroadcastTransactionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BroadcastTransactionResponse) ProtoMessage() {} + +func (x *BroadcastTransactionResponse) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[5] + 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 BroadcastTransactionResponse.ProtoReflect.Descriptor instead. +func (*BroadcastTransactionResponse) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{5} +} + +func (x *BroadcastTransactionResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +// Request message for retrieving raw details of transaction. +type GetRawTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The lock time for the transaction. If not set, defaults to the last block + // height. + LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + // A memo string for the transaction. + Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` + // Types that are assignable to Transaction: + // + // *GetRawTransactionRequest_Transfer + // *GetRawTransactionRequest_Bond + // *GetRawTransactionRequest_Unbond + // *GetRawTransactionRequest_Withdraw + Transaction isGetRawTransactionRequest_Transaction `protobuf_oneof:"transaction"` +} + +func (x *GetRawTransactionRequest) Reset() { + *x = GetRawTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRawTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRawTransactionRequest) ProtoMessage() {} + +func (x *GetRawTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[6] + 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 GetRawTransactionRequest.ProtoReflect.Descriptor instead. +func (*GetRawTransactionRequest) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{6} +} + +func (x *GetRawTransactionRequest) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +func (x *GetRawTransactionRequest) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (m *GetRawTransactionRequest) GetTransaction() isGetRawTransactionRequest_Transaction { + if m != nil { + return m.Transaction + } + return nil +} + +func (x *GetRawTransactionRequest) GetTransfer() *GetRawTransferTransactionRequest { + if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Transfer); ok { + return x.Transfer + } + return nil +} + +func (x *GetRawTransactionRequest) GetBond() *GetRawBondTransactionRequest { + if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Bond); ok { + return x.Bond + } + return nil +} + +func (x *GetRawTransactionRequest) GetUnbond() *GetRawUnbondTransactionRequest { + if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Unbond); ok { + return x.Unbond + } + return nil +} + +func (x *GetRawTransactionRequest) GetWithdraw() *GetRawWithdrawTransactionRequest { + if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Withdraw); ok { + return x.Withdraw + } + return nil +} + +type isGetRawTransactionRequest_Transaction interface { + isGetRawTransactionRequest_Transaction() +} + +type GetRawTransactionRequest_Transfer struct { + Transfer *GetRawTransferTransactionRequest `protobuf:"bytes,3,opt,name=transfer,proto3,oneof"` +} + +type GetRawTransactionRequest_Bond struct { + Bond *GetRawBondTransactionRequest `protobuf:"bytes,4,opt,name=bond,proto3,oneof"` +} + +type GetRawTransactionRequest_Unbond struct { + Unbond *GetRawUnbondTransactionRequest `protobuf:"bytes,5,opt,name=unbond,proto3,oneof"` +} + +type GetRawTransactionRequest_Withdraw struct { + Withdraw *GetRawWithdrawTransactionRequest `protobuf:"bytes,6,opt,name=withdraw,proto3,oneof"` +} + +func (*GetRawTransactionRequest_Transfer) isGetRawTransactionRequest_Transaction() {} + +func (*GetRawTransactionRequest_Bond) isGetRawTransactionRequest_Transaction() {} + +func (*GetRawTransactionRequest_Unbond) isGetRawTransactionRequest_Transaction() {} + +func (*GetRawTransactionRequest_Withdraw) isGetRawTransactionRequest_Transaction() {} + +// Request message for retrieving raw details of a transfer transaction. +type GetRawTransferTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sender's account address. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // The receiver's account address. + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // The amount to be transferred, specified in NanoPAC. Must be greater than 0. + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (x *GetRawTransferTransactionRequest) Reset() { + *x = GetRawTransferTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRawTransferTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRawTransferTransactionRequest) ProtoMessage() {} + +func (x *GetRawTransferTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[7] + 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 GetRawTransferTransactionRequest.ProtoReflect.Descriptor instead. +func (*GetRawTransferTransactionRequest) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{7} +} + +func (x *GetRawTransferTransactionRequest) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *GetRawTransferTransactionRequest) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *GetRawTransferTransactionRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *GetRawTransferTransactionRequest) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Request message for retrieving raw details of a bond transaction. +type GetRawBondTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sender's account address. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // The receiver's validator address. + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // The stake amount in NanoPAC. Must be greater than 0. + Stake int64 `protobuf:"varint,3,opt,name=stake,proto3" json:"stake,omitempty"` + // The public key of the validator. + PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (x *GetRawBondTransactionRequest) Reset() { + *x = GetRawBondTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRawBondTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRawBondTransactionRequest) ProtoMessage() {} + +func (x *GetRawBondTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[8] + 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 GetRawBondTransactionRequest.ProtoReflect.Descriptor instead. +func (*GetRawBondTransactionRequest) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{8} +} + +func (x *GetRawBondTransactionRequest) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *GetRawBondTransactionRequest) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *GetRawBondTransactionRequest) GetStake() int64 { + if x != nil { + return x.Stake + } + return 0 +} + +func (x *GetRawBondTransactionRequest) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *GetRawBondTransactionRequest) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Request message for retrieving raw details of an unbond transaction. +type GetRawUnbondTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the validator to unbond from. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *GetRawUnbondTransactionRequest) Reset() { + *x = GetRawUnbondTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRawUnbondTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRawUnbondTransactionRequest) ProtoMessage() {} + +func (x *GetRawUnbondTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[9] + 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 GetRawUnbondTransactionRequest.ProtoReflect.Descriptor instead. +func (*GetRawUnbondTransactionRequest) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{9} +} + +func (x *GetRawUnbondTransactionRequest) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +// Request message for retrieving raw details of a withdraw transaction. +type GetRawWithdrawTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the validator to withdraw from. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // The address of the account to withdraw to. + AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + // The withdrawal amount in NanoPAC. Must be greater than 0. + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (x *GetRawWithdrawTransactionRequest) Reset() { + *x = GetRawWithdrawTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRawWithdrawTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRawWithdrawTransactionRequest) ProtoMessage() {} + +func (x *GetRawWithdrawTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[10] + 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 GetRawWithdrawTransactionRequest.ProtoReflect.Descriptor instead. +func (*GetRawWithdrawTransactionRequest) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{10} +} + +func (x *GetRawWithdrawTransactionRequest) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *GetRawWithdrawTransactionRequest) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *GetRawWithdrawTransactionRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *GetRawWithdrawTransactionRequest) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Response message containing raw transaction data. +type GetRawTransactionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The raw transaction data. + RawTransaction string `protobuf:"bytes,1,opt,name=raw_transaction,json=rawTransaction,proto3" json:"raw_transaction,omitempty"` +} + +func (x *GetRawTransactionResponse) Reset() { + *x = GetRawTransactionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetRawTransactionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetRawTransactionResponse) ProtoMessage() {} + +func (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[11] + 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 GetRawTransactionResponse.ProtoReflect.Descriptor instead. +func (*GetRawTransactionResponse) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{11} +} + +func (x *GetRawTransactionResponse) GetRawTransaction() string { + if x != nil { + return x.RawTransaction + } + return "" +} + +// Payload for a transfer transaction. +type PayloadTransfer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sender's address. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // The receiver's address. + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // The amount to be transferred in NanoPAC. + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *PayloadTransfer) Reset() { + *x = PayloadTransfer{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadTransfer) ProtoMessage() {} + +func (x *PayloadTransfer) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[12] + 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 PayloadTransfer.ProtoReflect.Descriptor instead. +func (*PayloadTransfer) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{12} +} + +func (x *PayloadTransfer) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *PayloadTransfer) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *PayloadTransfer) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Payload for a bond transaction. +type PayloadBond struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sender's address. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // The receiver's address. + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // The stake amount in NanoPAC. + Stake int64 `protobuf:"varint,3,opt,name=stake,proto3" json:"stake,omitempty"` +} + +func (x *PayloadBond) Reset() { + *x = PayloadBond{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadBond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadBond) ProtoMessage() {} + +func (x *PayloadBond) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[13] + 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 PayloadBond.ProtoReflect.Descriptor instead. +func (*PayloadBond) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{13} +} + +func (x *PayloadBond) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *PayloadBond) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *PayloadBond) GetStake() int64 { + if x != nil { + return x.Stake + } + return 0 +} + +// Payload for a sortition transaction. +type PayloadSortition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The validator address associated with the sortition proof. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The proof for the sortition. + Proof string `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` +} + +func (x *PayloadSortition) Reset() { + *x = PayloadSortition{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadSortition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadSortition) ProtoMessage() {} + +func (x *PayloadSortition) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[14] + 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 PayloadSortition.ProtoReflect.Descriptor instead. +func (*PayloadSortition) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{14} +} + +func (x *PayloadSortition) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *PayloadSortition) GetProof() string { + if x != nil { + return x.Proof + } + return "" +} + +// Payload for an unbond transaction. +type PayloadUnbond struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the validator to unbond from. + Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` +} + +func (x *PayloadUnbond) Reset() { + *x = PayloadUnbond{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadUnbond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadUnbond) ProtoMessage() {} + +func (x *PayloadUnbond) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[15] + 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 PayloadUnbond.ProtoReflect.Descriptor instead. +func (*PayloadUnbond) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{15} +} + +func (x *PayloadUnbond) GetValidator() string { + if x != nil { + return x.Validator + } + return "" +} + +// Payload for a withdraw transaction. +type PayloadWithdraw struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address to withdraw from. + From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` + // The address to withdraw to. + To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // The withdrawal amount in NanoPAC. + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *PayloadWithdraw) Reset() { + *x = PayloadWithdraw{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PayloadWithdraw) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PayloadWithdraw) ProtoMessage() {} + +func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[16] + 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 PayloadWithdraw.ProtoReflect.Descriptor instead. +func (*PayloadWithdraw) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{16} +} + +func (x *PayloadWithdraw) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *PayloadWithdraw) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *PayloadWithdraw) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Information about a transaction. +type TransactionInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique ID of the transaction. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The raw transaction data. + Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + // The version of the transaction. + Version int32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + // The lock time for the transaction. + LockTime uint32 `protobuf:"varint,4,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` + // The value of the transaction in NanoPAC. + Value int64 `protobuf:"varint,5,opt,name=value,proto3" json:"value,omitempty"` + // The fee for the transaction in NanoPAC. + Fee int64 `protobuf:"varint,6,opt,name=fee,proto3" json:"fee,omitempty"` + // The type of transaction payload. + PayloadType PayloadType `protobuf:"varint,7,opt,name=payload_type,json=payloadType,proto3,enum=pactus.PayloadType" json:"payload_type,omitempty"` + // Types that are assignable to Payload: + // + // *TransactionInfo_Transfer + // *TransactionInfo_Bond + // *TransactionInfo_Sortition + // *TransactionInfo_Unbond + // *TransactionInfo_Withdraw + Payload isTransactionInfo_Payload `protobuf_oneof:"payload"` + // A memo string for the transaction. + Memo string `protobuf:"bytes,8,opt,name=memo,proto3" json:"memo,omitempty"` + // The public key associated with the transaction. + PublicKey string `protobuf:"bytes,9,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The signature for the transaction. + Signature string `protobuf:"bytes,10,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *TransactionInfo) Reset() { + *x = TransactionInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TransactionInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionInfo) ProtoMessage() {} + +func (x *TransactionInfo) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[17] + 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 TransactionInfo.ProtoReflect.Descriptor instead. +func (*TransactionInfo) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{17} +} + +func (x *TransactionInfo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *TransactionInfo) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *TransactionInfo) GetVersion() int32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *TransactionInfo) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + +func (x *TransactionInfo) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *TransactionInfo) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *TransactionInfo) GetPayloadType() PayloadType { + if x != nil { + return x.PayloadType + } + return PayloadType_UNKNOWN +} + +func (m *TransactionInfo) GetPayload() isTransactionInfo_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (x *TransactionInfo) GetTransfer() *PayloadTransfer { + if x, ok := x.GetPayload().(*TransactionInfo_Transfer); ok { + return x.Transfer + } + return nil +} + +func (x *TransactionInfo) GetBond() *PayloadBond { + if x, ok := x.GetPayload().(*TransactionInfo_Bond); ok { + return x.Bond + } + return nil +} + +func (x *TransactionInfo) GetSortition() *PayloadSortition { + if x, ok := x.GetPayload().(*TransactionInfo_Sortition); ok { + return x.Sortition + } + return nil +} + +func (x *TransactionInfo) GetUnbond() *PayloadUnbond { + if x, ok := x.GetPayload().(*TransactionInfo_Unbond); ok { + return x.Unbond + } + return nil +} + +func (x *TransactionInfo) GetWithdraw() *PayloadWithdraw { + if x, ok := x.GetPayload().(*TransactionInfo_Withdraw); ok { + return x.Withdraw + } + return nil +} + +func (x *TransactionInfo) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +func (x *TransactionInfo) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *TransactionInfo) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +type isTransactionInfo_Payload interface { + isTransactionInfo_Payload() +} + +type TransactionInfo_Transfer struct { + // Transfer transaction payload. + Transfer *PayloadTransfer `protobuf:"bytes,30,opt,name=transfer,proto3,oneof"` +} + +type TransactionInfo_Bond struct { + // Bond transaction payload. + Bond *PayloadBond `protobuf:"bytes,31,opt,name=bond,proto3,oneof"` +} + +type TransactionInfo_Sortition struct { + // Sortition transaction payload. + Sortition *PayloadSortition `protobuf:"bytes,32,opt,name=sortition,proto3,oneof"` +} + +type TransactionInfo_Unbond struct { + // Unbond transaction payload. + Unbond *PayloadUnbond `protobuf:"bytes,33,opt,name=unbond,proto3,oneof"` +} + +type TransactionInfo_Withdraw struct { + // Withdraw transaction payload. + Withdraw *PayloadWithdraw `protobuf:"bytes,34,opt,name=withdraw,proto3,oneof"` +} + +func (*TransactionInfo_Transfer) isTransactionInfo_Payload() {} + +func (*TransactionInfo_Bond) isTransactionInfo_Payload() {} + +func (*TransactionInfo_Sortition) isTransactionInfo_Payload() {} + +func (*TransactionInfo_Unbond) isTransactionInfo_Payload() {} + +func (*TransactionInfo_Withdraw) isTransactionInfo_Payload() {} + +var File_transaction_proto protoreflect.FileDescriptor + +var file_transaction_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x22, 0x63, 0x0a, 0x15, 0x47, + 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x09, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x62, + 0x6f, 0x73, 0x69, 0x74, 0x79, 0x52, 0x09, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, + 0x22, 0x95, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x39, 0x0a, + 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x88, 0x01, 0x0a, 0x13, 0x43, 0x61, 0x6c, + 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, + 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x66, 0x69, 0x78, 0x65, 0x64, 0x41, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x40, 0x0a, 0x14, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, + 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x53, 0x0a, 0x1b, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, + 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x72, + 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, 0x61, 0x77, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x1c, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe8, 0x02, 0x0a, 0x18, 0x47, + 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x46, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, + 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x06, + 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, + 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x46, + 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, + 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x66, 0x65, 0x65, 0x22, 0x4d, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, + 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0xa2, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, + 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, + 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, + 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x57, 0x0a, + 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x42, 0x0a, 0x10, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4d, 0x0a, 0x0f, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, + 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, + 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xac, 0x04, 0x0a, 0x0f, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, + 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, + 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x29, + 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, + 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x6f, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x21, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, + 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, + 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6d, + 0x65, 0x6d, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x83, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, + 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x4f, + 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, + 0x53, 0x4f, 0x52, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, + 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, + 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x48, 0x44, + 0x52, 0x41, 0x57, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x2a, 0x42, 0x0a, + 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x62, + 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, + 0x01, 0x32, 0xe6, 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, + 0x65, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, + 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, + 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, + 0x14, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, + 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x46, 0x0a, 0x12, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_transaction_proto_rawDescOnce sync.Once + file_transaction_proto_rawDescData = file_transaction_proto_rawDesc +) + +func file_transaction_proto_rawDescGZIP() []byte { + file_transaction_proto_rawDescOnce.Do(func() { + file_transaction_proto_rawDescData = protoimpl.X.CompressGZIP(file_transaction_proto_rawDescData) + }) + return file_transaction_proto_rawDescData +} + +var file_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_transaction_proto_goTypes = []any{ + (PayloadType)(0), // 0: pactus.PayloadType + (TransactionVerbosity)(0), // 1: pactus.TransactionVerbosity + (*GetTransactionRequest)(nil), // 2: pactus.GetTransactionRequest + (*GetTransactionResponse)(nil), // 3: pactus.GetTransactionResponse + (*CalculateFeeRequest)(nil), // 4: pactus.CalculateFeeRequest + (*CalculateFeeResponse)(nil), // 5: pactus.CalculateFeeResponse + (*BroadcastTransactionRequest)(nil), // 6: pactus.BroadcastTransactionRequest + (*BroadcastTransactionResponse)(nil), // 7: pactus.BroadcastTransactionResponse + (*GetRawTransactionRequest)(nil), // 8: pactus.GetRawTransactionRequest + (*GetRawTransferTransactionRequest)(nil), // 9: pactus.GetRawTransferTransactionRequest + (*GetRawBondTransactionRequest)(nil), // 10: pactus.GetRawBondTransactionRequest + (*GetRawUnbondTransactionRequest)(nil), // 11: pactus.GetRawUnbondTransactionRequest + (*GetRawWithdrawTransactionRequest)(nil), // 12: pactus.GetRawWithdrawTransactionRequest + (*GetRawTransactionResponse)(nil), // 13: pactus.GetRawTransactionResponse + (*PayloadTransfer)(nil), // 14: pactus.PayloadTransfer + (*PayloadBond)(nil), // 15: pactus.PayloadBond + (*PayloadSortition)(nil), // 16: pactus.PayloadSortition + (*PayloadUnbond)(nil), // 17: pactus.PayloadUnbond + (*PayloadWithdraw)(nil), // 18: pactus.PayloadWithdraw + (*TransactionInfo)(nil), // 19: pactus.TransactionInfo +} +var file_transaction_proto_depIdxs = []int32{ + 1, // 0: pactus.GetTransactionRequest.verbosity:type_name -> pactus.TransactionVerbosity + 19, // 1: pactus.GetTransactionResponse.transaction:type_name -> pactus.TransactionInfo + 0, // 2: pactus.CalculateFeeRequest.payload_type:type_name -> pactus.PayloadType + 9, // 3: pactus.GetRawTransactionRequest.transfer:type_name -> pactus.GetRawTransferTransactionRequest + 10, // 4: pactus.GetRawTransactionRequest.bond:type_name -> pactus.GetRawBondTransactionRequest + 11, // 5: pactus.GetRawTransactionRequest.unbond:type_name -> pactus.GetRawUnbondTransactionRequest + 12, // 6: pactus.GetRawTransactionRequest.withdraw:type_name -> pactus.GetRawWithdrawTransactionRequest + 0, // 7: pactus.TransactionInfo.payload_type:type_name -> pactus.PayloadType + 14, // 8: pactus.TransactionInfo.transfer:type_name -> pactus.PayloadTransfer + 15, // 9: pactus.TransactionInfo.bond:type_name -> pactus.PayloadBond + 16, // 10: pactus.TransactionInfo.sortition:type_name -> pactus.PayloadSortition + 17, // 11: pactus.TransactionInfo.unbond:type_name -> pactus.PayloadUnbond + 18, // 12: pactus.TransactionInfo.withdraw:type_name -> pactus.PayloadWithdraw + 2, // 13: pactus.Transaction.GetTransaction:input_type -> pactus.GetTransactionRequest + 4, // 14: pactus.Transaction.CalculateFee:input_type -> pactus.CalculateFeeRequest + 6, // 15: pactus.Transaction.BroadcastTransaction:input_type -> pactus.BroadcastTransactionRequest + 8, // 16: pactus.Transaction.GetRawTransaction:input_type -> pactus.GetRawTransactionRequest + 3, // 17: pactus.Transaction.GetTransaction:output_type -> pactus.GetTransactionResponse + 5, // 18: pactus.Transaction.CalculateFee:output_type -> pactus.CalculateFeeResponse + 7, // 19: pactus.Transaction.BroadcastTransaction:output_type -> pactus.BroadcastTransactionResponse + 13, // 20: pactus.Transaction.GetRawTransaction:output_type -> pactus.GetRawTransactionResponse + 17, // [17:21] is the sub-list for method output_type + 13, // [13:17] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name +} + +func init() { file_transaction_proto_init() } +func file_transaction_proto_init() { + if File_transaction_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_transaction_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*GetTransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*CalculateFeeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*CalculateFeeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*BroadcastTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*BroadcastTransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*GetRawTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*GetRawTransferTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*GetRawBondTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*GetRawUnbondTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*GetRawWithdrawTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*GetRawTransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*PayloadTransfer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*PayloadBond); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*PayloadSortition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*PayloadUnbond); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*PayloadWithdraw); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*TransactionInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_transaction_proto_msgTypes[6].OneofWrappers = []any{ + (*GetRawTransactionRequest_Transfer)(nil), + (*GetRawTransactionRequest_Bond)(nil), + (*GetRawTransactionRequest_Unbond)(nil), + (*GetRawTransactionRequest_Withdraw)(nil), + } + file_transaction_proto_msgTypes[17].OneofWrappers = []any{ + (*TransactionInfo_Transfer)(nil), + (*TransactionInfo_Bond)(nil), + (*TransactionInfo_Sortition)(nil), + (*TransactionInfo_Unbond)(nil), + (*TransactionInfo_Withdraw)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_transaction_proto_rawDesc, + NumEnums: 2, + NumMessages: 18, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_transaction_proto_goTypes, + DependencyIndexes: file_transaction_proto_depIdxs, + EnumInfos: file_transaction_proto_enumTypes, + MessageInfos: file_transaction_proto_msgTypes, + }.Build() + File_transaction_proto = out.File + file_transaction_proto_rawDesc = nil + file_transaction_proto_goTypes = nil + file_transaction_proto_depIdxs = nil +} diff --git a/www/grpc/gen/go/transaction.pb.gw.go b/www/grpc/gen/go/transaction.pb.gw.go new file mode 100644 index 000000000..f865d4dc0 --- /dev/null +++ b/www/grpc/gen/go/transaction.pb.gw.go @@ -0,0 +1,434 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: transaction.proto + +/* +Package pactus is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package pactus + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_Transaction_GetTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Transaction_GetTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Transaction_GetTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTransaction(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Transaction_CalculateFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Transaction_CalculateFee_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CalculateFeeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_CalculateFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CalculateFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Transaction_CalculateFee_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CalculateFeeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_CalculateFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CalculateFee(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Transaction_BroadcastTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Transaction_BroadcastTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BroadcastTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_BroadcastTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.BroadcastTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Transaction_BroadcastTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BroadcastTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_BroadcastTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.BroadcastTransaction(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Transaction_GetRawTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Transaction_GetRawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRawTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetRawTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Transaction_GetRawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRawTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetRawTransaction(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterTransactionHandlerServer registers the http handlers for service Transaction to "mux". +// UnaryRPC :call TransactionServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTransactionHandlerFromEndpoint instead. +func RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionServer) error { + + mux.Handle("GET", pattern_Transaction_GetTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Transaction_GetTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Transaction_CalculateFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/CalculateFee", runtime.WithHTTPPathPattern("/pactus/transaction/calculate_fee")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Transaction_CalculateFee_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_CalculateFee_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Transaction_BroadcastTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/BroadcastTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/broadcast_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Transaction_BroadcastTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_BroadcastTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Transaction_GetRawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Transaction_GetRawTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterTransactionHandlerFromEndpoint is same as RegisterTransactionHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterTransactionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterTransactionHandler(ctx, mux, conn) +} + +// RegisterTransactionHandler registers the http handlers for service Transaction to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterTransactionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterTransactionHandlerClient(ctx, mux, NewTransactionClient(conn)) +} + +// RegisterTransactionHandlerClient registers the http handlers for service Transaction +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TransactionClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TransactionClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "TransactionClient" to call the correct interceptors. +func RegisterTransactionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionClient) error { + + mux.Handle("GET", pattern_Transaction_GetTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Transaction_GetTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Transaction_CalculateFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/CalculateFee", runtime.WithHTTPPathPattern("/pactus/transaction/calculate_fee")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Transaction_CalculateFee_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_CalculateFee_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_Transaction_BroadcastTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/BroadcastTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/broadcast_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Transaction_BroadcastTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_BroadcastTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Transaction_GetRawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Transaction_GetRawTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Transaction_GetTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_transaction"}, "")) + + pattern_Transaction_CalculateFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "calculate_fee"}, "")) + + pattern_Transaction_BroadcastTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "broadcast_transaction"}, "")) + + pattern_Transaction_GetRawTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_transaction"}, "")) +) + +var ( + forward_Transaction_GetTransaction_0 = runtime.ForwardResponseMessage + + forward_Transaction_CalculateFee_0 = runtime.ForwardResponseMessage + + forward_Transaction_BroadcastTransaction_0 = runtime.ForwardResponseMessage + + forward_Transaction_GetRawTransaction_0 = runtime.ForwardResponseMessage +) diff --git a/www/grpc/gen/go/transaction_grpc.pb.go b/www/grpc/gen/go/transaction_grpc.pb.go new file mode 100644 index 000000000..dc04eec2c --- /dev/null +++ b/www/grpc/gen/go/transaction_grpc.pb.go @@ -0,0 +1,240 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: transaction.proto + +package pactus + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Transaction_GetTransaction_FullMethodName = "/pactus.Transaction/GetTransaction" + Transaction_CalculateFee_FullMethodName = "/pactus.Transaction/CalculateFee" + Transaction_BroadcastTransaction_FullMethodName = "/pactus.Transaction/BroadcastTransaction" + Transaction_GetRawTransaction_FullMethodName = "/pactus.Transaction/GetRawTransaction" +) + +// TransactionClient is the client API for Transaction 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. +// +// Transaction service defines various RPC methods for interacting with +// transactions. +type TransactionClient interface { + // GetTransaction retrieves transaction details based on the provided request + // parameters. + GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) + // CalculateFee calculates the transaction fee based on the specified amount + // and payload type. + CalculateFee(ctx context.Context, in *CalculateFeeRequest, opts ...grpc.CallOption) (*CalculateFeeResponse, error) + // BroadcastTransaction broadcasts a signed transaction to the network. + BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error) + // GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. + GetRawTransaction(ctx context.Context, in *GetRawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) +} + +type transactionClient struct { + cc grpc.ClientConnInterface +} + +func NewTransactionClient(cc grpc.ClientConnInterface) TransactionClient { + return &transactionClient{cc} +} + +func (c *transactionClient) GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetTransactionResponse) + err := c.cc.Invoke(ctx, Transaction_GetTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) CalculateFee(ctx context.Context, in *CalculateFeeRequest, opts ...grpc.CallOption) (*CalculateFeeResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CalculateFeeResponse) + err := c.cc.Invoke(ctx, Transaction_CalculateFee_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BroadcastTransactionResponse) + err := c.cc.Invoke(ctx, Transaction_BroadcastTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) GetRawTransaction(ctx context.Context, in *GetRawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRawTransactionResponse) + err := c.cc.Invoke(ctx, Transaction_GetRawTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TransactionServer is the server API for Transaction service. +// All implementations should embed UnimplementedTransactionServer +// for forward compatibility +// +// Transaction service defines various RPC methods for interacting with +// transactions. +type TransactionServer interface { + // GetTransaction retrieves transaction details based on the provided request + // parameters. + GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) + // CalculateFee calculates the transaction fee based on the specified amount + // and payload type. + CalculateFee(context.Context, *CalculateFeeRequest) (*CalculateFeeResponse, error) + // BroadcastTransaction broadcasts a signed transaction to the network. + BroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error) + // GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. + GetRawTransaction(context.Context, *GetRawTransactionRequest) (*GetRawTransactionResponse, error) +} + +// UnimplementedTransactionServer should be embedded to have forward compatible implementations. +type UnimplementedTransactionServer struct { +} + +func (UnimplementedTransactionServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTransaction not implemented") +} +func (UnimplementedTransactionServer) CalculateFee(context.Context, *CalculateFeeRequest) (*CalculateFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CalculateFee not implemented") +} +func (UnimplementedTransactionServer) BroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method BroadcastTransaction not implemented") +} +func (UnimplementedTransactionServer) GetRawTransaction(context.Context, *GetRawTransactionRequest) (*GetRawTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawTransaction not implemented") +} + +// UnsafeTransactionServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TransactionServer will +// result in compilation errors. +type UnsafeTransactionServer interface { + mustEmbedUnimplementedTransactionServer() +} + +func RegisterTransactionServer(s grpc.ServiceRegistrar, srv TransactionServer) { + s.RegisterService(&Transaction_ServiceDesc, srv) +} + +func _Transaction_GetTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).GetTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Transaction_GetTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).GetTransaction(ctx, req.(*GetTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_CalculateFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CalculateFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).CalculateFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Transaction_CalculateFee_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).CalculateFee(ctx, req.(*CalculateFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_BroadcastTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BroadcastTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).BroadcastTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Transaction_BroadcastTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).BroadcastTransaction(ctx, req.(*BroadcastTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_GetRawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRawTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).GetRawTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Transaction_GetRawTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).GetRawTransaction(ctx, req.(*GetRawTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Transaction_ServiceDesc is the grpc.ServiceDesc for Transaction service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Transaction_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pactus.Transaction", + HandlerType: (*TransactionServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetTransaction", + Handler: _Transaction_GetTransaction_Handler, + }, + { + MethodName: "CalculateFee", + Handler: _Transaction_CalculateFee_Handler, + }, + { + MethodName: "BroadcastTransaction", + Handler: _Transaction_BroadcastTransaction_Handler, + }, + { + MethodName: "GetRawTransaction", + Handler: _Transaction_GetRawTransaction_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "transaction.proto", +} diff --git a/www/grpc/gen/go/transaction_jgw.pb.go b/www/grpc/gen/go/transaction_jgw.pb.go new file mode 100644 index 000000000..c4e6134cf --- /dev/null +++ b/www/grpc/gen/go/transaction_jgw.pb.go @@ -0,0 +1,108 @@ +// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT. +// source: transaction.proto + +/* +Package pactus is a reverse proxy. + +It translates gRPC into JSON-RPC 2.0 +*/ +package pactus + +import ( + "context" + "encoding/json" + + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" +) + +type TransactionJsonRPC struct { + client TransactionClient +} + +type paramsAndHeadersTransaction struct { + Headers metadata.MD `json:"headers,omitempty"` + Params json.RawMessage `json:"params"` +} + +// RegisterTransactionJsonRPC register the grpc client Transaction for json-rpc. +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterTransactionJsonRPC(conn *grpc.ClientConn) *TransactionJsonRPC { + return &TransactionJsonRPC{ + client: NewTransactionClient(conn), + } +} + +func (s *TransactionJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) { + return map[string]func(ctx context.Context, params json.RawMessage) (any, error){ + + "pactus.transaction.get_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetTransactionRequest) + + var jrpcData paramsAndHeadersTransaction + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.transaction.calculate_fee": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(CalculateFeeRequest) + + var jrpcData paramsAndHeadersTransaction + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.CalculateFee(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.transaction.broadcast_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(BroadcastTransactionRequest) + + var jrpcData paramsAndHeadersTransaction + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.BroadcastTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.transaction.get_raw_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetRawTransactionRequest) + + var jrpcData paramsAndHeadersTransaction + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetRawTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + } +} diff --git a/www/grpc/gen/go/utils.cobra.pb.go b/www/grpc/gen/go/utils.cobra.pb.go new file mode 100644 index 000000000..bfda94e23 --- /dev/null +++ b/www/grpc/gen/go/utils.cobra.pb.go @@ -0,0 +1,114 @@ +// Code generated by protoc-gen-cobra. DO NOT EDIT. + +package pactus + +import ( + client "github.com/NathanBaulch/protoc-gen-cobra/client" + flag "github.com/NathanBaulch/protoc-gen-cobra/flag" + iocodec "github.com/NathanBaulch/protoc-gen-cobra/iocodec" + cobra "github.com/spf13/cobra" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func UtilsClientCommand(options ...client.Option) *cobra.Command { + cfg := client.NewConfig(options...) + cmd := &cobra.Command{ + Use: cfg.CommandNamer("Utils"), + Short: "Utils service client", + Long: "Utils service defines RPC methods for utility functions such as message\n signing and verification.", + } + cfg.BindFlags(cmd.PersistentFlags()) + cmd.AddCommand( + _UtilsSignMessageWithPrivateKeyCommand(cfg), + _UtilsVerifyMessageCommand(cfg), + ) + return cmd +} + +func _UtilsSignMessageWithPrivateKeyCommand(cfg *client.Config) *cobra.Command { + req := &SignMessageWithPrivateKeyRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("SignMessageWithPrivateKey"), + Short: "SignMessageWithPrivateKey RPC client", + Long: "SignMessageWithPrivateKey sign message with provided private key.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Utils"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Utils", "SignMessageWithPrivateKey"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewUtilsClient(cc) + v := &SignMessageWithPrivateKeyRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.SignMessageWithPrivateKey(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.PrivateKey, cfg.FlagNamer("PrivateKey"), "", "The private key to sign the message.") + cmd.PersistentFlags().StringVar(&req.Message, cfg.FlagNamer("Message"), "", "The message to sign.") + + return cmd +} + +func _UtilsVerifyMessageCommand(cfg *client.Config) *cobra.Command { + req := &VerifyMessageRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("VerifyMessage"), + Short: "VerifyMessage RPC client", + Long: "VerifyMessage verify signature with public key and message", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Utils"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Utils", "VerifyMessage"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewUtilsClient(cc) + v := &VerifyMessageRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.VerifyMessage(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.Message, cfg.FlagNamer("Message"), "", "The signed message.") + cmd.PersistentFlags().StringVar(&req.Signature, cfg.FlagNamer("Signature"), "", "The signature of the message.") + cmd.PersistentFlags().StringVar(&req.PublicKey, cfg.FlagNamer("PublicKey"), "", "The public key of the signer.") + + return cmd +} diff --git a/www/grpc/gen/go/utils.pb.go b/www/grpc/gen/go/utils.pb.go new file mode 100644 index 000000000..4f38cd6b0 --- /dev/null +++ b/www/grpc/gen/go/utils.pb.go @@ -0,0 +1,394 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: utils.proto + +package pactus + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Request message for sign message with private key. +type SignMessageWithPrivateKeyRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The private key to sign the message. + PrivateKey string `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"` + // The message to sign. + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *SignMessageWithPrivateKeyRequest) Reset() { + *x = SignMessageWithPrivateKeyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignMessageWithPrivateKeyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignMessageWithPrivateKeyRequest) ProtoMessage() {} + +func (x *SignMessageWithPrivateKeyRequest) ProtoReflect() protoreflect.Message { + mi := &file_utils_proto_msgTypes[0] + 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 SignMessageWithPrivateKeyRequest.ProtoReflect.Descriptor instead. +func (*SignMessageWithPrivateKeyRequest) Descriptor() ([]byte, []int) { + return file_utils_proto_rawDescGZIP(), []int{0} +} + +func (x *SignMessageWithPrivateKeyRequest) GetPrivateKey() string { + if x != nil { + return x.PrivateKey + } + return "" +} + +func (x *SignMessageWithPrivateKeyRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Response message containing the generated signature. +type SignMessageWithPrivateKeyResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The signature of the message. + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *SignMessageWithPrivateKeyResponse) Reset() { + *x = SignMessageWithPrivateKeyResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignMessageWithPrivateKeyResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignMessageWithPrivateKeyResponse) ProtoMessage() {} + +func (x *SignMessageWithPrivateKeyResponse) ProtoReflect() protoreflect.Message { + mi := &file_utils_proto_msgTypes[1] + 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 SignMessageWithPrivateKeyResponse.ProtoReflect.Descriptor instead. +func (*SignMessageWithPrivateKeyResponse) Descriptor() ([]byte, []int) { + return file_utils_proto_rawDescGZIP(), []int{1} +} + +func (x *SignMessageWithPrivateKeyResponse) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +// Request message for verifying a message signature. +type VerifyMessageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The signed message. + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + // The signature of the message. + Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + // The public key of the signer. + PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (x *VerifyMessageRequest) Reset() { + *x = VerifyMessageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VerifyMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyMessageRequest) ProtoMessage() {} + +func (x *VerifyMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_utils_proto_msgTypes[2] + 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 VerifyMessageRequest.ProtoReflect.Descriptor instead. +func (*VerifyMessageRequest) Descriptor() ([]byte, []int) { + return file_utils_proto_rawDescGZIP(), []int{2} +} + +func (x *VerifyMessageRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *VerifyMessageRequest) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +func (x *VerifyMessageRequest) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +// Response message containing the resualt of validation of signature and message. +type VerifyMessageResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates if the signature is valid (true) or not (false). + IsValid bool `protobuf:"varint,1,opt,name=is_valid,json=isValid,proto3" json:"is_valid,omitempty"` +} + +func (x *VerifyMessageResponse) Reset() { + *x = VerifyMessageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utils_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VerifyMessageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VerifyMessageResponse) ProtoMessage() {} + +func (x *VerifyMessageResponse) ProtoReflect() protoreflect.Message { + mi := &file_utils_proto_msgTypes[3] + 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 VerifyMessageResponse.ProtoReflect.Descriptor instead. +func (*VerifyMessageResponse) Descriptor() ([]byte, []int) { + return file_utils_proto_rawDescGZIP(), []int{3} +} + +func (x *VerifyMessageResponse) GetIsValid() bool { + if x != nil { + return x.IsValid + } + return false +} + +var File_utils_proto protoreflect.FileDescriptor + +var file_utils_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x75, 0x74, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x22, 0x5d, 0x0a, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x22, 0x41, 0x0a, 0x21, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x6d, 0x0a, 0x14, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x32, 0x0a, 0x15, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x69, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x32, 0xc7, 0x01, 0x0a, 0x05, 0x55, + 0x74, 0x69, 0x6c, 0x73, 0x12, 0x70, 0x0a, 0x19, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x57, 0x69, 0x74, 0x68, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x40, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x75, + 0x74, 0x69, 0x6c, 0x73, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_utils_proto_rawDescOnce sync.Once + file_utils_proto_rawDescData = file_utils_proto_rawDesc +) + +func file_utils_proto_rawDescGZIP() []byte { + file_utils_proto_rawDescOnce.Do(func() { + file_utils_proto_rawDescData = protoimpl.X.CompressGZIP(file_utils_proto_rawDescData) + }) + return file_utils_proto_rawDescData +} + +var file_utils_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_utils_proto_goTypes = []any{ + (*SignMessageWithPrivateKeyRequest)(nil), // 0: pactus.SignMessageWithPrivateKeyRequest + (*SignMessageWithPrivateKeyResponse)(nil), // 1: pactus.SignMessageWithPrivateKeyResponse + (*VerifyMessageRequest)(nil), // 2: pactus.VerifyMessageRequest + (*VerifyMessageResponse)(nil), // 3: pactus.VerifyMessageResponse +} +var file_utils_proto_depIdxs = []int32{ + 0, // 0: pactus.Utils.SignMessageWithPrivateKey:input_type -> pactus.SignMessageWithPrivateKeyRequest + 2, // 1: pactus.Utils.VerifyMessage:input_type -> pactus.VerifyMessageRequest + 1, // 2: pactus.Utils.SignMessageWithPrivateKey:output_type -> pactus.SignMessageWithPrivateKeyResponse + 3, // 3: pactus.Utils.VerifyMessage:output_type -> pactus.VerifyMessageResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_utils_proto_init() } +func file_utils_proto_init() { + if File_utils_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_utils_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*SignMessageWithPrivateKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utils_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*SignMessageWithPrivateKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utils_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*VerifyMessageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utils_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*VerifyMessageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utils_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_utils_proto_goTypes, + DependencyIndexes: file_utils_proto_depIdxs, + MessageInfos: file_utils_proto_msgTypes, + }.Build() + File_utils_proto = out.File + file_utils_proto_rawDesc = nil + file_utils_proto_goTypes = nil + file_utils_proto_depIdxs = nil +} diff --git a/www/grpc/gen/go/utils.pb.gw.go b/www/grpc/gen/go/utils.pb.gw.go new file mode 100644 index 000000000..b39071861 --- /dev/null +++ b/www/grpc/gen/go/utils.pb.gw.go @@ -0,0 +1,260 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: utils.proto + +/* +Package pactus is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package pactus + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_Utils_SignMessageWithPrivateKey_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Utils_SignMessageWithPrivateKey_0(ctx context.Context, marshaler runtime.Marshaler, client UtilsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SignMessageWithPrivateKeyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Utils_SignMessageWithPrivateKey_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SignMessageWithPrivateKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Utils_SignMessageWithPrivateKey_0(ctx context.Context, marshaler runtime.Marshaler, server UtilsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SignMessageWithPrivateKeyRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Utils_SignMessageWithPrivateKey_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SignMessageWithPrivateKey(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Utils_VerifyMessage_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Utils_VerifyMessage_0(ctx context.Context, marshaler runtime.Marshaler, client UtilsClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq VerifyMessageRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Utils_VerifyMessage_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.VerifyMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Utils_VerifyMessage_0(ctx context.Context, marshaler runtime.Marshaler, server UtilsServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq VerifyMessageRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Utils_VerifyMessage_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.VerifyMessage(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterUtilsHandlerServer registers the http handlers for service Utils to "mux". +// UnaryRPC :call UtilsServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUtilsHandlerFromEndpoint instead. +func RegisterUtilsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UtilsServer) error { + + mux.Handle("GET", pattern_Utils_SignMessageWithPrivateKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Utils/SignMessageWithPrivateKey", runtime.WithHTTPPathPattern("/pactus/Utils/sign_message_with_private_key")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Utils_SignMessageWithPrivateKey_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Utils_SignMessageWithPrivateKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Utils_VerifyMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Utils/VerifyMessage", runtime.WithHTTPPathPattern("/pactus/Utils/verify_message")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Utils_VerifyMessage_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Utils_VerifyMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterUtilsHandlerFromEndpoint is same as RegisterUtilsHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterUtilsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterUtilsHandler(ctx, mux, conn) +} + +// RegisterUtilsHandler registers the http handlers for service Utils to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterUtilsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterUtilsHandlerClient(ctx, mux, NewUtilsClient(conn)) +} + +// RegisterUtilsHandlerClient registers the http handlers for service Utils +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UtilsClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UtilsClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "UtilsClient" to call the correct interceptors. +func RegisterUtilsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UtilsClient) error { + + mux.Handle("GET", pattern_Utils_SignMessageWithPrivateKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Utils/SignMessageWithPrivateKey", runtime.WithHTTPPathPattern("/pactus/Utils/sign_message_with_private_key")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Utils_SignMessageWithPrivateKey_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Utils_SignMessageWithPrivateKey_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Utils_VerifyMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Utils/VerifyMessage", runtime.WithHTTPPathPattern("/pactus/Utils/verify_message")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Utils_VerifyMessage_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Utils_VerifyMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Utils_SignMessageWithPrivateKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "Utils", "sign_message_with_private_key"}, "")) + + pattern_Utils_VerifyMessage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "Utils", "verify_message"}, "")) +) + +var ( + forward_Utils_SignMessageWithPrivateKey_0 = runtime.ForwardResponseMessage + + forward_Utils_VerifyMessage_0 = runtime.ForwardResponseMessage +) diff --git a/www/grpc/gen/go/utils_grpc.pb.go b/www/grpc/gen/go/utils_grpc.pb.go new file mode 100644 index 000000000..623487c1a --- /dev/null +++ b/www/grpc/gen/go/utils_grpc.pb.go @@ -0,0 +1,156 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: utils.proto + +package pactus + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Utils_SignMessageWithPrivateKey_FullMethodName = "/pactus.Utils/SignMessageWithPrivateKey" + Utils_VerifyMessage_FullMethodName = "/pactus.Utils/VerifyMessage" +) + +// UtilsClient is the client API for Utils 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. +// +// Utils service defines RPC methods for utility functions such as message +// signing and verification. +type UtilsClient interface { + // SignMessageWithPrivateKey sign message with provided private key. + SignMessageWithPrivateKey(ctx context.Context, in *SignMessageWithPrivateKeyRequest, opts ...grpc.CallOption) (*SignMessageWithPrivateKeyResponse, error) + // VerifyMessage verify signature with public key and message + VerifyMessage(ctx context.Context, in *VerifyMessageRequest, opts ...grpc.CallOption) (*VerifyMessageResponse, error) +} + +type utilsClient struct { + cc grpc.ClientConnInterface +} + +func NewUtilsClient(cc grpc.ClientConnInterface) UtilsClient { + return &utilsClient{cc} +} + +func (c *utilsClient) SignMessageWithPrivateKey(ctx context.Context, in *SignMessageWithPrivateKeyRequest, opts ...grpc.CallOption) (*SignMessageWithPrivateKeyResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SignMessageWithPrivateKeyResponse) + err := c.cc.Invoke(ctx, Utils_SignMessageWithPrivateKey_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *utilsClient) VerifyMessage(ctx context.Context, in *VerifyMessageRequest, opts ...grpc.CallOption) (*VerifyMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(VerifyMessageResponse) + err := c.cc.Invoke(ctx, Utils_VerifyMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// UtilsServer is the server API for Utils service. +// All implementations should embed UnimplementedUtilsServer +// for forward compatibility +// +// Utils service defines RPC methods for utility functions such as message +// signing and verification. +type UtilsServer interface { + // SignMessageWithPrivateKey sign message with provided private key. + SignMessageWithPrivateKey(context.Context, *SignMessageWithPrivateKeyRequest) (*SignMessageWithPrivateKeyResponse, error) + // VerifyMessage verify signature with public key and message + VerifyMessage(context.Context, *VerifyMessageRequest) (*VerifyMessageResponse, error) +} + +// UnimplementedUtilsServer should be embedded to have forward compatible implementations. +type UnimplementedUtilsServer struct { +} + +func (UnimplementedUtilsServer) SignMessageWithPrivateKey(context.Context, *SignMessageWithPrivateKeyRequest) (*SignMessageWithPrivateKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignMessageWithPrivateKey not implemented") +} +func (UnimplementedUtilsServer) VerifyMessage(context.Context, *VerifyMessageRequest) (*VerifyMessageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VerifyMessage not implemented") +} + +// UnsafeUtilsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to UtilsServer will +// result in compilation errors. +type UnsafeUtilsServer interface { + mustEmbedUnimplementedUtilsServer() +} + +func RegisterUtilsServer(s grpc.ServiceRegistrar, srv UtilsServer) { + s.RegisterService(&Utils_ServiceDesc, srv) +} + +func _Utils_SignMessageWithPrivateKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignMessageWithPrivateKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UtilsServer).SignMessageWithPrivateKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Utils_SignMessageWithPrivateKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UtilsServer).SignMessageWithPrivateKey(ctx, req.(*SignMessageWithPrivateKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Utils_VerifyMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(VerifyMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UtilsServer).VerifyMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Utils_VerifyMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UtilsServer).VerifyMessage(ctx, req.(*VerifyMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Utils_ServiceDesc is the grpc.ServiceDesc for Utils service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Utils_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pactus.Utils", + HandlerType: (*UtilsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SignMessageWithPrivateKey", + Handler: _Utils_SignMessageWithPrivateKey_Handler, + }, + { + MethodName: "VerifyMessage", + Handler: _Utils_VerifyMessage_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "utils.proto", +} diff --git a/www/grpc/gen/go/utils_jgw.pb.go b/www/grpc/gen/go/utils_jgw.pb.go new file mode 100644 index 000000000..5ac60b199 --- /dev/null +++ b/www/grpc/gen/go/utils_jgw.pb.go @@ -0,0 +1,74 @@ +// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT. +// source: utils.proto + +/* +Package pactus is a reverse proxy. + +It translates gRPC into JSON-RPC 2.0 +*/ +package pactus + +import ( + "context" + "encoding/json" + + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" +) + +type UtilsJsonRPC struct { + client UtilsClient +} + +type paramsAndHeadersUtils struct { + Headers metadata.MD `json:"headers,omitempty"` + Params json.RawMessage `json:"params"` +} + +// RegisterUtilsJsonRPC register the grpc client Utils for json-rpc. +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterUtilsJsonRPC(conn *grpc.ClientConn) *UtilsJsonRPC { + return &UtilsJsonRPC{ + client: NewUtilsClient(conn), + } +} + +func (s *UtilsJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) { + return map[string]func(ctx context.Context, params json.RawMessage) (any, error){ + + "pactus.utils.sign_message_with_private_key": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(SignMessageWithPrivateKeyRequest) + + var jrpcData paramsAndHeadersUtils + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.SignMessageWithPrivateKey(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.utils.verify_message": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(VerifyMessageRequest) + + var jrpcData paramsAndHeadersUtils + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.VerifyMessage(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + } +} diff --git a/www/grpc/gen/go/wallet.cobra.pb.go b/www/grpc/gen/go/wallet.cobra.pb.go new file mode 100644 index 000000000..82df0534d --- /dev/null +++ b/www/grpc/gen/go/wallet.cobra.pb.go @@ -0,0 +1,467 @@ +// Code generated by protoc-gen-cobra. DO NOT EDIT. + +package pactus + +import ( + client "github.com/NathanBaulch/protoc-gen-cobra/client" + flag "github.com/NathanBaulch/protoc-gen-cobra/flag" + iocodec "github.com/NathanBaulch/protoc-gen-cobra/iocodec" + cobra "github.com/spf13/cobra" + grpc "google.golang.org/grpc" + proto "google.golang.org/protobuf/proto" +) + +func WalletClientCommand(options ...client.Option) *cobra.Command { + cfg := client.NewConfig(options...) + cmd := &cobra.Command{ + Use: cfg.CommandNamer("Wallet"), + Short: "Wallet service client", + Long: "Define the Wallet service with various RPC methods for wallet management.", + } + cfg.BindFlags(cmd.PersistentFlags()) + cmd.AddCommand( + _WalletCreateWalletCommand(cfg), + _WalletRestoreWalletCommand(cfg), + _WalletLoadWalletCommand(cfg), + _WalletUnloadWalletCommand(cfg), + _WalletGetTotalBalanceCommand(cfg), + _WalletSignRawTransactionCommand(cfg), + _WalletGetValidatorAddressCommand(cfg), + _WalletGetNewAddressCommand(cfg), + _WalletGetAddressHistoryCommand(cfg), + _WalletSignMessageCommand(cfg), + ) + return cmd +} + +func _WalletCreateWalletCommand(cfg *client.Config) *cobra.Command { + req := &CreateWalletRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("CreateWallet"), + Short: "CreateWallet RPC client", + Long: "CreateWallet creates a new wallet with the specified parameters.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "CreateWallet"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewWalletClient(cc) + v := &CreateWalletRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.CreateWallet(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the new wallet.") + cmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer("Password"), "", "The password for securing the wallet.") + + return cmd +} + +func _WalletRestoreWalletCommand(cfg *client.Config) *cobra.Command { + req := &RestoreWalletRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("RestoreWallet"), + Short: "RestoreWallet RPC client", + Long: "RestoreWallet restores an existing wallet with the given mnemonic.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "RestoreWallet"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewWalletClient(cc) + v := &RestoreWalletRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.RestoreWallet(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet to restore.") + cmd.PersistentFlags().StringVar(&req.Mnemonic, cfg.FlagNamer("Mnemonic"), "", "The mnemonic for wallet recovery.") + cmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer("Password"), "", "The password for securing the wallet.") + + return cmd +} + +func _WalletLoadWalletCommand(cfg *client.Config) *cobra.Command { + req := &LoadWalletRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("LoadWallet"), + Short: "LoadWallet RPC client", + Long: "LoadWallet loads an existing wallet with the given name.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "LoadWallet"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewWalletClient(cc) + v := &LoadWalletRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.LoadWallet(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet to load.") + + return cmd +} + +func _WalletUnloadWalletCommand(cfg *client.Config) *cobra.Command { + req := &UnloadWalletRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("UnloadWallet"), + Short: "UnloadWallet RPC client", + Long: "UnloadWallet unloads a currently loaded wallet with the specified name.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "UnloadWallet"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewWalletClient(cc) + v := &UnloadWalletRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.UnloadWallet(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet to unload.") + + return cmd +} + +func _WalletGetTotalBalanceCommand(cfg *client.Config) *cobra.Command { + req := &GetTotalBalanceRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetTotalBalance"), + Short: "GetTotalBalance RPC client", + Long: "GetTotalBalance returns the total available balance of the wallet.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "GetTotalBalance"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewWalletClient(cc) + v := &GetTotalBalanceRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetTotalBalance(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet to get the total balance.") + + return cmd +} + +func _WalletSignRawTransactionCommand(cfg *client.Config) *cobra.Command { + req := &SignRawTransactionRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("SignRawTransaction"), + Short: "SignRawTransaction RPC client", + Long: "SignRawTransaction signs a raw transaction for a specified wallet.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "SignRawTransaction"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewWalletClient(cc) + v := &SignRawTransactionRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.SignRawTransaction(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet used for signing.") + cmd.PersistentFlags().StringVar(&req.RawTransaction, cfg.FlagNamer("RawTransaction"), "", "The raw transaction data to be signed.") + cmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer("Password"), "", "The password for unlocking the wallet for signing.") + + return cmd +} + +func _WalletGetValidatorAddressCommand(cfg *client.Config) *cobra.Command { + req := &GetValidatorAddressRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetValidatorAddress"), + Short: "GetValidatorAddress RPC client", + Long: "GetValidatorAddress retrieves the validator address associated with a\n public key.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "GetValidatorAddress"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewWalletClient(cc) + v := &GetValidatorAddressRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetValidatorAddress(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.PublicKey, cfg.FlagNamer("PublicKey"), "", "The public key for which the validator address is requested.") + + return cmd +} + +func _WalletGetNewAddressCommand(cfg *client.Config) *cobra.Command { + req := &GetNewAddressRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetNewAddress"), + Short: "GetNewAddress RPC client", + Long: "GetNewAddress generates a new address for the specified wallet.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "GetNewAddress"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewWalletClient(cc) + v := &GetNewAddressRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetNewAddress(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet to generate a new address.") + flag.EnumVar(cmd.PersistentFlags(), &req.AddressType, cfg.FlagNamer("AddressType"), "The type of address to generate.") + cmd.PersistentFlags().StringVar(&req.Label, cfg.FlagNamer("Label"), "", "A label for the new address.") + cmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer("Password"), "", "Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.") + + return cmd +} + +func _WalletGetAddressHistoryCommand(cfg *client.Config) *cobra.Command { + req := &GetAddressHistoryRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetAddressHistory"), + Short: "GetAddressHistory RPC client", + Long: "GetAddressHistory retrieves the transaction history of an address.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "GetAddressHistory"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewWalletClient(cc) + v := &GetAddressHistoryRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetAddressHistory(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet.") + cmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer("Address"), "", "The address to retrieve the transaction history for.") + + return cmd +} + +func _WalletSignMessageCommand(cfg *client.Config) *cobra.Command { + req := &SignMessageRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("SignMessage"), + Short: "SignMessage RPC client", + Long: "SignMessage signs an arbitrary message.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Wallet", "SignMessage"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewWalletClient(cc) + v := &SignMessageRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.SignMessage(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().StringVar(&req.WalletName, cfg.FlagNamer("WalletName"), "", "The name of the wallet.") + cmd.PersistentFlags().StringVar(&req.Password, cfg.FlagNamer("Password"), "", "The password for unlocking the wallet for signing.") + cmd.PersistentFlags().StringVar(&req.Address, cfg.FlagNamer("Address"), "", "The account address associated with the private key.") + cmd.PersistentFlags().StringVar(&req.Message, cfg.FlagNamer("Message"), "", "The arbitrary message to be signed.") + + return cmd +} diff --git a/www/grpc/gen/go/wallet.pb.go b/www/grpc/gen/go/wallet.pb.go new file mode 100644 index 000000000..b57a7a9c6 --- /dev/null +++ b/www/grpc/gen/go/wallet.pb.go @@ -0,0 +1,1919 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.34.2 +// protoc (unknown) +// source: wallet.proto + +// Define the package and Go package path for the generated code. + +package pactus + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Enum for the address type. +type AddressType int32 + +const ( + // Treasury address type. + // Should not be used to generate new addresses. + AddressType_ADDRESS_TYPE_TREASURY AddressType = 0 + // Validator address type. + AddressType_ADDRESS_TYPE_VALIDATOR AddressType = 1 + // Account address type with BLS signature scheme. + AddressType_ADDRESS_TYPE_BLS_ACCOUNT AddressType = 2 + // Account address type with Ed25519 signature scheme. + // Note: Generating a new Ed25519 address requires the wallet password. + AddressType_ADDRESS_TYPE_ED25519_ACCOUNT AddressType = 3 +) + +// Enum value maps for AddressType. +var ( + AddressType_name = map[int32]string{ + 0: "ADDRESS_TYPE_TREASURY", + 1: "ADDRESS_TYPE_VALIDATOR", + 2: "ADDRESS_TYPE_BLS_ACCOUNT", + 3: "ADDRESS_TYPE_ED25519_ACCOUNT", + } + AddressType_value = map[string]int32{ + "ADDRESS_TYPE_TREASURY": 0, + "ADDRESS_TYPE_VALIDATOR": 1, + "ADDRESS_TYPE_BLS_ACCOUNT": 2, + "ADDRESS_TYPE_ED25519_ACCOUNT": 3, + } +) + +func (x AddressType) Enum() *AddressType { + p := new(AddressType) + *p = x + return p +} + +func (x AddressType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AddressType) Descriptor() protoreflect.EnumDescriptor { + return file_wallet_proto_enumTypes[0].Descriptor() +} + +func (AddressType) Type() protoreflect.EnumType { + return &file_wallet_proto_enumTypes[0] +} + +func (x AddressType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AddressType.Descriptor instead. +func (AddressType) EnumDescriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{0} +} + +// Message containing address information. +type AddressInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address string. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The public key associated with the address. + PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // A label associated with the address. + Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` + // The Hierarchical Deterministic path of the address within the wallet. + Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *AddressInfo) Reset() { + *x = AddressInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddressInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddressInfo) ProtoMessage() {} + +func (x *AddressInfo) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[0] + 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 AddressInfo.ProtoReflect.Descriptor instead. +func (*AddressInfo) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{0} +} + +func (x *AddressInfo) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *AddressInfo) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *AddressInfo) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *AddressInfo) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +// Message containing transaction history information for an address. +type HistoryInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The transaction ID hash. + TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + // The timestamp of the transaction. + Time uint32 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"` + // The payload type of the transaction. + PayloadType string `protobuf:"bytes,3,opt,name=payload_type,json=payloadType,proto3" json:"payload_type,omitempty"` + // A description of the transaction. + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // The amount involved in the transaction. + Amount int64 `protobuf:"varint,5,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *HistoryInfo) Reset() { + *x = HistoryInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HistoryInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HistoryInfo) ProtoMessage() {} + +func (x *HistoryInfo) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[1] + 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 HistoryInfo.ProtoReflect.Descriptor instead. +func (*HistoryInfo) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{1} +} + +func (x *HistoryInfo) GetTransactionId() string { + if x != nil { + return x.TransactionId + } + return "" +} + +func (x *HistoryInfo) GetTime() uint32 { + if x != nil { + return x.Time + } + return 0 +} + +func (x *HistoryInfo) GetPayloadType() string { + if x != nil { + return x.PayloadType + } + return "" +} + +func (x *HistoryInfo) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *HistoryInfo) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +// Request message to get an address transaction history. +type GetAddressHistoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the wallet. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` + // The address to retrieve the transaction history for. + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *GetAddressHistoryRequest) Reset() { + *x = GetAddressHistoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAddressHistoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAddressHistoryRequest) ProtoMessage() {} + +func (x *GetAddressHistoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[2] + 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 GetAddressHistoryRequest.ProtoReflect.Descriptor instead. +func (*GetAddressHistoryRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{2} +} + +func (x *GetAddressHistoryRequest) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +func (x *GetAddressHistoryRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// Response message containing the address transaction history. +type GetAddressHistoryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Array of history information for the address. + HistoryInfo []*HistoryInfo `protobuf:"bytes,1,rep,name=history_info,json=historyInfo,proto3" json:"history_info,omitempty"` +} + +func (x *GetAddressHistoryResponse) Reset() { + *x = GetAddressHistoryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAddressHistoryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAddressHistoryResponse) ProtoMessage() {} + +func (x *GetAddressHistoryResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[3] + 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 GetAddressHistoryResponse.ProtoReflect.Descriptor instead. +func (*GetAddressHistoryResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{3} +} + +func (x *GetAddressHistoryResponse) GetHistoryInfo() []*HistoryInfo { + if x != nil { + return x.HistoryInfo + } + return nil +} + +// Request message for generating a new address. +type GetNewAddressRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the wallet to generate a new address. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` + // The type of address to generate. + AddressType AddressType `protobuf:"varint,2,opt,name=address_type,json=addressType,proto3,enum=pactus.AddressType" json:"address_type,omitempty"` + // A label for the new address. + Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"` + // Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` +} + +func (x *GetNewAddressRequest) Reset() { + *x = GetNewAddressRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNewAddressRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNewAddressRequest) ProtoMessage() {} + +func (x *GetNewAddressRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[4] + 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 GetNewAddressRequest.ProtoReflect.Descriptor instead. +func (*GetNewAddressRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{4} +} + +func (x *GetNewAddressRequest) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +func (x *GetNewAddressRequest) GetAddressType() AddressType { + if x != nil { + return x.AddressType + } + return AddressType_ADDRESS_TYPE_TREASURY +} + +func (x *GetNewAddressRequest) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *GetNewAddressRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +// Response message containing the newly generated address. +type GetNewAddressResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the wallet from which the address is generated. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` + // Information about the newly generated address. + AddressInfo *AddressInfo `protobuf:"bytes,2,opt,name=address_info,json=addressInfo,proto3" json:"address_info,omitempty"` +} + +func (x *GetNewAddressResponse) Reset() { + *x = GetNewAddressResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNewAddressResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNewAddressResponse) ProtoMessage() {} + +func (x *GetNewAddressResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[5] + 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 GetNewAddressResponse.ProtoReflect.Descriptor instead. +func (*GetNewAddressResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{5} +} + +func (x *GetNewAddressResponse) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +func (x *GetNewAddressResponse) GetAddressInfo() *AddressInfo { + if x != nil { + return x.AddressInfo + } + return nil +} + +// Request message for restoring an existing wallet. +type RestoreWalletRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the wallet to restore. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` + // The mnemonic for wallet recovery. + Mnemonic string `protobuf:"bytes,2,opt,name=mnemonic,proto3" json:"mnemonic,omitempty"` + // The password for securing the wallet. + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` +} + +func (x *RestoreWalletRequest) Reset() { + *x = RestoreWalletRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestoreWalletRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreWalletRequest) ProtoMessage() {} + +func (x *RestoreWalletRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[6] + 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 RestoreWalletRequest.ProtoReflect.Descriptor instead. +func (*RestoreWalletRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{6} +} + +func (x *RestoreWalletRequest) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +func (x *RestoreWalletRequest) GetMnemonic() string { + if x != nil { + return x.Mnemonic + } + return "" +} + +func (x *RestoreWalletRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +// Response message containing the name of the restored wallet. +type RestoreWalletResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the restored wallet. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` +} + +func (x *RestoreWalletResponse) Reset() { + *x = RestoreWalletResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestoreWalletResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreWalletResponse) ProtoMessage() {} + +func (x *RestoreWalletResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[7] + 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 RestoreWalletResponse.ProtoReflect.Descriptor instead. +func (*RestoreWalletResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{7} +} + +func (x *RestoreWalletResponse) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +// Request message for creating a new wallet. +type CreateWalletRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the new wallet. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` + // The password for securing the wallet. + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` +} + +func (x *CreateWalletRequest) Reset() { + *x = CreateWalletRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWalletRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWalletRequest) ProtoMessage() {} + +func (x *CreateWalletRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[8] + 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 CreateWalletRequest.ProtoReflect.Descriptor instead. +func (*CreateWalletRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{8} +} + +func (x *CreateWalletRequest) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +func (x *CreateWalletRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +// Response message containing the mnemonic for wallet recovery. +type CreateWalletResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The mnemonic for wallet recovery. + Mnemonic string `protobuf:"bytes,2,opt,name=mnemonic,proto3" json:"mnemonic,omitempty"` +} + +func (x *CreateWalletResponse) Reset() { + *x = CreateWalletResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateWalletResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateWalletResponse) ProtoMessage() {} + +func (x *CreateWalletResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[9] + 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 CreateWalletResponse.ProtoReflect.Descriptor instead. +func (*CreateWalletResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateWalletResponse) GetMnemonic() string { + if x != nil { + return x.Mnemonic + } + return "" +} + +// Request message for loading an existing wallet. +type LoadWalletRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the wallet to load. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` +} + +func (x *LoadWalletRequest) Reset() { + *x = LoadWalletRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoadWalletRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadWalletRequest) ProtoMessage() {} + +func (x *LoadWalletRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[10] + 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 LoadWalletRequest.ProtoReflect.Descriptor instead. +func (*LoadWalletRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{10} +} + +func (x *LoadWalletRequest) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +// Response message containing the name of the loaded wallet. +type LoadWalletResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the loaded wallet. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` +} + +func (x *LoadWalletResponse) Reset() { + *x = LoadWalletResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoadWalletResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadWalletResponse) ProtoMessage() {} + +func (x *LoadWalletResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[11] + 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 LoadWalletResponse.ProtoReflect.Descriptor instead. +func (*LoadWalletResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{11} +} + +func (x *LoadWalletResponse) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +// Request message for unloading a currently loaded wallet. +type UnloadWalletRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the wallet to unload. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` +} + +func (x *UnloadWalletRequest) Reset() { + *x = UnloadWalletRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnloadWalletRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnloadWalletRequest) ProtoMessage() {} + +func (x *UnloadWalletRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[12] + 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 UnloadWalletRequest.ProtoReflect.Descriptor instead. +func (*UnloadWalletRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{12} +} + +func (x *UnloadWalletRequest) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +// Response message containing the name of the unloaded wallet. +type UnloadWalletResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the unloaded wallet. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` +} + +func (x *UnloadWalletResponse) Reset() { + *x = UnloadWalletResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnloadWalletResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnloadWalletResponse) ProtoMessage() {} + +func (x *UnloadWalletResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[13] + 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 UnloadWalletResponse.ProtoReflect.Descriptor instead. +func (*UnloadWalletResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{13} +} + +func (x *UnloadWalletResponse) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +// Request message for obtaining the validator address associated with a public +// key. +type GetValidatorAddressRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The public key for which the validator address is requested. + PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (x *GetValidatorAddressRequest) Reset() { + *x = GetValidatorAddressRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetValidatorAddressRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetValidatorAddressRequest) ProtoMessage() {} + +func (x *GetValidatorAddressRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[14] + 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 GetValidatorAddressRequest.ProtoReflect.Descriptor instead. +func (*GetValidatorAddressRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{14} +} + +func (x *GetValidatorAddressRequest) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +// Response message containing the validator address corresponding to a public +// key. +type GetValidatorAddressResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The validator address associated with the public key. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *GetValidatorAddressResponse) Reset() { + *x = GetValidatorAddressResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetValidatorAddressResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetValidatorAddressResponse) ProtoMessage() {} + +func (x *GetValidatorAddressResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[15] + 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 GetValidatorAddressResponse.ProtoReflect.Descriptor instead. +func (*GetValidatorAddressResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{15} +} + +func (x *GetValidatorAddressResponse) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +// Request message for signing a raw transaction. +type SignRawTransactionRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the wallet used for signing. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` + // The raw transaction data to be signed. + RawTransaction string `protobuf:"bytes,2,opt,name=raw_transaction,json=rawTransaction,proto3" json:"raw_transaction,omitempty"` + // The password for unlocking the wallet for signing. + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` +} + +func (x *SignRawTransactionRequest) Reset() { + *x = SignRawTransactionRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignRawTransactionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignRawTransactionRequest) ProtoMessage() {} + +func (x *SignRawTransactionRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[16] + 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 SignRawTransactionRequest.ProtoReflect.Descriptor instead. +func (*SignRawTransactionRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{16} +} + +func (x *SignRawTransactionRequest) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +func (x *SignRawTransactionRequest) GetRawTransaction() string { + if x != nil { + return x.RawTransaction + } + return "" +} + +func (x *SignRawTransactionRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +// Response message containing the transaction ID and signed raw transaction. +type SignRawTransactionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The ID of the signed transaction. + TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + // The signed raw transaction data. + SignedRawTransaction string `protobuf:"bytes,2,opt,name=signed_raw_transaction,json=signedRawTransaction,proto3" json:"signed_raw_transaction,omitempty"` +} + +func (x *SignRawTransactionResponse) Reset() { + *x = SignRawTransactionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignRawTransactionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignRawTransactionResponse) ProtoMessage() {} + +func (x *SignRawTransactionResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[17] + 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 SignRawTransactionResponse.ProtoReflect.Descriptor instead. +func (*SignRawTransactionResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{17} +} + +func (x *SignRawTransactionResponse) GetTransactionId() string { + if x != nil { + return x.TransactionId + } + return "" +} + +func (x *SignRawTransactionResponse) GetSignedRawTransaction() string { + if x != nil { + return x.SignedRawTransaction + } + return "" +} + +// Request message for obtaining the available balance of a wallet. +type GetTotalBalanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the wallet to get the total balance. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` +} + +func (x *GetTotalBalanceRequest) Reset() { + *x = GetTotalBalanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTotalBalanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTotalBalanceRequest) ProtoMessage() {} + +func (x *GetTotalBalanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_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 GetTotalBalanceRequest.ProtoReflect.Descriptor instead. +func (*GetTotalBalanceRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{18} +} + +func (x *GetTotalBalanceRequest) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +// Response message containing the available balance of the wallet. +type GetTotalBalanceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the wallet. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` + // The total balance of the wallet in NanoPAC. + TotalBalance int64 `protobuf:"varint,2,opt,name=total_balance,json=totalBalance,proto3" json:"total_balance,omitempty"` +} + +func (x *GetTotalBalanceResponse) Reset() { + *x = GetTotalBalanceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetTotalBalanceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetTotalBalanceResponse) ProtoMessage() {} + +func (x *GetTotalBalanceResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[19] + 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 GetTotalBalanceResponse.ProtoReflect.Descriptor instead. +func (*GetTotalBalanceResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{19} +} + +func (x *GetTotalBalanceResponse) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +func (x *GetTotalBalanceResponse) GetTotalBalance() int64 { + if x != nil { + return x.TotalBalance + } + return 0 +} + +// Request message to sign an arbitrary message. +type SignMessageRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the wallet. + WalletName string `protobuf:"bytes,1,opt,name=wallet_name,json=walletName,proto3" json:"wallet_name,omitempty"` + // The password for unlocking the wallet for signing. + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + // The account address associated with the private key. + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + // The arbitrary message to be signed. + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *SignMessageRequest) Reset() { + *x = SignMessageRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignMessageRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignMessageRequest) ProtoMessage() {} + +func (x *SignMessageRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[20] + 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 SignMessageRequest.ProtoReflect.Descriptor instead. +func (*SignMessageRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{20} +} + +func (x *SignMessageRequest) GetWalletName() string { + if x != nil { + return x.WalletName + } + return "" +} + +func (x *SignMessageRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *SignMessageRequest) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *SignMessageRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +// Response message containing the available balance of the wallet. +type SignMessageResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Signature of the message. + Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` +} + +func (x *SignMessageResponse) Reset() { + *x = SignMessageResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_wallet_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SignMessageResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SignMessageResponse) ProtoMessage() {} + +func (x *SignMessageResponse) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[21] + 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 SignMessageResponse.ProtoReflect.Descriptor instead. +func (*SignMessageResponse) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{21} +} + +func (x *SignMessageResponse) GetSignature() string { + if x != nil { + return x.Signature + } + return "" +} + +var File_wallet_proto protoreflect.FileDescriptor + +var file_wallet_proto_rawDesc = []byte{ + 0x0a, 0x0c, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x1a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x70, 0x0a, 0x0b, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0xa5, 0x01, 0x0a, 0x0b, + 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x22, 0x55, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x53, 0x0a, 0x19, 0x47, 0x65, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x68, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x0b, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x22, + 0xa1, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x22, 0x70, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x0a, + 0x0c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x6f, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x38, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x22, 0x52, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x22, 0x32, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6d, 0x6e, 0x65, 0x6d, 0x6f, 0x6e, 0x69, 0x63, 0x22, 0x34, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x35, + 0x0a, 0x12, 0x4c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x36, 0x0a, 0x13, 0x55, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x37, 0x0a, + 0x14, 0x55, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3b, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x22, 0x37, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x81, 0x01, 0x0a, + 0x19, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, + 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x22, 0x79, 0x0a, 0x1a, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, + 0x0a, 0x0e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, + 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x52, 0x61, 0x77, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x39, 0x0a, 0x16, 0x47, + 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x5f, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, + 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, + 0x33, 0x0a, 0x13, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x2a, 0x84, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x45, 0x41, 0x53, 0x55, 0x52, 0x59, 0x10, 0x00, 0x12, + 0x1a, 0x0a, 0x16, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x41, + 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4c, 0x53, 0x5f, + 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x44, 0x44, + 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, 0x31, + 0x39, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x03, 0x32, 0xb2, 0x06, 0x0a, 0x06, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x49, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x43, 0x0a, 0x0a, 0x4c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x19, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x55, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x55, 0x6e, + 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x55, 0x6e, 0x6c, 0x6f, 0x61, + 0x64, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x52, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x77, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x22, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, + 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x77, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x12, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0b, 0x53, 0x69, 0x67, 0x6e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x69, 0x67, + 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x41, 0x0a, 0x0d, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_wallet_proto_rawDescOnce sync.Once + file_wallet_proto_rawDescData = file_wallet_proto_rawDesc +) + +func file_wallet_proto_rawDescGZIP() []byte { + file_wallet_proto_rawDescOnce.Do(func() { + file_wallet_proto_rawDescData = protoimpl.X.CompressGZIP(file_wallet_proto_rawDescData) + }) + return file_wallet_proto_rawDescData +} + +var file_wallet_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_wallet_proto_goTypes = []any{ + (AddressType)(0), // 0: pactus.AddressType + (*AddressInfo)(nil), // 1: pactus.AddressInfo + (*HistoryInfo)(nil), // 2: pactus.HistoryInfo + (*GetAddressHistoryRequest)(nil), // 3: pactus.GetAddressHistoryRequest + (*GetAddressHistoryResponse)(nil), // 4: pactus.GetAddressHistoryResponse + (*GetNewAddressRequest)(nil), // 5: pactus.GetNewAddressRequest + (*GetNewAddressResponse)(nil), // 6: pactus.GetNewAddressResponse + (*RestoreWalletRequest)(nil), // 7: pactus.RestoreWalletRequest + (*RestoreWalletResponse)(nil), // 8: pactus.RestoreWalletResponse + (*CreateWalletRequest)(nil), // 9: pactus.CreateWalletRequest + (*CreateWalletResponse)(nil), // 10: pactus.CreateWalletResponse + (*LoadWalletRequest)(nil), // 11: pactus.LoadWalletRequest + (*LoadWalletResponse)(nil), // 12: pactus.LoadWalletResponse + (*UnloadWalletRequest)(nil), // 13: pactus.UnloadWalletRequest + (*UnloadWalletResponse)(nil), // 14: pactus.UnloadWalletResponse + (*GetValidatorAddressRequest)(nil), // 15: pactus.GetValidatorAddressRequest + (*GetValidatorAddressResponse)(nil), // 16: pactus.GetValidatorAddressResponse + (*SignRawTransactionRequest)(nil), // 17: pactus.SignRawTransactionRequest + (*SignRawTransactionResponse)(nil), // 18: pactus.SignRawTransactionResponse + (*GetTotalBalanceRequest)(nil), // 19: pactus.GetTotalBalanceRequest + (*GetTotalBalanceResponse)(nil), // 20: pactus.GetTotalBalanceResponse + (*SignMessageRequest)(nil), // 21: pactus.SignMessageRequest + (*SignMessageResponse)(nil), // 22: pactus.SignMessageResponse +} +var file_wallet_proto_depIdxs = []int32{ + 2, // 0: pactus.GetAddressHistoryResponse.history_info:type_name -> pactus.HistoryInfo + 0, // 1: pactus.GetNewAddressRequest.address_type:type_name -> pactus.AddressType + 1, // 2: pactus.GetNewAddressResponse.address_info:type_name -> pactus.AddressInfo + 9, // 3: pactus.Wallet.CreateWallet:input_type -> pactus.CreateWalletRequest + 7, // 4: pactus.Wallet.RestoreWallet:input_type -> pactus.RestoreWalletRequest + 11, // 5: pactus.Wallet.LoadWallet:input_type -> pactus.LoadWalletRequest + 13, // 6: pactus.Wallet.UnloadWallet:input_type -> pactus.UnloadWalletRequest + 19, // 7: pactus.Wallet.GetTotalBalance:input_type -> pactus.GetTotalBalanceRequest + 17, // 8: pactus.Wallet.SignRawTransaction:input_type -> pactus.SignRawTransactionRequest + 15, // 9: pactus.Wallet.GetValidatorAddress:input_type -> pactus.GetValidatorAddressRequest + 5, // 10: pactus.Wallet.GetNewAddress:input_type -> pactus.GetNewAddressRequest + 3, // 11: pactus.Wallet.GetAddressHistory:input_type -> pactus.GetAddressHistoryRequest + 21, // 12: pactus.Wallet.SignMessage:input_type -> pactus.SignMessageRequest + 10, // 13: pactus.Wallet.CreateWallet:output_type -> pactus.CreateWalletResponse + 8, // 14: pactus.Wallet.RestoreWallet:output_type -> pactus.RestoreWalletResponse + 12, // 15: pactus.Wallet.LoadWallet:output_type -> pactus.LoadWalletResponse + 14, // 16: pactus.Wallet.UnloadWallet:output_type -> pactus.UnloadWalletResponse + 20, // 17: pactus.Wallet.GetTotalBalance:output_type -> pactus.GetTotalBalanceResponse + 18, // 18: pactus.Wallet.SignRawTransaction:output_type -> pactus.SignRawTransactionResponse + 16, // 19: pactus.Wallet.GetValidatorAddress:output_type -> pactus.GetValidatorAddressResponse + 6, // 20: pactus.Wallet.GetNewAddress:output_type -> pactus.GetNewAddressResponse + 4, // 21: pactus.Wallet.GetAddressHistory:output_type -> pactus.GetAddressHistoryResponse + 22, // 22: pactus.Wallet.SignMessage:output_type -> pactus.SignMessageResponse + 13, // [13:23] is the sub-list for method output_type + 3, // [3:13] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_wallet_proto_init() } +func file_wallet_proto_init() { + if File_wallet_proto != nil { + return + } + file_transaction_proto_init() + if !protoimpl.UnsafeEnabled { + file_wallet_proto_msgTypes[0].Exporter = func(v any, i int) any { + switch v := v.(*AddressInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[1].Exporter = func(v any, i int) any { + switch v := v.(*HistoryInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[2].Exporter = func(v any, i int) any { + switch v := v.(*GetAddressHistoryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[3].Exporter = func(v any, i int) any { + switch v := v.(*GetAddressHistoryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[4].Exporter = func(v any, i int) any { + switch v := v.(*GetNewAddressRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[5].Exporter = func(v any, i int) any { + switch v := v.(*GetNewAddressResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[6].Exporter = func(v any, i int) any { + switch v := v.(*RestoreWalletRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[7].Exporter = func(v any, i int) any { + switch v := v.(*RestoreWalletResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[8].Exporter = func(v any, i int) any { + switch v := v.(*CreateWalletRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[9].Exporter = func(v any, i int) any { + switch v := v.(*CreateWalletResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*LoadWalletRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[11].Exporter = func(v any, i int) any { + switch v := v.(*LoadWalletResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[12].Exporter = func(v any, i int) any { + switch v := v.(*UnloadWalletRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[13].Exporter = func(v any, i int) any { + switch v := v.(*UnloadWalletResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[14].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorAddressRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[15].Exporter = func(v any, i int) any { + switch v := v.(*GetValidatorAddressResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[16].Exporter = func(v any, i int) any { + switch v := v.(*SignRawTransactionRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*SignRawTransactionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*GetTotalBalanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*GetTotalBalanceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*SignMessageRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_wallet_proto_msgTypes[21].Exporter = func(v any, i int) any { + switch v := v.(*SignMessageResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_wallet_proto_rawDesc, + NumEnums: 1, + NumMessages: 22, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_wallet_proto_goTypes, + DependencyIndexes: file_wallet_proto_depIdxs, + EnumInfos: file_wallet_proto_enumTypes, + MessageInfos: file_wallet_proto_msgTypes, + }.Build() + File_wallet_proto = out.File + file_wallet_proto_rawDesc = nil + file_wallet_proto_goTypes = nil + file_wallet_proto_depIdxs = nil +} diff --git a/www/grpc/gen/go/wallet.pb.gw.go b/www/grpc/gen/go/wallet.pb.gw.go new file mode 100644 index 000000000..67c180ab2 --- /dev/null +++ b/www/grpc/gen/go/wallet.pb.gw.go @@ -0,0 +1,869 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: wallet.proto + +/* +Package pactus is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package pactus + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +var ( + filter_Wallet_CreateWallet_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Wallet_CreateWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWalletRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_CreateWallet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Wallet_CreateWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateWalletRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_CreateWallet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateWallet(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Wallet_RestoreWallet_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Wallet_RestoreWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RestoreWalletRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_RestoreWallet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RestoreWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Wallet_RestoreWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RestoreWalletRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_RestoreWallet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RestoreWallet(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Wallet_LoadWallet_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Wallet_LoadWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LoadWalletRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_LoadWallet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.LoadWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Wallet_LoadWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq LoadWalletRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_LoadWallet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.LoadWallet(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Wallet_UnloadWallet_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Wallet_UnloadWallet_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UnloadWalletRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_UnloadWallet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UnloadWallet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Wallet_UnloadWallet_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UnloadWalletRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_UnloadWallet_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UnloadWallet(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Wallet_GetTotalBalance_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Wallet_GetTotalBalance_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTotalBalanceRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetTotalBalance_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTotalBalance(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Wallet_GetTotalBalance_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetTotalBalanceRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetTotalBalance_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTotalBalance(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Wallet_SignRawTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Wallet_SignRawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SignRawTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_SignRawTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SignRawTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Wallet_SignRawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SignRawTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_SignRawTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SignRawTransaction(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Wallet_GetValidatorAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Wallet_GetValidatorAddress_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetValidatorAddressRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetValidatorAddress_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetValidatorAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Wallet_GetValidatorAddress_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetValidatorAddressRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetValidatorAddress_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetValidatorAddress(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Wallet_GetNewAddress_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Wallet_GetNewAddress_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNewAddressRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetNewAddress_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetNewAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Wallet_GetNewAddress_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNewAddressRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_GetNewAddress_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetNewAddress(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Wallet_SignMessage_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Wallet_SignMessage_0(ctx context.Context, marshaler runtime.Marshaler, client WalletClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SignMessageRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_SignMessage_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.SignMessage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Wallet_SignMessage_0(ctx context.Context, marshaler runtime.Marshaler, server WalletServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SignMessageRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Wallet_SignMessage_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.SignMessage(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterWalletHandlerServer registers the http handlers for service Wallet to "mux". +// UnaryRPC :call WalletServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWalletHandlerFromEndpoint instead. +func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServer) error { + + mux.Handle("GET", pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/CreateWallet", runtime.WithHTTPPathPattern("/pactus/wallet/create_wallet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Wallet_CreateWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_CreateWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_RestoreWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/RestoreWallet", runtime.WithHTTPPathPattern("/pactus/wallet/restore_wallet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Wallet_RestoreWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_RestoreWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_LoadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/LoadWallet", runtime.WithHTTPPathPattern("/pactus/wallet/load_wallet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Wallet_LoadWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_LoadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_UnloadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/UnloadWallet", runtime.WithHTTPPathPattern("/pactus/wallet/unload_wallet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Wallet_UnloadWallet_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_UnloadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_GetTotalBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/GetTotalBalance", runtime.WithHTTPPathPattern("/pactus/wallet/get_total_balance")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Wallet_GetTotalBalance_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_GetTotalBalance_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_SignRawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/SignRawTransaction", runtime.WithHTTPPathPattern("/pactus/wallet/sign_raw_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Wallet_SignRawTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_SignRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_GetValidatorAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/GetValidatorAddress", runtime.WithHTTPPathPattern("/pactus/wallet/get_validator_address")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Wallet_GetValidatorAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_GetValidatorAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_GetNewAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/GetNewAddress", runtime.WithHTTPPathPattern("/pactus/wallet/get_new_address")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Wallet_GetNewAddress_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_GetNewAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_SignMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Wallet/SignMessage", runtime.WithHTTPPathPattern("/pactus/wallet/sign_message")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Wallet_SignMessage_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_SignMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterWalletHandlerFromEndpoint is same as RegisterWalletHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterWalletHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.NewClient(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterWalletHandler(ctx, mux, conn) +} + +// RegisterWalletHandler registers the http handlers for service Wallet to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterWalletHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterWalletHandlerClient(ctx, mux, NewWalletClient(conn)) +} + +// RegisterWalletHandlerClient registers the http handlers for service Wallet +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WalletClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WalletClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "WalletClient" to call the correct interceptors. +func RegisterWalletHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WalletClient) error { + + mux.Handle("GET", pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/CreateWallet", runtime.WithHTTPPathPattern("/pactus/wallet/create_wallet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Wallet_CreateWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_CreateWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_RestoreWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/RestoreWallet", runtime.WithHTTPPathPattern("/pactus/wallet/restore_wallet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Wallet_RestoreWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_RestoreWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_LoadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/LoadWallet", runtime.WithHTTPPathPattern("/pactus/wallet/load_wallet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Wallet_LoadWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_LoadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_UnloadWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/UnloadWallet", runtime.WithHTTPPathPattern("/pactus/wallet/unload_wallet")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Wallet_UnloadWallet_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_UnloadWallet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_GetTotalBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/GetTotalBalance", runtime.WithHTTPPathPattern("/pactus/wallet/get_total_balance")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Wallet_GetTotalBalance_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_GetTotalBalance_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_SignRawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/SignRawTransaction", runtime.WithHTTPPathPattern("/pactus/wallet/sign_raw_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Wallet_SignRawTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_SignRawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_GetValidatorAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/GetValidatorAddress", runtime.WithHTTPPathPattern("/pactus/wallet/get_validator_address")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Wallet_GetValidatorAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_GetValidatorAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_GetNewAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/GetNewAddress", runtime.WithHTTPPathPattern("/pactus/wallet/get_new_address")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Wallet_GetNewAddress_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_GetNewAddress_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Wallet_SignMessage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Wallet/SignMessage", runtime.WithHTTPPathPattern("/pactus/wallet/sign_message")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Wallet_SignMessage_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Wallet_SignMessage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Wallet_CreateWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "create_wallet"}, "")) + + pattern_Wallet_RestoreWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "restore_wallet"}, "")) + + pattern_Wallet_LoadWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "load_wallet"}, "")) + + pattern_Wallet_UnloadWallet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "unload_wallet"}, "")) + + pattern_Wallet_GetTotalBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "get_total_balance"}, "")) + + pattern_Wallet_SignRawTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "sign_raw_transaction"}, "")) + + pattern_Wallet_GetValidatorAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "get_validator_address"}, "")) + + pattern_Wallet_GetNewAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "get_new_address"}, "")) + + pattern_Wallet_SignMessage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "wallet", "sign_message"}, "")) +) + +var ( + forward_Wallet_CreateWallet_0 = runtime.ForwardResponseMessage + + forward_Wallet_RestoreWallet_0 = runtime.ForwardResponseMessage + + forward_Wallet_LoadWallet_0 = runtime.ForwardResponseMessage + + forward_Wallet_UnloadWallet_0 = runtime.ForwardResponseMessage + + forward_Wallet_GetTotalBalance_0 = runtime.ForwardResponseMessage + + forward_Wallet_SignRawTransaction_0 = runtime.ForwardResponseMessage + + forward_Wallet_GetValidatorAddress_0 = runtime.ForwardResponseMessage + + forward_Wallet_GetNewAddress_0 = runtime.ForwardResponseMessage + + forward_Wallet_SignMessage_0 = runtime.ForwardResponseMessage +) diff --git a/www/grpc/gen/go/wallet_grpc.pb.go b/www/grpc/gen/go/wallet_grpc.pb.go new file mode 100644 index 000000000..31ecb5b83 --- /dev/null +++ b/www/grpc/gen/go/wallet_grpc.pb.go @@ -0,0 +1,478 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.4.0 +// - protoc (unknown) +// source: wallet.proto + +// Define the package and Go package path for the generated code. + +package pactus + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// 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.62.0 or later. +const _ = grpc.SupportPackageIsVersion8 + +const ( + Wallet_CreateWallet_FullMethodName = "/pactus.Wallet/CreateWallet" + Wallet_RestoreWallet_FullMethodName = "/pactus.Wallet/RestoreWallet" + Wallet_LoadWallet_FullMethodName = "/pactus.Wallet/LoadWallet" + Wallet_UnloadWallet_FullMethodName = "/pactus.Wallet/UnloadWallet" + Wallet_GetTotalBalance_FullMethodName = "/pactus.Wallet/GetTotalBalance" + Wallet_SignRawTransaction_FullMethodName = "/pactus.Wallet/SignRawTransaction" + Wallet_GetValidatorAddress_FullMethodName = "/pactus.Wallet/GetValidatorAddress" + Wallet_GetNewAddress_FullMethodName = "/pactus.Wallet/GetNewAddress" + Wallet_GetAddressHistory_FullMethodName = "/pactus.Wallet/GetAddressHistory" + Wallet_SignMessage_FullMethodName = "/pactus.Wallet/SignMessage" +) + +// WalletClient is the client API for Wallet 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. +// +// Define the Wallet service with various RPC methods for wallet management. +type WalletClient interface { + // CreateWallet creates a new wallet with the specified parameters. + CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error) + // RestoreWallet restores an existing wallet with the given mnemonic. + RestoreWallet(ctx context.Context, in *RestoreWalletRequest, opts ...grpc.CallOption) (*RestoreWalletResponse, error) + // LoadWallet loads an existing wallet with the given name. + LoadWallet(ctx context.Context, in *LoadWalletRequest, opts ...grpc.CallOption) (*LoadWalletResponse, error) + // UnloadWallet unloads a currently loaded wallet with the specified name. + UnloadWallet(ctx context.Context, in *UnloadWalletRequest, opts ...grpc.CallOption) (*UnloadWalletResponse, error) + // GetTotalBalance returns the total available balance of the wallet. + GetTotalBalance(ctx context.Context, in *GetTotalBalanceRequest, opts ...grpc.CallOption) (*GetTotalBalanceResponse, error) + // SignRawTransaction signs a raw transaction for a specified wallet. + SignRawTransaction(ctx context.Context, in *SignRawTransactionRequest, opts ...grpc.CallOption) (*SignRawTransactionResponse, error) + // GetValidatorAddress retrieves the validator address associated with a + // public key. + GetValidatorAddress(ctx context.Context, in *GetValidatorAddressRequest, opts ...grpc.CallOption) (*GetValidatorAddressResponse, error) + // GetNewAddress generates a new address for the specified wallet. + GetNewAddress(ctx context.Context, in *GetNewAddressRequest, opts ...grpc.CallOption) (*GetNewAddressResponse, error) + // GetAddressHistory retrieves the transaction history of an address. + GetAddressHistory(ctx context.Context, in *GetAddressHistoryRequest, opts ...grpc.CallOption) (*GetAddressHistoryResponse, error) + // SignMessage signs an arbitrary message. + SignMessage(ctx context.Context, in *SignMessageRequest, opts ...grpc.CallOption) (*SignMessageResponse, error) +} + +type walletClient struct { + cc grpc.ClientConnInterface +} + +func NewWalletClient(cc grpc.ClientConnInterface) WalletClient { + return &walletClient{cc} +} + +func (c *walletClient) CreateWallet(ctx context.Context, in *CreateWalletRequest, opts ...grpc.CallOption) (*CreateWalletResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CreateWalletResponse) + err := c.cc.Invoke(ctx, Wallet_CreateWallet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletClient) RestoreWallet(ctx context.Context, in *RestoreWalletRequest, opts ...grpc.CallOption) (*RestoreWalletResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RestoreWalletResponse) + err := c.cc.Invoke(ctx, Wallet_RestoreWallet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletClient) LoadWallet(ctx context.Context, in *LoadWalletRequest, opts ...grpc.CallOption) (*LoadWalletResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(LoadWalletResponse) + err := c.cc.Invoke(ctx, Wallet_LoadWallet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletClient) UnloadWallet(ctx context.Context, in *UnloadWalletRequest, opts ...grpc.CallOption) (*UnloadWalletResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UnloadWalletResponse) + err := c.cc.Invoke(ctx, Wallet_UnloadWallet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletClient) GetTotalBalance(ctx context.Context, in *GetTotalBalanceRequest, opts ...grpc.CallOption) (*GetTotalBalanceResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetTotalBalanceResponse) + err := c.cc.Invoke(ctx, Wallet_GetTotalBalance_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletClient) SignRawTransaction(ctx context.Context, in *SignRawTransactionRequest, opts ...grpc.CallOption) (*SignRawTransactionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SignRawTransactionResponse) + err := c.cc.Invoke(ctx, Wallet_SignRawTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletClient) GetValidatorAddress(ctx context.Context, in *GetValidatorAddressRequest, opts ...grpc.CallOption) (*GetValidatorAddressResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetValidatorAddressResponse) + err := c.cc.Invoke(ctx, Wallet_GetValidatorAddress_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletClient) GetNewAddress(ctx context.Context, in *GetNewAddressRequest, opts ...grpc.CallOption) (*GetNewAddressResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetNewAddressResponse) + err := c.cc.Invoke(ctx, Wallet_GetNewAddress_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletClient) GetAddressHistory(ctx context.Context, in *GetAddressHistoryRequest, opts ...grpc.CallOption) (*GetAddressHistoryResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAddressHistoryResponse) + err := c.cc.Invoke(ctx, Wallet_GetAddressHistory_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *walletClient) SignMessage(ctx context.Context, in *SignMessageRequest, opts ...grpc.CallOption) (*SignMessageResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(SignMessageResponse) + err := c.cc.Invoke(ctx, Wallet_SignMessage_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// WalletServer is the server API for Wallet service. +// All implementations should embed UnimplementedWalletServer +// for forward compatibility +// +// Define the Wallet service with various RPC methods for wallet management. +type WalletServer interface { + // CreateWallet creates a new wallet with the specified parameters. + CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error) + // RestoreWallet restores an existing wallet with the given mnemonic. + RestoreWallet(context.Context, *RestoreWalletRequest) (*RestoreWalletResponse, error) + // LoadWallet loads an existing wallet with the given name. + LoadWallet(context.Context, *LoadWalletRequest) (*LoadWalletResponse, error) + // UnloadWallet unloads a currently loaded wallet with the specified name. + UnloadWallet(context.Context, *UnloadWalletRequest) (*UnloadWalletResponse, error) + // GetTotalBalance returns the total available balance of the wallet. + GetTotalBalance(context.Context, *GetTotalBalanceRequest) (*GetTotalBalanceResponse, error) + // SignRawTransaction signs a raw transaction for a specified wallet. + SignRawTransaction(context.Context, *SignRawTransactionRequest) (*SignRawTransactionResponse, error) + // GetValidatorAddress retrieves the validator address associated with a + // public key. + GetValidatorAddress(context.Context, *GetValidatorAddressRequest) (*GetValidatorAddressResponse, error) + // GetNewAddress generates a new address for the specified wallet. + GetNewAddress(context.Context, *GetNewAddressRequest) (*GetNewAddressResponse, error) + // GetAddressHistory retrieves the transaction history of an address. + GetAddressHistory(context.Context, *GetAddressHistoryRequest) (*GetAddressHistoryResponse, error) + // SignMessage signs an arbitrary message. + SignMessage(context.Context, *SignMessageRequest) (*SignMessageResponse, error) +} + +// UnimplementedWalletServer should be embedded to have forward compatible implementations. +type UnimplementedWalletServer struct { +} + +func (UnimplementedWalletServer) CreateWallet(context.Context, *CreateWalletRequest) (*CreateWalletResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateWallet not implemented") +} +func (UnimplementedWalletServer) RestoreWallet(context.Context, *RestoreWalletRequest) (*RestoreWalletResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RestoreWallet not implemented") +} +func (UnimplementedWalletServer) LoadWallet(context.Context, *LoadWalletRequest) (*LoadWalletResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LoadWallet not implemented") +} +func (UnimplementedWalletServer) UnloadWallet(context.Context, *UnloadWalletRequest) (*UnloadWalletResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnloadWallet not implemented") +} +func (UnimplementedWalletServer) GetTotalBalance(context.Context, *GetTotalBalanceRequest) (*GetTotalBalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTotalBalance not implemented") +} +func (UnimplementedWalletServer) SignRawTransaction(context.Context, *SignRawTransactionRequest) (*SignRawTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignRawTransaction not implemented") +} +func (UnimplementedWalletServer) GetValidatorAddress(context.Context, *GetValidatorAddressRequest) (*GetValidatorAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetValidatorAddress not implemented") +} +func (UnimplementedWalletServer) GetNewAddress(context.Context, *GetNewAddressRequest) (*GetNewAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNewAddress not implemented") +} +func (UnimplementedWalletServer) GetAddressHistory(context.Context, *GetAddressHistoryRequest) (*GetAddressHistoryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAddressHistory not implemented") +} +func (UnimplementedWalletServer) SignMessage(context.Context, *SignMessageRequest) (*SignMessageResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SignMessage not implemented") +} + +// UnsafeWalletServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to WalletServer will +// result in compilation errors. +type UnsafeWalletServer interface { + mustEmbedUnimplementedWalletServer() +} + +func RegisterWalletServer(s grpc.ServiceRegistrar, srv WalletServer) { + s.RegisterService(&Wallet_ServiceDesc, srv) +} + +func _Wallet_CreateWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWalletRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServer).CreateWallet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wallet_CreateWallet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServer).CreateWallet(ctx, req.(*CreateWalletRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wallet_RestoreWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RestoreWalletRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServer).RestoreWallet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wallet_RestoreWallet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServer).RestoreWallet(ctx, req.(*RestoreWalletRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wallet_LoadWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LoadWalletRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServer).LoadWallet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wallet_LoadWallet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServer).LoadWallet(ctx, req.(*LoadWalletRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wallet_UnloadWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnloadWalletRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServer).UnloadWallet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wallet_UnloadWallet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServer).UnloadWallet(ctx, req.(*UnloadWalletRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wallet_GetTotalBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTotalBalanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServer).GetTotalBalance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wallet_GetTotalBalance_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServer).GetTotalBalance(ctx, req.(*GetTotalBalanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wallet_SignRawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignRawTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServer).SignRawTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wallet_SignRawTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServer).SignRawTransaction(ctx, req.(*SignRawTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wallet_GetValidatorAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetValidatorAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServer).GetValidatorAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wallet_GetValidatorAddress_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServer).GetValidatorAddress(ctx, req.(*GetValidatorAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wallet_GetNewAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNewAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServer).GetNewAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wallet_GetNewAddress_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServer).GetNewAddress(ctx, req.(*GetNewAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wallet_GetAddressHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAddressHistoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServer).GetAddressHistory(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wallet_GetAddressHistory_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServer).GetAddressHistory(ctx, req.(*GetAddressHistoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wallet_SignMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignMessageRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WalletServer).SignMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wallet_SignMessage_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WalletServer).SignMessage(ctx, req.(*SignMessageRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Wallet_ServiceDesc is the grpc.ServiceDesc for Wallet service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Wallet_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "pactus.Wallet", + HandlerType: (*WalletServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateWallet", + Handler: _Wallet_CreateWallet_Handler, + }, + { + MethodName: "RestoreWallet", + Handler: _Wallet_RestoreWallet_Handler, + }, + { + MethodName: "LoadWallet", + Handler: _Wallet_LoadWallet_Handler, + }, + { + MethodName: "UnloadWallet", + Handler: _Wallet_UnloadWallet_Handler, + }, + { + MethodName: "GetTotalBalance", + Handler: _Wallet_GetTotalBalance_Handler, + }, + { + MethodName: "SignRawTransaction", + Handler: _Wallet_SignRawTransaction_Handler, + }, + { + MethodName: "GetValidatorAddress", + Handler: _Wallet_GetValidatorAddress_Handler, + }, + { + MethodName: "GetNewAddress", + Handler: _Wallet_GetNewAddress_Handler, + }, + { + MethodName: "GetAddressHistory", + Handler: _Wallet_GetAddressHistory_Handler, + }, + { + MethodName: "SignMessage", + Handler: _Wallet_SignMessage_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "wallet.proto", +} diff --git a/www/grpc/gen/go/wallet_jgw.pb.go b/www/grpc/gen/go/wallet_jgw.pb.go new file mode 100644 index 000000000..df3dcca9e --- /dev/null +++ b/www/grpc/gen/go/wallet_jgw.pb.go @@ -0,0 +1,210 @@ +// Code generated by protoc-gen-jrpc-gateway. DO NOT EDIT. +// source: wallet.proto + +/* +Package pactus is a reverse proxy. + +It translates gRPC into JSON-RPC 2.0 +*/ +package pactus + +import ( + "context" + "encoding/json" + + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/encoding/protojson" +) + +type WalletJsonRPC struct { + client WalletClient +} + +type paramsAndHeadersWallet struct { + Headers metadata.MD `json:"headers,omitempty"` + Params json.RawMessage `json:"params"` +} + +// RegisterWalletJsonRPC register the grpc client Wallet for json-rpc. +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterWalletJsonRPC(conn *grpc.ClientConn) *WalletJsonRPC { + return &WalletJsonRPC{ + client: NewWalletClient(conn), + } +} + +func (s *WalletJsonRPC) Methods() map[string]func(ctx context.Context, message json.RawMessage) (any, error) { + return map[string]func(ctx context.Context, params json.RawMessage) (any, error){ + + "pactus.wallet.create_wallet": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(CreateWalletRequest) + + var jrpcData paramsAndHeadersWallet + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.CreateWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.wallet.restore_wallet": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(RestoreWalletRequest) + + var jrpcData paramsAndHeadersWallet + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.RestoreWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.wallet.load_wallet": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(LoadWalletRequest) + + var jrpcData paramsAndHeadersWallet + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.LoadWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.wallet.unload_wallet": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(UnloadWalletRequest) + + var jrpcData paramsAndHeadersWallet + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.UnloadWallet(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.wallet.get_total_balance": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetTotalBalanceRequest) + + var jrpcData paramsAndHeadersWallet + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetTotalBalance(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.wallet.sign_raw_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(SignRawTransactionRequest) + + var jrpcData paramsAndHeadersWallet + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.SignRawTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.wallet.get_validator_address": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetValidatorAddressRequest) + + var jrpcData paramsAndHeadersWallet + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetValidatorAddress(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.wallet.get_new_address": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetNewAddressRequest) + + var jrpcData paramsAndHeadersWallet + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetNewAddress(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.wallet.get_address_history": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetAddressHistoryRequest) + + var jrpcData paramsAndHeadersWallet + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetAddressHistory(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.wallet.sign_message": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(SignMessageRequest) + + var jrpcData paramsAndHeadersWallet + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.SignMessage(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + } +} diff --git a/www/grpc/gen/java/pactus/blockchain/BlockchainGrpc.java b/www/grpc/gen/java/pactus/blockchain/BlockchainGrpc.java new file mode 100644 index 000000000..79a944eee --- /dev/null +++ b/www/grpc/gen/java/pactus/blockchain/BlockchainGrpc.java @@ -0,0 +1,1183 @@ +package pactus.blockchain; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Blockchain service defines RPC methods for interacting with the blockchain.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.50.2)", + comments = "Source: blockchain.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class BlockchainGrpc { + + private BlockchainGrpc() {} + + public static final String SERVICE_NAME = "pactus.Blockchain"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getGetBlockMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBlock", + requestType = pactus.blockchain.BlockchainOuterClass.GetBlockRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetBlockResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBlockMethod() { + io.grpc.MethodDescriptor getGetBlockMethod; + if ((getGetBlockMethod = BlockchainGrpc.getGetBlockMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetBlockMethod = BlockchainGrpc.getGetBlockMethod) == null) { + BlockchainGrpc.getGetBlockMethod = getGetBlockMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlock")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetBlockRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetBlockResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetBlock")) + .build(); + } + } + } + return getGetBlockMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetBlockHashMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBlockHash", + requestType = pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBlockHashMethod() { + io.grpc.MethodDescriptor getGetBlockHashMethod; + if ((getGetBlockHashMethod = BlockchainGrpc.getGetBlockHashMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetBlockHashMethod = BlockchainGrpc.getGetBlockHashMethod) == null) { + BlockchainGrpc.getGetBlockHashMethod = getGetBlockHashMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockHash")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetBlockHash")) + .build(); + } + } + } + return getGetBlockHashMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetBlockHeightMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBlockHeight", + requestType = pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBlockHeightMethod() { + io.grpc.MethodDescriptor getGetBlockHeightMethod; + if ((getGetBlockHeightMethod = BlockchainGrpc.getGetBlockHeightMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetBlockHeightMethod = BlockchainGrpc.getGetBlockHeightMethod) == null) { + BlockchainGrpc.getGetBlockHeightMethod = getGetBlockHeightMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockHeight")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetBlockHeight")) + .build(); + } + } + } + return getGetBlockHeightMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetBlockchainInfoMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetBlockchainInfo", + requestType = pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetBlockchainInfoMethod() { + io.grpc.MethodDescriptor getGetBlockchainInfoMethod; + if ((getGetBlockchainInfoMethod = BlockchainGrpc.getGetBlockchainInfoMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetBlockchainInfoMethod = BlockchainGrpc.getGetBlockchainInfoMethod) == null) { + BlockchainGrpc.getGetBlockchainInfoMethod = getGetBlockchainInfoMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBlockchainInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetBlockchainInfo")) + .build(); + } + } + } + return getGetBlockchainInfoMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetConsensusInfoMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetConsensusInfo", + requestType = pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetConsensusInfoMethod() { + io.grpc.MethodDescriptor getGetConsensusInfoMethod; + if ((getGetConsensusInfoMethod = BlockchainGrpc.getGetConsensusInfoMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetConsensusInfoMethod = BlockchainGrpc.getGetConsensusInfoMethod) == null) { + BlockchainGrpc.getGetConsensusInfoMethod = getGetConsensusInfoMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetConsensusInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetConsensusInfo")) + .build(); + } + } + } + return getGetConsensusInfoMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetAccountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAccount", + requestType = pactus.blockchain.BlockchainOuterClass.GetAccountRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetAccountResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAccountMethod() { + io.grpc.MethodDescriptor getGetAccountMethod; + if ((getGetAccountMethod = BlockchainGrpc.getGetAccountMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetAccountMethod = BlockchainGrpc.getGetAccountMethod) == null) { + BlockchainGrpc.getGetAccountMethod = getGetAccountMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAccount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetAccountRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetAccountResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetAccount")) + .build(); + } + } + } + return getGetAccountMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetValidatorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetValidator", + requestType = pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetValidatorMethod() { + io.grpc.MethodDescriptor getGetValidatorMethod; + if ((getGetValidatorMethod = BlockchainGrpc.getGetValidatorMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetValidatorMethod = BlockchainGrpc.getGetValidatorMethod) == null) { + BlockchainGrpc.getGetValidatorMethod = getGetValidatorMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetValidator")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetValidator")) + .build(); + } + } + } + return getGetValidatorMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetValidatorByNumberMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetValidatorByNumber", + requestType = pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetValidatorByNumberMethod() { + io.grpc.MethodDescriptor getGetValidatorByNumberMethod; + if ((getGetValidatorByNumberMethod = BlockchainGrpc.getGetValidatorByNumberMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetValidatorByNumberMethod = BlockchainGrpc.getGetValidatorByNumberMethod) == null) { + BlockchainGrpc.getGetValidatorByNumberMethod = getGetValidatorByNumberMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetValidatorByNumber")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetValidatorByNumber")) + .build(); + } + } + } + return getGetValidatorByNumberMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetValidatorAddressesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetValidatorAddresses", + requestType = pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetValidatorAddressesMethod() { + io.grpc.MethodDescriptor getGetValidatorAddressesMethod; + if ((getGetValidatorAddressesMethod = BlockchainGrpc.getGetValidatorAddressesMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetValidatorAddressesMethod = BlockchainGrpc.getGetValidatorAddressesMethod) == null) { + BlockchainGrpc.getGetValidatorAddressesMethod = getGetValidatorAddressesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetValidatorAddresses")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetValidatorAddresses")) + .build(); + } + } + } + return getGetValidatorAddressesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetPublicKeyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPublicKey", + requestType = pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetPublicKeyMethod() { + io.grpc.MethodDescriptor getGetPublicKeyMethod; + if ((getGetPublicKeyMethod = BlockchainGrpc.getGetPublicKeyMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetPublicKeyMethod = BlockchainGrpc.getGetPublicKeyMethod) == null) { + BlockchainGrpc.getGetPublicKeyMethod = getGetPublicKeyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPublicKey")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetPublicKey")) + .build(); + } + } + } + return getGetPublicKeyMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTxPoolContentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTxPoolContent", + requestType = pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.class, + responseType = pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTxPoolContentMethod() { + io.grpc.MethodDescriptor getGetTxPoolContentMethod; + if ((getGetTxPoolContentMethod = BlockchainGrpc.getGetTxPoolContentMethod) == null) { + synchronized (BlockchainGrpc.class) { + if ((getGetTxPoolContentMethod = BlockchainGrpc.getGetTxPoolContentMethod) == null) { + BlockchainGrpc.getGetTxPoolContentMethod = getGetTxPoolContentMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTxPoolContent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.getDefaultInstance())) + .setSchemaDescriptor(new BlockchainMethodDescriptorSupplier("GetTxPoolContent")) + .build(); + } + } + } + return getGetTxPoolContentMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static BlockchainStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BlockchainStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BlockchainStub(channel, callOptions); + } + }; + return BlockchainStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static BlockchainBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BlockchainBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BlockchainBlockingStub(channel, callOptions); + } + }; + return BlockchainBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static BlockchainFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BlockchainFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BlockchainFutureStub(channel, callOptions); + } + }; + return BlockchainFutureStub.newStub(factory, channel); + } + + /** + *
+   * Blockchain service defines RPC methods for interacting with the blockchain.
+   * 
+ */ + public static abstract class BlockchainImplBase implements io.grpc.BindableService { + + /** + *
+     * GetBlock retrieves information about a block based on the provided request
+     * parameters.
+     * 
+ */ + public void getBlock(pactus.blockchain.BlockchainOuterClass.GetBlockRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockMethod(), responseObserver); + } + + /** + *
+     * GetBlockHash retrieves the hash of a block at the specified height.
+     * 
+ */ + public void getBlockHash(pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockHashMethod(), responseObserver); + } + + /** + *
+     * GetBlockHeight retrieves the height of a block with the specified hash.
+     * 
+ */ + public void getBlockHeight(pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockHeightMethod(), responseObserver); + } + + /** + *
+     * GetBlockchainInfo retrieves general information about the blockchain.
+     * 
+ */ + public void getBlockchainInfo(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBlockchainInfoMethod(), responseObserver); + } + + /** + *
+     * GetConsensusInfo retrieves information about the consensus instances.
+     * 
+ */ + public void getConsensusInfo(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConsensusInfoMethod(), responseObserver); + } + + /** + *
+     * GetAccount retrieves information about an account based on the provided
+     * address.
+     * 
+ */ + public void getAccount(pactus.blockchain.BlockchainOuterClass.GetAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAccountMethod(), responseObserver); + } + + /** + *
+     * GetValidator retrieves information about a validator based on the provided
+     * address.
+     * 
+ */ + public void getValidator(pactus.blockchain.BlockchainOuterClass.GetValidatorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorMethod(), responseObserver); + } + + /** + *
+     * GetValidatorByNumber retrieves information about a validator based on the
+     * provided number.
+     * 
+ */ + public void getValidatorByNumber(pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorByNumberMethod(), responseObserver); + } + + /** + *
+     * GetValidatorAddresses retrieves a list of all validator addresses.
+     * 
+ */ + public void getValidatorAddresses(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorAddressesMethod(), responseObserver); + } + + /** + *
+     * GetPublicKey retrieves the public key of an account based on the provided
+     * address.
+     * 
+ */ + public void getPublicKey(pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPublicKeyMethod(), responseObserver); + } + + /** + *
+     * GetTxPoolContent retrieves current transactions in the transaction pool.
+     * 
+ */ + public void getTxPoolContent(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTxPoolContentMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetBlockMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetBlockRequest, + pactus.blockchain.BlockchainOuterClass.GetBlockResponse>( + this, METHODID_GET_BLOCK))) + .addMethod( + getGetBlockHashMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest, + pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse>( + this, METHODID_GET_BLOCK_HASH))) + .addMethod( + getGetBlockHeightMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest, + pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse>( + this, METHODID_GET_BLOCK_HEIGHT))) + .addMethod( + getGetBlockchainInfoMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest, + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse>( + this, METHODID_GET_BLOCKCHAIN_INFO))) + .addMethod( + getGetConsensusInfoMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest, + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse>( + this, METHODID_GET_CONSENSUS_INFO))) + .addMethod( + getGetAccountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetAccountRequest, + pactus.blockchain.BlockchainOuterClass.GetAccountResponse>( + this, METHODID_GET_ACCOUNT))) + .addMethod( + getGetValidatorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetValidatorRequest, + pactus.blockchain.BlockchainOuterClass.GetValidatorResponse>( + this, METHODID_GET_VALIDATOR))) + .addMethod( + getGetValidatorByNumberMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest, + pactus.blockchain.BlockchainOuterClass.GetValidatorResponse>( + this, METHODID_GET_VALIDATOR_BY_NUMBER))) + .addMethod( + getGetValidatorAddressesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest, + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse>( + this, METHODID_GET_VALIDATOR_ADDRESSES))) + .addMethod( + getGetPublicKeyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest, + pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse>( + this, METHODID_GET_PUBLIC_KEY))) + .addMethod( + getGetTxPoolContentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest, + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse>( + this, METHODID_GET_TX_POOL_CONTENT))) + .build(); + } + } + + /** + *
+   * Blockchain service defines RPC methods for interacting with the blockchain.
+   * 
+ */ + public static final class BlockchainStub extends io.grpc.stub.AbstractAsyncStub { + private BlockchainStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BlockchainStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BlockchainStub(channel, callOptions); + } + + /** + *
+     * GetBlock retrieves information about a block based on the provided request
+     * parameters.
+     * 
+ */ + public void getBlock(pactus.blockchain.BlockchainOuterClass.GetBlockRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBlockMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetBlockHash retrieves the hash of a block at the specified height.
+     * 
+ */ + public void getBlockHash(pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBlockHashMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetBlockHeight retrieves the height of a block with the specified hash.
+     * 
+ */ + public void getBlockHeight(pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBlockHeightMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetBlockchainInfo retrieves general information about the blockchain.
+     * 
+ */ + public void getBlockchainInfo(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetBlockchainInfoMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetConsensusInfo retrieves information about the consensus instances.
+     * 
+ */ + public void getConsensusInfo(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetConsensusInfoMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetAccount retrieves information about an account based on the provided
+     * address.
+     * 
+ */ + public void getAccount(pactus.blockchain.BlockchainOuterClass.GetAccountRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAccountMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetValidator retrieves information about a validator based on the provided
+     * address.
+     * 
+ */ + public void getValidator(pactus.blockchain.BlockchainOuterClass.GetValidatorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetValidatorMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetValidatorByNumber retrieves information about a validator based on the
+     * provided number.
+     * 
+ */ + public void getValidatorByNumber(pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetValidatorByNumberMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetValidatorAddresses retrieves a list of all validator addresses.
+     * 
+ */ + public void getValidatorAddresses(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetValidatorAddressesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetPublicKey retrieves the public key of an account based on the provided
+     * address.
+     * 
+ */ + public void getPublicKey(pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPublicKeyMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetTxPoolContent retrieves current transactions in the transaction pool.
+     * 
+ */ + public void getTxPoolContent(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTxPoolContentMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Blockchain service defines RPC methods for interacting with the blockchain.
+   * 
+ */ + public static final class BlockchainBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private BlockchainBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BlockchainBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BlockchainBlockingStub(channel, callOptions); + } + + /** + *
+     * GetBlock retrieves information about a block based on the provided request
+     * parameters.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetBlockResponse getBlock(pactus.blockchain.BlockchainOuterClass.GetBlockRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBlockMethod(), getCallOptions(), request); + } + + /** + *
+     * GetBlockHash retrieves the hash of a block at the specified height.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse getBlockHash(pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBlockHashMethod(), getCallOptions(), request); + } + + /** + *
+     * GetBlockHeight retrieves the height of a block with the specified hash.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse getBlockHeight(pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBlockHeightMethod(), getCallOptions(), request); + } + + /** + *
+     * GetBlockchainInfo retrieves general information about the blockchain.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse getBlockchainInfo(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetBlockchainInfoMethod(), getCallOptions(), request); + } + + /** + *
+     * GetConsensusInfo retrieves information about the consensus instances.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse getConsensusInfo(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetConsensusInfoMethod(), getCallOptions(), request); + } + + /** + *
+     * GetAccount retrieves information about an account based on the provided
+     * address.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetAccountResponse getAccount(pactus.blockchain.BlockchainOuterClass.GetAccountRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAccountMethod(), getCallOptions(), request); + } + + /** + *
+     * GetValidator retrieves information about a validator based on the provided
+     * address.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse getValidator(pactus.blockchain.BlockchainOuterClass.GetValidatorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetValidatorMethod(), getCallOptions(), request); + } + + /** + *
+     * GetValidatorByNumber retrieves information about a validator based on the
+     * provided number.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse getValidatorByNumber(pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetValidatorByNumberMethod(), getCallOptions(), request); + } + + /** + *
+     * GetValidatorAddresses retrieves a list of all validator addresses.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse getValidatorAddresses(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetValidatorAddressesMethod(), getCallOptions(), request); + } + + /** + *
+     * GetPublicKey retrieves the public key of an account based on the provided
+     * address.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse getPublicKey(pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPublicKeyMethod(), getCallOptions(), request); + } + + /** + *
+     * GetTxPoolContent retrieves current transactions in the transaction pool.
+     * 
+ */ + public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse getTxPoolContent(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTxPoolContentMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Blockchain service defines RPC methods for interacting with the blockchain.
+   * 
+ */ + public static final class BlockchainFutureStub extends io.grpc.stub.AbstractFutureStub { + private BlockchainFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BlockchainFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BlockchainFutureStub(channel, callOptions); + } + + /** + *
+     * GetBlock retrieves information about a block based on the provided request
+     * parameters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBlock( + pactus.blockchain.BlockchainOuterClass.GetBlockRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBlockMethod(), getCallOptions()), request); + } + + /** + *
+     * GetBlockHash retrieves the hash of a block at the specified height.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBlockHash( + pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBlockHashMethod(), getCallOptions()), request); + } + + /** + *
+     * GetBlockHeight retrieves the height of a block with the specified hash.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBlockHeight( + pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBlockHeightMethod(), getCallOptions()), request); + } + + /** + *
+     * GetBlockchainInfo retrieves general information about the blockchain.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getBlockchainInfo( + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetBlockchainInfoMethod(), getCallOptions()), request); + } + + /** + *
+     * GetConsensusInfo retrieves information about the consensus instances.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getConsensusInfo( + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetConsensusInfoMethod(), getCallOptions()), request); + } + + /** + *
+     * GetAccount retrieves information about an account based on the provided
+     * address.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getAccount( + pactus.blockchain.BlockchainOuterClass.GetAccountRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAccountMethod(), getCallOptions()), request); + } + + /** + *
+     * GetValidator retrieves information about a validator based on the provided
+     * address.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getValidator( + pactus.blockchain.BlockchainOuterClass.GetValidatorRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetValidatorMethod(), getCallOptions()), request); + } + + /** + *
+     * GetValidatorByNumber retrieves information about a validator based on the
+     * provided number.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getValidatorByNumber( + pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetValidatorByNumberMethod(), getCallOptions()), request); + } + + /** + *
+     * GetValidatorAddresses retrieves a list of all validator addresses.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getValidatorAddresses( + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetValidatorAddressesMethod(), getCallOptions()), request); + } + + /** + *
+     * GetPublicKey retrieves the public key of an account based on the provided
+     * address.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getPublicKey( + pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPublicKeyMethod(), getCallOptions()), request); + } + + /** + *
+     * GetTxPoolContent retrieves current transactions in the transaction pool.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getTxPoolContent( + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTxPoolContentMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_BLOCK = 0; + private static final int METHODID_GET_BLOCK_HASH = 1; + private static final int METHODID_GET_BLOCK_HEIGHT = 2; + private static final int METHODID_GET_BLOCKCHAIN_INFO = 3; + private static final int METHODID_GET_CONSENSUS_INFO = 4; + private static final int METHODID_GET_ACCOUNT = 5; + private static final int METHODID_GET_VALIDATOR = 6; + private static final int METHODID_GET_VALIDATOR_BY_NUMBER = 7; + private static final int METHODID_GET_VALIDATOR_ADDRESSES = 8; + private static final int METHODID_GET_PUBLIC_KEY = 9; + private static final int METHODID_GET_TX_POOL_CONTENT = 10; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final BlockchainImplBase serviceImpl; + private final int methodId; + + MethodHandlers(BlockchainImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_BLOCK: + serviceImpl.getBlock((pactus.blockchain.BlockchainOuterClass.GetBlockRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BLOCK_HASH: + serviceImpl.getBlockHash((pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BLOCK_HEIGHT: + serviceImpl.getBlockHeight((pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_BLOCKCHAIN_INFO: + serviceImpl.getBlockchainInfo((pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CONSENSUS_INFO: + serviceImpl.getConsensusInfo((pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ACCOUNT: + serviceImpl.getAccount((pactus.blockchain.BlockchainOuterClass.GetAccountRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_VALIDATOR: + serviceImpl.getValidator((pactus.blockchain.BlockchainOuterClass.GetValidatorRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_VALIDATOR_BY_NUMBER: + serviceImpl.getValidatorByNumber((pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_VALIDATOR_ADDRESSES: + serviceImpl.getValidatorAddresses((pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_PUBLIC_KEY: + serviceImpl.getPublicKey((pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TX_POOL_CONTENT: + serviceImpl.getTxPoolContent((pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class BlockchainBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + BlockchainBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return pactus.blockchain.BlockchainOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Blockchain"); + } + } + + private static final class BlockchainFileDescriptorSupplier + extends BlockchainBaseDescriptorSupplier { + BlockchainFileDescriptorSupplier() {} + } + + private static final class BlockchainMethodDescriptorSupplier + extends BlockchainBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + BlockchainMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (BlockchainGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new BlockchainFileDescriptorSupplier()) + .addMethod(getGetBlockMethod()) + .addMethod(getGetBlockHashMethod()) + .addMethod(getGetBlockHeightMethod()) + .addMethod(getGetBlockchainInfoMethod()) + .addMethod(getGetConsensusInfoMethod()) + .addMethod(getGetAccountMethod()) + .addMethod(getGetValidatorMethod()) + .addMethod(getGetValidatorByNumberMethod()) + .addMethod(getGetValidatorAddressesMethod()) + .addMethod(getGetPublicKeyMethod()) + .addMethod(getGetTxPoolContentMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java b/www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java new file mode 100644 index 000000000..696ee802c --- /dev/null +++ b/www/grpc/gen/java/pactus/blockchain/BlockchainOuterClass.java @@ -0,0 +1,25014 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: blockchain.proto + +package pactus.blockchain; + +public final class BlockchainOuterClass { + private BlockchainOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + *
+   * Enumeration for verbosity levels when requesting block information.
+   * 
+ * + * Protobuf enum {@code pactus.BlockVerbosity} + */ + public enum BlockVerbosity + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Request only block data.
+     * 
+ * + * BLOCK_DATA = 0; + */ + BLOCK_DATA(0), + /** + *
+     * Request block information and transaction IDs.
+     * 
+ * + * BLOCK_INFO = 1; + */ + BLOCK_INFO(1), + /** + *
+     * Request block information and detailed transaction data.
+     * 
+ * + * BLOCK_TRANSACTIONS = 2; + */ + BLOCK_TRANSACTIONS(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Request only block data.
+     * 
+ * + * BLOCK_DATA = 0; + */ + public static final int BLOCK_DATA_VALUE = 0; + /** + *
+     * Request block information and transaction IDs.
+     * 
+ * + * BLOCK_INFO = 1; + */ + public static final int BLOCK_INFO_VALUE = 1; + /** + *
+     * Request block information and detailed transaction data.
+     * 
+ * + * BLOCK_TRANSACTIONS = 2; + */ + public static final int BLOCK_TRANSACTIONS_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BlockVerbosity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static BlockVerbosity forNumber(int value) { + switch (value) { + case 0: return BLOCK_DATA; + case 1: return BLOCK_INFO; + case 2: return BLOCK_TRANSACTIONS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BlockVerbosity> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public BlockVerbosity findValueByNumber(int number) { + return BlockVerbosity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final BlockVerbosity[] VALUES = values(); + + public static BlockVerbosity valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private BlockVerbosity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pactus.BlockVerbosity) + } + + /** + *
+   * Enumeration for types of votes.
+   * 
+ * + * Protobuf enum {@code pactus.VoteType} + */ + public enum VoteType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown vote type.
+     * 
+ * + * VOTE_UNKNOWN = 0; + */ + VOTE_UNKNOWN(0), + /** + *
+     * Prepare vote type.
+     * 
+ * + * VOTE_PREPARE = 1; + */ + VOTE_PREPARE(1), + /** + *
+     * Precommit vote type.
+     * 
+ * + * VOTE_PRECOMMIT = 2; + */ + VOTE_PRECOMMIT(2), + /** + *
+     * Change proposer vote type.
+     * 
+ * + * VOTE_CHANGE_PROPOSER = 3; + */ + VOTE_CHANGE_PROPOSER(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown vote type.
+     * 
+ * + * VOTE_UNKNOWN = 0; + */ + public static final int VOTE_UNKNOWN_VALUE = 0; + /** + *
+     * Prepare vote type.
+     * 
+ * + * VOTE_PREPARE = 1; + */ + public static final int VOTE_PREPARE_VALUE = 1; + /** + *
+     * Precommit vote type.
+     * 
+ * + * VOTE_PRECOMMIT = 2; + */ + public static final int VOTE_PRECOMMIT_VALUE = 2; + /** + *
+     * Change proposer vote type.
+     * 
+ * + * VOTE_CHANGE_PROPOSER = 3; + */ + public static final int VOTE_CHANGE_PROPOSER_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static VoteType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static VoteType forNumber(int value) { + switch (value) { + case 0: return VOTE_UNKNOWN; + case 1: return VOTE_PREPARE; + case 2: return VOTE_PRECOMMIT; + case 3: return VOTE_CHANGE_PROPOSER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + VoteType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public VoteType findValueByNumber(int number) { + return VoteType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.getDescriptor().getEnumTypes().get(1); + } + + private static final VoteType[] VALUES = values(); + + public static VoteType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private VoteType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pactus.VoteType) + } + + public interface GetAccountRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetAccountRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The address of the account to retrieve information for.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The address of the account to retrieve information for.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + } + /** + *
+   * Message to request account information based on an address.
+   * 
+ * + * Protobuf type {@code pactus.GetAccountRequest} + */ + public static final class GetAccountRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetAccountRequest) + GetAccountRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAccountRequest.newBuilder() to construct. + private GetAccountRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAccountRequest() { + address_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAccountRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetAccountRequest.class, pactus.blockchain.BlockchainOuterClass.GetAccountRequest.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object address_; + /** + *
+     * The address of the account to retrieve information for.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The address of the account to retrieve information for.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetAccountRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetAccountRequest other = (pactus.blockchain.BlockchainOuterClass.GetAccountRequest) obj; + + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetAccountRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to request account information based on an address.
+     * 
+ * + * Protobuf type {@code pactus.GetAccountRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetAccountRequest) + pactus.blockchain.BlockchainOuterClass.GetAccountRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetAccountRequest.class, pactus.blockchain.BlockchainOuterClass.GetAccountRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetAccountRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + address_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetAccountRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetAccountRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetAccountRequest build() { + pactus.blockchain.BlockchainOuterClass.GetAccountRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetAccountRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetAccountRequest result = new pactus.blockchain.BlockchainOuterClass.GetAccountRequest(this); + result.address_ = address_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetAccountRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetAccountRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetAccountRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetAccountRequest.getDefaultInstance()) return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * The address of the account to retrieve information for.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the account to retrieve information for.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the account to retrieve information for.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the account to retrieve information for.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The address of the account to retrieve information for.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetAccountRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetAccountRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetAccountRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetAccountRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetAccountRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAccountRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetAccountRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetAccountResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetAccountResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Detailed information about the account.
+     * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + boolean hasAccount(); + /** + *
+     * Detailed information about the account.
+     * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + * @return The account. + */ + pactus.blockchain.BlockchainOuterClass.AccountInfo getAccount(); + /** + *
+     * Detailed information about the account.
+     * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + */ + pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder getAccountOrBuilder(); + } + /** + *
+   * Message containing the response with account information.
+   * 
+ * + * Protobuf type {@code pactus.GetAccountResponse} + */ + public static final class GetAccountResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetAccountResponse) + GetAccountResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAccountResponse.newBuilder() to construct. + private GetAccountResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAccountResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAccountResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetAccountResponse.class, pactus.blockchain.BlockchainOuterClass.GetAccountResponse.Builder.class); + } + + public static final int ACCOUNT_FIELD_NUMBER = 1; + private pactus.blockchain.BlockchainOuterClass.AccountInfo account_; + /** + *
+     * Detailed information about the account.
+     * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + @java.lang.Override + public boolean hasAccount() { + return account_ != null; + } + /** + *
+     * Detailed information about the account.
+     * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + * @return The account. + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.AccountInfo getAccount() { + return account_ == null ? pactus.blockchain.BlockchainOuterClass.AccountInfo.getDefaultInstance() : account_; + } + /** + *
+     * Detailed information about the account.
+     * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder getAccountOrBuilder() { + return getAccount(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (account_ != null) { + output.writeMessage(1, getAccount()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (account_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAccount()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetAccountResponse)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetAccountResponse other = (pactus.blockchain.BlockchainOuterClass.GetAccountResponse) obj; + + if (hasAccount() != other.hasAccount()) return false; + if (hasAccount()) { + if (!getAccount() + .equals(other.getAccount())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAccount()) { + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetAccountResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing the response with account information.
+     * 
+ * + * Protobuf type {@code pactus.GetAccountResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetAccountResponse) + pactus.blockchain.BlockchainOuterClass.GetAccountResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetAccountResponse.class, pactus.blockchain.BlockchainOuterClass.GetAccountResponse.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetAccountResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (accountBuilder_ == null) { + account_ = null; + } else { + account_ = null; + accountBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetAccountResponse_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetAccountResponse getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetAccountResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetAccountResponse build() { + pactus.blockchain.BlockchainOuterClass.GetAccountResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetAccountResponse buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetAccountResponse result = new pactus.blockchain.BlockchainOuterClass.GetAccountResponse(this); + if (accountBuilder_ == null) { + result.account_ = account_; + } else { + result.account_ = accountBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetAccountResponse) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetAccountResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetAccountResponse other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetAccountResponse.getDefaultInstance()) return this; + if (other.hasAccount()) { + mergeAccount(other.getAccount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getAccountFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private pactus.blockchain.BlockchainOuterClass.AccountInfo account_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.AccountInfo, pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder, pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder> accountBuilder_; + /** + *
+       * Detailed information about the account.
+       * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + * @return Whether the account field is set. + */ + public boolean hasAccount() { + return accountBuilder_ != null || account_ != null; + } + /** + *
+       * Detailed information about the account.
+       * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + * @return The account. + */ + public pactus.blockchain.BlockchainOuterClass.AccountInfo getAccount() { + if (accountBuilder_ == null) { + return account_ == null ? pactus.blockchain.BlockchainOuterClass.AccountInfo.getDefaultInstance() : account_; + } else { + return accountBuilder_.getMessage(); + } + } + /** + *
+       * Detailed information about the account.
+       * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + */ + public Builder setAccount(pactus.blockchain.BlockchainOuterClass.AccountInfo value) { + if (accountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + account_ = value; + onChanged(); + } else { + accountBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Detailed information about the account.
+       * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + */ + public Builder setAccount( + pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder builderForValue) { + if (accountBuilder_ == null) { + account_ = builderForValue.build(); + onChanged(); + } else { + accountBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Detailed information about the account.
+       * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + */ + public Builder mergeAccount(pactus.blockchain.BlockchainOuterClass.AccountInfo value) { + if (accountBuilder_ == null) { + if (account_ != null) { + account_ = + pactus.blockchain.BlockchainOuterClass.AccountInfo.newBuilder(account_).mergeFrom(value).buildPartial(); + } else { + account_ = value; + } + onChanged(); + } else { + accountBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Detailed information about the account.
+       * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + */ + public Builder clearAccount() { + if (accountBuilder_ == null) { + account_ = null; + onChanged(); + } else { + account_ = null; + accountBuilder_ = null; + } + + return this; + } + /** + *
+       * Detailed information about the account.
+       * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + */ + public pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder getAccountBuilder() { + + onChanged(); + return getAccountFieldBuilder().getBuilder(); + } + /** + *
+       * Detailed information about the account.
+       * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + */ + public pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder getAccountOrBuilder() { + if (accountBuilder_ != null) { + return accountBuilder_.getMessageOrBuilder(); + } else { + return account_ == null ? + pactus.blockchain.BlockchainOuterClass.AccountInfo.getDefaultInstance() : account_; + } + } + /** + *
+       * Detailed information about the account.
+       * 
+ * + * .pactus.AccountInfo account = 1 [json_name = "account"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.AccountInfo, pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder, pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder> + getAccountFieldBuilder() { + if (accountBuilder_ == null) { + accountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.AccountInfo, pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder, pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder>( + getAccount(), + getParentForChildren(), + isClean()); + account_ = null; + } + return accountBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetAccountResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetAccountResponse) + private static final pactus.blockchain.BlockchainOuterClass.GetAccountResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetAccountResponse(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetAccountResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAccountResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetAccountResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetValidatorAddressesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressesRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Message to request validator addresses.
+   * 
+ * + * Protobuf type {@code pactus.GetValidatorAddressesRequest} + */ + public static final class GetValidatorAddressesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressesRequest) + GetValidatorAddressesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetValidatorAddressesRequest.newBuilder() to construct. + private GetValidatorAddressesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetValidatorAddressesRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetValidatorAddressesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest other = (pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to request validator addresses.
+     * 
+ * + * Protobuf type {@code pactus.GetValidatorAddressesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressesRequest) + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest build() { + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest result = new pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressesRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressesRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetValidatorAddressesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetValidatorAddressesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * List of validator addresses.
+     * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @return A list containing the addresses. + */ + java.util.List + getAddressesList(); + /** + *
+     * List of validator addresses.
+     * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @return The count of addresses. + */ + int getAddressesCount(); + /** + *
+     * List of validator addresses.
+     * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @param index The index of the element to return. + * @return The addresses at the given index. + */ + java.lang.String getAddresses(int index); + /** + *
+     * List of validator addresses.
+     * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @param index The index of the value to return. + * @return The bytes of the addresses at the given index. + */ + com.google.protobuf.ByteString + getAddressesBytes(int index); + } + /** + *
+   * Message containing the response with a list of validator addresses.
+   * 
+ * + * Protobuf type {@code pactus.GetValidatorAddressesResponse} + */ + public static final class GetValidatorAddressesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressesResponse) + GetValidatorAddressesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetValidatorAddressesResponse.newBuilder() to construct. + private GetValidatorAddressesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetValidatorAddressesResponse() { + addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetValidatorAddressesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.class, pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.Builder.class); + } + + public static final int ADDRESSES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList addresses_; + /** + *
+     * List of validator addresses.
+     * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @return A list containing the addresses. + */ + public com.google.protobuf.ProtocolStringList + getAddressesList() { + return addresses_; + } + /** + *
+     * List of validator addresses.
+     * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @return The count of addresses. + */ + public int getAddressesCount() { + return addresses_.size(); + } + /** + *
+     * List of validator addresses.
+     * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @param index The index of the element to return. + * @return The addresses at the given index. + */ + public java.lang.String getAddresses(int index) { + return addresses_.get(index); + } + /** + *
+     * List of validator addresses.
+     * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @param index The index of the value to return. + * @return The bytes of the addresses at the given index. + */ + public com.google.protobuf.ByteString + getAddressesBytes(int index) { + return addresses_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < addresses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, addresses_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < addresses_.size(); i++) { + dataSize += computeStringSizeNoTag(addresses_.getRaw(i)); + } + size += dataSize; + size += 1 * getAddressesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse other = (pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse) obj; + + if (!getAddressesList() + .equals(other.getAddressesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAddressesCount() > 0) { + hash = (37 * hash) + ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getAddressesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing the response with a list of validator addresses.
+     * 
+ * + * Protobuf type {@code pactus.GetValidatorAddressesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressesResponse) + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.class, pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorAddressesResponse_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse build() { + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse result = new pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + addresses_ = addresses_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.addresses_ = addresses_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse.getDefaultInstance()) return this; + if (!other.addresses_.isEmpty()) { + if (addresses_.isEmpty()) { + addresses_ = other.addresses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAddressesIsMutable(); + addresses_.addAll(other.addresses_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAddressesIsMutable(); + addresses_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureAddressesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + addresses_ = new com.google.protobuf.LazyStringArrayList(addresses_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * List of validator addresses.
+       * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @return A list containing the addresses. + */ + public com.google.protobuf.ProtocolStringList + getAddressesList() { + return addresses_.getUnmodifiableView(); + } + /** + *
+       * List of validator addresses.
+       * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @return The count of addresses. + */ + public int getAddressesCount() { + return addresses_.size(); + } + /** + *
+       * List of validator addresses.
+       * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @param index The index of the element to return. + * @return The addresses at the given index. + */ + public java.lang.String getAddresses(int index) { + return addresses_.get(index); + } + /** + *
+       * List of validator addresses.
+       * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @param index The index of the value to return. + * @return The bytes of the addresses at the given index. + */ + public com.google.protobuf.ByteString + getAddressesBytes(int index) { + return addresses_.getByteString(index); + } + /** + *
+       * List of validator addresses.
+       * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @param index The index to set the value at. + * @param value The addresses to set. + * @return This builder for chaining. + */ + public Builder setAddresses( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAddressesIsMutable(); + addresses_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * List of validator addresses.
+       * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @param value The addresses to add. + * @return This builder for chaining. + */ + public Builder addAddresses( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAddressesIsMutable(); + addresses_.add(value); + onChanged(); + return this; + } + /** + *
+       * List of validator addresses.
+       * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @param values The addresses to add. + * @return This builder for chaining. + */ + public Builder addAllAddresses( + java.lang.Iterable values) { + ensureAddressesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, addresses_); + onChanged(); + return this; + } + /** + *
+       * List of validator addresses.
+       * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @return This builder for chaining. + */ + public Builder clearAddresses() { + addresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * List of validator addresses.
+       * 
+ * + * repeated string addresses = 1 [json_name = "addresses"]; + * @param value The bytes of the addresses to add. + * @return This builder for chaining. + */ + public Builder addAddressesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAddressesIsMutable(); + addresses_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressesResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressesResponse) + private static final pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetValidatorAddressesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorAddressesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetValidatorRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetValidatorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The address of the validator to retrieve information for.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The address of the validator to retrieve information for.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + } + /** + *
+   * Message to request validator information based on an address.
+   * 
+ * + * Protobuf type {@code pactus.GetValidatorRequest} + */ + public static final class GetValidatorRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetValidatorRequest) + GetValidatorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetValidatorRequest.newBuilder() to construct. + private GetValidatorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetValidatorRequest() { + address_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetValidatorRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object address_; + /** + *
+     * The address of the validator to retrieve information for.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The address of the validator to retrieve information for.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetValidatorRequest other = (pactus.blockchain.BlockchainOuterClass.GetValidatorRequest) obj; + + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetValidatorRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to request validator information based on an address.
+     * 
+ * + * Protobuf type {@code pactus.GetValidatorRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetValidatorRequest) + pactus.blockchain.BlockchainOuterClass.GetValidatorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + address_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorRequest build() { + pactus.blockchain.BlockchainOuterClass.GetValidatorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetValidatorRequest result = new pactus.blockchain.BlockchainOuterClass.GetValidatorRequest(this); + result.address_ = address_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetValidatorRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetValidatorRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetValidatorRequest.getDefaultInstance()) return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * The address of the validator to retrieve information for.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the validator to retrieve information for.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the validator to retrieve information for.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the validator to retrieve information for.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The address of the validator to retrieve information for.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetValidatorRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetValidatorRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetValidatorRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetValidatorRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetValidatorRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetValidatorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetValidatorByNumberRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetValidatorByNumberRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The unique number of the validator to retrieve information for.
+     * 
+ * + * int32 number = 1 [json_name = "number"]; + * @return The number. + */ + int getNumber(); + } + /** + *
+   * Message to request validator information based on a validator number.
+   * 
+ * + * Protobuf type {@code pactus.GetValidatorByNumberRequest} + */ + public static final class GetValidatorByNumberRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetValidatorByNumberRequest) + GetValidatorByNumberRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetValidatorByNumberRequest.newBuilder() to construct. + private GetValidatorByNumberRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetValidatorByNumberRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetValidatorByNumberRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.Builder.class); + } + + public static final int NUMBER_FIELD_NUMBER = 1; + private int number_; + /** + *
+     * The unique number of the validator to retrieve information for.
+     * 
+ * + * int32 number = 1 [json_name = "number"]; + * @return The number. + */ + @java.lang.Override + public int getNumber() { + return number_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (number_ != 0) { + output.writeInt32(1, number_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (number_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, number_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest other = (pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest) obj; + + if (getNumber() + != other.getNumber()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getNumber(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to request validator information based on a validator number.
+     * 
+ * + * Protobuf type {@code pactus.GetValidatorByNumberRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetValidatorByNumberRequest) + pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.class, pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + number_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorByNumberRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest build() { + pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest result = new pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest(this); + result.number_ = number_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest.getDefaultInstance()) return this; + if (other.getNumber() != 0) { + setNumber(other.getNumber()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + number_ = input.readInt32(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int number_ ; + /** + *
+       * The unique number of the validator to retrieve information for.
+       * 
+ * + * int32 number = 1 [json_name = "number"]; + * @return The number. + */ + @java.lang.Override + public int getNumber() { + return number_; + } + /** + *
+       * The unique number of the validator to retrieve information for.
+       * 
+ * + * int32 number = 1 [json_name = "number"]; + * @param value The number to set. + * @return This builder for chaining. + */ + public Builder setNumber(int value) { + + number_ = value; + onChanged(); + return this; + } + /** + *
+       * The unique number of the validator to retrieve information for.
+       * 
+ * + * int32 number = 1 [json_name = "number"]; + * @return This builder for chaining. + */ + public Builder clearNumber() { + + number_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetValidatorByNumberRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetValidatorByNumberRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetValidatorByNumberRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorByNumberRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetValidatorResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetValidatorResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Detailed information about the validator.
+     * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + * @return Whether the validator field is set. + */ + boolean hasValidator(); + /** + *
+     * Detailed information about the validator.
+     * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + * @return The validator. + */ + pactus.blockchain.BlockchainOuterClass.ValidatorInfo getValidator(); + /** + *
+     * Detailed information about the validator.
+     * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + */ + pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorOrBuilder(); + } + /** + *
+   * Message containing the response with validator information.
+   * 
+ * + * Protobuf type {@code pactus.GetValidatorResponse} + */ + public static final class GetValidatorResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetValidatorResponse) + GetValidatorResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetValidatorResponse.newBuilder() to construct. + private GetValidatorResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetValidatorResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetValidatorResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.class, pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.Builder.class); + } + + public static final int VALIDATOR_FIELD_NUMBER = 1; + private pactus.blockchain.BlockchainOuterClass.ValidatorInfo validator_; + /** + *
+     * Detailed information about the validator.
+     * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + * @return Whether the validator field is set. + */ + @java.lang.Override + public boolean hasValidator() { + return validator_ != null; + } + /** + *
+     * Detailed information about the validator.
+     * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + * @return The validator. + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getValidator() { + return validator_ == null ? pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance() : validator_; + } + /** + *
+     * Detailed information about the validator.
+     * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorOrBuilder() { + return getValidator(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (validator_ != null) { + output.writeMessage(1, getValidator()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (validator_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getValidator()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorResponse)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetValidatorResponse other = (pactus.blockchain.BlockchainOuterClass.GetValidatorResponse) obj; + + if (hasValidator() != other.hasValidator()) return false; + if (hasValidator()) { + if (!getValidator() + .equals(other.getValidator())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasValidator()) { + hash = (37 * hash) + VALIDATOR_FIELD_NUMBER; + hash = (53 * hash) + getValidator().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetValidatorResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing the response with validator information.
+     * 
+ * + * Protobuf type {@code pactus.GetValidatorResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetValidatorResponse) + pactus.blockchain.BlockchainOuterClass.GetValidatorResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.class, pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (validatorBuilder_ == null) { + validator_ = null; + } else { + validator_ = null; + validatorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetValidatorResponse_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse build() { + pactus.blockchain.BlockchainOuterClass.GetValidatorResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetValidatorResponse result = new pactus.blockchain.BlockchainOuterClass.GetValidatorResponse(this); + if (validatorBuilder_ == null) { + result.validator_ = validator_; + } else { + result.validator_ = validatorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetValidatorResponse) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetValidatorResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetValidatorResponse other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetValidatorResponse.getDefaultInstance()) return this; + if (other.hasValidator()) { + mergeValidator(other.getValidator()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValidatorFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private pactus.blockchain.BlockchainOuterClass.ValidatorInfo validator_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder> validatorBuilder_; + /** + *
+       * Detailed information about the validator.
+       * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + * @return Whether the validator field is set. + */ + public boolean hasValidator() { + return validatorBuilder_ != null || validator_ != null; + } + /** + *
+       * Detailed information about the validator.
+       * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + * @return The validator. + */ + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getValidator() { + if (validatorBuilder_ == null) { + return validator_ == null ? pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance() : validator_; + } else { + return validatorBuilder_.getMessage(); + } + } + /** + *
+       * Detailed information about the validator.
+       * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + */ + public Builder setValidator(pactus.blockchain.BlockchainOuterClass.ValidatorInfo value) { + if (validatorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + validator_ = value; + onChanged(); + } else { + validatorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Detailed information about the validator.
+       * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + */ + public Builder setValidator( + pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) { + if (validatorBuilder_ == null) { + validator_ = builderForValue.build(); + onChanged(); + } else { + validatorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Detailed information about the validator.
+       * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + */ + public Builder mergeValidator(pactus.blockchain.BlockchainOuterClass.ValidatorInfo value) { + if (validatorBuilder_ == null) { + if (validator_ != null) { + validator_ = + pactus.blockchain.BlockchainOuterClass.ValidatorInfo.newBuilder(validator_).mergeFrom(value).buildPartial(); + } else { + validator_ = value; + } + onChanged(); + } else { + validatorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Detailed information about the validator.
+       * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + */ + public Builder clearValidator() { + if (validatorBuilder_ == null) { + validator_ = null; + onChanged(); + } else { + validator_ = null; + validatorBuilder_ = null; + } + + return this; + } + /** + *
+       * Detailed information about the validator.
+       * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + */ + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder getValidatorBuilder() { + + onChanged(); + return getValidatorFieldBuilder().getBuilder(); + } + /** + *
+       * Detailed information about the validator.
+       * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + */ + public pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getValidatorOrBuilder() { + if (validatorBuilder_ != null) { + return validatorBuilder_.getMessageOrBuilder(); + } else { + return validator_ == null ? + pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance() : validator_; + } + } + /** + *
+       * Detailed information about the validator.
+       * 
+ * + * .pactus.ValidatorInfo validator = 1 [json_name = "validator"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder> + getValidatorFieldBuilder() { + if (validatorBuilder_ == null) { + validatorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder>( + getValidator(), + getParentForChildren(), + isClean()); + validator_ = null; + } + return validatorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetValidatorResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetValidatorResponse) + private static final pactus.blockchain.BlockchainOuterClass.GetValidatorResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetValidatorResponse(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetValidatorResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetValidatorResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetValidatorResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetPublicKeyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetPublicKeyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The address for which to retrieve the public key.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The address for which to retrieve the public key.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + } + /** + *
+   * Message to request public key based on an address.
+   * 
+ * + * Protobuf type {@code pactus.GetPublicKeyRequest} + */ + public static final class GetPublicKeyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetPublicKeyRequest) + GetPublicKeyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPublicKeyRequest.newBuilder() to construct. + private GetPublicKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetPublicKeyRequest() { + address_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetPublicKeyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.class, pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object address_; + /** + *
+     * The address for which to retrieve the public key.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The address for which to retrieve the public key.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest other = (pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest) obj; + + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to request public key based on an address.
+     * 
+ * + * Protobuf type {@code pactus.GetPublicKeyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetPublicKeyRequest) + pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.class, pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + address_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest build() { + pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest result = new pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest(this); + result.address_ = address_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest.getDefaultInstance()) return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * The address for which to retrieve the public key.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address for which to retrieve the public key.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address for which to retrieve the public key.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The address for which to retrieve the public key.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The address for which to retrieve the public key.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetPublicKeyRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetPublicKeyRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPublicKeyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetPublicKeyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetPublicKeyResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetPublicKeyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The public key associated with the provided address.
+     * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + *
+     * The public key associated with the provided address.
+     * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString + getPublicKeyBytes(); + } + /** + *
+   * Message containing the response with the public key.
+   * 
+ * + * Protobuf type {@code pactus.GetPublicKeyResponse} + */ + public static final class GetPublicKeyResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetPublicKeyResponse) + GetPublicKeyResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPublicKeyResponse.newBuilder() to construct. + private GetPublicKeyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetPublicKeyResponse() { + publicKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetPublicKeyResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.class, pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.Builder.class); + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object publicKey_; + /** + *
+     * The public key associated with the provided address.
+     * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + *
+     * The public key associated with the provided address.
+     * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse other = (pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse) obj; + + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing the response with the public key.
+     * 
+ * + * Protobuf type {@code pactus.GetPublicKeyResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetPublicKeyResponse) + pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.class, pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + publicKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetPublicKeyResponse_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse build() { + pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse result = new pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse(this); + result.publicKey_ = publicKey_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse.getDefaultInstance()) return this; + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + publicKey_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object publicKey_ = ""; + /** + *
+       * The public key associated with the provided address.
+       * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The public key associated with the provided address.
+       * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The public key associated with the provided address.
+       * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + *
+       * The public key associated with the provided address.
+       * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + /** + *
+       * The public key associated with the provided address.
+       * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKey_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetPublicKeyResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetPublicKeyResponse) + private static final pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPublicKeyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetPublicKeyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetBlockRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The height of the block to retrieve.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + int getHeight(); + + /** + *
+     * The verbosity level for block information.
+     * 
+ * + * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The enum numeric value on the wire for verbosity. + */ + int getVerbosityValue(); + /** + *
+     * The verbosity level for block information.
+     * 
+ * + * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The verbosity. + */ + pactus.blockchain.BlockchainOuterClass.BlockVerbosity getVerbosity(); + } + /** + *
+   * Message to request block information based on height and verbosity level.
+   * 
+ * + * Protobuf type {@code pactus.GetBlockRequest} + */ + public static final class GetBlockRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetBlockRequest) + GetBlockRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockRequest.newBuilder() to construct. + private GetBlockRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockRequest() { + verbosity_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockRequest.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private int height_; + /** + *
+     * The height of the block to retrieve.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int VERBOSITY_FIELD_NUMBER = 2; + private int verbosity_; + /** + *
+     * The verbosity level for block information.
+     * 
+ * + * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The enum numeric value on the wire for verbosity. + */ + @java.lang.Override public int getVerbosityValue() { + return verbosity_; + } + /** + *
+     * The verbosity level for block information.
+     * 
+ * + * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The verbosity. + */ + @java.lang.Override public pactus.blockchain.BlockchainOuterClass.BlockVerbosity getVerbosity() { + @SuppressWarnings("deprecation") + pactus.blockchain.BlockchainOuterClass.BlockVerbosity result = pactus.blockchain.BlockchainOuterClass.BlockVerbosity.valueOf(verbosity_); + return result == null ? pactus.blockchain.BlockchainOuterClass.BlockVerbosity.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (height_ != 0) { + output.writeUInt32(1, height_); + } + if (verbosity_ != pactus.blockchain.BlockchainOuterClass.BlockVerbosity.BLOCK_DATA.getNumber()) { + output.writeEnum(2, verbosity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, height_); + } + if (verbosity_ != pactus.blockchain.BlockchainOuterClass.BlockVerbosity.BLOCK_DATA.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, verbosity_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetBlockRequest other = (pactus.blockchain.BlockchainOuterClass.GetBlockRequest) obj; + + if (getHeight() + != other.getHeight()) return false; + if (verbosity_ != other.verbosity_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + VERBOSITY_FIELD_NUMBER; + hash = (53 * hash) + verbosity_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to request block information based on height and verbosity level.
+     * 
+ * + * Protobuf type {@code pactus.GetBlockRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetBlockRequest) + pactus.blockchain.BlockchainOuterClass.GetBlockRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + height_ = 0; + + verbosity_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetBlockRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockRequest build() { + pactus.blockchain.BlockchainOuterClass.GetBlockRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetBlockRequest result = new pactus.blockchain.BlockchainOuterClass.GetBlockRequest(this); + result.height_ = height_; + result.verbosity_ = verbosity_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetBlockRequest.getDefaultInstance()) return this; + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.verbosity_ != 0) { + setVerbosityValue(other.getVerbosityValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + height_ = input.readUInt32(); + + break; + } // case 8 + case 16: { + verbosity_ = input.readEnum(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int height_ ; + /** + *
+       * The height of the block to retrieve.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+       * The height of the block to retrieve.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       * The height of the block to retrieve.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private int verbosity_ = 0; + /** + *
+       * The verbosity level for block information.
+       * 
+ * + * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The enum numeric value on the wire for verbosity. + */ + @java.lang.Override public int getVerbosityValue() { + return verbosity_; + } + /** + *
+       * The verbosity level for block information.
+       * 
+ * + * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; + * @param value The enum numeric value on the wire for verbosity to set. + * @return This builder for chaining. + */ + public Builder setVerbosityValue(int value) { + + verbosity_ = value; + onChanged(); + return this; + } + /** + *
+       * The verbosity level for block information.
+       * 
+ * + * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The verbosity. + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.BlockVerbosity getVerbosity() { + @SuppressWarnings("deprecation") + pactus.blockchain.BlockchainOuterClass.BlockVerbosity result = pactus.blockchain.BlockchainOuterClass.BlockVerbosity.valueOf(verbosity_); + return result == null ? pactus.blockchain.BlockchainOuterClass.BlockVerbosity.UNRECOGNIZED : result; + } + /** + *
+       * The verbosity level for block information.
+       * 
+ * + * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; + * @param value The verbosity to set. + * @return This builder for chaining. + */ + public Builder setVerbosity(pactus.blockchain.BlockchainOuterClass.BlockVerbosity value) { + if (value == null) { + throw new NullPointerException(); + } + + verbosity_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The verbosity level for block information.
+       * 
+ * + * .pactus.BlockVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return This builder for chaining. + */ + public Builder clearVerbosity() { + + verbosity_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetBlockRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetBlockRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetBlockRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBlockRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetBlockResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The height of the block.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + int getHeight(); + + /** + *
+     * The hash of the block.
+     * 
+ * + * string hash = 2 [json_name = "hash"]; + * @return The hash. + */ + java.lang.String getHash(); + /** + *
+     * The hash of the block.
+     * 
+ * + * string hash = 2 [json_name = "hash"]; + * @return The bytes for hash. + */ + com.google.protobuf.ByteString + getHashBytes(); + + /** + *
+     * Block data, available only if verbosity level is set to BLOCK_DATA.
+     * 
+ * + * string data = 3 [json_name = "data"]; + * @return The data. + */ + java.lang.String getData(); + /** + *
+     * Block data, available only if verbosity level is set to BLOCK_DATA.
+     * 
+ * + * string data = 3 [json_name = "data"]; + * @return The bytes for data. + */ + com.google.protobuf.ByteString + getDataBytes(); + + /** + *
+     * The timestamp of the block.
+     * 
+ * + * uint32 block_time = 4 [json_name = "blockTime"]; + * @return The blockTime. + */ + int getBlockTime(); + + /** + *
+     * Header information of the block.
+     * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + *
+     * Header information of the block.
+     * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + * @return The header. + */ + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getHeader(); + /** + *
+     * Header information of the block.
+     * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + */ + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder getHeaderOrBuilder(); + + /** + *
+     * Certificate information of the previous block.
+     * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + * @return Whether the prevCert field is set. + */ + boolean hasPrevCert(); + /** + *
+     * Certificate information of the previous block.
+     * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + * @return The prevCert. + */ + pactus.blockchain.BlockchainOuterClass.CertificateInfo getPrevCert(); + /** + *
+     * Certificate information of the previous block.
+     * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + */ + pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder getPrevCertOrBuilder(); + + /** + *
+     * List of transactions in the block, available when verbosity level is set to
+     * BLOCK_TRANSACTIONS.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + java.util.List + getTxsList(); + /** + *
+     * List of transactions in the block, available when verbosity level is set to
+     * BLOCK_TRANSACTIONS.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index); + /** + *
+     * List of transactions in the block, available when verbosity level is set to
+     * BLOCK_TRANSACTIONS.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + int getTxsCount(); + /** + *
+     * List of transactions in the block, available when verbosity level is set to
+     * BLOCK_TRANSACTIONS.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + java.util.List + getTxsOrBuilderList(); + /** + *
+     * List of transactions in the block, available when verbosity level is set to
+     * BLOCK_TRANSACTIONS.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( + int index); + } + /** + *
+   * Message containing the response with block information.
+   * 
+ * + * Protobuf type {@code pactus.GetBlockResponse} + */ + public static final class GetBlockResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetBlockResponse) + GetBlockResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockResponse.newBuilder() to construct. + private GetBlockResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockResponse() { + hash_ = ""; + data_ = ""; + txs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockResponse.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private int height_; + /** + *
+     * The height of the block.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int HASH_FIELD_NUMBER = 2; + private volatile java.lang.Object hash_; + /** + *
+     * The hash of the block.
+     * 
+ * + * string hash = 2 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } + } + /** + *
+     * The hash of the block.
+     * 
+ * + * string hash = 2 [json_name = "hash"]; + * @return The bytes for hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 3; + private volatile java.lang.Object data_; + /** + *
+     * Block data, available only if verbosity level is set to BLOCK_DATA.
+     * 
+ * + * string data = 3 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public java.lang.String getData() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } + } + /** + *
+     * Block data, available only if verbosity level is set to BLOCK_DATA.
+     * 
+ * + * string data = 3 [json_name = "data"]; + * @return The bytes for data. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BLOCK_TIME_FIELD_NUMBER = 4; + private int blockTime_; + /** + *
+     * The timestamp of the block.
+     * 
+ * + * uint32 block_time = 4 [json_name = "blockTime"]; + * @return The blockTime. + */ + @java.lang.Override + public int getBlockTime() { + return blockTime_; + } + + public static final int HEADER_FIELD_NUMBER = 5; + private pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo header_; + /** + *
+     * Header information of the block.
+     * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + * @return Whether the header field is set. + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + *
+     * Header information of the block.
+     * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + * @return The header. + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getHeader() { + return header_ == null ? pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance() : header_; + } + /** + *
+     * Header information of the block.
+     * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder getHeaderOrBuilder() { + return getHeader(); + } + + public static final int PREV_CERT_FIELD_NUMBER = 6; + private pactus.blockchain.BlockchainOuterClass.CertificateInfo prevCert_; + /** + *
+     * Certificate information of the previous block.
+     * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + * @return Whether the prevCert field is set. + */ + @java.lang.Override + public boolean hasPrevCert() { + return prevCert_ != null; + } + /** + *
+     * Certificate information of the previous block.
+     * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + * @return The prevCert. + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.CertificateInfo getPrevCert() { + return prevCert_ == null ? pactus.blockchain.BlockchainOuterClass.CertificateInfo.getDefaultInstance() : prevCert_; + } + /** + *
+     * Certificate information of the previous block.
+     * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder getPrevCertOrBuilder() { + return getPrevCert(); + } + + public static final int TXS_FIELD_NUMBER = 7; + private java.util.List txs_; + /** + *
+     * List of transactions in the block, available when verbosity level is set to
+     * BLOCK_TRANSACTIONS.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + @java.lang.Override + public java.util.List getTxsList() { + return txs_; + } + /** + *
+     * List of transactions in the block, available when verbosity level is set to
+     * BLOCK_TRANSACTIONS.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + @java.lang.Override + public java.util.List + getTxsOrBuilderList() { + return txs_; + } + /** + *
+     * List of transactions in the block, available when verbosity level is set to
+     * BLOCK_TRANSACTIONS.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + @java.lang.Override + public int getTxsCount() { + return txs_.size(); + } + /** + *
+     * List of transactions in the block, available when verbosity level is set to
+     * BLOCK_TRANSACTIONS.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index) { + return txs_.get(index); + } + /** + *
+     * List of transactions in the block, available when verbosity level is set to
+     * BLOCK_TRANSACTIONS.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( + int index) { + return txs_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (height_ != 0) { + output.writeUInt32(1, height_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hash_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, data_); + } + if (blockTime_ != 0) { + output.writeUInt32(4, blockTime_); + } + if (header_ != null) { + output.writeMessage(5, getHeader()); + } + if (prevCert_ != null) { + output.writeMessage(6, getPrevCert()); + } + for (int i = 0; i < txs_.size(); i++) { + output.writeMessage(7, txs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, height_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, hash_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, data_); + } + if (blockTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, blockTime_); + } + if (header_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getHeader()); + } + if (prevCert_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getPrevCert()); + } + for (int i = 0; i < txs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, txs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockResponse)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetBlockResponse other = (pactus.blockchain.BlockchainOuterClass.GetBlockResponse) obj; + + if (getHeight() + != other.getHeight()) return false; + if (!getHash() + .equals(other.getHash())) return false; + if (!getData() + .equals(other.getData())) return false; + if (getBlockTime() + != other.getBlockTime()) return false; + if (hasHeader() != other.hasHeader()) return false; + if (hasHeader()) { + if (!getHeader() + .equals(other.getHeader())) return false; + } + if (hasPrevCert() != other.hasPrevCert()) return false; + if (hasPrevCert()) { + if (!getPrevCert() + .equals(other.getPrevCert())) return false; + } + if (!getTxsList() + .equals(other.getTxsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + HASH_FIELD_NUMBER; + hash = (53 * hash) + getHash().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + BLOCK_TIME_FIELD_NUMBER; + hash = (53 * hash) + getBlockTime(); + if (hasHeader()) { + hash = (37 * hash) + HEADER_FIELD_NUMBER; + hash = (53 * hash) + getHeader().hashCode(); + } + if (hasPrevCert()) { + hash = (37 * hash) + PREV_CERT_FIELD_NUMBER; + hash = (53 * hash) + getPrevCert().hashCode(); + } + if (getTxsCount() > 0) { + hash = (37 * hash) + TXS_FIELD_NUMBER; + hash = (53 * hash) + getTxsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing the response with block information.
+     * 
+ * + * Protobuf type {@code pactus.GetBlockResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetBlockResponse) + pactus.blockchain.BlockchainOuterClass.GetBlockResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockResponse.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + height_ = 0; + + hash_ = ""; + + data_ = ""; + + blockTime_ = 0; + + if (headerBuilder_ == null) { + header_ = null; + } else { + header_ = null; + headerBuilder_ = null; + } + if (prevCertBuilder_ == null) { + prevCert_ = null; + } else { + prevCert_ = null; + prevCertBuilder_ = null; + } + if (txsBuilder_ == null) { + txs_ = java.util.Collections.emptyList(); + } else { + txs_ = null; + txsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockResponse_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockResponse getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetBlockResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockResponse build() { + pactus.blockchain.BlockchainOuterClass.GetBlockResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockResponse buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetBlockResponse result = new pactus.blockchain.BlockchainOuterClass.GetBlockResponse(this); + int from_bitField0_ = bitField0_; + result.height_ = height_; + result.hash_ = hash_; + result.data_ = data_; + result.blockTime_ = blockTime_; + if (headerBuilder_ == null) { + result.header_ = header_; + } else { + result.header_ = headerBuilder_.build(); + } + if (prevCertBuilder_ == null) { + result.prevCert_ = prevCert_; + } else { + result.prevCert_ = prevCertBuilder_.build(); + } + if (txsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + txs_ = java.util.Collections.unmodifiableList(txs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.txs_ = txs_; + } else { + result.txs_ = txsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockResponse) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockResponse other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetBlockResponse.getDefaultInstance()) return this; + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (!other.getHash().isEmpty()) { + hash_ = other.hash_; + onChanged(); + } + if (!other.getData().isEmpty()) { + data_ = other.data_; + onChanged(); + } + if (other.getBlockTime() != 0) { + setBlockTime(other.getBlockTime()); + } + if (other.hasHeader()) { + mergeHeader(other.getHeader()); + } + if (other.hasPrevCert()) { + mergePrevCert(other.getPrevCert()); + } + if (txsBuilder_ == null) { + if (!other.txs_.isEmpty()) { + if (txs_.isEmpty()) { + txs_ = other.txs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTxsIsMutable(); + txs_.addAll(other.txs_); + } + onChanged(); + } + } else { + if (!other.txs_.isEmpty()) { + if (txsBuilder_.isEmpty()) { + txsBuilder_.dispose(); + txsBuilder_ = null; + txs_ = other.txs_; + bitField0_ = (bitField0_ & ~0x00000001); + txsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTxsFieldBuilder() : null; + } else { + txsBuilder_.addAllMessages(other.txs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + height_ = input.readUInt32(); + + break; + } // case 8 + case 18: { + hash_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + data_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: { + blockTime_ = input.readUInt32(); + + break; + } // case 32 + case 42: { + input.readMessage( + getHeaderFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 42 + case 50: { + input.readMessage( + getPrevCertFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 50 + case 58: { + pactus.transaction.TransactionOuterClass.TransactionInfo m = + input.readMessage( + pactus.transaction.TransactionOuterClass.TransactionInfo.parser(), + extensionRegistry); + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + txs_.add(m); + } else { + txsBuilder_.addMessage(m); + } + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int height_ ; + /** + *
+       * The height of the block.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+       * The height of the block.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       * The height of the block.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private java.lang.Object hash_ = ""; + /** + *
+       * The hash of the block.
+       * 
+ * + * string hash = 2 [json_name = "hash"]; + * @return The hash. + */ + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The hash of the block.
+       * 
+ * + * string hash = 2 [json_name = "hash"]; + * @return The bytes for hash. + */ + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The hash of the block.
+       * 
+ * + * string hash = 2 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hash_ = value; + onChanged(); + return this; + } + /** + *
+       * The hash of the block.
+       * 
+ * + * string hash = 2 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + + hash_ = getDefaultInstance().getHash(); + onChanged(); + return this; + } + /** + *
+       * The hash of the block.
+       * 
+ * + * string hash = 2 [json_name = "hash"]; + * @param value The bytes for hash to set. + * @return This builder for chaining. + */ + public Builder setHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hash_ = value; + onChanged(); + return this; + } + + private java.lang.Object data_ = ""; + /** + *
+       * Block data, available only if verbosity level is set to BLOCK_DATA.
+       * 
+ * + * string data = 3 [json_name = "data"]; + * @return The data. + */ + public java.lang.String getData() { + java.lang.Object ref = data_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Block data, available only if verbosity level is set to BLOCK_DATA.
+       * 
+ * + * string data = 3 [json_name = "data"]; + * @return The bytes for data. + */ + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Block data, available only if verbosity level is set to BLOCK_DATA.
+       * 
+ * + * string data = 3 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       * Block data, available only if verbosity level is set to BLOCK_DATA.
+       * 
+ * + * string data = 3 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + /** + *
+       * Block data, available only if verbosity level is set to BLOCK_DATA.
+       * 
+ * + * string data = 3 [json_name = "data"]; + * @param value The bytes for data to set. + * @return This builder for chaining. + */ + public Builder setDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + data_ = value; + onChanged(); + return this; + } + + private int blockTime_ ; + /** + *
+       * The timestamp of the block.
+       * 
+ * + * uint32 block_time = 4 [json_name = "blockTime"]; + * @return The blockTime. + */ + @java.lang.Override + public int getBlockTime() { + return blockTime_; + } + /** + *
+       * The timestamp of the block.
+       * 
+ * + * uint32 block_time = 4 [json_name = "blockTime"]; + * @param value The blockTime to set. + * @return This builder for chaining. + */ + public Builder setBlockTime(int value) { + + blockTime_ = value; + onChanged(); + return this; + } + /** + *
+       * The timestamp of the block.
+       * 
+ * + * uint32 block_time = 4 [json_name = "blockTime"]; + * @return This builder for chaining. + */ + public Builder clearBlockTime() { + + blockTime_ = 0; + onChanged(); + return this; + } + + private pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo header_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder> headerBuilder_; + /** + *
+       * Header information of the block.
+       * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + * @return Whether the header field is set. + */ + public boolean hasHeader() { + return headerBuilder_ != null || header_ != null; + } + /** + *
+       * Header information of the block.
+       * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + * @return The header. + */ + public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getHeader() { + if (headerBuilder_ == null) { + return header_ == null ? pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance() : header_; + } else { + return headerBuilder_.getMessage(); + } + } + /** + *
+       * Header information of the block.
+       * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + */ + public Builder setHeader(pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo value) { + if (headerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + header_ = value; + onChanged(); + } else { + headerBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Header information of the block.
+       * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + */ + public Builder setHeader( + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder builderForValue) { + if (headerBuilder_ == null) { + header_ = builderForValue.build(); + onChanged(); + } else { + headerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Header information of the block.
+       * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + */ + public Builder mergeHeader(pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo value) { + if (headerBuilder_ == null) { + if (header_ != null) { + header_ = + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.newBuilder(header_).mergeFrom(value).buildPartial(); + } else { + header_ = value; + } + onChanged(); + } else { + headerBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Header information of the block.
+       * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + */ + public Builder clearHeader() { + if (headerBuilder_ == null) { + header_ = null; + onChanged(); + } else { + header_ = null; + headerBuilder_ = null; + } + + return this; + } + /** + *
+       * Header information of the block.
+       * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + */ + public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder getHeaderBuilder() { + + onChanged(); + return getHeaderFieldBuilder().getBuilder(); + } + /** + *
+       * Header information of the block.
+       * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + */ + public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder getHeaderOrBuilder() { + if (headerBuilder_ != null) { + return headerBuilder_.getMessageOrBuilder(); + } else { + return header_ == null ? + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance() : header_; + } + } + /** + *
+       * Header information of the block.
+       * 
+ * + * .pactus.BlockHeaderInfo header = 5 [json_name = "header"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder> + getHeaderFieldBuilder() { + if (headerBuilder_ == null) { + headerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder>( + getHeader(), + getParentForChildren(), + isClean()); + header_ = null; + } + return headerBuilder_; + } + + private pactus.blockchain.BlockchainOuterClass.CertificateInfo prevCert_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.CertificateInfo, pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder, pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder> prevCertBuilder_; + /** + *
+       * Certificate information of the previous block.
+       * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + * @return Whether the prevCert field is set. + */ + public boolean hasPrevCert() { + return prevCertBuilder_ != null || prevCert_ != null; + } + /** + *
+       * Certificate information of the previous block.
+       * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + * @return The prevCert. + */ + public pactus.blockchain.BlockchainOuterClass.CertificateInfo getPrevCert() { + if (prevCertBuilder_ == null) { + return prevCert_ == null ? pactus.blockchain.BlockchainOuterClass.CertificateInfo.getDefaultInstance() : prevCert_; + } else { + return prevCertBuilder_.getMessage(); + } + } + /** + *
+       * Certificate information of the previous block.
+       * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + */ + public Builder setPrevCert(pactus.blockchain.BlockchainOuterClass.CertificateInfo value) { + if (prevCertBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + prevCert_ = value; + onChanged(); + } else { + prevCertBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Certificate information of the previous block.
+       * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + */ + public Builder setPrevCert( + pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder builderForValue) { + if (prevCertBuilder_ == null) { + prevCert_ = builderForValue.build(); + onChanged(); + } else { + prevCertBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Certificate information of the previous block.
+       * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + */ + public Builder mergePrevCert(pactus.blockchain.BlockchainOuterClass.CertificateInfo value) { + if (prevCertBuilder_ == null) { + if (prevCert_ != null) { + prevCert_ = + pactus.blockchain.BlockchainOuterClass.CertificateInfo.newBuilder(prevCert_).mergeFrom(value).buildPartial(); + } else { + prevCert_ = value; + } + onChanged(); + } else { + prevCertBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Certificate information of the previous block.
+       * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + */ + public Builder clearPrevCert() { + if (prevCertBuilder_ == null) { + prevCert_ = null; + onChanged(); + } else { + prevCert_ = null; + prevCertBuilder_ = null; + } + + return this; + } + /** + *
+       * Certificate information of the previous block.
+       * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + */ + public pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder getPrevCertBuilder() { + + onChanged(); + return getPrevCertFieldBuilder().getBuilder(); + } + /** + *
+       * Certificate information of the previous block.
+       * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + */ + public pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder getPrevCertOrBuilder() { + if (prevCertBuilder_ != null) { + return prevCertBuilder_.getMessageOrBuilder(); + } else { + return prevCert_ == null ? + pactus.blockchain.BlockchainOuterClass.CertificateInfo.getDefaultInstance() : prevCert_; + } + } + /** + *
+       * Certificate information of the previous block.
+       * 
+ * + * .pactus.CertificateInfo prev_cert = 6 [json_name = "prevCert"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.CertificateInfo, pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder, pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder> + getPrevCertFieldBuilder() { + if (prevCertBuilder_ == null) { + prevCertBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.CertificateInfo, pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder, pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder>( + getPrevCert(), + getParentForChildren(), + isClean()); + prevCert_ = null; + } + return prevCertBuilder_; + } + + private java.util.List txs_ = + java.util.Collections.emptyList(); + private void ensureTxsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + txs_ = new java.util.ArrayList(txs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> txsBuilder_; + + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public java.util.List getTxsList() { + if (txsBuilder_ == null) { + return java.util.Collections.unmodifiableList(txs_); + } else { + return txsBuilder_.getMessageList(); + } + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public int getTxsCount() { + if (txsBuilder_ == null) { + return txs_.size(); + } else { + return txsBuilder_.getCount(); + } + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index) { + if (txsBuilder_ == null) { + return txs_.get(index); + } else { + return txsBuilder_.getMessage(index); + } + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public Builder setTxs( + int index, pactus.transaction.TransactionOuterClass.TransactionInfo value) { + if (txsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTxsIsMutable(); + txs_.set(index, value); + onChanged(); + } else { + txsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public Builder setTxs( + int index, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + txs_.set(index, builderForValue.build()); + onChanged(); + } else { + txsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public Builder addTxs(pactus.transaction.TransactionOuterClass.TransactionInfo value) { + if (txsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTxsIsMutable(); + txs_.add(value); + onChanged(); + } else { + txsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public Builder addTxs( + int index, pactus.transaction.TransactionOuterClass.TransactionInfo value) { + if (txsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTxsIsMutable(); + txs_.add(index, value); + onChanged(); + } else { + txsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public Builder addTxs( + pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + txs_.add(builderForValue.build()); + onChanged(); + } else { + txsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public Builder addTxs( + int index, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + txs_.add(index, builderForValue.build()); + onChanged(); + } else { + txsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public Builder addAllTxs( + java.lang.Iterable values) { + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, txs_); + onChanged(); + } else { + txsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public Builder clearTxs() { + if (txsBuilder_ == null) { + txs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + txsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public Builder removeTxs(int index) { + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + txs_.remove(index); + onChanged(); + } else { + txsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder getTxsBuilder( + int index) { + return getTxsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( + int index) { + if (txsBuilder_ == null) { + return txs_.get(index); } else { + return txsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public java.util.List + getTxsOrBuilderList() { + if (txsBuilder_ != null) { + return txsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(txs_); + } + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder() { + return getTxsFieldBuilder().addBuilder( + pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance()); + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder( + int index) { + return getTxsFieldBuilder().addBuilder( + index, pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance()); + } + /** + *
+       * List of transactions in the block, available when verbosity level is set to
+       * BLOCK_TRANSACTIONS.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 7 [json_name = "txs"]; + */ + public java.util.List + getTxsBuilderList() { + return getTxsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> + getTxsFieldBuilder() { + if (txsBuilder_ == null) { + txsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder>( + txs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + txs_ = null; + } + return txsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetBlockResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetBlockResponse) + private static final pactus.blockchain.BlockchainOuterClass.GetBlockResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockResponse(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBlockResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockHashRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetBlockHashRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The height of the block to retrieve the hash for.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + int getHeight(); + } + /** + *
+   * Message to request block hash based on height.
+   * 
+ * + * Protobuf type {@code pactus.GetBlockHashRequest} + */ + public static final class GetBlockHashRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetBlockHashRequest) + GetBlockHashRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockHashRequest.newBuilder() to construct. + private GetBlockHashRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockHashRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockHashRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private int height_; + /** + *
+     * The height of the block to retrieve the hash for.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (height_ != 0) { + output.writeUInt32(1, height_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, height_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest other = (pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest) obj; + + if (getHeight() + != other.getHeight()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to request block hash based on height.
+     * 
+ * + * Protobuf type {@code pactus.GetBlockHashRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetBlockHashRequest) + pactus.blockchain.BlockchainOuterClass.GetBlockHashRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + height_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest build() { + pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest result = new pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest(this); + result.height_ = height_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest.getDefaultInstance()) return this; + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + height_ = input.readUInt32(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int height_ ; + /** + *
+       * The height of the block to retrieve the hash for.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+       * The height of the block to retrieve the hash for.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       * The height of the block to retrieve the hash for.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetBlockHashRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetBlockHashRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBlockHashRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHashRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockHashResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetBlockHashResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The hash of the block.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + java.lang.String getHash(); + /** + *
+     * The hash of the block.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + com.google.protobuf.ByteString + getHashBytes(); + } + /** + *
+   * Message containing the response with the block hash.
+   * 
+ * + * Protobuf type {@code pactus.GetBlockHashResponse} + */ + public static final class GetBlockHashResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetBlockHashResponse) + GetBlockHashResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockHashResponse.newBuilder() to construct. + private GetBlockHashResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockHashResponse() { + hash_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockHashResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.Builder.class); + } + + public static final int HASH_FIELD_NUMBER = 1; + private volatile java.lang.Object hash_; + /** + *
+     * The hash of the block.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } + } + /** + *
+     * The hash of the block.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hash_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hash_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse other = (pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse) obj; + + if (!getHash() + .equals(other.getHash())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HASH_FIELD_NUMBER; + hash = (53 * hash) + getHash().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing the response with the block hash.
+     * 
+ * + * Protobuf type {@code pactus.GetBlockHashResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetBlockHashResponse) + pactus.blockchain.BlockchainOuterClass.GetBlockHashResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + hash_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHashResponse_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse build() { + pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse result = new pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse(this); + result.hash_ = hash_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse.getDefaultInstance()) return this; + if (!other.getHash().isEmpty()) { + hash_ = other.hash_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + hash_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object hash_ = ""; + /** + *
+       * The hash of the block.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The hash of the block.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The hash of the block.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hash_ = value; + onChanged(); + return this; + } + /** + *
+       * The hash of the block.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + + hash_ = getDefaultInstance().getHash(); + onChanged(); + return this; + } + /** + *
+       * The hash of the block.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @param value The bytes for hash to set. + * @return This builder for chaining. + */ + public Builder setHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hash_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetBlockHashResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetBlockHashResponse) + private static final pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBlockHashResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHashResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockHeightRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetBlockHeightRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The hash of the block to retrieve the height for.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + java.lang.String getHash(); + /** + *
+     * The hash of the block to retrieve the height for.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + com.google.protobuf.ByteString + getHashBytes(); + } + /** + *
+   * Message to request block height based on hash.
+   * 
+ * + * Protobuf type {@code pactus.GetBlockHeightRequest} + */ + public static final class GetBlockHeightRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetBlockHeightRequest) + GetBlockHeightRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockHeightRequest.newBuilder() to construct. + private GetBlockHeightRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockHeightRequest() { + hash_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockHeightRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.Builder.class); + } + + public static final int HASH_FIELD_NUMBER = 1; + private volatile java.lang.Object hash_; + /** + *
+     * The hash of the block to retrieve the height for.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } + } + /** + *
+     * The hash of the block to retrieve the height for.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hash_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hash_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest other = (pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest) obj; + + if (!getHash() + .equals(other.getHash())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HASH_FIELD_NUMBER; + hash = (53 * hash) + getHash().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to request block height based on hash.
+     * 
+ * + * Protobuf type {@code pactus.GetBlockHeightRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetBlockHeightRequest) + pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + hash_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest build() { + pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest result = new pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest(this); + result.hash_ = hash_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest.getDefaultInstance()) return this; + if (!other.getHash().isEmpty()) { + hash_ = other.hash_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + hash_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object hash_ = ""; + /** + *
+       * The hash of the block to retrieve the height for.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The hash of the block to retrieve the height for.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The hash of the block to retrieve the height for.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hash_ = value; + onChanged(); + return this; + } + /** + *
+       * The hash of the block to retrieve the height for.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + + hash_ = getDefaultInstance().getHash(); + onChanged(); + return this; + } + /** + *
+       * The hash of the block to retrieve the height for.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @param value The bytes for hash to set. + * @return This builder for chaining. + */ + public Builder setHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hash_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetBlockHeightRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetBlockHeightRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBlockHeightRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHeightRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockHeightResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetBlockHeightResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The height of the block.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + int getHeight(); + } + /** + *
+   * Message containing the response with the block height.
+   * 
+ * + * Protobuf type {@code pactus.GetBlockHeightResponse} + */ + public static final class GetBlockHeightResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetBlockHeightResponse) + GetBlockHeightResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockHeightResponse.newBuilder() to construct. + private GetBlockHeightResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockHeightResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockHeightResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private int height_; + /** + *
+     * The height of the block.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (height_ != 0) { + output.writeUInt32(1, height_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, height_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse other = (pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse) obj; + + if (getHeight() + != other.getHeight()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing the response with the block height.
+     * 
+ * + * Protobuf type {@code pactus.GetBlockHeightResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetBlockHeightResponse) + pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + height_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockHeightResponse_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse build() { + pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse result = new pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse(this); + result.height_ = height_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse.getDefaultInstance()) return this; + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + height_ = input.readUInt32(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int height_ ; + /** + *
+       * The height of the block.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+       * The height of the block.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       * The height of the block.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetBlockHeightResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetBlockHeightResponse) + private static final pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBlockHeightResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockHeightResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockchainInfoRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetBlockchainInfoRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Message to request general information about the blockchain.
+   * 
+ * + * Protobuf type {@code pactus.GetBlockchainInfoRequest} + */ + public static final class GetBlockchainInfoRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetBlockchainInfoRequest) + GetBlockchainInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockchainInfoRequest.newBuilder() to construct. + private GetBlockchainInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockchainInfoRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockchainInfoRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest other = (pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to request general information about the blockchain.
+     * 
+ * + * Protobuf type {@code pactus.GetBlockchainInfoRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetBlockchainInfoRequest) + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.class, pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest build() { + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest result = new pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetBlockchainInfoRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetBlockchainInfoRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBlockchainInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetBlockchainInfoResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetBlockchainInfoResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The height of the last block in the blockchain.
+     * 
+ * + * uint32 last_block_height = 1 [json_name = "lastBlockHeight"]; + * @return The lastBlockHeight. + */ + int getLastBlockHeight(); + + /** + *
+     * The hash of the last block in the blockchain.
+     * 
+ * + * string last_block_hash = 2 [json_name = "lastBlockHash"]; + * @return The lastBlockHash. + */ + java.lang.String getLastBlockHash(); + /** + *
+     * The hash of the last block in the blockchain.
+     * 
+ * + * string last_block_hash = 2 [json_name = "lastBlockHash"]; + * @return The bytes for lastBlockHash. + */ + com.google.protobuf.ByteString + getLastBlockHashBytes(); + + /** + *
+     * The total number of accounts in the blockchain.
+     * 
+ * + * int32 total_accounts = 3 [json_name = "totalAccounts"]; + * @return The totalAccounts. + */ + int getTotalAccounts(); + + /** + *
+     * The total number of validators in the blockchain.
+     * 
+ * + * int32 total_validators = 4 [json_name = "totalValidators"]; + * @return The totalValidators. + */ + int getTotalValidators(); + + /** + *
+     * The total power of the blockchain.
+     * 
+ * + * int64 total_power = 5 [json_name = "totalPower"]; + * @return The totalPower. + */ + long getTotalPower(); + + /** + *
+     * The power of the committee.
+     * 
+ * + * int64 committee_power = 6 [json_name = "committeePower"]; + * @return The committeePower. + */ + long getCommitteePower(); + + /** + *
+     * List of committee validators.
+     * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + java.util.List + getCommitteeValidatorsList(); + /** + *
+     * List of committee validators.
+     * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + pactus.blockchain.BlockchainOuterClass.ValidatorInfo getCommitteeValidators(int index); + /** + *
+     * List of committee validators.
+     * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + int getCommitteeValidatorsCount(); + /** + *
+     * List of committee validators.
+     * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + java.util.List + getCommitteeValidatorsOrBuilderList(); + /** + *
+     * List of committee validators.
+     * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getCommitteeValidatorsOrBuilder( + int index); + + /** + *
+     * If the blocks are subject to pruning.
+     * 
+ * + * bool is_pruned = 8 [json_name = "isPruned"]; + * @return The isPruned. + */ + boolean getIsPruned(); + + /** + *
+     * Lowest-height block stored (only present if pruning is enabled)
+     * 
+ * + * uint32 pruning_height = 9 [json_name = "pruningHeight"]; + * @return The pruningHeight. + */ + int getPruningHeight(); + + /** + *
+     * Timestamp of the last block in Unix format
+     * 
+ * + * int64 last_block_time = 10 [json_name = "lastBlockTime"]; + * @return The lastBlockTime. + */ + long getLastBlockTime(); + } + /** + *
+   * Message containing the response with general blockchain information.
+   * 
+ * + * Protobuf type {@code pactus.GetBlockchainInfoResponse} + */ + public static final class GetBlockchainInfoResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetBlockchainInfoResponse) + GetBlockchainInfoResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetBlockchainInfoResponse.newBuilder() to construct. + private GetBlockchainInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetBlockchainInfoResponse() { + lastBlockHash_ = ""; + committeeValidators_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetBlockchainInfoResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.Builder.class); + } + + public static final int LAST_BLOCK_HEIGHT_FIELD_NUMBER = 1; + private int lastBlockHeight_; + /** + *
+     * The height of the last block in the blockchain.
+     * 
+ * + * uint32 last_block_height = 1 [json_name = "lastBlockHeight"]; + * @return The lastBlockHeight. + */ + @java.lang.Override + public int getLastBlockHeight() { + return lastBlockHeight_; + } + + public static final int LAST_BLOCK_HASH_FIELD_NUMBER = 2; + private volatile java.lang.Object lastBlockHash_; + /** + *
+     * The hash of the last block in the blockchain.
+     * 
+ * + * string last_block_hash = 2 [json_name = "lastBlockHash"]; + * @return The lastBlockHash. + */ + @java.lang.Override + public java.lang.String getLastBlockHash() { + java.lang.Object ref = lastBlockHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastBlockHash_ = s; + return s; + } + } + /** + *
+     * The hash of the last block in the blockchain.
+     * 
+ * + * string last_block_hash = 2 [json_name = "lastBlockHash"]; + * @return The bytes for lastBlockHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLastBlockHashBytes() { + java.lang.Object ref = lastBlockHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lastBlockHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_ACCOUNTS_FIELD_NUMBER = 3; + private int totalAccounts_; + /** + *
+     * The total number of accounts in the blockchain.
+     * 
+ * + * int32 total_accounts = 3 [json_name = "totalAccounts"]; + * @return The totalAccounts. + */ + @java.lang.Override + public int getTotalAccounts() { + return totalAccounts_; + } + + public static final int TOTAL_VALIDATORS_FIELD_NUMBER = 4; + private int totalValidators_; + /** + *
+     * The total number of validators in the blockchain.
+     * 
+ * + * int32 total_validators = 4 [json_name = "totalValidators"]; + * @return The totalValidators. + */ + @java.lang.Override + public int getTotalValidators() { + return totalValidators_; + } + + public static final int TOTAL_POWER_FIELD_NUMBER = 5; + private long totalPower_; + /** + *
+     * The total power of the blockchain.
+     * 
+ * + * int64 total_power = 5 [json_name = "totalPower"]; + * @return The totalPower. + */ + @java.lang.Override + public long getTotalPower() { + return totalPower_; + } + + public static final int COMMITTEE_POWER_FIELD_NUMBER = 6; + private long committeePower_; + /** + *
+     * The power of the committee.
+     * 
+ * + * int64 committee_power = 6 [json_name = "committeePower"]; + * @return The committeePower. + */ + @java.lang.Override + public long getCommitteePower() { + return committeePower_; + } + + public static final int COMMITTEE_VALIDATORS_FIELD_NUMBER = 7; + private java.util.List committeeValidators_; + /** + *
+     * List of committee validators.
+     * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + @java.lang.Override + public java.util.List getCommitteeValidatorsList() { + return committeeValidators_; + } + /** + *
+     * List of committee validators.
+     * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + @java.lang.Override + public java.util.List + getCommitteeValidatorsOrBuilderList() { + return committeeValidators_; + } + /** + *
+     * List of committee validators.
+     * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + @java.lang.Override + public int getCommitteeValidatorsCount() { + return committeeValidators_.size(); + } + /** + *
+     * List of committee validators.
+     * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getCommitteeValidators(int index) { + return committeeValidators_.get(index); + } + /** + *
+     * List of committee validators.
+     * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getCommitteeValidatorsOrBuilder( + int index) { + return committeeValidators_.get(index); + } + + public static final int IS_PRUNED_FIELD_NUMBER = 8; + private boolean isPruned_; + /** + *
+     * If the blocks are subject to pruning.
+     * 
+ * + * bool is_pruned = 8 [json_name = "isPruned"]; + * @return The isPruned. + */ + @java.lang.Override + public boolean getIsPruned() { + return isPruned_; + } + + public static final int PRUNING_HEIGHT_FIELD_NUMBER = 9; + private int pruningHeight_; + /** + *
+     * Lowest-height block stored (only present if pruning is enabled)
+     * 
+ * + * uint32 pruning_height = 9 [json_name = "pruningHeight"]; + * @return The pruningHeight. + */ + @java.lang.Override + public int getPruningHeight() { + return pruningHeight_; + } + + public static final int LAST_BLOCK_TIME_FIELD_NUMBER = 10; + private long lastBlockTime_; + /** + *
+     * Timestamp of the last block in Unix format
+     * 
+ * + * int64 last_block_time = 10 [json_name = "lastBlockTime"]; + * @return The lastBlockTime. + */ + @java.lang.Override + public long getLastBlockTime() { + return lastBlockTime_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (lastBlockHeight_ != 0) { + output.writeUInt32(1, lastBlockHeight_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastBlockHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, lastBlockHash_); + } + if (totalAccounts_ != 0) { + output.writeInt32(3, totalAccounts_); + } + if (totalValidators_ != 0) { + output.writeInt32(4, totalValidators_); + } + if (totalPower_ != 0L) { + output.writeInt64(5, totalPower_); + } + if (committeePower_ != 0L) { + output.writeInt64(6, committeePower_); + } + for (int i = 0; i < committeeValidators_.size(); i++) { + output.writeMessage(7, committeeValidators_.get(i)); + } + if (isPruned_ != false) { + output.writeBool(8, isPruned_); + } + if (pruningHeight_ != 0) { + output.writeUInt32(9, pruningHeight_); + } + if (lastBlockTime_ != 0L) { + output.writeInt64(10, lastBlockTime_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lastBlockHeight_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, lastBlockHeight_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastBlockHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, lastBlockHash_); + } + if (totalAccounts_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, totalAccounts_); + } + if (totalValidators_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, totalValidators_); + } + if (totalPower_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, totalPower_); + } + if (committeePower_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, committeePower_); + } + for (int i = 0; i < committeeValidators_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, committeeValidators_.get(i)); + } + if (isPruned_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, isPruned_); + } + if (pruningHeight_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, pruningHeight_); + } + if (lastBlockTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, lastBlockTime_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse other = (pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse) obj; + + if (getLastBlockHeight() + != other.getLastBlockHeight()) return false; + if (!getLastBlockHash() + .equals(other.getLastBlockHash())) return false; + if (getTotalAccounts() + != other.getTotalAccounts()) return false; + if (getTotalValidators() + != other.getTotalValidators()) return false; + if (getTotalPower() + != other.getTotalPower()) return false; + if (getCommitteePower() + != other.getCommitteePower()) return false; + if (!getCommitteeValidatorsList() + .equals(other.getCommitteeValidatorsList())) return false; + if (getIsPruned() + != other.getIsPruned()) return false; + if (getPruningHeight() + != other.getPruningHeight()) return false; + if (getLastBlockTime() + != other.getLastBlockTime()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LAST_BLOCK_HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getLastBlockHeight(); + hash = (37 * hash) + LAST_BLOCK_HASH_FIELD_NUMBER; + hash = (53 * hash) + getLastBlockHash().hashCode(); + hash = (37 * hash) + TOTAL_ACCOUNTS_FIELD_NUMBER; + hash = (53 * hash) + getTotalAccounts(); + hash = (37 * hash) + TOTAL_VALIDATORS_FIELD_NUMBER; + hash = (53 * hash) + getTotalValidators(); + hash = (37 * hash) + TOTAL_POWER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalPower()); + hash = (37 * hash) + COMMITTEE_POWER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCommitteePower()); + if (getCommitteeValidatorsCount() > 0) { + hash = (37 * hash) + COMMITTEE_VALIDATORS_FIELD_NUMBER; + hash = (53 * hash) + getCommitteeValidatorsList().hashCode(); + } + hash = (37 * hash) + IS_PRUNED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsPruned()); + hash = (37 * hash) + PRUNING_HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getPruningHeight(); + hash = (37 * hash) + LAST_BLOCK_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLastBlockTime()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing the response with general blockchain information.
+     * 
+ * + * Protobuf type {@code pactus.GetBlockchainInfoResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetBlockchainInfoResponse) + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.class, pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + lastBlockHeight_ = 0; + + lastBlockHash_ = ""; + + totalAccounts_ = 0; + + totalValidators_ = 0; + + totalPower_ = 0L; + + committeePower_ = 0L; + + if (committeeValidatorsBuilder_ == null) { + committeeValidators_ = java.util.Collections.emptyList(); + } else { + committeeValidators_ = null; + committeeValidatorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + isPruned_ = false; + + pruningHeight_ = 0; + + lastBlockTime_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetBlockchainInfoResponse_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse build() { + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse result = new pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse(this); + int from_bitField0_ = bitField0_; + result.lastBlockHeight_ = lastBlockHeight_; + result.lastBlockHash_ = lastBlockHash_; + result.totalAccounts_ = totalAccounts_; + result.totalValidators_ = totalValidators_; + result.totalPower_ = totalPower_; + result.committeePower_ = committeePower_; + if (committeeValidatorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + committeeValidators_ = java.util.Collections.unmodifiableList(committeeValidators_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.committeeValidators_ = committeeValidators_; + } else { + result.committeeValidators_ = committeeValidatorsBuilder_.build(); + } + result.isPruned_ = isPruned_; + result.pruningHeight_ = pruningHeight_; + result.lastBlockTime_ = lastBlockTime_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse.getDefaultInstance()) return this; + if (other.getLastBlockHeight() != 0) { + setLastBlockHeight(other.getLastBlockHeight()); + } + if (!other.getLastBlockHash().isEmpty()) { + lastBlockHash_ = other.lastBlockHash_; + onChanged(); + } + if (other.getTotalAccounts() != 0) { + setTotalAccounts(other.getTotalAccounts()); + } + if (other.getTotalValidators() != 0) { + setTotalValidators(other.getTotalValidators()); + } + if (other.getTotalPower() != 0L) { + setTotalPower(other.getTotalPower()); + } + if (other.getCommitteePower() != 0L) { + setCommitteePower(other.getCommitteePower()); + } + if (committeeValidatorsBuilder_ == null) { + if (!other.committeeValidators_.isEmpty()) { + if (committeeValidators_.isEmpty()) { + committeeValidators_ = other.committeeValidators_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCommitteeValidatorsIsMutable(); + committeeValidators_.addAll(other.committeeValidators_); + } + onChanged(); + } + } else { + if (!other.committeeValidators_.isEmpty()) { + if (committeeValidatorsBuilder_.isEmpty()) { + committeeValidatorsBuilder_.dispose(); + committeeValidatorsBuilder_ = null; + committeeValidators_ = other.committeeValidators_; + bitField0_ = (bitField0_ & ~0x00000001); + committeeValidatorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCommitteeValidatorsFieldBuilder() : null; + } else { + committeeValidatorsBuilder_.addAllMessages(other.committeeValidators_); + } + } + } + if (other.getIsPruned() != false) { + setIsPruned(other.getIsPruned()); + } + if (other.getPruningHeight() != 0) { + setPruningHeight(other.getPruningHeight()); + } + if (other.getLastBlockTime() != 0L) { + setLastBlockTime(other.getLastBlockTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + lastBlockHeight_ = input.readUInt32(); + + break; + } // case 8 + case 18: { + lastBlockHash_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + totalAccounts_ = input.readInt32(); + + break; + } // case 24 + case 32: { + totalValidators_ = input.readInt32(); + + break; + } // case 32 + case 40: { + totalPower_ = input.readInt64(); + + break; + } // case 40 + case 48: { + committeePower_ = input.readInt64(); + + break; + } // case 48 + case 58: { + pactus.blockchain.BlockchainOuterClass.ValidatorInfo m = + input.readMessage( + pactus.blockchain.BlockchainOuterClass.ValidatorInfo.parser(), + extensionRegistry); + if (committeeValidatorsBuilder_ == null) { + ensureCommitteeValidatorsIsMutable(); + committeeValidators_.add(m); + } else { + committeeValidatorsBuilder_.addMessage(m); + } + break; + } // case 58 + case 64: { + isPruned_ = input.readBool(); + + break; + } // case 64 + case 72: { + pruningHeight_ = input.readUInt32(); + + break; + } // case 72 + case 80: { + lastBlockTime_ = input.readInt64(); + + break; + } // case 80 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int lastBlockHeight_ ; + /** + *
+       * The height of the last block in the blockchain.
+       * 
+ * + * uint32 last_block_height = 1 [json_name = "lastBlockHeight"]; + * @return The lastBlockHeight. + */ + @java.lang.Override + public int getLastBlockHeight() { + return lastBlockHeight_; + } + /** + *
+       * The height of the last block in the blockchain.
+       * 
+ * + * uint32 last_block_height = 1 [json_name = "lastBlockHeight"]; + * @param value The lastBlockHeight to set. + * @return This builder for chaining. + */ + public Builder setLastBlockHeight(int value) { + + lastBlockHeight_ = value; + onChanged(); + return this; + } + /** + *
+       * The height of the last block in the blockchain.
+       * 
+ * + * uint32 last_block_height = 1 [json_name = "lastBlockHeight"]; + * @return This builder for chaining. + */ + public Builder clearLastBlockHeight() { + + lastBlockHeight_ = 0; + onChanged(); + return this; + } + + private java.lang.Object lastBlockHash_ = ""; + /** + *
+       * The hash of the last block in the blockchain.
+       * 
+ * + * string last_block_hash = 2 [json_name = "lastBlockHash"]; + * @return The lastBlockHash. + */ + public java.lang.String getLastBlockHash() { + java.lang.Object ref = lastBlockHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastBlockHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The hash of the last block in the blockchain.
+       * 
+ * + * string last_block_hash = 2 [json_name = "lastBlockHash"]; + * @return The bytes for lastBlockHash. + */ + public com.google.protobuf.ByteString + getLastBlockHashBytes() { + java.lang.Object ref = lastBlockHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lastBlockHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The hash of the last block in the blockchain.
+       * 
+ * + * string last_block_hash = 2 [json_name = "lastBlockHash"]; + * @param value The lastBlockHash to set. + * @return This builder for chaining. + */ + public Builder setLastBlockHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + lastBlockHash_ = value; + onChanged(); + return this; + } + /** + *
+       * The hash of the last block in the blockchain.
+       * 
+ * + * string last_block_hash = 2 [json_name = "lastBlockHash"]; + * @return This builder for chaining. + */ + public Builder clearLastBlockHash() { + + lastBlockHash_ = getDefaultInstance().getLastBlockHash(); + onChanged(); + return this; + } + /** + *
+       * The hash of the last block in the blockchain.
+       * 
+ * + * string last_block_hash = 2 [json_name = "lastBlockHash"]; + * @param value The bytes for lastBlockHash to set. + * @return This builder for chaining. + */ + public Builder setLastBlockHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lastBlockHash_ = value; + onChanged(); + return this; + } + + private int totalAccounts_ ; + /** + *
+       * The total number of accounts in the blockchain.
+       * 
+ * + * int32 total_accounts = 3 [json_name = "totalAccounts"]; + * @return The totalAccounts. + */ + @java.lang.Override + public int getTotalAccounts() { + return totalAccounts_; + } + /** + *
+       * The total number of accounts in the blockchain.
+       * 
+ * + * int32 total_accounts = 3 [json_name = "totalAccounts"]; + * @param value The totalAccounts to set. + * @return This builder for chaining. + */ + public Builder setTotalAccounts(int value) { + + totalAccounts_ = value; + onChanged(); + return this; + } + /** + *
+       * The total number of accounts in the blockchain.
+       * 
+ * + * int32 total_accounts = 3 [json_name = "totalAccounts"]; + * @return This builder for chaining. + */ + public Builder clearTotalAccounts() { + + totalAccounts_ = 0; + onChanged(); + return this; + } + + private int totalValidators_ ; + /** + *
+       * The total number of validators in the blockchain.
+       * 
+ * + * int32 total_validators = 4 [json_name = "totalValidators"]; + * @return The totalValidators. + */ + @java.lang.Override + public int getTotalValidators() { + return totalValidators_; + } + /** + *
+       * The total number of validators in the blockchain.
+       * 
+ * + * int32 total_validators = 4 [json_name = "totalValidators"]; + * @param value The totalValidators to set. + * @return This builder for chaining. + */ + public Builder setTotalValidators(int value) { + + totalValidators_ = value; + onChanged(); + return this; + } + /** + *
+       * The total number of validators in the blockchain.
+       * 
+ * + * int32 total_validators = 4 [json_name = "totalValidators"]; + * @return This builder for chaining. + */ + public Builder clearTotalValidators() { + + totalValidators_ = 0; + onChanged(); + return this; + } + + private long totalPower_ ; + /** + *
+       * The total power of the blockchain.
+       * 
+ * + * int64 total_power = 5 [json_name = "totalPower"]; + * @return The totalPower. + */ + @java.lang.Override + public long getTotalPower() { + return totalPower_; + } + /** + *
+       * The total power of the blockchain.
+       * 
+ * + * int64 total_power = 5 [json_name = "totalPower"]; + * @param value The totalPower to set. + * @return This builder for chaining. + */ + public Builder setTotalPower(long value) { + + totalPower_ = value; + onChanged(); + return this; + } + /** + *
+       * The total power of the blockchain.
+       * 
+ * + * int64 total_power = 5 [json_name = "totalPower"]; + * @return This builder for chaining. + */ + public Builder clearTotalPower() { + + totalPower_ = 0L; + onChanged(); + return this; + } + + private long committeePower_ ; + /** + *
+       * The power of the committee.
+       * 
+ * + * int64 committee_power = 6 [json_name = "committeePower"]; + * @return The committeePower. + */ + @java.lang.Override + public long getCommitteePower() { + return committeePower_; + } + /** + *
+       * The power of the committee.
+       * 
+ * + * int64 committee_power = 6 [json_name = "committeePower"]; + * @param value The committeePower to set. + * @return This builder for chaining. + */ + public Builder setCommitteePower(long value) { + + committeePower_ = value; + onChanged(); + return this; + } + /** + *
+       * The power of the committee.
+       * 
+ * + * int64 committee_power = 6 [json_name = "committeePower"]; + * @return This builder for chaining. + */ + public Builder clearCommitteePower() { + + committeePower_ = 0L; + onChanged(); + return this; + } + + private java.util.List committeeValidators_ = + java.util.Collections.emptyList(); + private void ensureCommitteeValidatorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + committeeValidators_ = new java.util.ArrayList(committeeValidators_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder> committeeValidatorsBuilder_; + + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public java.util.List getCommitteeValidatorsList() { + if (committeeValidatorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(committeeValidators_); + } else { + return committeeValidatorsBuilder_.getMessageList(); + } + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public int getCommitteeValidatorsCount() { + if (committeeValidatorsBuilder_ == null) { + return committeeValidators_.size(); + } else { + return committeeValidatorsBuilder_.getCount(); + } + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getCommitteeValidators(int index) { + if (committeeValidatorsBuilder_ == null) { + return committeeValidators_.get(index); + } else { + return committeeValidatorsBuilder_.getMessage(index); + } + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public Builder setCommitteeValidators( + int index, pactus.blockchain.BlockchainOuterClass.ValidatorInfo value) { + if (committeeValidatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommitteeValidatorsIsMutable(); + committeeValidators_.set(index, value); + onChanged(); + } else { + committeeValidatorsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public Builder setCommitteeValidators( + int index, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) { + if (committeeValidatorsBuilder_ == null) { + ensureCommitteeValidatorsIsMutable(); + committeeValidators_.set(index, builderForValue.build()); + onChanged(); + } else { + committeeValidatorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public Builder addCommitteeValidators(pactus.blockchain.BlockchainOuterClass.ValidatorInfo value) { + if (committeeValidatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommitteeValidatorsIsMutable(); + committeeValidators_.add(value); + onChanged(); + } else { + committeeValidatorsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public Builder addCommitteeValidators( + int index, pactus.blockchain.BlockchainOuterClass.ValidatorInfo value) { + if (committeeValidatorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommitteeValidatorsIsMutable(); + committeeValidators_.add(index, value); + onChanged(); + } else { + committeeValidatorsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public Builder addCommitteeValidators( + pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) { + if (committeeValidatorsBuilder_ == null) { + ensureCommitteeValidatorsIsMutable(); + committeeValidators_.add(builderForValue.build()); + onChanged(); + } else { + committeeValidatorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public Builder addCommitteeValidators( + int index, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder builderForValue) { + if (committeeValidatorsBuilder_ == null) { + ensureCommitteeValidatorsIsMutable(); + committeeValidators_.add(index, builderForValue.build()); + onChanged(); + } else { + committeeValidatorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public Builder addAllCommitteeValidators( + java.lang.Iterable values) { + if (committeeValidatorsBuilder_ == null) { + ensureCommitteeValidatorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, committeeValidators_); + onChanged(); + } else { + committeeValidatorsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public Builder clearCommitteeValidators() { + if (committeeValidatorsBuilder_ == null) { + committeeValidators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + committeeValidatorsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public Builder removeCommitteeValidators(int index) { + if (committeeValidatorsBuilder_ == null) { + ensureCommitteeValidatorsIsMutable(); + committeeValidators_.remove(index); + onChanged(); + } else { + committeeValidatorsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder getCommitteeValidatorsBuilder( + int index) { + return getCommitteeValidatorsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder getCommitteeValidatorsOrBuilder( + int index) { + if (committeeValidatorsBuilder_ == null) { + return committeeValidators_.get(index); } else { + return committeeValidatorsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public java.util.List + getCommitteeValidatorsOrBuilderList() { + if (committeeValidatorsBuilder_ != null) { + return committeeValidatorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(committeeValidators_); + } + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder addCommitteeValidatorsBuilder() { + return getCommitteeValidatorsFieldBuilder().addBuilder( + pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance()); + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder addCommitteeValidatorsBuilder( + int index) { + return getCommitteeValidatorsFieldBuilder().addBuilder( + index, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance()); + } + /** + *
+       * List of committee validators.
+       * 
+ * + * repeated .pactus.ValidatorInfo committee_validators = 7 [json_name = "committeeValidators"]; + */ + public java.util.List + getCommitteeValidatorsBuilderList() { + return getCommitteeValidatorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder> + getCommitteeValidatorsFieldBuilder() { + if (committeeValidatorsBuilder_ == null) { + committeeValidatorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.ValidatorInfo, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder, pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder>( + committeeValidators_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + committeeValidators_ = null; + } + return committeeValidatorsBuilder_; + } + + private boolean isPruned_ ; + /** + *
+       * If the blocks are subject to pruning.
+       * 
+ * + * bool is_pruned = 8 [json_name = "isPruned"]; + * @return The isPruned. + */ + @java.lang.Override + public boolean getIsPruned() { + return isPruned_; + } + /** + *
+       * If the blocks are subject to pruning.
+       * 
+ * + * bool is_pruned = 8 [json_name = "isPruned"]; + * @param value The isPruned to set. + * @return This builder for chaining. + */ + public Builder setIsPruned(boolean value) { + + isPruned_ = value; + onChanged(); + return this; + } + /** + *
+       * If the blocks are subject to pruning.
+       * 
+ * + * bool is_pruned = 8 [json_name = "isPruned"]; + * @return This builder for chaining. + */ + public Builder clearIsPruned() { + + isPruned_ = false; + onChanged(); + return this; + } + + private int pruningHeight_ ; + /** + *
+       * Lowest-height block stored (only present if pruning is enabled)
+       * 
+ * + * uint32 pruning_height = 9 [json_name = "pruningHeight"]; + * @return The pruningHeight. + */ + @java.lang.Override + public int getPruningHeight() { + return pruningHeight_; + } + /** + *
+       * Lowest-height block stored (only present if pruning is enabled)
+       * 
+ * + * uint32 pruning_height = 9 [json_name = "pruningHeight"]; + * @param value The pruningHeight to set. + * @return This builder for chaining. + */ + public Builder setPruningHeight(int value) { + + pruningHeight_ = value; + onChanged(); + return this; + } + /** + *
+       * Lowest-height block stored (only present if pruning is enabled)
+       * 
+ * + * uint32 pruning_height = 9 [json_name = "pruningHeight"]; + * @return This builder for chaining. + */ + public Builder clearPruningHeight() { + + pruningHeight_ = 0; + onChanged(); + return this; + } + + private long lastBlockTime_ ; + /** + *
+       * Timestamp of the last block in Unix format
+       * 
+ * + * int64 last_block_time = 10 [json_name = "lastBlockTime"]; + * @return The lastBlockTime. + */ + @java.lang.Override + public long getLastBlockTime() { + return lastBlockTime_; + } + /** + *
+       * Timestamp of the last block in Unix format
+       * 
+ * + * int64 last_block_time = 10 [json_name = "lastBlockTime"]; + * @param value The lastBlockTime to set. + * @return This builder for chaining. + */ + public Builder setLastBlockTime(long value) { + + lastBlockTime_ = value; + onChanged(); + return this; + } + /** + *
+       * Timestamp of the last block in Unix format
+       * 
+ * + * int64 last_block_time = 10 [json_name = "lastBlockTime"]; + * @return This builder for chaining. + */ + public Builder clearLastBlockTime() { + + lastBlockTime_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetBlockchainInfoResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetBlockchainInfoResponse) + private static final pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetBlockchainInfoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetBlockchainInfoResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetConsensusInfoRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetConsensusInfoRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Message to request consensus information.
+   * 
+ * + * Protobuf type {@code pactus.GetConsensusInfoRequest} + */ + public static final class GetConsensusInfoRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetConsensusInfoRequest) + GetConsensusInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetConsensusInfoRequest.newBuilder() to construct. + private GetConsensusInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetConsensusInfoRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetConsensusInfoRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.class, pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest other = (pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message to request consensus information.
+     * 
+ * + * Protobuf type {@code pactus.GetConsensusInfoRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetConsensusInfoRequest) + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.class, pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest build() { + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest result = new pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetConsensusInfoRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetConsensusInfoRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetConsensusInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetConsensusInfoResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetConsensusInfoResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + * @return Whether the proposal field is set. + */ + boolean hasProposal(); + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + * @return The proposal. + */ + pactus.blockchain.BlockchainOuterClass.Proposal getProposal(); + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + */ + pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder(); + + /** + *
+     * List of consensus instances.
+     * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + java.util.List + getInstancesList(); + /** + *
+     * List of consensus instances.
+     * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index); + /** + *
+     * List of consensus instances.
+     * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + int getInstancesCount(); + /** + *
+     * List of consensus instances.
+     * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + java.util.List + getInstancesOrBuilderList(); + /** + *
+     * List of consensus instances.
+     * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder( + int index); + } + /** + *
+   * Message containing the response with consensus information.
+   * 
+ * + * Protobuf type {@code pactus.GetConsensusInfoResponse} + */ + public static final class GetConsensusInfoResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetConsensusInfoResponse) + GetConsensusInfoResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetConsensusInfoResponse.newBuilder() to construct. + private GetConsensusInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetConsensusInfoResponse() { + instances_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetConsensusInfoResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.class, pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.Builder.class); + } + + public static final int PROPOSAL_FIELD_NUMBER = 1; + private pactus.blockchain.BlockchainOuterClass.Proposal proposal_; + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + * @return Whether the proposal field is set. + */ + @java.lang.Override + public boolean hasProposal() { + return proposal_ != null; + } + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + * @return The proposal. + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.Proposal getProposal() { + return proposal_ == null ? pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; + } + /** + *
+     * The proposal of the consensus info.
+     * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder() { + return getProposal(); + } + + public static final int INSTANCES_FIELD_NUMBER = 2; + private java.util.List instances_; + /** + *
+     * List of consensus instances.
+     * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + @java.lang.Override + public java.util.List getInstancesList() { + return instances_; + } + /** + *
+     * List of consensus instances.
+     * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + @java.lang.Override + public java.util.List + getInstancesOrBuilderList() { + return instances_; + } + /** + *
+     * List of consensus instances.
+     * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + @java.lang.Override + public int getInstancesCount() { + return instances_.size(); + } + /** + *
+     * List of consensus instances.
+     * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index) { + return instances_.get(index); + } + /** + *
+     * List of consensus instances.
+     * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder( + int index) { + return instances_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (proposal_ != null) { + output.writeMessage(1, getProposal()); + } + for (int i = 0; i < instances_.size(); i++) { + output.writeMessage(2, instances_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (proposal_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProposal()); + } + for (int i = 0; i < instances_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, instances_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse other = (pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse) obj; + + if (hasProposal() != other.hasProposal()) return false; + if (hasProposal()) { + if (!getProposal() + .equals(other.getProposal())) return false; + } + if (!getInstancesList() + .equals(other.getInstancesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProposal()) { + hash = (37 * hash) + PROPOSAL_FIELD_NUMBER; + hash = (53 * hash) + getProposal().hashCode(); + } + if (getInstancesCount() > 0) { + hash = (37 * hash) + INSTANCES_FIELD_NUMBER; + hash = (53 * hash) + getInstancesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing the response with consensus information.
+     * 
+ * + * Protobuf type {@code pactus.GetConsensusInfoResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetConsensusInfoResponse) + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.class, pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (proposalBuilder_ == null) { + proposal_ = null; + } else { + proposal_ = null; + proposalBuilder_ = null; + } + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + } else { + instances_ = null; + instancesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetConsensusInfoResponse_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse build() { + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse result = new pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse(this); + int from_bitField0_ = bitField0_; + if (proposalBuilder_ == null) { + result.proposal_ = proposal_; + } else { + result.proposal_ = proposalBuilder_.build(); + } + if (instancesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instances_ = java.util.Collections.unmodifiableList(instances_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instances_ = instances_; + } else { + result.instances_ = instancesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse.getDefaultInstance()) return this; + if (other.hasProposal()) { + mergeProposal(other.getProposal()); + } + if (instancesBuilder_ == null) { + if (!other.instances_.isEmpty()) { + if (instances_.isEmpty()) { + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstancesIsMutable(); + instances_.addAll(other.instances_); + } + onChanged(); + } + } else { + if (!other.instances_.isEmpty()) { + if (instancesBuilder_.isEmpty()) { + instancesBuilder_.dispose(); + instancesBuilder_ = null; + instances_ = other.instances_; + bitField0_ = (bitField0_ & ~0x00000001); + instancesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInstancesFieldBuilder() : null; + } else { + instancesBuilder_.addAllMessages(other.instances_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getProposalFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + pactus.blockchain.BlockchainOuterClass.ConsensusInfo m = + input.readMessage( + pactus.blockchain.BlockchainOuterClass.ConsensusInfo.parser(), + extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private pactus.blockchain.BlockchainOuterClass.Proposal proposal_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder> proposalBuilder_; + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + * @return Whether the proposal field is set. + */ + public boolean hasProposal() { + return proposalBuilder_ != null || proposal_ != null; + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + * @return The proposal. + */ + public pactus.blockchain.BlockchainOuterClass.Proposal getProposal() { + if (proposalBuilder_ == null) { + return proposal_ == null ? pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; + } else { + return proposalBuilder_.getMessage(); + } + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + */ + public Builder setProposal(pactus.blockchain.BlockchainOuterClass.Proposal value) { + if (proposalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proposal_ = value; + onChanged(); + } else { + proposalBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + */ + public Builder setProposal( + pactus.blockchain.BlockchainOuterClass.Proposal.Builder builderForValue) { + if (proposalBuilder_ == null) { + proposal_ = builderForValue.build(); + onChanged(); + } else { + proposalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + */ + public Builder mergeProposal(pactus.blockchain.BlockchainOuterClass.Proposal value) { + if (proposalBuilder_ == null) { + if (proposal_ != null) { + proposal_ = + pactus.blockchain.BlockchainOuterClass.Proposal.newBuilder(proposal_).mergeFrom(value).buildPartial(); + } else { + proposal_ = value; + } + onChanged(); + } else { + proposalBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + */ + public Builder clearProposal() { + if (proposalBuilder_ == null) { + proposal_ = null; + onChanged(); + } else { + proposal_ = null; + proposalBuilder_ = null; + } + + return this; + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + */ + public pactus.blockchain.BlockchainOuterClass.Proposal.Builder getProposalBuilder() { + + onChanged(); + return getProposalFieldBuilder().getBuilder(); + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + */ + public pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder getProposalOrBuilder() { + if (proposalBuilder_ != null) { + return proposalBuilder_.getMessageOrBuilder(); + } else { + return proposal_ == null ? + pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance() : proposal_; + } + } + /** + *
+       * The proposal of the consensus info.
+       * 
+ * + * .pactus.Proposal proposal = 1 [json_name = "proposal"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder> + getProposalFieldBuilder() { + if (proposalBuilder_ == null) { + proposalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.Proposal, pactus.blockchain.BlockchainOuterClass.Proposal.Builder, pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder>( + getProposal(), + getParentForChildren(), + isClean()); + proposal_ = null; + } + return proposalBuilder_; + } + + private java.util.List instances_ = + java.util.Collections.emptyList(); + private void ensureInstancesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instances_ = new java.util.ArrayList(instances_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.ConsensusInfo, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder, pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder> instancesBuilder_; + + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public java.util.List getInstancesList() { + if (instancesBuilder_ == null) { + return java.util.Collections.unmodifiableList(instances_); + } else { + return instancesBuilder_.getMessageList(); + } + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public int getInstancesCount() { + if (instancesBuilder_ == null) { + return instances_.size(); + } else { + return instancesBuilder_.getCount(); + } + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getInstances(int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); + } else { + return instancesBuilder_.getMessage(index); + } + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public Builder setInstances( + int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.set(index, value); + onChanged(); + } else { + instancesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public Builder setInstances( + int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.set(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public Builder addInstances(pactus.blockchain.BlockchainOuterClass.ConsensusInfo value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(value); + onChanged(); + } else { + instancesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public Builder addInstances( + int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo value) { + if (instancesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstancesIsMutable(); + instances_.add(index, value); + onChanged(); + } else { + instancesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public Builder addInstances( + pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public Builder addInstances( + int index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder builderForValue) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(index, builderForValue.build()); + onChanged(); + } else { + instancesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public Builder addAllInstances( + java.lang.Iterable values) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, instances_); + onChanged(); + } else { + instancesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public Builder clearInstances() { + if (instancesBuilder_ == null) { + instances_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instancesBuilder_.clear(); + } + return this; + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public Builder removeInstances(int index) { + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.remove(index); + onChanged(); + } else { + instancesBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder getInstancesBuilder( + int index) { + return getInstancesFieldBuilder().getBuilder(index); + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder getInstancesOrBuilder( + int index) { + if (instancesBuilder_ == null) { + return instances_.get(index); } else { + return instancesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public java.util.List + getInstancesOrBuilderList() { + if (instancesBuilder_ != null) { + return instancesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instances_); + } + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder addInstancesBuilder() { + return getInstancesFieldBuilder().addBuilder( + pactus.blockchain.BlockchainOuterClass.ConsensusInfo.getDefaultInstance()); + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder addInstancesBuilder( + int index) { + return getInstancesFieldBuilder().addBuilder( + index, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.getDefaultInstance()); + } + /** + *
+       * List of consensus instances.
+       * 
+ * + * repeated .pactus.ConsensusInfo instances = 2 [json_name = "instances"]; + */ + public java.util.List + getInstancesBuilderList() { + return getInstancesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.ConsensusInfo, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder, pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder> + getInstancesFieldBuilder() { + if (instancesBuilder_ == null) { + instancesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.ConsensusInfo, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder, pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder>( + instances_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + instances_ = null; + } + return instancesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetConsensusInfoResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetConsensusInfoResponse) + private static final pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetConsensusInfoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetConsensusInfoResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetTxPoolContentRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetTxPoolContentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The type of transactions to retrieve from the transaction pool. 0 means all
+     * types.
+     * 
+ * + * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; + * @return The enum numeric value on the wire for payloadType. + */ + int getPayloadTypeValue(); + /** + *
+     * The type of transactions to retrieve from the transaction pool. 0 means all
+     * types.
+     * 
+ * + * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; + * @return The payloadType. + */ + pactus.transaction.TransactionOuterClass.PayloadType getPayloadType(); + } + /** + *
+   * Request message to retrieve transactions in the transaction pool.
+   * 
+ * + * Protobuf type {@code pactus.GetTxPoolContentRequest} + */ + public static final class GetTxPoolContentRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetTxPoolContentRequest) + GetTxPoolContentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTxPoolContentRequest.newBuilder() to construct. + private GetTxPoolContentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetTxPoolContentRequest() { + payloadType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetTxPoolContentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.class, pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.Builder.class); + } + + public static final int PAYLOAD_TYPE_FIELD_NUMBER = 1; + private int payloadType_; + /** + *
+     * The type of transactions to retrieve from the transaction pool. 0 means all
+     * types.
+     * 
+ * + * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; + * @return The enum numeric value on the wire for payloadType. + */ + @java.lang.Override public int getPayloadTypeValue() { + return payloadType_; + } + /** + *
+     * The type of transactions to retrieve from the transaction pool. 0 means all
+     * types.
+     * 
+ * + * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; + * @return The payloadType. + */ + @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { + @SuppressWarnings("deprecation") + pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); + return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { + output.writeEnum(1, payloadType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, payloadType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest other = (pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest) obj; + + if (payloadType_ != other.payloadType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + payloadType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message to retrieve transactions in the transaction pool.
+     * 
+ * + * Protobuf type {@code pactus.GetTxPoolContentRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetTxPoolContentRequest) + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.class, pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + payloadType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentRequest_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest build() { + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest result = new pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest(this); + result.payloadType_ = payloadType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest.getDefaultInstance()) return this; + if (other.payloadType_ != 0) { + setPayloadTypeValue(other.getPayloadTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + payloadType_ = input.readEnum(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int payloadType_ = 0; + /** + *
+       * The type of transactions to retrieve from the transaction pool. 0 means all
+       * types.
+       * 
+ * + * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; + * @return The enum numeric value on the wire for payloadType. + */ + @java.lang.Override public int getPayloadTypeValue() { + return payloadType_; + } + /** + *
+       * The type of transactions to retrieve from the transaction pool. 0 means all
+       * types.
+       * 
+ * + * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; + * @param value The enum numeric value on the wire for payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadTypeValue(int value) { + + payloadType_ = value; + onChanged(); + return this; + } + /** + *
+       * The type of transactions to retrieve from the transaction pool. 0 means all
+       * types.
+       * 
+ * + * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; + * @return The payloadType. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { + @SuppressWarnings("deprecation") + pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); + return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; + } + /** + *
+       * The type of transactions to retrieve from the transaction pool. 0 means all
+       * types.
+       * 
+ * + * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; + * @param value The payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadType(pactus.transaction.TransactionOuterClass.PayloadType value) { + if (value == null) { + throw new NullPointerException(); + } + + payloadType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The type of transactions to retrieve from the transaction pool. 0 means all
+       * types.
+       * 
+ * + * .pactus.PayloadType payload_type = 1 [json_name = "payloadType"]; + * @return This builder for chaining. + */ + public Builder clearPayloadType() { + + payloadType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetTxPoolContentRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetTxPoolContentRequest) + private static final pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTxPoolContentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetTxPoolContentResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetTxPoolContentResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * List of transactions currently in the pool.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + java.util.List + getTxsList(); + /** + *
+     * List of transactions currently in the pool.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index); + /** + *
+     * List of transactions currently in the pool.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + int getTxsCount(); + /** + *
+     * List of transactions currently in the pool.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + java.util.List + getTxsOrBuilderList(); + /** + *
+     * List of transactions currently in the pool.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( + int index); + } + /** + *
+   * Response message containing transactions in the transaction pool.
+   * 
+ * + * Protobuf type {@code pactus.GetTxPoolContentResponse} + */ + public static final class GetTxPoolContentResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetTxPoolContentResponse) + GetTxPoolContentResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTxPoolContentResponse.newBuilder() to construct. + private GetTxPoolContentResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetTxPoolContentResponse() { + txs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetTxPoolContentResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.class, pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.Builder.class); + } + + public static final int TXS_FIELD_NUMBER = 1; + private java.util.List txs_; + /** + *
+     * List of transactions currently in the pool.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + @java.lang.Override + public java.util.List getTxsList() { + return txs_; + } + /** + *
+     * List of transactions currently in the pool.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + @java.lang.Override + public java.util.List + getTxsOrBuilderList() { + return txs_; + } + /** + *
+     * List of transactions currently in the pool.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + @java.lang.Override + public int getTxsCount() { + return txs_.size(); + } + /** + *
+     * List of transactions currently in the pool.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index) { + return txs_.get(index); + } + /** + *
+     * List of transactions currently in the pool.
+     * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( + int index) { + return txs_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < txs_.size(); i++) { + output.writeMessage(1, txs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < txs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, txs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse other = (pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse) obj; + + if (!getTxsList() + .equals(other.getTxsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTxsCount() > 0) { + hash = (37 * hash) + TXS_FIELD_NUMBER; + hash = (53 * hash) + getTxsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing transactions in the transaction pool.
+     * 
+ * + * Protobuf type {@code pactus.GetTxPoolContentResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetTxPoolContentResponse) + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.class, pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (txsBuilder_ == null) { + txs_ = java.util.Collections.emptyList(); + } else { + txs_ = null; + txsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_GetTxPoolContentResponse_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse build() { + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse buildPartial() { + pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse result = new pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse(this); + int from_bitField0_ = bitField0_; + if (txsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + txs_ = java.util.Collections.unmodifiableList(txs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.txs_ = txs_; + } else { + result.txs_ = txsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse other) { + if (other == pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse.getDefaultInstance()) return this; + if (txsBuilder_ == null) { + if (!other.txs_.isEmpty()) { + if (txs_.isEmpty()) { + txs_ = other.txs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTxsIsMutable(); + txs_.addAll(other.txs_); + } + onChanged(); + } + } else { + if (!other.txs_.isEmpty()) { + if (txsBuilder_.isEmpty()) { + txsBuilder_.dispose(); + txsBuilder_ = null; + txs_ = other.txs_; + bitField0_ = (bitField0_ & ~0x00000001); + txsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTxsFieldBuilder() : null; + } else { + txsBuilder_.addAllMessages(other.txs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + pactus.transaction.TransactionOuterClass.TransactionInfo m = + input.readMessage( + pactus.transaction.TransactionOuterClass.TransactionInfo.parser(), + extensionRegistry); + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + txs_.add(m); + } else { + txsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List txs_ = + java.util.Collections.emptyList(); + private void ensureTxsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + txs_ = new java.util.ArrayList(txs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> txsBuilder_; + + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public java.util.List getTxsList() { + if (txsBuilder_ == null) { + return java.util.Collections.unmodifiableList(txs_); + } else { + return txsBuilder_.getMessageList(); + } + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public int getTxsCount() { + if (txsBuilder_ == null) { + return txs_.size(); + } else { + return txsBuilder_.getCount(); + } + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfo getTxs(int index) { + if (txsBuilder_ == null) { + return txs_.get(index); + } else { + return txsBuilder_.getMessage(index); + } + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public Builder setTxs( + int index, pactus.transaction.TransactionOuterClass.TransactionInfo value) { + if (txsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTxsIsMutable(); + txs_.set(index, value); + onChanged(); + } else { + txsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public Builder setTxs( + int index, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + txs_.set(index, builderForValue.build()); + onChanged(); + } else { + txsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public Builder addTxs(pactus.transaction.TransactionOuterClass.TransactionInfo value) { + if (txsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTxsIsMutable(); + txs_.add(value); + onChanged(); + } else { + txsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public Builder addTxs( + int index, pactus.transaction.TransactionOuterClass.TransactionInfo value) { + if (txsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTxsIsMutable(); + txs_.add(index, value); + onChanged(); + } else { + txsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public Builder addTxs( + pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + txs_.add(builderForValue.build()); + onChanged(); + } else { + txsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public Builder addTxs( + int index, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + txs_.add(index, builderForValue.build()); + onChanged(); + } else { + txsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public Builder addAllTxs( + java.lang.Iterable values) { + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, txs_); + onChanged(); + } else { + txsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public Builder clearTxs() { + if (txsBuilder_ == null) { + txs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + txsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public Builder removeTxs(int index) { + if (txsBuilder_ == null) { + ensureTxsIsMutable(); + txs_.remove(index); + onChanged(); + } else { + txsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder getTxsBuilder( + int index) { + return getTxsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTxsOrBuilder( + int index) { + if (txsBuilder_ == null) { + return txs_.get(index); } else { + return txsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public java.util.List + getTxsOrBuilderList() { + if (txsBuilder_ != null) { + return txsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(txs_); + } + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder() { + return getTxsFieldBuilder().addBuilder( + pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance()); + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder addTxsBuilder( + int index) { + return getTxsFieldBuilder().addBuilder( + index, pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance()); + } + /** + *
+       * List of transactions currently in the pool.
+       * 
+ * + * repeated .pactus.TransactionInfo txs = 1 [json_name = "txs"]; + */ + public java.util.List + getTxsBuilderList() { + return getTxsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> + getTxsFieldBuilder() { + if (txsBuilder_ == null) { + txsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder>( + txs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + txs_ = null; + } + return txsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetTxPoolContentResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetTxPoolContentResponse) + private static final pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse(); + } + + public static pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTxPoolContentResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.GetTxPoolContentResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ValidatorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.ValidatorInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The hash of the validator.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + java.lang.String getHash(); + /** + *
+     * The hash of the validator.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + com.google.protobuf.ByteString + getHashBytes(); + + /** + *
+     * The serialized data of the validator.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The data. + */ + java.lang.String getData(); + /** + *
+     * The serialized data of the validator.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The bytes for data. + */ + com.google.protobuf.ByteString + getDataBytes(); + + /** + *
+     * The public key of the validator.
+     * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + *
+     * The public key of the validator.
+     * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString + getPublicKeyBytes(); + + /** + *
+     * The unique number assigned to the validator.
+     * 
+ * + * int32 number = 4 [json_name = "number"]; + * @return The number. + */ + int getNumber(); + + /** + *
+     * The stake of the validator in NanoPAC.
+     * 
+ * + * int64 stake = 5 [json_name = "stake"]; + * @return The stake. + */ + long getStake(); + + /** + *
+     * The height at which the validator last bonded.
+     * 
+ * + * uint32 last_bonding_height = 6 [json_name = "lastBondingHeight"]; + * @return The lastBondingHeight. + */ + int getLastBondingHeight(); + + /** + *
+     * The height at which the validator last participated in sortition.
+     * 
+ * + * uint32 last_sortition_height = 7 [json_name = "lastSortitionHeight"]; + * @return The lastSortitionHeight. + */ + int getLastSortitionHeight(); + + /** + *
+     * The height at which the validator will unbond.
+     * 
+ * + * uint32 unbonding_height = 8 [json_name = "unbondingHeight"]; + * @return The unbondingHeight. + */ + int getUnbondingHeight(); + + /** + *
+     * The address of the validator.
+     * 
+ * + * string address = 9 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The address of the validator.
+     * 
+ * + * string address = 9 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + + /** + *
+     * The availability score of the validator.
+     * 
+ * + * double availability_score = 10 [json_name = "availabilityScore"]; + * @return The availabilityScore. + */ + double getAvailabilityScore(); + } + /** + *
+   * Message containing information about a validator.
+   * 
+ * + * Protobuf type {@code pactus.ValidatorInfo} + */ + public static final class ValidatorInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.ValidatorInfo) + ValidatorInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidatorInfo.newBuilder() to construct. + private ValidatorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ValidatorInfo() { + hash_ = ""; + data_ = ""; + publicKey_ = ""; + address_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ValidatorInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.ValidatorInfo.class, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder.class); + } + + public static final int HASH_FIELD_NUMBER = 1; + private volatile java.lang.Object hash_; + /** + *
+     * The hash of the validator.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } + } + /** + *
+     * The hash of the validator.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 2; + private volatile java.lang.Object data_; + /** + *
+     * The serialized data of the validator.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public java.lang.String getData() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } + } + /** + *
+     * The serialized data of the validator.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The bytes for data. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 3; + private volatile java.lang.Object publicKey_; + /** + *
+     * The public key of the validator.
+     * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + *
+     * The public key of the validator.
+     * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NUMBER_FIELD_NUMBER = 4; + private int number_; + /** + *
+     * The unique number assigned to the validator.
+     * 
+ * + * int32 number = 4 [json_name = "number"]; + * @return The number. + */ + @java.lang.Override + public int getNumber() { + return number_; + } + + public static final int STAKE_FIELD_NUMBER = 5; + private long stake_; + /** + *
+     * The stake of the validator in NanoPAC.
+     * 
+ * + * int64 stake = 5 [json_name = "stake"]; + * @return The stake. + */ + @java.lang.Override + public long getStake() { + return stake_; + } + + public static final int LAST_BONDING_HEIGHT_FIELD_NUMBER = 6; + private int lastBondingHeight_; + /** + *
+     * The height at which the validator last bonded.
+     * 
+ * + * uint32 last_bonding_height = 6 [json_name = "lastBondingHeight"]; + * @return The lastBondingHeight. + */ + @java.lang.Override + public int getLastBondingHeight() { + return lastBondingHeight_; + } + + public static final int LAST_SORTITION_HEIGHT_FIELD_NUMBER = 7; + private int lastSortitionHeight_; + /** + *
+     * The height at which the validator last participated in sortition.
+     * 
+ * + * uint32 last_sortition_height = 7 [json_name = "lastSortitionHeight"]; + * @return The lastSortitionHeight. + */ + @java.lang.Override + public int getLastSortitionHeight() { + return lastSortitionHeight_; + } + + public static final int UNBONDING_HEIGHT_FIELD_NUMBER = 8; + private int unbondingHeight_; + /** + *
+     * The height at which the validator will unbond.
+     * 
+ * + * uint32 unbonding_height = 8 [json_name = "unbondingHeight"]; + * @return The unbondingHeight. + */ + @java.lang.Override + public int getUnbondingHeight() { + return unbondingHeight_; + } + + public static final int ADDRESS_FIELD_NUMBER = 9; + private volatile java.lang.Object address_; + /** + *
+     * The address of the validator.
+     * 
+ * + * string address = 9 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The address of the validator.
+     * 
+ * + * string address = 9 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVAILABILITY_SCORE_FIELD_NUMBER = 10; + private double availabilityScore_; + /** + *
+     * The availability score of the validator.
+     * 
+ * + * double availability_score = 10 [json_name = "availabilityScore"]; + * @return The availabilityScore. + */ + @java.lang.Override + public double getAvailabilityScore() { + return availabilityScore_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hash_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publicKey_); + } + if (number_ != 0) { + output.writeInt32(4, number_); + } + if (stake_ != 0L) { + output.writeInt64(5, stake_); + } + if (lastBondingHeight_ != 0) { + output.writeUInt32(6, lastBondingHeight_); + } + if (lastSortitionHeight_ != 0) { + output.writeUInt32(7, lastSortitionHeight_); + } + if (unbondingHeight_ != 0) { + output.writeUInt32(8, unbondingHeight_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, address_); + } + if (java.lang.Double.doubleToRawLongBits(availabilityScore_) != 0) { + output.writeDouble(10, availabilityScore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hash_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publicKey_); + } + if (number_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, number_); + } + if (stake_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, stake_); + } + if (lastBondingHeight_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, lastBondingHeight_); + } + if (lastSortitionHeight_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, lastSortitionHeight_); + } + if (unbondingHeight_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, unbondingHeight_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, address_); + } + if (java.lang.Double.doubleToRawLongBits(availabilityScore_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(10, availabilityScore_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.ValidatorInfo)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.ValidatorInfo other = (pactus.blockchain.BlockchainOuterClass.ValidatorInfo) obj; + + if (!getHash() + .equals(other.getHash())) return false; + if (!getData() + .equals(other.getData())) return false; + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (getNumber() + != other.getNumber()) return false; + if (getStake() + != other.getStake()) return false; + if (getLastBondingHeight() + != other.getLastBondingHeight()) return false; + if (getLastSortitionHeight() + != other.getLastSortitionHeight()) return false; + if (getUnbondingHeight() + != other.getUnbondingHeight()) return false; + if (!getAddress() + .equals(other.getAddress())) return false; + if (java.lang.Double.doubleToLongBits(getAvailabilityScore()) + != java.lang.Double.doubleToLongBits( + other.getAvailabilityScore())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HASH_FIELD_NUMBER; + hash = (53 * hash) + getHash().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (37 * hash) + NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getNumber(); + hash = (37 * hash) + STAKE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStake()); + hash = (37 * hash) + LAST_BONDING_HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getLastBondingHeight(); + hash = (37 * hash) + LAST_SORTITION_HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getLastSortitionHeight(); + hash = (37 * hash) + UNBONDING_HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getUnbondingHeight(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + AVAILABILITY_SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAvailabilityScore())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.ValidatorInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing information about a validator.
+     * 
+ * + * Protobuf type {@code pactus.ValidatorInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.ValidatorInfo) + pactus.blockchain.BlockchainOuterClass.ValidatorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.ValidatorInfo.class, pactus.blockchain.BlockchainOuterClass.ValidatorInfo.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.ValidatorInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + hash_ = ""; + + data_ = ""; + + publicKey_ = ""; + + number_ = 0; + + stake_ = 0L; + + lastBondingHeight_ = 0; + + lastSortitionHeight_ = 0; + + unbondingHeight_ = 0; + + address_ = ""; + + availabilityScore_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ValidatorInfo_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo build() { + pactus.blockchain.BlockchainOuterClass.ValidatorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo buildPartial() { + pactus.blockchain.BlockchainOuterClass.ValidatorInfo result = new pactus.blockchain.BlockchainOuterClass.ValidatorInfo(this); + result.hash_ = hash_; + result.data_ = data_; + result.publicKey_ = publicKey_; + result.number_ = number_; + result.stake_ = stake_; + result.lastBondingHeight_ = lastBondingHeight_; + result.lastSortitionHeight_ = lastSortitionHeight_; + result.unbondingHeight_ = unbondingHeight_; + result.address_ = address_; + result.availabilityScore_ = availabilityScore_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.ValidatorInfo) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.ValidatorInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.ValidatorInfo other) { + if (other == pactus.blockchain.BlockchainOuterClass.ValidatorInfo.getDefaultInstance()) return this; + if (!other.getHash().isEmpty()) { + hash_ = other.hash_; + onChanged(); + } + if (!other.getData().isEmpty()) { + data_ = other.data_; + onChanged(); + } + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } + if (other.getNumber() != 0) { + setNumber(other.getNumber()); + } + if (other.getStake() != 0L) { + setStake(other.getStake()); + } + if (other.getLastBondingHeight() != 0) { + setLastBondingHeight(other.getLastBondingHeight()); + } + if (other.getLastSortitionHeight() != 0) { + setLastSortitionHeight(other.getLastSortitionHeight()); + } + if (other.getUnbondingHeight() != 0) { + setUnbondingHeight(other.getUnbondingHeight()); + } + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + if (other.getAvailabilityScore() != 0D) { + setAvailabilityScore(other.getAvailabilityScore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + hash_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + data_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + publicKey_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: { + number_ = input.readInt32(); + + break; + } // case 32 + case 40: { + stake_ = input.readInt64(); + + break; + } // case 40 + case 48: { + lastBondingHeight_ = input.readUInt32(); + + break; + } // case 48 + case 56: { + lastSortitionHeight_ = input.readUInt32(); + + break; + } // case 56 + case 64: { + unbondingHeight_ = input.readUInt32(); + + break; + } // case 64 + case 74: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 74 + case 81: { + availabilityScore_ = input.readDouble(); + + break; + } // case 81 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object hash_ = ""; + /** + *
+       * The hash of the validator.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The hash of the validator.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The hash of the validator.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hash_ = value; + onChanged(); + return this; + } + /** + *
+       * The hash of the validator.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + + hash_ = getDefaultInstance().getHash(); + onChanged(); + return this; + } + /** + *
+       * The hash of the validator.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @param value The bytes for hash to set. + * @return This builder for chaining. + */ + public Builder setHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hash_ = value; + onChanged(); + return this; + } + + private java.lang.Object data_ = ""; + /** + *
+       * The serialized data of the validator.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @return The data. + */ + public java.lang.String getData() { + java.lang.Object ref = data_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The serialized data of the validator.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @return The bytes for data. + */ + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The serialized data of the validator.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       * The serialized data of the validator.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + /** + *
+       * The serialized data of the validator.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @param value The bytes for data to set. + * @return This builder for chaining. + */ + public Builder setDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + data_ = value; + onChanged(); + return this; + } + + private java.lang.Object publicKey_ = ""; + /** + *
+       * The public key of the validator.
+       * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The public key of the validator.
+       * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The public key of the validator.
+       * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + *
+       * The public key of the validator.
+       * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + /** + *
+       * The public key of the validator.
+       * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKey_ = value; + onChanged(); + return this; + } + + private int number_ ; + /** + *
+       * The unique number assigned to the validator.
+       * 
+ * + * int32 number = 4 [json_name = "number"]; + * @return The number. + */ + @java.lang.Override + public int getNumber() { + return number_; + } + /** + *
+       * The unique number assigned to the validator.
+       * 
+ * + * int32 number = 4 [json_name = "number"]; + * @param value The number to set. + * @return This builder for chaining. + */ + public Builder setNumber(int value) { + + number_ = value; + onChanged(); + return this; + } + /** + *
+       * The unique number assigned to the validator.
+       * 
+ * + * int32 number = 4 [json_name = "number"]; + * @return This builder for chaining. + */ + public Builder clearNumber() { + + number_ = 0; + onChanged(); + return this; + } + + private long stake_ ; + /** + *
+       * The stake of the validator in NanoPAC.
+       * 
+ * + * int64 stake = 5 [json_name = "stake"]; + * @return The stake. + */ + @java.lang.Override + public long getStake() { + return stake_; + } + /** + *
+       * The stake of the validator in NanoPAC.
+       * 
+ * + * int64 stake = 5 [json_name = "stake"]; + * @param value The stake to set. + * @return This builder for chaining. + */ + public Builder setStake(long value) { + + stake_ = value; + onChanged(); + return this; + } + /** + *
+       * The stake of the validator in NanoPAC.
+       * 
+ * + * int64 stake = 5 [json_name = "stake"]; + * @return This builder for chaining. + */ + public Builder clearStake() { + + stake_ = 0L; + onChanged(); + return this; + } + + private int lastBondingHeight_ ; + /** + *
+       * The height at which the validator last bonded.
+       * 
+ * + * uint32 last_bonding_height = 6 [json_name = "lastBondingHeight"]; + * @return The lastBondingHeight. + */ + @java.lang.Override + public int getLastBondingHeight() { + return lastBondingHeight_; + } + /** + *
+       * The height at which the validator last bonded.
+       * 
+ * + * uint32 last_bonding_height = 6 [json_name = "lastBondingHeight"]; + * @param value The lastBondingHeight to set. + * @return This builder for chaining. + */ + public Builder setLastBondingHeight(int value) { + + lastBondingHeight_ = value; + onChanged(); + return this; + } + /** + *
+       * The height at which the validator last bonded.
+       * 
+ * + * uint32 last_bonding_height = 6 [json_name = "lastBondingHeight"]; + * @return This builder for chaining. + */ + public Builder clearLastBondingHeight() { + + lastBondingHeight_ = 0; + onChanged(); + return this; + } + + private int lastSortitionHeight_ ; + /** + *
+       * The height at which the validator last participated in sortition.
+       * 
+ * + * uint32 last_sortition_height = 7 [json_name = "lastSortitionHeight"]; + * @return The lastSortitionHeight. + */ + @java.lang.Override + public int getLastSortitionHeight() { + return lastSortitionHeight_; + } + /** + *
+       * The height at which the validator last participated in sortition.
+       * 
+ * + * uint32 last_sortition_height = 7 [json_name = "lastSortitionHeight"]; + * @param value The lastSortitionHeight to set. + * @return This builder for chaining. + */ + public Builder setLastSortitionHeight(int value) { + + lastSortitionHeight_ = value; + onChanged(); + return this; + } + /** + *
+       * The height at which the validator last participated in sortition.
+       * 
+ * + * uint32 last_sortition_height = 7 [json_name = "lastSortitionHeight"]; + * @return This builder for chaining. + */ + public Builder clearLastSortitionHeight() { + + lastSortitionHeight_ = 0; + onChanged(); + return this; + } + + private int unbondingHeight_ ; + /** + *
+       * The height at which the validator will unbond.
+       * 
+ * + * uint32 unbonding_height = 8 [json_name = "unbondingHeight"]; + * @return The unbondingHeight. + */ + @java.lang.Override + public int getUnbondingHeight() { + return unbondingHeight_; + } + /** + *
+       * The height at which the validator will unbond.
+       * 
+ * + * uint32 unbonding_height = 8 [json_name = "unbondingHeight"]; + * @param value The unbondingHeight to set. + * @return This builder for chaining. + */ + public Builder setUnbondingHeight(int value) { + + unbondingHeight_ = value; + onChanged(); + return this; + } + /** + *
+       * The height at which the validator will unbond.
+       * 
+ * + * uint32 unbonding_height = 8 [json_name = "unbondingHeight"]; + * @return This builder for chaining. + */ + public Builder clearUnbondingHeight() { + + unbondingHeight_ = 0; + onChanged(); + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * The address of the validator.
+       * 
+ * + * string address = 9 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the validator.
+       * 
+ * + * string address = 9 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the validator.
+       * 
+ * + * string address = 9 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the validator.
+       * 
+ * + * string address = 9 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The address of the validator.
+       * 
+ * + * string address = 9 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + + private double availabilityScore_ ; + /** + *
+       * The availability score of the validator.
+       * 
+ * + * double availability_score = 10 [json_name = "availabilityScore"]; + * @return The availabilityScore. + */ + @java.lang.Override + public double getAvailabilityScore() { + return availabilityScore_; + } + /** + *
+       * The availability score of the validator.
+       * 
+ * + * double availability_score = 10 [json_name = "availabilityScore"]; + * @param value The availabilityScore to set. + * @return This builder for chaining. + */ + public Builder setAvailabilityScore(double value) { + + availabilityScore_ = value; + onChanged(); + return this; + } + /** + *
+       * The availability score of the validator.
+       * 
+ * + * double availability_score = 10 [json_name = "availabilityScore"]; + * @return This builder for chaining. + */ + public Builder clearAvailabilityScore() { + + availabilityScore_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.ValidatorInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.ValidatorInfo) + private static final pactus.blockchain.BlockchainOuterClass.ValidatorInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.ValidatorInfo(); + } + + public static pactus.blockchain.BlockchainOuterClass.ValidatorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidatorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ValidatorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AccountInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.AccountInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The hash of the account.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + java.lang.String getHash(); + /** + *
+     * The hash of the account.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + com.google.protobuf.ByteString + getHashBytes(); + + /** + *
+     * The serialized data of the account.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The data. + */ + java.lang.String getData(); + /** + *
+     * The serialized data of the account.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The bytes for data. + */ + com.google.protobuf.ByteString + getDataBytes(); + + /** + *
+     * The unique number assigned to the account.
+     * 
+ * + * int32 number = 3 [json_name = "number"]; + * @return The number. + */ + int getNumber(); + + /** + *
+     * The balance of the account in NanoPAC.
+     * 
+ * + * int64 balance = 4 [json_name = "balance"]; + * @return The balance. + */ + long getBalance(); + + /** + *
+     * The address of the account.
+     * 
+ * + * string address = 5 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The address of the account.
+     * 
+ * + * string address = 5 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + } + /** + *
+   * Message containing information about an account.
+   * 
+ * + * Protobuf type {@code pactus.AccountInfo} + */ + public static final class AccountInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.AccountInfo) + AccountInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccountInfo.newBuilder() to construct. + private AccountInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AccountInfo() { + hash_ = ""; + data_ = ""; + address_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AccountInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_AccountInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_AccountInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.AccountInfo.class, pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder.class); + } + + public static final int HASH_FIELD_NUMBER = 1; + private volatile java.lang.Object hash_; + /** + *
+     * The hash of the account.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } + } + /** + *
+     * The hash of the account.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 2; + private volatile java.lang.Object data_; + /** + *
+     * The serialized data of the account.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public java.lang.String getData() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } + } + /** + *
+     * The serialized data of the account.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The bytes for data. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NUMBER_FIELD_NUMBER = 3; + private int number_; + /** + *
+     * The unique number assigned to the account.
+     * 
+ * + * int32 number = 3 [json_name = "number"]; + * @return The number. + */ + @java.lang.Override + public int getNumber() { + return number_; + } + + public static final int BALANCE_FIELD_NUMBER = 4; + private long balance_; + /** + *
+     * The balance of the account in NanoPAC.
+     * 
+ * + * int64 balance = 4 [json_name = "balance"]; + * @return The balance. + */ + @java.lang.Override + public long getBalance() { + return balance_; + } + + public static final int ADDRESS_FIELD_NUMBER = 5; + private volatile java.lang.Object address_; + /** + *
+     * The address of the account.
+     * 
+ * + * string address = 5 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The address of the account.
+     * 
+ * + * string address = 5 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hash_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); + } + if (number_ != 0) { + output.writeInt32(3, number_); + } + if (balance_ != 0L) { + output.writeInt64(4, balance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, address_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hash_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); + } + if (number_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, number_); + } + if (balance_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, balance_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, address_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.AccountInfo)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.AccountInfo other = (pactus.blockchain.BlockchainOuterClass.AccountInfo) obj; + + if (!getHash() + .equals(other.getHash())) return false; + if (!getData() + .equals(other.getData())) return false; + if (getNumber() + != other.getNumber()) return false; + if (getBalance() + != other.getBalance()) return false; + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HASH_FIELD_NUMBER; + hash = (53 * hash) + getHash().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getNumber(); + hash = (37 * hash) + BALANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBalance()); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.AccountInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.AccountInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing information about an account.
+     * 
+ * + * Protobuf type {@code pactus.AccountInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.AccountInfo) + pactus.blockchain.BlockchainOuterClass.AccountInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_AccountInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_AccountInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.AccountInfo.class, pactus.blockchain.BlockchainOuterClass.AccountInfo.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.AccountInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + hash_ = ""; + + data_ = ""; + + number_ = 0; + + balance_ = 0L; + + address_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_AccountInfo_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.AccountInfo getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.AccountInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.AccountInfo build() { + pactus.blockchain.BlockchainOuterClass.AccountInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.AccountInfo buildPartial() { + pactus.blockchain.BlockchainOuterClass.AccountInfo result = new pactus.blockchain.BlockchainOuterClass.AccountInfo(this); + result.hash_ = hash_; + result.data_ = data_; + result.number_ = number_; + result.balance_ = balance_; + result.address_ = address_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.AccountInfo) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.AccountInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.AccountInfo other) { + if (other == pactus.blockchain.BlockchainOuterClass.AccountInfo.getDefaultInstance()) return this; + if (!other.getHash().isEmpty()) { + hash_ = other.hash_; + onChanged(); + } + if (!other.getData().isEmpty()) { + data_ = other.data_; + onChanged(); + } + if (other.getNumber() != 0) { + setNumber(other.getNumber()); + } + if (other.getBalance() != 0L) { + setBalance(other.getBalance()); + } + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + hash_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + data_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + number_ = input.readInt32(); + + break; + } // case 24 + case 32: { + balance_ = input.readInt64(); + + break; + } // case 32 + case 42: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object hash_ = ""; + /** + *
+       * The hash of the account.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The hash of the account.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The hash of the account.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hash_ = value; + onChanged(); + return this; + } + /** + *
+       * The hash of the account.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + + hash_ = getDefaultInstance().getHash(); + onChanged(); + return this; + } + /** + *
+       * The hash of the account.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @param value The bytes for hash to set. + * @return This builder for chaining. + */ + public Builder setHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hash_ = value; + onChanged(); + return this; + } + + private java.lang.Object data_ = ""; + /** + *
+       * The serialized data of the account.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @return The data. + */ + public java.lang.String getData() { + java.lang.Object ref = data_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The serialized data of the account.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @return The bytes for data. + */ + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The serialized data of the account.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       * The serialized data of the account.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + /** + *
+       * The serialized data of the account.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @param value The bytes for data to set. + * @return This builder for chaining. + */ + public Builder setDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + data_ = value; + onChanged(); + return this; + } + + private int number_ ; + /** + *
+       * The unique number assigned to the account.
+       * 
+ * + * int32 number = 3 [json_name = "number"]; + * @return The number. + */ + @java.lang.Override + public int getNumber() { + return number_; + } + /** + *
+       * The unique number assigned to the account.
+       * 
+ * + * int32 number = 3 [json_name = "number"]; + * @param value The number to set. + * @return This builder for chaining. + */ + public Builder setNumber(int value) { + + number_ = value; + onChanged(); + return this; + } + /** + *
+       * The unique number assigned to the account.
+       * 
+ * + * int32 number = 3 [json_name = "number"]; + * @return This builder for chaining. + */ + public Builder clearNumber() { + + number_ = 0; + onChanged(); + return this; + } + + private long balance_ ; + /** + *
+       * The balance of the account in NanoPAC.
+       * 
+ * + * int64 balance = 4 [json_name = "balance"]; + * @return The balance. + */ + @java.lang.Override + public long getBalance() { + return balance_; + } + /** + *
+       * The balance of the account in NanoPAC.
+       * 
+ * + * int64 balance = 4 [json_name = "balance"]; + * @param value The balance to set. + * @return This builder for chaining. + */ + public Builder setBalance(long value) { + + balance_ = value; + onChanged(); + return this; + } + /** + *
+       * The balance of the account in NanoPAC.
+       * 
+ * + * int64 balance = 4 [json_name = "balance"]; + * @return This builder for chaining. + */ + public Builder clearBalance() { + + balance_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * The address of the account.
+       * 
+ * + * string address = 5 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the account.
+       * 
+ * + * string address = 5 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the account.
+       * 
+ * + * string address = 5 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the account.
+       * 
+ * + * string address = 5 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The address of the account.
+       * 
+ * + * string address = 5 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.AccountInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.AccountInfo) + private static final pactus.blockchain.BlockchainOuterClass.AccountInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.AccountInfo(); + } + + public static pactus.blockchain.BlockchainOuterClass.AccountInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccountInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.AccountInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BlockHeaderInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.BlockHeaderInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The version of the block.
+     * 
+ * + * int32 version = 1 [json_name = "version"]; + * @return The version. + */ + int getVersion(); + + /** + *
+     * The hash of the previous block.
+     * 
+ * + * string prev_block_hash = 2 [json_name = "prevBlockHash"]; + * @return The prevBlockHash. + */ + java.lang.String getPrevBlockHash(); + /** + *
+     * The hash of the previous block.
+     * 
+ * + * string prev_block_hash = 2 [json_name = "prevBlockHash"]; + * @return The bytes for prevBlockHash. + */ + com.google.protobuf.ByteString + getPrevBlockHashBytes(); + + /** + *
+     * The state root hash of the blockchain.
+     * 
+ * + * string state_root = 3 [json_name = "stateRoot"]; + * @return The stateRoot. + */ + java.lang.String getStateRoot(); + /** + *
+     * The state root hash of the blockchain.
+     * 
+ * + * string state_root = 3 [json_name = "stateRoot"]; + * @return The bytes for stateRoot. + */ + com.google.protobuf.ByteString + getStateRootBytes(); + + /** + *
+     * The sortition seed of the block.
+     * 
+ * + * string sortition_seed = 4 [json_name = "sortitionSeed"]; + * @return The sortitionSeed. + */ + java.lang.String getSortitionSeed(); + /** + *
+     * The sortition seed of the block.
+     * 
+ * + * string sortition_seed = 4 [json_name = "sortitionSeed"]; + * @return The bytes for sortitionSeed. + */ + com.google.protobuf.ByteString + getSortitionSeedBytes(); + + /** + *
+     * The address of the proposer of the block.
+     * 
+ * + * string proposer_address = 5 [json_name = "proposerAddress"]; + * @return The proposerAddress. + */ + java.lang.String getProposerAddress(); + /** + *
+     * The address of the proposer of the block.
+     * 
+ * + * string proposer_address = 5 [json_name = "proposerAddress"]; + * @return The bytes for proposerAddress. + */ + com.google.protobuf.ByteString + getProposerAddressBytes(); + } + /** + *
+   * Message containing information about the header of a block.
+   * 
+ * + * Protobuf type {@code pactus.BlockHeaderInfo} + */ + public static final class BlockHeaderInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.BlockHeaderInfo) + BlockHeaderInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use BlockHeaderInfo.newBuilder() to construct. + private BlockHeaderInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BlockHeaderInfo() { + prevBlockHash_ = ""; + stateRoot_ = ""; + sortitionSeed_ = ""; + proposerAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BlockHeaderInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.class, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private int version_; + /** + *
+     * The version of the block.
+     * 
+ * + * int32 version = 1 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public int getVersion() { + return version_; + } + + public static final int PREV_BLOCK_HASH_FIELD_NUMBER = 2; + private volatile java.lang.Object prevBlockHash_; + /** + *
+     * The hash of the previous block.
+     * 
+ * + * string prev_block_hash = 2 [json_name = "prevBlockHash"]; + * @return The prevBlockHash. + */ + @java.lang.Override + public java.lang.String getPrevBlockHash() { + java.lang.Object ref = prevBlockHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevBlockHash_ = s; + return s; + } + } + /** + *
+     * The hash of the previous block.
+     * 
+ * + * string prev_block_hash = 2 [json_name = "prevBlockHash"]; + * @return The bytes for prevBlockHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrevBlockHashBytes() { + java.lang.Object ref = prevBlockHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevBlockHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_ROOT_FIELD_NUMBER = 3; + private volatile java.lang.Object stateRoot_; + /** + *
+     * The state root hash of the blockchain.
+     * 
+ * + * string state_root = 3 [json_name = "stateRoot"]; + * @return The stateRoot. + */ + @java.lang.Override + public java.lang.String getStateRoot() { + java.lang.Object ref = stateRoot_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateRoot_ = s; + return s; + } + } + /** + *
+     * The state root hash of the blockchain.
+     * 
+ * + * string state_root = 3 [json_name = "stateRoot"]; + * @return The bytes for stateRoot. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStateRootBytes() { + java.lang.Object ref = stateRoot_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateRoot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SORTITION_SEED_FIELD_NUMBER = 4; + private volatile java.lang.Object sortitionSeed_; + /** + *
+     * The sortition seed of the block.
+     * 
+ * + * string sortition_seed = 4 [json_name = "sortitionSeed"]; + * @return The sortitionSeed. + */ + @java.lang.Override + public java.lang.String getSortitionSeed() { + java.lang.Object ref = sortitionSeed_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sortitionSeed_ = s; + return s; + } + } + /** + *
+     * The sortition seed of the block.
+     * 
+ * + * string sortition_seed = 4 [json_name = "sortitionSeed"]; + * @return The bytes for sortitionSeed. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSortitionSeedBytes() { + java.lang.Object ref = sortitionSeed_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sortitionSeed_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPOSER_ADDRESS_FIELD_NUMBER = 5; + private volatile java.lang.Object proposerAddress_; + /** + *
+     * The address of the proposer of the block.
+     * 
+ * + * string proposer_address = 5 [json_name = "proposerAddress"]; + * @return The proposerAddress. + */ + @java.lang.Override + public java.lang.String getProposerAddress() { + java.lang.Object ref = proposerAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proposerAddress_ = s; + return s; + } + } + /** + *
+     * The address of the proposer of the block.
+     * 
+ * + * string proposer_address = 5 [json_name = "proposerAddress"]; + * @return The bytes for proposerAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProposerAddressBytes() { + java.lang.Object ref = proposerAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + proposerAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (version_ != 0) { + output.writeInt32(1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(prevBlockHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, prevBlockHash_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateRoot_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, stateRoot_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sortitionSeed_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sortitionSeed_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proposerAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, proposerAddress_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (version_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, version_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(prevBlockHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, prevBlockHash_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateRoot_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, stateRoot_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sortitionSeed_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sortitionSeed_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proposerAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, proposerAddress_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo other = (pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo) obj; + + if (getVersion() + != other.getVersion()) return false; + if (!getPrevBlockHash() + .equals(other.getPrevBlockHash())) return false; + if (!getStateRoot() + .equals(other.getStateRoot())) return false; + if (!getSortitionSeed() + .equals(other.getSortitionSeed())) return false; + if (!getProposerAddress() + .equals(other.getProposerAddress())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion(); + hash = (37 * hash) + PREV_BLOCK_HASH_FIELD_NUMBER; + hash = (53 * hash) + getPrevBlockHash().hashCode(); + hash = (37 * hash) + STATE_ROOT_FIELD_NUMBER; + hash = (53 * hash) + getStateRoot().hashCode(); + hash = (37 * hash) + SORTITION_SEED_FIELD_NUMBER; + hash = (53 * hash) + getSortitionSeed().hashCode(); + hash = (37 * hash) + PROPOSER_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getProposerAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing information about the header of a block.
+     * 
+ * + * Protobuf type {@code pactus.BlockHeaderInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.BlockHeaderInfo) + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.class, pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = 0; + + prevBlockHash_ = ""; + + stateRoot_ = ""; + + sortitionSeed_ = ""; + + proposerAddress_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_BlockHeaderInfo_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo build() { + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo buildPartial() { + pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo result = new pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo(this); + result.version_ = version_; + result.prevBlockHash_ = prevBlockHash_; + result.stateRoot_ = stateRoot_; + result.sortitionSeed_ = sortitionSeed_; + result.proposerAddress_ = proposerAddress_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo other) { + if (other == pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo.getDefaultInstance()) return this; + if (other.getVersion() != 0) { + setVersion(other.getVersion()); + } + if (!other.getPrevBlockHash().isEmpty()) { + prevBlockHash_ = other.prevBlockHash_; + onChanged(); + } + if (!other.getStateRoot().isEmpty()) { + stateRoot_ = other.stateRoot_; + onChanged(); + } + if (!other.getSortitionSeed().isEmpty()) { + sortitionSeed_ = other.sortitionSeed_; + onChanged(); + } + if (!other.getProposerAddress().isEmpty()) { + proposerAddress_ = other.proposerAddress_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + version_ = input.readInt32(); + + break; + } // case 8 + case 18: { + prevBlockHash_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + stateRoot_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + sortitionSeed_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: { + proposerAddress_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int version_ ; + /** + *
+       * The version of the block.
+       * 
+ * + * int32 version = 1 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public int getVersion() { + return version_; + } + /** + *
+       * The version of the block.
+       * 
+ * + * int32 version = 1 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(int value) { + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * The version of the block.
+       * 
+ * + * int32 version = 1 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = 0; + onChanged(); + return this; + } + + private java.lang.Object prevBlockHash_ = ""; + /** + *
+       * The hash of the previous block.
+       * 
+ * + * string prev_block_hash = 2 [json_name = "prevBlockHash"]; + * @return The prevBlockHash. + */ + public java.lang.String getPrevBlockHash() { + java.lang.Object ref = prevBlockHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + prevBlockHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The hash of the previous block.
+       * 
+ * + * string prev_block_hash = 2 [json_name = "prevBlockHash"]; + * @return The bytes for prevBlockHash. + */ + public com.google.protobuf.ByteString + getPrevBlockHashBytes() { + java.lang.Object ref = prevBlockHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + prevBlockHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The hash of the previous block.
+       * 
+ * + * string prev_block_hash = 2 [json_name = "prevBlockHash"]; + * @param value The prevBlockHash to set. + * @return This builder for chaining. + */ + public Builder setPrevBlockHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + prevBlockHash_ = value; + onChanged(); + return this; + } + /** + *
+       * The hash of the previous block.
+       * 
+ * + * string prev_block_hash = 2 [json_name = "prevBlockHash"]; + * @return This builder for chaining. + */ + public Builder clearPrevBlockHash() { + + prevBlockHash_ = getDefaultInstance().getPrevBlockHash(); + onChanged(); + return this; + } + /** + *
+       * The hash of the previous block.
+       * 
+ * + * string prev_block_hash = 2 [json_name = "prevBlockHash"]; + * @param value The bytes for prevBlockHash to set. + * @return This builder for chaining. + */ + public Builder setPrevBlockHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + prevBlockHash_ = value; + onChanged(); + return this; + } + + private java.lang.Object stateRoot_ = ""; + /** + *
+       * The state root hash of the blockchain.
+       * 
+ * + * string state_root = 3 [json_name = "stateRoot"]; + * @return The stateRoot. + */ + public java.lang.String getStateRoot() { + java.lang.Object ref = stateRoot_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stateRoot_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The state root hash of the blockchain.
+       * 
+ * + * string state_root = 3 [json_name = "stateRoot"]; + * @return The bytes for stateRoot. + */ + public com.google.protobuf.ByteString + getStateRootBytes() { + java.lang.Object ref = stateRoot_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stateRoot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The state root hash of the blockchain.
+       * 
+ * + * string state_root = 3 [json_name = "stateRoot"]; + * @param value The stateRoot to set. + * @return This builder for chaining. + */ + public Builder setStateRoot( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + stateRoot_ = value; + onChanged(); + return this; + } + /** + *
+       * The state root hash of the blockchain.
+       * 
+ * + * string state_root = 3 [json_name = "stateRoot"]; + * @return This builder for chaining. + */ + public Builder clearStateRoot() { + + stateRoot_ = getDefaultInstance().getStateRoot(); + onChanged(); + return this; + } + /** + *
+       * The state root hash of the blockchain.
+       * 
+ * + * string state_root = 3 [json_name = "stateRoot"]; + * @param value The bytes for stateRoot to set. + * @return This builder for chaining. + */ + public Builder setStateRootBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + stateRoot_ = value; + onChanged(); + return this; + } + + private java.lang.Object sortitionSeed_ = ""; + /** + *
+       * The sortition seed of the block.
+       * 
+ * + * string sortition_seed = 4 [json_name = "sortitionSeed"]; + * @return The sortitionSeed. + */ + public java.lang.String getSortitionSeed() { + java.lang.Object ref = sortitionSeed_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sortitionSeed_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The sortition seed of the block.
+       * 
+ * + * string sortition_seed = 4 [json_name = "sortitionSeed"]; + * @return The bytes for sortitionSeed. + */ + public com.google.protobuf.ByteString + getSortitionSeedBytes() { + java.lang.Object ref = sortitionSeed_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sortitionSeed_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The sortition seed of the block.
+       * 
+ * + * string sortition_seed = 4 [json_name = "sortitionSeed"]; + * @param value The sortitionSeed to set. + * @return This builder for chaining. + */ + public Builder setSortitionSeed( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sortitionSeed_ = value; + onChanged(); + return this; + } + /** + *
+       * The sortition seed of the block.
+       * 
+ * + * string sortition_seed = 4 [json_name = "sortitionSeed"]; + * @return This builder for chaining. + */ + public Builder clearSortitionSeed() { + + sortitionSeed_ = getDefaultInstance().getSortitionSeed(); + onChanged(); + return this; + } + /** + *
+       * The sortition seed of the block.
+       * 
+ * + * string sortition_seed = 4 [json_name = "sortitionSeed"]; + * @param value The bytes for sortitionSeed to set. + * @return This builder for chaining. + */ + public Builder setSortitionSeedBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sortitionSeed_ = value; + onChanged(); + return this; + } + + private java.lang.Object proposerAddress_ = ""; + /** + *
+       * The address of the proposer of the block.
+       * 
+ * + * string proposer_address = 5 [json_name = "proposerAddress"]; + * @return The proposerAddress. + */ + public java.lang.String getProposerAddress() { + java.lang.Object ref = proposerAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proposerAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the proposer of the block.
+       * 
+ * + * string proposer_address = 5 [json_name = "proposerAddress"]; + * @return The bytes for proposerAddress. + */ + public com.google.protobuf.ByteString + getProposerAddressBytes() { + java.lang.Object ref = proposerAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + proposerAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the proposer of the block.
+       * 
+ * + * string proposer_address = 5 [json_name = "proposerAddress"]; + * @param value The proposerAddress to set. + * @return This builder for chaining. + */ + public Builder setProposerAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + proposerAddress_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the proposer of the block.
+       * 
+ * + * string proposer_address = 5 [json_name = "proposerAddress"]; + * @return This builder for chaining. + */ + public Builder clearProposerAddress() { + + proposerAddress_ = getDefaultInstance().getProposerAddress(); + onChanged(); + return this; + } + /** + *
+       * The address of the proposer of the block.
+       * 
+ * + * string proposer_address = 5 [json_name = "proposerAddress"]; + * @param value The bytes for proposerAddress to set. + * @return This builder for chaining. + */ + public Builder setProposerAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + proposerAddress_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.BlockHeaderInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.BlockHeaderInfo) + private static final pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo(); + } + + public static pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BlockHeaderInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.BlockHeaderInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CertificateInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.CertificateInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The hash of the certificate.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + java.lang.String getHash(); + /** + *
+     * The hash of the certificate.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + com.google.protobuf.ByteString + getHashBytes(); + + /** + *
+     * The round of the certificate.
+     * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + int getRound(); + + /** + *
+     * List of committers in the certificate.
+     * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @return A list containing the committers. + */ + java.util.List getCommittersList(); + /** + *
+     * List of committers in the certificate.
+     * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @return The count of committers. + */ + int getCommittersCount(); + /** + *
+     * List of committers in the certificate.
+     * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @param index The index of the element to return. + * @return The committers at the given index. + */ + int getCommitters(int index); + + /** + *
+     * List of absentees in the certificate.
+     * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @return A list containing the absentees. + */ + java.util.List getAbsenteesList(); + /** + *
+     * List of absentees in the certificate.
+     * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @return The count of absentees. + */ + int getAbsenteesCount(); + /** + *
+     * List of absentees in the certificate.
+     * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @param index The index of the element to return. + * @return The absentees at the given index. + */ + int getAbsentees(int index); + + /** + *
+     * The signature of the certificate.
+     * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The signature. + */ + java.lang.String getSignature(); + /** + *
+     * The signature of the certificate.
+     * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The bytes for signature. + */ + com.google.protobuf.ByteString + getSignatureBytes(); + } + /** + *
+   * Message containing information about a certificate.
+   * 
+ * + * Protobuf type {@code pactus.CertificateInfo} + */ + public static final class CertificateInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.CertificateInfo) + CertificateInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CertificateInfo.newBuilder() to construct. + private CertificateInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CertificateInfo() { + hash_ = ""; + committers_ = emptyIntList(); + absentees_ = emptyIntList(); + signature_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CertificateInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_CertificateInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_CertificateInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.CertificateInfo.class, pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder.class); + } + + public static final int HASH_FIELD_NUMBER = 1; + private volatile java.lang.Object hash_; + /** + *
+     * The hash of the certificate.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } + } + /** + *
+     * The hash of the certificate.
+     * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROUND_FIELD_NUMBER = 2; + private int round_; + /** + *
+     * The round of the certificate.
+     * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + + public static final int COMMITTERS_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.IntList committers_; + /** + *
+     * List of committers in the certificate.
+     * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @return A list containing the committers. + */ + @java.lang.Override + public java.util.List + getCommittersList() { + return committers_; + } + /** + *
+     * List of committers in the certificate.
+     * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @return The count of committers. + */ + public int getCommittersCount() { + return committers_.size(); + } + /** + *
+     * List of committers in the certificate.
+     * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @param index The index of the element to return. + * @return The committers at the given index. + */ + public int getCommitters(int index) { + return committers_.getInt(index); + } + private int committersMemoizedSerializedSize = -1; + + public static final int ABSENTEES_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.IntList absentees_; + /** + *
+     * List of absentees in the certificate.
+     * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @return A list containing the absentees. + */ + @java.lang.Override + public java.util.List + getAbsenteesList() { + return absentees_; + } + /** + *
+     * List of absentees in the certificate.
+     * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @return The count of absentees. + */ + public int getAbsenteesCount() { + return absentees_.size(); + } + /** + *
+     * List of absentees in the certificate.
+     * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @param index The index of the element to return. + * @return The absentees at the given index. + */ + public int getAbsentees(int index) { + return absentees_.getInt(index); + } + private int absenteesMemoizedSerializedSize = -1; + + public static final int SIGNATURE_FIELD_NUMBER = 5; + private volatile java.lang.Object signature_; + /** + *
+     * The signature of the certificate.
+     * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } + } + /** + *
+     * The signature of the certificate.
+     * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The bytes for signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, hash_); + } + if (round_ != 0) { + output.writeInt32(2, round_); + } + if (getCommittersList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(committersMemoizedSerializedSize); + } + for (int i = 0; i < committers_.size(); i++) { + output.writeInt32NoTag(committers_.getInt(i)); + } + if (getAbsenteesList().size() > 0) { + output.writeUInt32NoTag(34); + output.writeUInt32NoTag(absenteesMemoizedSerializedSize); + } + for (int i = 0; i < absentees_.size(); i++) { + output.writeInt32NoTag(absentees_.getInt(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, signature_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, hash_); + } + if (round_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, round_); + } + { + int dataSize = 0; + for (int i = 0; i < committers_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(committers_.getInt(i)); + } + size += dataSize; + if (!getCommittersList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + committersMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < absentees_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(absentees_.getInt(i)); + } + size += dataSize; + if (!getAbsenteesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + absenteesMemoizedSerializedSize = dataSize; + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, signature_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.CertificateInfo)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.CertificateInfo other = (pactus.blockchain.BlockchainOuterClass.CertificateInfo) obj; + + if (!getHash() + .equals(other.getHash())) return false; + if (getRound() + != other.getRound()) return false; + if (!getCommittersList() + .equals(other.getCommittersList())) return false; + if (!getAbsenteesList() + .equals(other.getAbsenteesList())) return false; + if (!getSignature() + .equals(other.getSignature())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HASH_FIELD_NUMBER; + hash = (53 * hash) + getHash().hashCode(); + hash = (37 * hash) + ROUND_FIELD_NUMBER; + hash = (53 * hash) + getRound(); + if (getCommittersCount() > 0) { + hash = (37 * hash) + COMMITTERS_FIELD_NUMBER; + hash = (53 * hash) + getCommittersList().hashCode(); + } + if (getAbsenteesCount() > 0) { + hash = (37 * hash) + ABSENTEES_FIELD_NUMBER; + hash = (53 * hash) + getAbsenteesList().hashCode(); + } + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.CertificateInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing information about a certificate.
+     * 
+ * + * Protobuf type {@code pactus.CertificateInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.CertificateInfo) + pactus.blockchain.BlockchainOuterClass.CertificateInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_CertificateInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_CertificateInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.CertificateInfo.class, pactus.blockchain.BlockchainOuterClass.CertificateInfo.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.CertificateInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + hash_ = ""; + + round_ = 0; + + committers_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + absentees_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + signature_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_CertificateInfo_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.CertificateInfo getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.CertificateInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.CertificateInfo build() { + pactus.blockchain.BlockchainOuterClass.CertificateInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.CertificateInfo buildPartial() { + pactus.blockchain.BlockchainOuterClass.CertificateInfo result = new pactus.blockchain.BlockchainOuterClass.CertificateInfo(this); + int from_bitField0_ = bitField0_; + result.hash_ = hash_; + result.round_ = round_; + if (((bitField0_ & 0x00000001) != 0)) { + committers_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.committers_ = committers_; + if (((bitField0_ & 0x00000002) != 0)) { + absentees_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.absentees_ = absentees_; + result.signature_ = signature_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.CertificateInfo) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.CertificateInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.CertificateInfo other) { + if (other == pactus.blockchain.BlockchainOuterClass.CertificateInfo.getDefaultInstance()) return this; + if (!other.getHash().isEmpty()) { + hash_ = other.hash_; + onChanged(); + } + if (other.getRound() != 0) { + setRound(other.getRound()); + } + if (!other.committers_.isEmpty()) { + if (committers_.isEmpty()) { + committers_ = other.committers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCommittersIsMutable(); + committers_.addAll(other.committers_); + } + onChanged(); + } + if (!other.absentees_.isEmpty()) { + if (absentees_.isEmpty()) { + absentees_ = other.absentees_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAbsenteesIsMutable(); + absentees_.addAll(other.absentees_); + } + onChanged(); + } + if (!other.getSignature().isEmpty()) { + signature_ = other.signature_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + hash_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + round_ = input.readInt32(); + + break; + } // case 16 + case 24: { + int v = input.readInt32(); + ensureCommittersIsMutable(); + committers_.addInt(v); + break; + } // case 24 + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureCommittersIsMutable(); + while (input.getBytesUntilLimit() > 0) { + committers_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 26 + case 32: { + int v = input.readInt32(); + ensureAbsenteesIsMutable(); + absentees_.addInt(v); + break; + } // case 32 + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAbsenteesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + absentees_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 34 + case 42: { + signature_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object hash_ = ""; + /** + *
+       * The hash of the certificate.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The hash. + */ + public java.lang.String getHash() { + java.lang.Object ref = hash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The hash of the certificate.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return The bytes for hash. + */ + public com.google.protobuf.ByteString + getHashBytes() { + java.lang.Object ref = hash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The hash of the certificate.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + hash_ = value; + onChanged(); + return this; + } + /** + *
+       * The hash of the certificate.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + + hash_ = getDefaultInstance().getHash(); + onChanged(); + return this; + } + /** + *
+       * The hash of the certificate.
+       * 
+ * + * string hash = 1 [json_name = "hash"]; + * @param value The bytes for hash to set. + * @return This builder for chaining. + */ + public Builder setHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + hash_ = value; + onChanged(); + return this; + } + + private int round_ ; + /** + *
+       * The round of the certificate.
+       * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + /** + *
+       * The round of the certificate.
+       * 
+ * + * int32 round = 2 [json_name = "round"]; + * @param value The round to set. + * @return This builder for chaining. + */ + public Builder setRound(int value) { + + round_ = value; + onChanged(); + return this; + } + /** + *
+       * The round of the certificate.
+       * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return This builder for chaining. + */ + public Builder clearRound() { + + round_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList committers_ = emptyIntList(); + private void ensureCommittersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + committers_ = mutableCopy(committers_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * List of committers in the certificate.
+       * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @return A list containing the committers. + */ + public java.util.List + getCommittersList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(committers_) : committers_; + } + /** + *
+       * List of committers in the certificate.
+       * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @return The count of committers. + */ + public int getCommittersCount() { + return committers_.size(); + } + /** + *
+       * List of committers in the certificate.
+       * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @param index The index of the element to return. + * @return The committers at the given index. + */ + public int getCommitters(int index) { + return committers_.getInt(index); + } + /** + *
+       * List of committers in the certificate.
+       * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @param index The index to set the value at. + * @param value The committers to set. + * @return This builder for chaining. + */ + public Builder setCommitters( + int index, int value) { + ensureCommittersIsMutable(); + committers_.setInt(index, value); + onChanged(); + return this; + } + /** + *
+       * List of committers in the certificate.
+       * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @param value The committers to add. + * @return This builder for chaining. + */ + public Builder addCommitters(int value) { + ensureCommittersIsMutable(); + committers_.addInt(value); + onChanged(); + return this; + } + /** + *
+       * List of committers in the certificate.
+       * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @param values The committers to add. + * @return This builder for chaining. + */ + public Builder addAllCommitters( + java.lang.Iterable values) { + ensureCommittersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, committers_); + onChanged(); + return this; + } + /** + *
+       * List of committers in the certificate.
+       * 
+ * + * repeated int32 committers = 3 [json_name = "committers"]; + * @return This builder for chaining. + */ + public Builder clearCommitters() { + committers_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private com.google.protobuf.Internal.IntList absentees_ = emptyIntList(); + private void ensureAbsenteesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + absentees_ = mutableCopy(absentees_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * List of absentees in the certificate.
+       * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @return A list containing the absentees. + */ + public java.util.List + getAbsenteesList() { + return ((bitField0_ & 0x00000002) != 0) ? + java.util.Collections.unmodifiableList(absentees_) : absentees_; + } + /** + *
+       * List of absentees in the certificate.
+       * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @return The count of absentees. + */ + public int getAbsenteesCount() { + return absentees_.size(); + } + /** + *
+       * List of absentees in the certificate.
+       * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @param index The index of the element to return. + * @return The absentees at the given index. + */ + public int getAbsentees(int index) { + return absentees_.getInt(index); + } + /** + *
+       * List of absentees in the certificate.
+       * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @param index The index to set the value at. + * @param value The absentees to set. + * @return This builder for chaining. + */ + public Builder setAbsentees( + int index, int value) { + ensureAbsenteesIsMutable(); + absentees_.setInt(index, value); + onChanged(); + return this; + } + /** + *
+       * List of absentees in the certificate.
+       * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @param value The absentees to add. + * @return This builder for chaining. + */ + public Builder addAbsentees(int value) { + ensureAbsenteesIsMutable(); + absentees_.addInt(value); + onChanged(); + return this; + } + /** + *
+       * List of absentees in the certificate.
+       * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @param values The absentees to add. + * @return This builder for chaining. + */ + public Builder addAllAbsentees( + java.lang.Iterable values) { + ensureAbsenteesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, absentees_); + onChanged(); + return this; + } + /** + *
+       * List of absentees in the certificate.
+       * 
+ * + * repeated int32 absentees = 4 [json_name = "absentees"]; + * @return This builder for chaining. + */ + public Builder clearAbsentees() { + absentees_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + private java.lang.Object signature_ = ""; + /** + *
+       * The signature of the certificate.
+       * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The signature. + */ + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The signature of the certificate.
+       * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return The bytes for signature. + */ + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The signature of the certificate.
+       * 
+ * + * string signature = 5 [json_name = "signature"]; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + signature_ = value; + onChanged(); + return this; + } + /** + *
+       * The signature of the certificate.
+       * 
+ * + * string signature = 5 [json_name = "signature"]; + * @return This builder for chaining. + */ + public Builder clearSignature() { + + signature_ = getDefaultInstance().getSignature(); + onChanged(); + return this; + } + /** + *
+       * The signature of the certificate.
+       * 
+ * + * string signature = 5 [json_name = "signature"]; + * @param value The bytes for signature to set. + * @return This builder for chaining. + */ + public Builder setSignatureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + signature_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.CertificateInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.CertificateInfo) + private static final pactus.blockchain.BlockchainOuterClass.CertificateInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.CertificateInfo(); + } + + public static pactus.blockchain.BlockchainOuterClass.CertificateInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CertificateInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.CertificateInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VoteInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.VoteInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The type of the vote.
+     * 
+ * + * .pactus.VoteType type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + *
+     * The type of the vote.
+     * 
+ * + * .pactus.VoteType type = 1 [json_name = "type"]; + * @return The type. + */ + pactus.blockchain.BlockchainOuterClass.VoteType getType(); + + /** + *
+     * The address of the voter.
+     * 
+ * + * string voter = 2 [json_name = "voter"]; + * @return The voter. + */ + java.lang.String getVoter(); + /** + *
+     * The address of the voter.
+     * 
+ * + * string voter = 2 [json_name = "voter"]; + * @return The bytes for voter. + */ + com.google.protobuf.ByteString + getVoterBytes(); + + /** + *
+     * The hash of the block being voted on.
+     * 
+ * + * string block_hash = 3 [json_name = "blockHash"]; + * @return The blockHash. + */ + java.lang.String getBlockHash(); + /** + *
+     * The hash of the block being voted on.
+     * 
+ * + * string block_hash = 3 [json_name = "blockHash"]; + * @return The bytes for blockHash. + */ + com.google.protobuf.ByteString + getBlockHashBytes(); + + /** + *
+     * The consensus round of the vote.
+     * 
+ * + * int32 round = 4 [json_name = "round"]; + * @return The round. + */ + int getRound(); + + /** + *
+     * The change-proposer round of the vote.
+     * 
+ * + * int32 cp_round = 5 [json_name = "cpRound"]; + * @return The cpRound. + */ + int getCpRound(); + + /** + *
+     * The change-proposer value of the vote.
+     * 
+ * + * int32 cp_value = 6 [json_name = "cpValue"]; + * @return The cpValue. + */ + int getCpValue(); + } + /** + *
+   * Message containing information about a vote.
+   * 
+ * + * Protobuf type {@code pactus.VoteInfo} + */ + public static final class VoteInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.VoteInfo) + VoteInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use VoteInfo.newBuilder() to construct. + private VoteInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VoteInfo() { + type_ = 0; + voter_ = ""; + blockHash_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VoteInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_VoteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_VoteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.VoteInfo.class, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + *
+     * The type of the vote.
+     * 
+ * + * .pactus.VoteType type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+     * The type of the vote.
+     * 
+ * + * .pactus.VoteType type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override public pactus.blockchain.BlockchainOuterClass.VoteType getType() { + @SuppressWarnings("deprecation") + pactus.blockchain.BlockchainOuterClass.VoteType result = pactus.blockchain.BlockchainOuterClass.VoteType.valueOf(type_); + return result == null ? pactus.blockchain.BlockchainOuterClass.VoteType.UNRECOGNIZED : result; + } + + public static final int VOTER_FIELD_NUMBER = 2; + private volatile java.lang.Object voter_; + /** + *
+     * The address of the voter.
+     * 
+ * + * string voter = 2 [json_name = "voter"]; + * @return The voter. + */ + @java.lang.Override + public java.lang.String getVoter() { + java.lang.Object ref = voter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + voter_ = s; + return s; + } + } + /** + *
+     * The address of the voter.
+     * 
+ * + * string voter = 2 [json_name = "voter"]; + * @return The bytes for voter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVoterBytes() { + java.lang.Object ref = voter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + voter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BLOCK_HASH_FIELD_NUMBER = 3; + private volatile java.lang.Object blockHash_; + /** + *
+     * The hash of the block being voted on.
+     * 
+ * + * string block_hash = 3 [json_name = "blockHash"]; + * @return The blockHash. + */ + @java.lang.Override + public java.lang.String getBlockHash() { + java.lang.Object ref = blockHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + blockHash_ = s; + return s; + } + } + /** + *
+     * The hash of the block being voted on.
+     * 
+ * + * string block_hash = 3 [json_name = "blockHash"]; + * @return The bytes for blockHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBlockHashBytes() { + java.lang.Object ref = blockHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + blockHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROUND_FIELD_NUMBER = 4; + private int round_; + /** + *
+     * The consensus round of the vote.
+     * 
+ * + * int32 round = 4 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + + public static final int CP_ROUND_FIELD_NUMBER = 5; + private int cpRound_; + /** + *
+     * The change-proposer round of the vote.
+     * 
+ * + * int32 cp_round = 5 [json_name = "cpRound"]; + * @return The cpRound. + */ + @java.lang.Override + public int getCpRound() { + return cpRound_; + } + + public static final int CP_VALUE_FIELD_NUMBER = 6; + private int cpValue_; + /** + *
+     * The change-proposer value of the vote.
+     * 
+ * + * int32 cp_value = 6 [json_name = "cpValue"]; + * @return The cpValue. + */ + @java.lang.Override + public int getCpValue() { + return cpValue_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != pactus.blockchain.BlockchainOuterClass.VoteType.VOTE_UNKNOWN.getNumber()) { + output.writeEnum(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(voter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, voter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, blockHash_); + } + if (round_ != 0) { + output.writeInt32(4, round_); + } + if (cpRound_ != 0) { + output.writeInt32(5, cpRound_); + } + if (cpValue_ != 0) { + output.writeInt32(6, cpValue_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != pactus.blockchain.BlockchainOuterClass.VoteType.VOTE_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(voter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, voter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, blockHash_); + } + if (round_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, round_); + } + if (cpRound_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, cpRound_); + } + if (cpValue_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, cpValue_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.VoteInfo)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.VoteInfo other = (pactus.blockchain.BlockchainOuterClass.VoteInfo) obj; + + if (type_ != other.type_) return false; + if (!getVoter() + .equals(other.getVoter())) return false; + if (!getBlockHash() + .equals(other.getBlockHash())) return false; + if (getRound() + != other.getRound()) return false; + if (getCpRound() + != other.getCpRound()) return false; + if (getCpValue() + != other.getCpValue()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + VOTER_FIELD_NUMBER; + hash = (53 * hash) + getVoter().hashCode(); + hash = (37 * hash) + BLOCK_HASH_FIELD_NUMBER; + hash = (53 * hash) + getBlockHash().hashCode(); + hash = (37 * hash) + ROUND_FIELD_NUMBER; + hash = (53 * hash) + getRound(); + hash = (37 * hash) + CP_ROUND_FIELD_NUMBER; + hash = (53 * hash) + getCpRound(); + hash = (37 * hash) + CP_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getCpValue(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.VoteInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.VoteInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing information about a vote.
+     * 
+ * + * Protobuf type {@code pactus.VoteInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.VoteInfo) + pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_VoteInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_VoteInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.VoteInfo.class, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.VoteInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = 0; + + voter_ = ""; + + blockHash_ = ""; + + round_ = 0; + + cpRound_ = 0; + + cpValue_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_VoteInfo_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.VoteInfo getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.VoteInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.VoteInfo build() { + pactus.blockchain.BlockchainOuterClass.VoteInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.VoteInfo buildPartial() { + pactus.blockchain.BlockchainOuterClass.VoteInfo result = new pactus.blockchain.BlockchainOuterClass.VoteInfo(this); + result.type_ = type_; + result.voter_ = voter_; + result.blockHash_ = blockHash_; + result.round_ = round_; + result.cpRound_ = cpRound_; + result.cpValue_ = cpValue_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.VoteInfo) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.VoteInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.VoteInfo other) { + if (other == pactus.blockchain.BlockchainOuterClass.VoteInfo.getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getVoter().isEmpty()) { + voter_ = other.voter_; + onChanged(); + } + if (!other.getBlockHash().isEmpty()) { + blockHash_ = other.blockHash_; + onChanged(); + } + if (other.getRound() != 0) { + setRound(other.getRound()); + } + if (other.getCpRound() != 0) { + setCpRound(other.getCpRound()); + } + if (other.getCpValue() != 0) { + setCpValue(other.getCpValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + type_ = input.readEnum(); + + break; + } // case 8 + case 18: { + voter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + blockHash_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: { + round_ = input.readInt32(); + + break; + } // case 32 + case 40: { + cpRound_ = input.readInt32(); + + break; + } // case 40 + case 48: { + cpValue_ = input.readInt32(); + + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int type_ = 0; + /** + *
+       * The type of the vote.
+       * 
+ * + * .pactus.VoteType type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override public int getTypeValue() { + return type_; + } + /** + *
+       * The type of the vote.
+       * 
+ * + * .pactus.VoteType type = 1 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + *
+       * The type of the vote.
+       * 
+ * + * .pactus.VoteType type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.VoteType getType() { + @SuppressWarnings("deprecation") + pactus.blockchain.BlockchainOuterClass.VoteType result = pactus.blockchain.BlockchainOuterClass.VoteType.valueOf(type_); + return result == null ? pactus.blockchain.BlockchainOuterClass.VoteType.UNRECOGNIZED : result; + } + /** + *
+       * The type of the vote.
+       * 
+ * + * .pactus.VoteType type = 1 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(pactus.blockchain.BlockchainOuterClass.VoteType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The type of the vote.
+       * 
+ * + * .pactus.VoteType type = 1 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object voter_ = ""; + /** + *
+       * The address of the voter.
+       * 
+ * + * string voter = 2 [json_name = "voter"]; + * @return The voter. + */ + public java.lang.String getVoter() { + java.lang.Object ref = voter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + voter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the voter.
+       * 
+ * + * string voter = 2 [json_name = "voter"]; + * @return The bytes for voter. + */ + public com.google.protobuf.ByteString + getVoterBytes() { + java.lang.Object ref = voter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + voter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the voter.
+       * 
+ * + * string voter = 2 [json_name = "voter"]; + * @param value The voter to set. + * @return This builder for chaining. + */ + public Builder setVoter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + voter_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the voter.
+       * 
+ * + * string voter = 2 [json_name = "voter"]; + * @return This builder for chaining. + */ + public Builder clearVoter() { + + voter_ = getDefaultInstance().getVoter(); + onChanged(); + return this; + } + /** + *
+       * The address of the voter.
+       * 
+ * + * string voter = 2 [json_name = "voter"]; + * @param value The bytes for voter to set. + * @return This builder for chaining. + */ + public Builder setVoterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + voter_ = value; + onChanged(); + return this; + } + + private java.lang.Object blockHash_ = ""; + /** + *
+       * The hash of the block being voted on.
+       * 
+ * + * string block_hash = 3 [json_name = "blockHash"]; + * @return The blockHash. + */ + public java.lang.String getBlockHash() { + java.lang.Object ref = blockHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + blockHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The hash of the block being voted on.
+       * 
+ * + * string block_hash = 3 [json_name = "blockHash"]; + * @return The bytes for blockHash. + */ + public com.google.protobuf.ByteString + getBlockHashBytes() { + java.lang.Object ref = blockHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + blockHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The hash of the block being voted on.
+       * 
+ * + * string block_hash = 3 [json_name = "blockHash"]; + * @param value The blockHash to set. + * @return This builder for chaining. + */ + public Builder setBlockHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + blockHash_ = value; + onChanged(); + return this; + } + /** + *
+       * The hash of the block being voted on.
+       * 
+ * + * string block_hash = 3 [json_name = "blockHash"]; + * @return This builder for chaining. + */ + public Builder clearBlockHash() { + + blockHash_ = getDefaultInstance().getBlockHash(); + onChanged(); + return this; + } + /** + *
+       * The hash of the block being voted on.
+       * 
+ * + * string block_hash = 3 [json_name = "blockHash"]; + * @param value The bytes for blockHash to set. + * @return This builder for chaining. + */ + public Builder setBlockHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + blockHash_ = value; + onChanged(); + return this; + } + + private int round_ ; + /** + *
+       * The consensus round of the vote.
+       * 
+ * + * int32 round = 4 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + /** + *
+       * The consensus round of the vote.
+       * 
+ * + * int32 round = 4 [json_name = "round"]; + * @param value The round to set. + * @return This builder for chaining. + */ + public Builder setRound(int value) { + + round_ = value; + onChanged(); + return this; + } + /** + *
+       * The consensus round of the vote.
+       * 
+ * + * int32 round = 4 [json_name = "round"]; + * @return This builder for chaining. + */ + public Builder clearRound() { + + round_ = 0; + onChanged(); + return this; + } + + private int cpRound_ ; + /** + *
+       * The change-proposer round of the vote.
+       * 
+ * + * int32 cp_round = 5 [json_name = "cpRound"]; + * @return The cpRound. + */ + @java.lang.Override + public int getCpRound() { + return cpRound_; + } + /** + *
+       * The change-proposer round of the vote.
+       * 
+ * + * int32 cp_round = 5 [json_name = "cpRound"]; + * @param value The cpRound to set. + * @return This builder for chaining. + */ + public Builder setCpRound(int value) { + + cpRound_ = value; + onChanged(); + return this; + } + /** + *
+       * The change-proposer round of the vote.
+       * 
+ * + * int32 cp_round = 5 [json_name = "cpRound"]; + * @return This builder for chaining. + */ + public Builder clearCpRound() { + + cpRound_ = 0; + onChanged(); + return this; + } + + private int cpValue_ ; + /** + *
+       * The change-proposer value of the vote.
+       * 
+ * + * int32 cp_value = 6 [json_name = "cpValue"]; + * @return The cpValue. + */ + @java.lang.Override + public int getCpValue() { + return cpValue_; + } + /** + *
+       * The change-proposer value of the vote.
+       * 
+ * + * int32 cp_value = 6 [json_name = "cpValue"]; + * @param value The cpValue to set. + * @return This builder for chaining. + */ + public Builder setCpValue(int value) { + + cpValue_ = value; + onChanged(); + return this; + } + /** + *
+       * The change-proposer value of the vote.
+       * 
+ * + * int32 cp_value = 6 [json_name = "cpValue"]; + * @return This builder for chaining. + */ + public Builder clearCpValue() { + + cpValue_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.VoteInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.VoteInfo) + private static final pactus.blockchain.BlockchainOuterClass.VoteInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.VoteInfo(); + } + + public static pactus.blockchain.BlockchainOuterClass.VoteInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VoteInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.VoteInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ConsensusInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.ConsensusInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The address of the consensus instance.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The address of the consensus instance.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + + /** + *
+     * Indicates whether the consensus instance is active and part of the
+     * committee.
+     * 
+ * + * bool active = 2 [json_name = "active"]; + * @return The active. + */ + boolean getActive(); + + /** + *
+     * The height of the consensus instance.
+     * 
+ * + * uint32 height = 3 [json_name = "height"]; + * @return The height. + */ + int getHeight(); + + /** + *
+     * The round of the consensus instance.
+     * 
+ * + * int32 round = 4 [json_name = "round"]; + * @return The round. + */ + int getRound(); + + /** + *
+     * List of votes in the consensus instance.
+     * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + java.util.List + getVotesList(); + /** + *
+     * List of votes in the consensus instance.
+     * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + pactus.blockchain.BlockchainOuterClass.VoteInfo getVotes(int index); + /** + *
+     * List of votes in the consensus instance.
+     * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + int getVotesCount(); + /** + *
+     * List of votes in the consensus instance.
+     * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + java.util.List + getVotesOrBuilderList(); + /** + *
+     * List of votes in the consensus instance.
+     * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder getVotesOrBuilder( + int index); + } + /** + *
+   * Message containing information about a consensus instance.
+   * 
+ * + * Protobuf type {@code pactus.ConsensusInfo} + */ + public static final class ConsensusInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.ConsensusInfo) + ConsensusInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConsensusInfo.newBuilder() to construct. + private ConsensusInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ConsensusInfo() { + address_ = ""; + votes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ConsensusInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.ConsensusInfo.class, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object address_; + /** + *
+     * The address of the consensus instance.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The address of the consensus instance.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTIVE_FIELD_NUMBER = 2; + private boolean active_; + /** + *
+     * Indicates whether the consensus instance is active and part of the
+     * committee.
+     * 
+ * + * bool active = 2 [json_name = "active"]; + * @return The active. + */ + @java.lang.Override + public boolean getActive() { + return active_; + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private int height_; + /** + *
+     * The height of the consensus instance.
+     * 
+ * + * uint32 height = 3 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int ROUND_FIELD_NUMBER = 4; + private int round_; + /** + *
+     * The round of the consensus instance.
+     * 
+ * + * int32 round = 4 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + + public static final int VOTES_FIELD_NUMBER = 5; + private java.util.List votes_; + /** + *
+     * List of votes in the consensus instance.
+     * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + @java.lang.Override + public java.util.List getVotesList() { + return votes_; + } + /** + *
+     * List of votes in the consensus instance.
+     * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + @java.lang.Override + public java.util.List + getVotesOrBuilderList() { + return votes_; + } + /** + *
+     * List of votes in the consensus instance.
+     * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + @java.lang.Override + public int getVotesCount() { + return votes_.size(); + } + /** + *
+     * List of votes in the consensus instance.
+     * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.VoteInfo getVotes(int index) { + return votes_.get(index); + } + /** + *
+     * List of votes in the consensus instance.
+     * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder getVotesOrBuilder( + int index) { + return votes_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + if (active_ != false) { + output.writeBool(2, active_); + } + if (height_ != 0) { + output.writeUInt32(3, height_); + } + if (round_ != 0) { + output.writeInt32(4, round_); + } + for (int i = 0; i < votes_.size(); i++) { + output.writeMessage(5, votes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + if (active_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, active_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, height_); + } + if (round_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, round_); + } + for (int i = 0; i < votes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, votes_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.ConsensusInfo)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.ConsensusInfo other = (pactus.blockchain.BlockchainOuterClass.ConsensusInfo) obj; + + if (!getAddress() + .equals(other.getAddress())) return false; + if (getActive() + != other.getActive()) return false; + if (getHeight() + != other.getHeight()) return false; + if (getRound() + != other.getRound()) return false; + if (!getVotesList() + .equals(other.getVotesList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + ACTIVE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getActive()); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + ROUND_FIELD_NUMBER; + hash = (53 * hash) + getRound(); + if (getVotesCount() > 0) { + hash = (37 * hash) + VOTES_FIELD_NUMBER; + hash = (53 * hash) + getVotesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.ConsensusInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing information about a consensus instance.
+     * 
+ * + * Protobuf type {@code pactus.ConsensusInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.ConsensusInfo) + pactus.blockchain.BlockchainOuterClass.ConsensusInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.ConsensusInfo.class, pactus.blockchain.BlockchainOuterClass.ConsensusInfo.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.ConsensusInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + address_ = ""; + + active_ = false; + + height_ = 0; + + round_ = 0; + + if (votesBuilder_ == null) { + votes_ = java.util.Collections.emptyList(); + } else { + votes_ = null; + votesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_ConsensusInfo_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.ConsensusInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ConsensusInfo build() { + pactus.blockchain.BlockchainOuterClass.ConsensusInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ConsensusInfo buildPartial() { + pactus.blockchain.BlockchainOuterClass.ConsensusInfo result = new pactus.blockchain.BlockchainOuterClass.ConsensusInfo(this); + int from_bitField0_ = bitField0_; + result.address_ = address_; + result.active_ = active_; + result.height_ = height_; + result.round_ = round_; + if (votesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + votes_ = java.util.Collections.unmodifiableList(votes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.votes_ = votes_; + } else { + result.votes_ = votesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.ConsensusInfo) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.ConsensusInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.ConsensusInfo other) { + if (other == pactus.blockchain.BlockchainOuterClass.ConsensusInfo.getDefaultInstance()) return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + if (other.getActive() != false) { + setActive(other.getActive()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getRound() != 0) { + setRound(other.getRound()); + } + if (votesBuilder_ == null) { + if (!other.votes_.isEmpty()) { + if (votes_.isEmpty()) { + votes_ = other.votes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVotesIsMutable(); + votes_.addAll(other.votes_); + } + onChanged(); + } + } else { + if (!other.votes_.isEmpty()) { + if (votesBuilder_.isEmpty()) { + votesBuilder_.dispose(); + votesBuilder_ = null; + votes_ = other.votes_; + bitField0_ = (bitField0_ & ~0x00000001); + votesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getVotesFieldBuilder() : null; + } else { + votesBuilder_.addAllMessages(other.votes_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + active_ = input.readBool(); + + break; + } // case 16 + case 24: { + height_ = input.readUInt32(); + + break; + } // case 24 + case 32: { + round_ = input.readInt32(); + + break; + } // case 32 + case 42: { + pactus.blockchain.BlockchainOuterClass.VoteInfo m = + input.readMessage( + pactus.blockchain.BlockchainOuterClass.VoteInfo.parser(), + extensionRegistry); + if (votesBuilder_ == null) { + ensureVotesIsMutable(); + votes_.add(m); + } else { + votesBuilder_.addMessage(m); + } + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object address_ = ""; + /** + *
+       * The address of the consensus instance.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the consensus instance.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the consensus instance.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the consensus instance.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The address of the consensus instance.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + + private boolean active_ ; + /** + *
+       * Indicates whether the consensus instance is active and part of the
+       * committee.
+       * 
+ * + * bool active = 2 [json_name = "active"]; + * @return The active. + */ + @java.lang.Override + public boolean getActive() { + return active_; + } + /** + *
+       * Indicates whether the consensus instance is active and part of the
+       * committee.
+       * 
+ * + * bool active = 2 [json_name = "active"]; + * @param value The active to set. + * @return This builder for chaining. + */ + public Builder setActive(boolean value) { + + active_ = value; + onChanged(); + return this; + } + /** + *
+       * Indicates whether the consensus instance is active and part of the
+       * committee.
+       * 
+ * + * bool active = 2 [json_name = "active"]; + * @return This builder for chaining. + */ + public Builder clearActive() { + + active_ = false; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+       * The height of the consensus instance.
+       * 
+ * + * uint32 height = 3 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+       * The height of the consensus instance.
+       * 
+ * + * uint32 height = 3 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       * The height of the consensus instance.
+       * 
+ * + * uint32 height = 3 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private int round_ ; + /** + *
+       * The round of the consensus instance.
+       * 
+ * + * int32 round = 4 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + /** + *
+       * The round of the consensus instance.
+       * 
+ * + * int32 round = 4 [json_name = "round"]; + * @param value The round to set. + * @return This builder for chaining. + */ + public Builder setRound(int value) { + + round_ = value; + onChanged(); + return this; + } + /** + *
+       * The round of the consensus instance.
+       * 
+ * + * int32 round = 4 [json_name = "round"]; + * @return This builder for chaining. + */ + public Builder clearRound() { + + round_ = 0; + onChanged(); + return this; + } + + private java.util.List votes_ = + java.util.Collections.emptyList(); + private void ensureVotesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + votes_ = new java.util.ArrayList(votes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.VoteInfo, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder, pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder> votesBuilder_; + + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public java.util.List getVotesList() { + if (votesBuilder_ == null) { + return java.util.Collections.unmodifiableList(votes_); + } else { + return votesBuilder_.getMessageList(); + } + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public int getVotesCount() { + if (votesBuilder_ == null) { + return votes_.size(); + } else { + return votesBuilder_.getCount(); + } + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public pactus.blockchain.BlockchainOuterClass.VoteInfo getVotes(int index) { + if (votesBuilder_ == null) { + return votes_.get(index); + } else { + return votesBuilder_.getMessage(index); + } + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public Builder setVotes( + int index, pactus.blockchain.BlockchainOuterClass.VoteInfo value) { + if (votesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVotesIsMutable(); + votes_.set(index, value); + onChanged(); + } else { + votesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public Builder setVotes( + int index, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder builderForValue) { + if (votesBuilder_ == null) { + ensureVotesIsMutable(); + votes_.set(index, builderForValue.build()); + onChanged(); + } else { + votesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public Builder addVotes(pactus.blockchain.BlockchainOuterClass.VoteInfo value) { + if (votesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVotesIsMutable(); + votes_.add(value); + onChanged(); + } else { + votesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public Builder addVotes( + int index, pactus.blockchain.BlockchainOuterClass.VoteInfo value) { + if (votesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVotesIsMutable(); + votes_.add(index, value); + onChanged(); + } else { + votesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public Builder addVotes( + pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder builderForValue) { + if (votesBuilder_ == null) { + ensureVotesIsMutable(); + votes_.add(builderForValue.build()); + onChanged(); + } else { + votesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public Builder addVotes( + int index, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder builderForValue) { + if (votesBuilder_ == null) { + ensureVotesIsMutable(); + votes_.add(index, builderForValue.build()); + onChanged(); + } else { + votesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public Builder addAllVotes( + java.lang.Iterable values) { + if (votesBuilder_ == null) { + ensureVotesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, votes_); + onChanged(); + } else { + votesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public Builder clearVotes() { + if (votesBuilder_ == null) { + votes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + votesBuilder_.clear(); + } + return this; + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public Builder removeVotes(int index) { + if (votesBuilder_ == null) { + ensureVotesIsMutable(); + votes_.remove(index); + onChanged(); + } else { + votesBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder getVotesBuilder( + int index) { + return getVotesFieldBuilder().getBuilder(index); + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder getVotesOrBuilder( + int index) { + if (votesBuilder_ == null) { + return votes_.get(index); } else { + return votesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public java.util.List + getVotesOrBuilderList() { + if (votesBuilder_ != null) { + return votesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(votes_); + } + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder addVotesBuilder() { + return getVotesFieldBuilder().addBuilder( + pactus.blockchain.BlockchainOuterClass.VoteInfo.getDefaultInstance()); + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder addVotesBuilder( + int index) { + return getVotesFieldBuilder().addBuilder( + index, pactus.blockchain.BlockchainOuterClass.VoteInfo.getDefaultInstance()); + } + /** + *
+       * List of votes in the consensus instance.
+       * 
+ * + * repeated .pactus.VoteInfo votes = 5 [json_name = "votes"]; + */ + public java.util.List + getVotesBuilderList() { + return getVotesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.VoteInfo, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder, pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder> + getVotesFieldBuilder() { + if (votesBuilder_ == null) { + votesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pactus.blockchain.BlockchainOuterClass.VoteInfo, pactus.blockchain.BlockchainOuterClass.VoteInfo.Builder, pactus.blockchain.BlockchainOuterClass.VoteInfoOrBuilder>( + votes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + votes_ = null; + } + return votesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.ConsensusInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.ConsensusInfo) + private static final pactus.blockchain.BlockchainOuterClass.ConsensusInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.ConsensusInfo(); + } + + public static pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConsensusInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.ConsensusInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ProposalOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.Proposal) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The height of the proposal.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + int getHeight(); + + /** + *
+     * The round of the proposal.
+     * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + int getRound(); + + /** + *
+     * The block data of the proposal.
+     * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The blockData. + */ + java.lang.String getBlockData(); + /** + *
+     * The block data of the proposal.
+     * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The bytes for blockData. + */ + com.google.protobuf.ByteString + getBlockDataBytes(); + + /** + *
+     * The signature data of the proposal.
+     * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The signatureData. + */ + java.lang.String getSignatureData(); + /** + *
+     * The signature data of the proposal.
+     * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The bytes for signatureData. + */ + com.google.protobuf.ByteString + getSignatureDataBytes(); + } + /** + *
+   * Message containing information about a proposal.
+   * 
+ * + * Protobuf type {@code pactus.Proposal} + */ + public static final class Proposal extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.Proposal) + ProposalOrBuilder { + private static final long serialVersionUID = 0L; + // Use Proposal.newBuilder() to construct. + private Proposal(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Proposal() { + blockData_ = ""; + signatureData_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Proposal(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.Proposal.class, pactus.blockchain.BlockchainOuterClass.Proposal.Builder.class); + } + + public static final int HEIGHT_FIELD_NUMBER = 1; + private int height_; + /** + *
+     * The height of the proposal.
+     * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int ROUND_FIELD_NUMBER = 2; + private int round_; + /** + *
+     * The round of the proposal.
+     * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + + public static final int BLOCK_DATA_FIELD_NUMBER = 3; + private volatile java.lang.Object blockData_; + /** + *
+     * The block data of the proposal.
+     * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The blockData. + */ + @java.lang.Override + public java.lang.String getBlockData() { + java.lang.Object ref = blockData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + blockData_ = s; + return s; + } + } + /** + *
+     * The block data of the proposal.
+     * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The bytes for blockData. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBlockDataBytes() { + java.lang.Object ref = blockData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + blockData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNATURE_DATA_FIELD_NUMBER = 4; + private volatile java.lang.Object signatureData_; + /** + *
+     * The signature data of the proposal.
+     * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The signatureData. + */ + @java.lang.Override + public java.lang.String getSignatureData() { + java.lang.Object ref = signatureData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signatureData_ = s; + return s; + } + } + /** + *
+     * The signature data of the proposal.
+     * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The bytes for signatureData. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureDataBytes() { + java.lang.Object ref = signatureData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signatureData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (height_ != 0) { + output.writeUInt32(1, height_); + } + if (round_ != 0) { + output.writeInt32(2, round_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, blockData_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signatureData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, signatureData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, height_); + } + if (round_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, round_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(blockData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, blockData_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signatureData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, signatureData_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.blockchain.BlockchainOuterClass.Proposal)) { + return super.equals(obj); + } + pactus.blockchain.BlockchainOuterClass.Proposal other = (pactus.blockchain.BlockchainOuterClass.Proposal) obj; + + if (getHeight() + != other.getHeight()) return false; + if (getRound() + != other.getRound()) return false; + if (!getBlockData() + .equals(other.getBlockData())) return false; + if (!getSignatureData() + .equals(other.getSignatureData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + ROUND_FIELD_NUMBER; + hash = (53 * hash) + getRound(); + hash = (37 * hash) + BLOCK_DATA_FIELD_NUMBER; + hash = (53 * hash) + getBlockData().hashCode(); + hash = (37 * hash) + SIGNATURE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getSignatureData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.blockchain.BlockchainOuterClass.Proposal parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.blockchain.BlockchainOuterClass.Proposal prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing information about a proposal.
+     * 
+ * + * Protobuf type {@code pactus.Proposal} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.Proposal) + pactus.blockchain.BlockchainOuterClass.ProposalOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.blockchain.BlockchainOuterClass.Proposal.class, pactus.blockchain.BlockchainOuterClass.Proposal.Builder.class); + } + + // Construct using pactus.blockchain.BlockchainOuterClass.Proposal.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + height_ = 0; + + round_ = 0; + + blockData_ = ""; + + signatureData_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.blockchain.BlockchainOuterClass.internal_static_pactus_Proposal_descriptor; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.Proposal getDefaultInstanceForType() { + return pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance(); + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.Proposal build() { + pactus.blockchain.BlockchainOuterClass.Proposal result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.Proposal buildPartial() { + pactus.blockchain.BlockchainOuterClass.Proposal result = new pactus.blockchain.BlockchainOuterClass.Proposal(this); + result.height_ = height_; + result.round_ = round_; + result.blockData_ = blockData_; + result.signatureData_ = signatureData_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.blockchain.BlockchainOuterClass.Proposal) { + return mergeFrom((pactus.blockchain.BlockchainOuterClass.Proposal)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.blockchain.BlockchainOuterClass.Proposal other) { + if (other == pactus.blockchain.BlockchainOuterClass.Proposal.getDefaultInstance()) return this; + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getRound() != 0) { + setRound(other.getRound()); + } + if (!other.getBlockData().isEmpty()) { + blockData_ = other.blockData_; + onChanged(); + } + if (!other.getSignatureData().isEmpty()) { + signatureData_ = other.signatureData_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + height_ = input.readUInt32(); + + break; + } // case 8 + case 16: { + round_ = input.readInt32(); + + break; + } // case 16 + case 26: { + blockData_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + signatureData_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int height_ ; + /** + *
+       * The height of the proposal.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+       * The height of the proposal.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       * The height of the proposal.
+       * 
+ * + * uint32 height = 1 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private int round_ ; + /** + *
+       * The round of the proposal.
+       * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + /** + *
+       * The round of the proposal.
+       * 
+ * + * int32 round = 2 [json_name = "round"]; + * @param value The round to set. + * @return This builder for chaining. + */ + public Builder setRound(int value) { + + round_ = value; + onChanged(); + return this; + } + /** + *
+       * The round of the proposal.
+       * 
+ * + * int32 round = 2 [json_name = "round"]; + * @return This builder for chaining. + */ + public Builder clearRound() { + + round_ = 0; + onChanged(); + return this; + } + + private java.lang.Object blockData_ = ""; + /** + *
+       * The block data of the proposal.
+       * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The blockData. + */ + public java.lang.String getBlockData() { + java.lang.Object ref = blockData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + blockData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The block data of the proposal.
+       * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return The bytes for blockData. + */ + public com.google.protobuf.ByteString + getBlockDataBytes() { + java.lang.Object ref = blockData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + blockData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The block data of the proposal.
+       * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @param value The blockData to set. + * @return This builder for chaining. + */ + public Builder setBlockData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + blockData_ = value; + onChanged(); + return this; + } + /** + *
+       * The block data of the proposal.
+       * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @return This builder for chaining. + */ + public Builder clearBlockData() { + + blockData_ = getDefaultInstance().getBlockData(); + onChanged(); + return this; + } + /** + *
+       * The block data of the proposal.
+       * 
+ * + * string block_data = 3 [json_name = "blockData"]; + * @param value The bytes for blockData to set. + * @return This builder for chaining. + */ + public Builder setBlockDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + blockData_ = value; + onChanged(); + return this; + } + + private java.lang.Object signatureData_ = ""; + /** + *
+       * The signature data of the proposal.
+       * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The signatureData. + */ + public java.lang.String getSignatureData() { + java.lang.Object ref = signatureData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signatureData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The signature data of the proposal.
+       * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return The bytes for signatureData. + */ + public com.google.protobuf.ByteString + getSignatureDataBytes() { + java.lang.Object ref = signatureData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signatureData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The signature data of the proposal.
+       * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @param value The signatureData to set. + * @return This builder for chaining. + */ + public Builder setSignatureData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + signatureData_ = value; + onChanged(); + return this; + } + /** + *
+       * The signature data of the proposal.
+       * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @return This builder for chaining. + */ + public Builder clearSignatureData() { + + signatureData_ = getDefaultInstance().getSignatureData(); + onChanged(); + return this; + } + /** + *
+       * The signature data of the proposal.
+       * 
+ * + * string signature_data = 4 [json_name = "signatureData"]; + * @param value The bytes for signatureData to set. + * @return This builder for chaining. + */ + public Builder setSignatureDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + signatureData_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.Proposal) + } + + // @@protoc_insertion_point(class_scope:pactus.Proposal) + private static final pactus.blockchain.BlockchainOuterClass.Proposal DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.blockchain.BlockchainOuterClass.Proposal(); + } + + public static pactus.blockchain.BlockchainOuterClass.Proposal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Proposal parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.blockchain.BlockchainOuterClass.Proposal getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetAccountRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetAccountRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetAccountResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetAccountResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorAddressesRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorAddressesResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorByNumberRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetPublicKeyRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetPublicKeyResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockHashRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockHashRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockHashResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockHashResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockHeightRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockHeightResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockchainInfoRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetBlockchainInfoResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetConsensusInfoRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetConsensusInfoResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetTxPoolContentRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetTxPoolContentResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_ValidatorInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_ValidatorInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_AccountInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_AccountInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_BlockHeaderInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_BlockHeaderInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_CertificateInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_CertificateInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_VoteInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_VoteInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_ConsensusInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_ConsensusInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_Proposal_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_Proposal_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020blockchain.proto\022\006pactus\032\021transaction." + + "proto\"-\n\021GetAccountRequest\022\030\n\007address\030\001 " + + "\001(\tR\007address\"C\n\022GetAccountResponse\022-\n\007ac" + + "count\030\001 \001(\0132\023.pactus.AccountInfoR\007accoun" + + "t\"\036\n\034GetValidatorAddressesRequest\"=\n\035Get" + + "ValidatorAddressesResponse\022\034\n\taddresses\030" + + "\001 \003(\tR\taddresses\"/\n\023GetValidatorRequest\022" + + "\030\n\007address\030\001 \001(\tR\007address\"5\n\033GetValidato" + + "rByNumberRequest\022\026\n\006number\030\001 \001(\005R\006number" + + "\"K\n\024GetValidatorResponse\0223\n\tvalidator\030\001 " + + "\001(\0132\025.pactus.ValidatorInfoR\tvalidator\"/\n" + + "\023GetPublicKeyRequest\022\030\n\007address\030\001 \001(\tR\007a" + + "ddress\"5\n\024GetPublicKeyResponse\022\035\n\npublic" + + "_key\030\001 \001(\tR\tpublicKey\"_\n\017GetBlockRequest" + + "\022\026\n\006height\030\001 \001(\rR\006height\0224\n\tverbosity\030\002 " + + "\001(\0162\026.pactus.BlockVerbosityR\tverbosity\"\203" + + "\002\n\020GetBlockResponse\022\026\n\006height\030\001 \001(\rR\006hei" + + "ght\022\022\n\004hash\030\002 \001(\tR\004hash\022\022\n\004data\030\003 \001(\tR\004d" + + "ata\022\035\n\nblock_time\030\004 \001(\rR\tblockTime\022/\n\006he" + + "ader\030\005 \001(\0132\027.pactus.BlockHeaderInfoR\006hea" + + "der\0224\n\tprev_cert\030\006 \001(\0132\027.pactus.Certific" + + "ateInfoR\010prevCert\022)\n\003txs\030\007 \003(\0132\027.pactus." + + "TransactionInfoR\003txs\"-\n\023GetBlockHashRequ" + + "est\022\026\n\006height\030\001 \001(\rR\006height\"*\n\024GetBlockH" + + "ashResponse\022\022\n\004hash\030\001 \001(\tR\004hash\"+\n\025GetBl" + + "ockHeightRequest\022\022\n\004hash\030\001 \001(\tR\004hash\"0\n\026" + + "GetBlockHeightResponse\022\026\n\006height\030\001 \001(\rR\006" + + "height\"\032\n\030GetBlockchainInfoRequest\"\301\003\n\031G" + + "etBlockchainInfoResponse\022*\n\021last_block_h" + + "eight\030\001 \001(\rR\017lastBlockHeight\022&\n\017last_blo" + + "ck_hash\030\002 \001(\tR\rlastBlockHash\022%\n\016total_ac" + + "counts\030\003 \001(\005R\rtotalAccounts\022)\n\020total_val" + + "idators\030\004 \001(\005R\017totalValidators\022\037\n\013total_" + + "power\030\005 \001(\003R\ntotalPower\022\'\n\017committee_pow" + + "er\030\006 \001(\003R\016committeePower\022H\n\024committee_va" + + "lidators\030\007 \003(\0132\025.pactus.ValidatorInfoR\023c" + + "ommitteeValidators\022\033\n\tis_pruned\030\010 \001(\010R\010i" + + "sPruned\022%\n\016pruning_height\030\t \001(\rR\rpruning" + + "Height\022&\n\017last_block_time\030\n \001(\003R\rlastBlo" + + "ckTime\"\031\n\027GetConsensusInfoRequest\"}\n\030Get" + + "ConsensusInfoResponse\022,\n\010proposal\030\001 \001(\0132" + + "\020.pactus.ProposalR\010proposal\0223\n\tinstances" + + "\030\002 \003(\0132\025.pactus.ConsensusInfoR\tinstances" + + "\"Q\n\027GetTxPoolContentRequest\0226\n\014payload_t" + + "ype\030\001 \001(\0162\023.pactus.PayloadTypeR\013payloadT" + + "ype\"E\n\030GetTxPoolContentResponse\022)\n\003txs\030\001" + + " \003(\0132\027.pactus.TransactionInfoR\003txs\"\334\002\n\rV" + + "alidatorInfo\022\022\n\004hash\030\001 \001(\tR\004hash\022\022\n\004data" + + "\030\002 \001(\tR\004data\022\035\n\npublic_key\030\003 \001(\tR\tpublic" + + "Key\022\026\n\006number\030\004 \001(\005R\006number\022\024\n\005stake\030\005 \001" + + "(\003R\005stake\022.\n\023last_bonding_height\030\006 \001(\rR\021" + + "lastBondingHeight\0222\n\025last_sortition_heig" + + "ht\030\007 \001(\rR\023lastSortitionHeight\022)\n\020unbondi" + + "ng_height\030\010 \001(\rR\017unbondingHeight\022\030\n\007addr" + + "ess\030\t \001(\tR\007address\022-\n\022availability_score" + + "\030\n \001(\001R\021availabilityScore\"\201\001\n\013AccountInf" + + "o\022\022\n\004hash\030\001 \001(\tR\004hash\022\022\n\004data\030\002 \001(\tR\004dat" + + "a\022\026\n\006number\030\003 \001(\005R\006number\022\030\n\007balance\030\004 \001" + + "(\003R\007balance\022\030\n\007address\030\005 \001(\tR\007address\"\304\001" + + "\n\017BlockHeaderInfo\022\030\n\007version\030\001 \001(\005R\007vers" + + "ion\022&\n\017prev_block_hash\030\002 \001(\tR\rprevBlockH" + + "ash\022\035\n\nstate_root\030\003 \001(\tR\tstateRoot\022%\n\016so" + + "rtition_seed\030\004 \001(\tR\rsortitionSeed\022)\n\020pro" + + "poser_address\030\005 \001(\tR\017proposerAddress\"\227\001\n" + + "\017CertificateInfo\022\022\n\004hash\030\001 \001(\tR\004hash\022\024\n\005" + + "round\030\002 \001(\005R\005round\022\036\n\ncommitters\030\003 \003(\005R\n" + + "committers\022\034\n\tabsentees\030\004 \003(\005R\tabsentees" + + "\022\034\n\tsignature\030\005 \001(\tR\tsignature\"\261\001\n\010VoteI" + + "nfo\022$\n\004type\030\001 \001(\0162\020.pactus.VoteTypeR\004typ" + + "e\022\024\n\005voter\030\002 \001(\tR\005voter\022\035\n\nblock_hash\030\003 " + + "\001(\tR\tblockHash\022\024\n\005round\030\004 \001(\005R\005round\022\031\n\010" + + "cp_round\030\005 \001(\005R\007cpRound\022\031\n\010cp_value\030\006 \001(" + + "\005R\007cpValue\"\227\001\n\rConsensusInfo\022\030\n\007address\030" + + "\001 \001(\tR\007address\022\026\n\006active\030\002 \001(\010R\006active\022\026" + + "\n\006height\030\003 \001(\rR\006height\022\024\n\005round\030\004 \001(\005R\005r" + + "ound\022&\n\005votes\030\005 \003(\0132\020.pactus.VoteInfoR\005v" + + "otes\"~\n\010Proposal\022\026\n\006height\030\001 \001(\rR\006height" + + "\022\024\n\005round\030\002 \001(\005R\005round\022\035\n\nblock_data\030\003 \001" + + "(\tR\tblockData\022%\n\016signature_data\030\004 \001(\tR\rs" + + "ignatureData*H\n\016BlockVerbosity\022\016\n\nBLOCK_" + + "DATA\020\000\022\016\n\nBLOCK_INFO\020\001\022\026\n\022BLOCK_TRANSACT" + + "IONS\020\002*\\\n\010VoteType\022\020\n\014VOTE_UNKNOWN\020\000\022\020\n\014" + + "VOTE_PREPARE\020\001\022\022\n\016VOTE_PRECOMMIT\020\002\022\030\n\024VO" + + "TE_CHANGE_PROPOSER\020\0032\213\007\n\nBlockchain\022=\n\010G" + + "etBlock\022\027.pactus.GetBlockRequest\032\030.pactu" + + "s.GetBlockResponse\022I\n\014GetBlockHash\022\033.pac" + + "tus.GetBlockHashRequest\032\034.pactus.GetBloc" + + "kHashResponse\022O\n\016GetBlockHeight\022\035.pactus" + + ".GetBlockHeightRequest\032\036.pactus.GetBlock" + + "HeightResponse\022X\n\021GetBlockchainInfo\022 .pa" + + "ctus.GetBlockchainInfoRequest\032!.pactus.G" + + "etBlockchainInfoResponse\022U\n\020GetConsensus" + + "Info\022\037.pactus.GetConsensusInfoRequest\032 ." + + "pactus.GetConsensusInfoResponse\022C\n\nGetAc" + + "count\022\031.pactus.GetAccountRequest\032\032.pactu" + + "s.GetAccountResponse\022I\n\014GetValidator\022\033.p" + + "actus.GetValidatorRequest\032\034.pactus.GetVa" + + "lidatorResponse\022Y\n\024GetValidatorByNumber\022" + + "#.pactus.GetValidatorByNumberRequest\032\034.p" + + "actus.GetValidatorResponse\022d\n\025GetValidat" + + "orAddresses\022$.pactus.GetValidatorAddress" + + "esRequest\032%.pactus.GetValidatorAddresses" + + "Response\022I\n\014GetPublicKey\022\033.pactus.GetPub" + + "licKeyRequest\032\034.pactus.GetPublicKeyRespo" + + "nse\022U\n\020GetTxPoolContent\022\037.pactus.GetTxPo" + + "olContentRequest\032 .pactus.GetTxPoolConte" + + "ntResponseBE\n\021pactus.blockchainZ0github." + + "com/pactus-project/pactus/www/grpc/pactu" + + "sb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + pactus.transaction.TransactionOuterClass.getDescriptor(), + }); + internal_static_pactus_GetAccountRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pactus_GetAccountRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetAccountRequest_descriptor, + new java.lang.String[] { "Address", }); + internal_static_pactus_GetAccountResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_pactus_GetAccountResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetAccountResponse_descriptor, + new java.lang.String[] { "Account", }); + internal_static_pactus_GetValidatorAddressesRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_pactus_GetValidatorAddressesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetValidatorAddressesRequest_descriptor, + new java.lang.String[] { }); + internal_static_pactus_GetValidatorAddressesResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_pactus_GetValidatorAddressesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetValidatorAddressesResponse_descriptor, + new java.lang.String[] { "Addresses", }); + internal_static_pactus_GetValidatorRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_pactus_GetValidatorRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetValidatorRequest_descriptor, + new java.lang.String[] { "Address", }); + internal_static_pactus_GetValidatorByNumberRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_pactus_GetValidatorByNumberRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetValidatorByNumberRequest_descriptor, + new java.lang.String[] { "Number", }); + internal_static_pactus_GetValidatorResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_pactus_GetValidatorResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetValidatorResponse_descriptor, + new java.lang.String[] { "Validator", }); + internal_static_pactus_GetPublicKeyRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_pactus_GetPublicKeyRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetPublicKeyRequest_descriptor, + new java.lang.String[] { "Address", }); + internal_static_pactus_GetPublicKeyResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_pactus_GetPublicKeyResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetPublicKeyResponse_descriptor, + new java.lang.String[] { "PublicKey", }); + internal_static_pactus_GetBlockRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_pactus_GetBlockRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetBlockRequest_descriptor, + new java.lang.String[] { "Height", "Verbosity", }); + internal_static_pactus_GetBlockResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_pactus_GetBlockResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetBlockResponse_descriptor, + new java.lang.String[] { "Height", "Hash", "Data", "BlockTime", "Header", "PrevCert", "Txs", }); + internal_static_pactus_GetBlockHashRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_pactus_GetBlockHashRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetBlockHashRequest_descriptor, + new java.lang.String[] { "Height", }); + internal_static_pactus_GetBlockHashResponse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_pactus_GetBlockHashResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetBlockHashResponse_descriptor, + new java.lang.String[] { "Hash", }); + internal_static_pactus_GetBlockHeightRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_pactus_GetBlockHeightRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetBlockHeightRequest_descriptor, + new java.lang.String[] { "Hash", }); + internal_static_pactus_GetBlockHeightResponse_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_pactus_GetBlockHeightResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetBlockHeightResponse_descriptor, + new java.lang.String[] { "Height", }); + internal_static_pactus_GetBlockchainInfoRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_pactus_GetBlockchainInfoRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetBlockchainInfoRequest_descriptor, + new java.lang.String[] { }); + internal_static_pactus_GetBlockchainInfoResponse_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_pactus_GetBlockchainInfoResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetBlockchainInfoResponse_descriptor, + new java.lang.String[] { "LastBlockHeight", "LastBlockHash", "TotalAccounts", "TotalValidators", "TotalPower", "CommitteePower", "CommitteeValidators", "IsPruned", "PruningHeight", "LastBlockTime", }); + internal_static_pactus_GetConsensusInfoRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_pactus_GetConsensusInfoRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetConsensusInfoRequest_descriptor, + new java.lang.String[] { }); + internal_static_pactus_GetConsensusInfoResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_pactus_GetConsensusInfoResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetConsensusInfoResponse_descriptor, + new java.lang.String[] { "Proposal", "Instances", }); + internal_static_pactus_GetTxPoolContentRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_pactus_GetTxPoolContentRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetTxPoolContentRequest_descriptor, + new java.lang.String[] { "PayloadType", }); + internal_static_pactus_GetTxPoolContentResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_pactus_GetTxPoolContentResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetTxPoolContentResponse_descriptor, + new java.lang.String[] { "Txs", }); + internal_static_pactus_ValidatorInfo_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_pactus_ValidatorInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_ValidatorInfo_descriptor, + new java.lang.String[] { "Hash", "Data", "PublicKey", "Number", "Stake", "LastBondingHeight", "LastSortitionHeight", "UnbondingHeight", "Address", "AvailabilityScore", }); + internal_static_pactus_AccountInfo_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_pactus_AccountInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_AccountInfo_descriptor, + new java.lang.String[] { "Hash", "Data", "Number", "Balance", "Address", }); + internal_static_pactus_BlockHeaderInfo_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_pactus_BlockHeaderInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_BlockHeaderInfo_descriptor, + new java.lang.String[] { "Version", "PrevBlockHash", "StateRoot", "SortitionSeed", "ProposerAddress", }); + internal_static_pactus_CertificateInfo_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_pactus_CertificateInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_CertificateInfo_descriptor, + new java.lang.String[] { "Hash", "Round", "Committers", "Absentees", "Signature", }); + internal_static_pactus_VoteInfo_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_pactus_VoteInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_VoteInfo_descriptor, + new java.lang.String[] { "Type", "Voter", "BlockHash", "Round", "CpRound", "CpValue", }); + internal_static_pactus_ConsensusInfo_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_pactus_ConsensusInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_ConsensusInfo_descriptor, + new java.lang.String[] { "Address", "Active", "Height", "Round", "Votes", }); + internal_static_pactus_Proposal_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_pactus_Proposal_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_Proposal_descriptor, + new java.lang.String[] { "Height", "Round", "BlockData", "SignatureData", }); + pactus.transaction.TransactionOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/www/grpc/gen/java/pactus/network/NetworkGrpc.java b/www/grpc/gen/java/pactus/network/NetworkGrpc.java new file mode 100644 index 000000000..af9bfd962 --- /dev/null +++ b/www/grpc/gen/java/pactus/network/NetworkGrpc.java @@ -0,0 +1,389 @@ +package pactus.network; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Network service provides RPCs for retrieving information about the network.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.50.2)", + comments = "Source: network.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class NetworkGrpc { + + private NetworkGrpc() {} + + public static final String SERVICE_NAME = "pactus.Network"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getGetNetworkInfoMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNetworkInfo", + requestType = pactus.network.NetworkOuterClass.GetNetworkInfoRequest.class, + responseType = pactus.network.NetworkOuterClass.GetNetworkInfoResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetNetworkInfoMethod() { + io.grpc.MethodDescriptor getGetNetworkInfoMethod; + if ((getGetNetworkInfoMethod = NetworkGrpc.getGetNetworkInfoMethod) == null) { + synchronized (NetworkGrpc.class) { + if ((getGetNetworkInfoMethod = NetworkGrpc.getGetNetworkInfoMethod) == null) { + NetworkGrpc.getGetNetworkInfoMethod = getGetNetworkInfoMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNetworkInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.network.NetworkOuterClass.GetNetworkInfoRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.network.NetworkOuterClass.GetNetworkInfoResponse.getDefaultInstance())) + .setSchemaDescriptor(new NetworkMethodDescriptorSupplier("GetNetworkInfo")) + .build(); + } + } + } + return getGetNetworkInfoMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetNodeInfoMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNodeInfo", + requestType = pactus.network.NetworkOuterClass.GetNodeInfoRequest.class, + responseType = pactus.network.NetworkOuterClass.GetNodeInfoResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetNodeInfoMethod() { + io.grpc.MethodDescriptor getGetNodeInfoMethod; + if ((getGetNodeInfoMethod = NetworkGrpc.getGetNodeInfoMethod) == null) { + synchronized (NetworkGrpc.class) { + if ((getGetNodeInfoMethod = NetworkGrpc.getGetNodeInfoMethod) == null) { + NetworkGrpc.getGetNodeInfoMethod = getGetNodeInfoMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNodeInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.network.NetworkOuterClass.GetNodeInfoRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.network.NetworkOuterClass.GetNodeInfoResponse.getDefaultInstance())) + .setSchemaDescriptor(new NetworkMethodDescriptorSupplier("GetNodeInfo")) + .build(); + } + } + } + return getGetNodeInfoMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static NetworkStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NetworkStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NetworkStub(channel, callOptions); + } + }; + return NetworkStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static NetworkBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NetworkBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NetworkBlockingStub(channel, callOptions); + } + }; + return NetworkBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static NetworkFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public NetworkFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NetworkFutureStub(channel, callOptions); + } + }; + return NetworkFutureStub.newStub(factory, channel); + } + + /** + *
+   * Network service provides RPCs for retrieving information about the network.
+   * 
+ */ + public static abstract class NetworkImplBase implements io.grpc.BindableService { + + /** + *
+     * GetNetworkInfo retrieves information about the overall network.
+     * 
+ */ + public void getNetworkInfo(pactus.network.NetworkOuterClass.GetNetworkInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNetworkInfoMethod(), responseObserver); + } + + /** + *
+     * GetNodeInfo retrieves information about a specific node in the network.
+     * 
+ */ + public void getNodeInfo(pactus.network.NetworkOuterClass.GetNodeInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeInfoMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetNetworkInfoMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.network.NetworkOuterClass.GetNetworkInfoRequest, + pactus.network.NetworkOuterClass.GetNetworkInfoResponse>( + this, METHODID_GET_NETWORK_INFO))) + .addMethod( + getGetNodeInfoMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.network.NetworkOuterClass.GetNodeInfoRequest, + pactus.network.NetworkOuterClass.GetNodeInfoResponse>( + this, METHODID_GET_NODE_INFO))) + .build(); + } + } + + /** + *
+   * Network service provides RPCs for retrieving information about the network.
+   * 
+ */ + public static final class NetworkStub extends io.grpc.stub.AbstractAsyncStub { + private NetworkStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NetworkStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NetworkStub(channel, callOptions); + } + + /** + *
+     * GetNetworkInfo retrieves information about the overall network.
+     * 
+ */ + public void getNetworkInfo(pactus.network.NetworkOuterClass.GetNetworkInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNetworkInfoMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetNodeInfo retrieves information about a specific node in the network.
+     * 
+ */ + public void getNodeInfo(pactus.network.NetworkOuterClass.GetNodeInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNodeInfoMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Network service provides RPCs for retrieving information about the network.
+   * 
+ */ + public static final class NetworkBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private NetworkBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NetworkBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NetworkBlockingStub(channel, callOptions); + } + + /** + *
+     * GetNetworkInfo retrieves information about the overall network.
+     * 
+ */ + public pactus.network.NetworkOuterClass.GetNetworkInfoResponse getNetworkInfo(pactus.network.NetworkOuterClass.GetNetworkInfoRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNetworkInfoMethod(), getCallOptions(), request); + } + + /** + *
+     * GetNodeInfo retrieves information about a specific node in the network.
+     * 
+ */ + public pactus.network.NetworkOuterClass.GetNodeInfoResponse getNodeInfo(pactus.network.NetworkOuterClass.GetNodeInfoRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNodeInfoMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Network service provides RPCs for retrieving information about the network.
+   * 
+ */ + public static final class NetworkFutureStub extends io.grpc.stub.AbstractFutureStub { + private NetworkFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected NetworkFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new NetworkFutureStub(channel, callOptions); + } + + /** + *
+     * GetNetworkInfo retrieves information about the overall network.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getNetworkInfo( + pactus.network.NetworkOuterClass.GetNetworkInfoRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNetworkInfoMethod(), getCallOptions()), request); + } + + /** + *
+     * GetNodeInfo retrieves information about a specific node in the network.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getNodeInfo( + pactus.network.NetworkOuterClass.GetNodeInfoRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNodeInfoMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_NETWORK_INFO = 0; + private static final int METHODID_GET_NODE_INFO = 1; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final NetworkImplBase serviceImpl; + private final int methodId; + + MethodHandlers(NetworkImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_NETWORK_INFO: + serviceImpl.getNetworkInfo((pactus.network.NetworkOuterClass.GetNetworkInfoRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NODE_INFO: + serviceImpl.getNodeInfo((pactus.network.NetworkOuterClass.GetNodeInfoRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class NetworkBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + NetworkBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return pactus.network.NetworkOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Network"); + } + } + + private static final class NetworkFileDescriptorSupplier + extends NetworkBaseDescriptorSupplier { + NetworkFileDescriptorSupplier() {} + } + + private static final class NetworkMethodDescriptorSupplier + extends NetworkBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + NetworkMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (NetworkGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new NetworkFileDescriptorSupplier()) + .addMethod(getGetNetworkInfoMethod()) + .addMethod(getGetNodeInfoMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/www/grpc/gen/java/pactus/network/NetworkOuterClass.java b/www/grpc/gen/java/pactus/network/NetworkOuterClass.java new file mode 100644 index 000000000..e9f7b041f --- /dev/null +++ b/www/grpc/gen/java/pactus/network/NetworkOuterClass.java @@ -0,0 +1,10189 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: network.proto + +package pactus.network; + +public final class NetworkOuterClass { + private NetworkOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface GetNetworkInfoRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetNetworkInfoRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * If true, only returns peers with connected status.
+     * 
+ * + * bool only_connected = 1 [json_name = "onlyConnected"]; + * @return The onlyConnected. + */ + boolean getOnlyConnected(); + } + /** + *
+   * Request message for retrieving overall network information.
+   * 
+ * + * Protobuf type {@code pactus.GetNetworkInfoRequest} + */ + public static final class GetNetworkInfoRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetNetworkInfoRequest) + GetNetworkInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNetworkInfoRequest.newBuilder() to construct. + private GetNetworkInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNetworkInfoRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNetworkInfoRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.GetNetworkInfoRequest.class, pactus.network.NetworkOuterClass.GetNetworkInfoRequest.Builder.class); + } + + public static final int ONLY_CONNECTED_FIELD_NUMBER = 1; + private boolean onlyConnected_; + /** + *
+     * If true, only returns peers with connected status.
+     * 
+ * + * bool only_connected = 1 [json_name = "onlyConnected"]; + * @return The onlyConnected. + */ + @java.lang.Override + public boolean getOnlyConnected() { + return onlyConnected_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (onlyConnected_ != false) { + output.writeBool(1, onlyConnected_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (onlyConnected_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, onlyConnected_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.network.NetworkOuterClass.GetNetworkInfoRequest)) { + return super.equals(obj); + } + pactus.network.NetworkOuterClass.GetNetworkInfoRequest other = (pactus.network.NetworkOuterClass.GetNetworkInfoRequest) obj; + + if (getOnlyConnected() + != other.getOnlyConnected()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ONLY_CONNECTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOnlyConnected()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.network.NetworkOuterClass.GetNetworkInfoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for retrieving overall network information.
+     * 
+ * + * Protobuf type {@code pactus.GetNetworkInfoRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetNetworkInfoRequest) + pactus.network.NetworkOuterClass.GetNetworkInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.GetNetworkInfoRequest.class, pactus.network.NetworkOuterClass.GetNetworkInfoRequest.Builder.class); + } + + // Construct using pactus.network.NetworkOuterClass.GetNetworkInfoRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + onlyConnected_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoRequest_descriptor; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNetworkInfoRequest getDefaultInstanceForType() { + return pactus.network.NetworkOuterClass.GetNetworkInfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNetworkInfoRequest build() { + pactus.network.NetworkOuterClass.GetNetworkInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNetworkInfoRequest buildPartial() { + pactus.network.NetworkOuterClass.GetNetworkInfoRequest result = new pactus.network.NetworkOuterClass.GetNetworkInfoRequest(this); + result.onlyConnected_ = onlyConnected_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.network.NetworkOuterClass.GetNetworkInfoRequest) { + return mergeFrom((pactus.network.NetworkOuterClass.GetNetworkInfoRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.network.NetworkOuterClass.GetNetworkInfoRequest other) { + if (other == pactus.network.NetworkOuterClass.GetNetworkInfoRequest.getDefaultInstance()) return this; + if (other.getOnlyConnected() != false) { + setOnlyConnected(other.getOnlyConnected()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + onlyConnected_ = input.readBool(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private boolean onlyConnected_ ; + /** + *
+       * If true, only returns peers with connected status.
+       * 
+ * + * bool only_connected = 1 [json_name = "onlyConnected"]; + * @return The onlyConnected. + */ + @java.lang.Override + public boolean getOnlyConnected() { + return onlyConnected_; + } + /** + *
+       * If true, only returns peers with connected status.
+       * 
+ * + * bool only_connected = 1 [json_name = "onlyConnected"]; + * @param value The onlyConnected to set. + * @return This builder for chaining. + */ + public Builder setOnlyConnected(boolean value) { + + onlyConnected_ = value; + onChanged(); + return this; + } + /** + *
+       * If true, only returns peers with connected status.
+       * 
+ * + * bool only_connected = 1 [json_name = "onlyConnected"]; + * @return This builder for chaining. + */ + public Builder clearOnlyConnected() { + + onlyConnected_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetNetworkInfoRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetNetworkInfoRequest) + private static final pactus.network.NetworkOuterClass.GetNetworkInfoRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.GetNetworkInfoRequest(); + } + + public static pactus.network.NetworkOuterClass.GetNetworkInfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNetworkInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNetworkInfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetNetworkInfoResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetNetworkInfoResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name of the network.
+     * 
+ * + * string network_name = 1 [json_name = "networkName"]; + * @return The networkName. + */ + java.lang.String getNetworkName(); + /** + *
+     * Name of the network.
+     * 
+ * + * string network_name = 1 [json_name = "networkName"]; + * @return The bytes for networkName. + */ + com.google.protobuf.ByteString + getNetworkNameBytes(); + + /** + *
+     * Total bytes sent across the network.
+     * 
+ * + * int64 total_sent_bytes = 2 [json_name = "totalSentBytes"]; + * @return The totalSentBytes. + */ + long getTotalSentBytes(); + + /** + *
+     * Total bytes received across the network.
+     * 
+ * + * int64 total_received_bytes = 3 [json_name = "totalReceivedBytes"]; + * @return The totalReceivedBytes. + */ + long getTotalReceivedBytes(); + + /** + *
+     * Number of connected peers.
+     * 
+ * + * uint32 connected_peers_count = 4 [json_name = "connectedPeersCount"]; + * @return The connectedPeersCount. + */ + int getConnectedPeersCount4(); + + /** + *
+     * List of connected peers.
+     * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + java.util.List + getConnectedPeers5List(); + /** + *
+     * List of connected peers.
+     * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + pactus.network.NetworkOuterClass.PeerInfo getConnectedPeers5(int index); + /** + *
+     * List of connected peers.
+     * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + int getConnectedPeers5Count(); + /** + *
+     * List of connected peers.
+     * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + java.util.List + getConnectedPeers5OrBuilderList(); + /** + *
+     * List of connected peers.
+     * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + pactus.network.NetworkOuterClass.PeerInfoOrBuilder getConnectedPeers5OrBuilder( + int index); + + /** + *
+     * Bytes sent per peer ID.
+     * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + int getSentBytesCount(); + /** + *
+     * Bytes sent per peer ID.
+     * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + boolean containsSentBytes( + int key); + /** + * Use {@link #getSentBytesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSentBytes(); + /** + *
+     * Bytes sent per peer ID.
+     * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + java.util.Map + getSentBytesMap(); + /** + *
+     * Bytes sent per peer ID.
+     * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + + long getSentBytesOrDefault( + int key, + long defaultValue); + /** + *
+     * Bytes sent per peer ID.
+     * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + + long getSentBytesOrThrow( + int key); + + /** + *
+     * Bytes received per peer ID.
+     * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + int getReceivedBytesCount(); + /** + *
+     * Bytes received per peer ID.
+     * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + boolean containsReceivedBytes( + int key); + /** + * Use {@link #getReceivedBytesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getReceivedBytes(); + /** + *
+     * Bytes received per peer ID.
+     * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + java.util.Map + getReceivedBytesMap(); + /** + *
+     * Bytes received per peer ID.
+     * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + + long getReceivedBytesOrDefault( + int key, + long defaultValue); + /** + *
+     * Bytes received per peer ID.
+     * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + + long getReceivedBytesOrThrow( + int key); + } + /** + *
+   * Response message containing information about the overall network.
+   * 
+ * + * Protobuf type {@code pactus.GetNetworkInfoResponse} + */ + public static final class GetNetworkInfoResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetNetworkInfoResponse) + GetNetworkInfoResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNetworkInfoResponse.newBuilder() to construct. + private GetNetworkInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNetworkInfoResponse() { + networkName_ = ""; + connectedPeers5_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNetworkInfoResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 6: + return internalGetSentBytes(); + case 7: + return internalGetReceivedBytes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.GetNetworkInfoResponse.class, pactus.network.NetworkOuterClass.GetNetworkInfoResponse.Builder.class); + } + + public static final int NETWORK_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object networkName_; + /** + *
+     * Name of the network.
+     * 
+ * + * string network_name = 1 [json_name = "networkName"]; + * @return The networkName. + */ + @java.lang.Override + public java.lang.String getNetworkName() { + java.lang.Object ref = networkName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkName_ = s; + return s; + } + } + /** + *
+     * Name of the network.
+     * 
+ * + * string network_name = 1 [json_name = "networkName"]; + * @return The bytes for networkName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNetworkNameBytes() { + java.lang.Object ref = networkName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + networkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_SENT_BYTES_FIELD_NUMBER = 2; + private long totalSentBytes_; + /** + *
+     * Total bytes sent across the network.
+     * 
+ * + * int64 total_sent_bytes = 2 [json_name = "totalSentBytes"]; + * @return The totalSentBytes. + */ + @java.lang.Override + public long getTotalSentBytes() { + return totalSentBytes_; + } + + public static final int TOTAL_RECEIVED_BYTES_FIELD_NUMBER = 3; + private long totalReceivedBytes_; + /** + *
+     * Total bytes received across the network.
+     * 
+ * + * int64 total_received_bytes = 3 [json_name = "totalReceivedBytes"]; + * @return The totalReceivedBytes. + */ + @java.lang.Override + public long getTotalReceivedBytes() { + return totalReceivedBytes_; + } + + public static final int CONNECTED_PEERS_COUNT_FIELD_NUMBER = 4; + private int connectedPeersCount4_; + // An alternative name is used for field "connected_peers_count" because: + // both repeated field "connected_peers" and singular field "connected_peers_count" generate the method "getConnectedPeersCount()" + /** + *
+     * Number of connected peers.
+     * 
+ * + * uint32 connected_peers_count = 4 [json_name = "connectedPeersCount"]; + * @return The connectedPeersCount. + */ + @java.lang.Override + public int getConnectedPeersCount4() { + return connectedPeersCount4_; + } + + public static final int CONNECTED_PEERS_FIELD_NUMBER = 5; + private java.util.List connectedPeers5_; + // An alternative name is used for field "connected_peers" because: + // both repeated field "connected_peers" and singular field "connected_peers_count" generate the method "getConnectedPeersCount()" + /** + *
+     * List of connected peers.
+     * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + @java.lang.Override + public java.util.List getConnectedPeers5List() { + return connectedPeers5_; + } + /** + *
+     * List of connected peers.
+     * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + @java.lang.Override + public java.util.List + getConnectedPeers5OrBuilderList() { + return connectedPeers5_; + } + /** + *
+     * List of connected peers.
+     * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + @java.lang.Override + public int getConnectedPeers5Count() { + return connectedPeers5_.size(); + } + /** + *
+     * List of connected peers.
+     * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + @java.lang.Override + public pactus.network.NetworkOuterClass.PeerInfo getConnectedPeers5(int index) { + return connectedPeers5_.get(index); + } + /** + *
+     * List of connected peers.
+     * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + @java.lang.Override + public pactus.network.NetworkOuterClass.PeerInfoOrBuilder getConnectedPeers5OrBuilder( + int index) { + return connectedPeers5_.get(index); + } + + public static final int SENT_BYTES_FIELD_NUMBER = 6; + private static final class SentBytesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.Long> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Long> sentBytes_; + private com.google.protobuf.MapField + internalGetSentBytes() { + if (sentBytes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SentBytesDefaultEntryHolder.defaultEntry); + } + return sentBytes_; + } + + public int getSentBytesCount() { + return internalGetSentBytes().getMap().size(); + } + /** + *
+     * Bytes sent per peer ID.
+     * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + + @java.lang.Override + public boolean containsSentBytes( + int key) { + + return internalGetSentBytes().getMap().containsKey(key); + } + /** + * Use {@link #getSentBytesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSentBytes() { + return getSentBytesMap(); + } + /** + *
+     * Bytes sent per peer ID.
+     * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public java.util.Map getSentBytesMap() { + return internalGetSentBytes().getMap(); + } + /** + *
+     * Bytes sent per peer ID.
+     * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public long getSentBytesOrDefault( + int key, + long defaultValue) { + + java.util.Map map = + internalGetSentBytes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Bytes sent per peer ID.
+     * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public long getSentBytesOrThrow( + int key) { + + java.util.Map map = + internalGetSentBytes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int RECEIVED_BYTES_FIELD_NUMBER = 7; + private static final class ReceivedBytesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.Long> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Long> receivedBytes_; + private com.google.protobuf.MapField + internalGetReceivedBytes() { + if (receivedBytes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ReceivedBytesDefaultEntryHolder.defaultEntry); + } + return receivedBytes_; + } + + public int getReceivedBytesCount() { + return internalGetReceivedBytes().getMap().size(); + } + /** + *
+     * Bytes received per peer ID.
+     * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + + @java.lang.Override + public boolean containsReceivedBytes( + int key) { + + return internalGetReceivedBytes().getMap().containsKey(key); + } + /** + * Use {@link #getReceivedBytesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getReceivedBytes() { + return getReceivedBytesMap(); + } + /** + *
+     * Bytes received per peer ID.
+     * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public java.util.Map getReceivedBytesMap() { + return internalGetReceivedBytes().getMap(); + } + /** + *
+     * Bytes received per peer ID.
+     * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public long getReceivedBytesOrDefault( + int key, + long defaultValue) { + + java.util.Map map = + internalGetReceivedBytes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Bytes received per peer ID.
+     * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public long getReceivedBytesOrThrow( + int key) { + + java.util.Map map = + internalGetReceivedBytes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, networkName_); + } + if (totalSentBytes_ != 0L) { + output.writeInt64(2, totalSentBytes_); + } + if (totalReceivedBytes_ != 0L) { + output.writeInt64(3, totalReceivedBytes_); + } + if (connectedPeersCount4_ != 0) { + output.writeUInt32(4, connectedPeersCount4_); + } + for (int i = 0; i < connectedPeers5_.size(); i++) { + output.writeMessage(5, connectedPeers5_.get(i)); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetSentBytes(), + SentBytesDefaultEntryHolder.defaultEntry, + 6); + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetReceivedBytes(), + ReceivedBytesDefaultEntryHolder.defaultEntry, + 7); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, networkName_); + } + if (totalSentBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, totalSentBytes_); + } + if (totalReceivedBytes_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, totalReceivedBytes_); + } + if (connectedPeersCount4_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, connectedPeersCount4_); + } + for (int i = 0; i < connectedPeers5_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, connectedPeers5_.get(i)); + } + for (java.util.Map.Entry entry + : internalGetSentBytes().getMap().entrySet()) { + com.google.protobuf.MapEntry + sentBytes__ = SentBytesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, sentBytes__); + } + for (java.util.Map.Entry entry + : internalGetReceivedBytes().getMap().entrySet()) { + com.google.protobuf.MapEntry + receivedBytes__ = ReceivedBytesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, receivedBytes__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.network.NetworkOuterClass.GetNetworkInfoResponse)) { + return super.equals(obj); + } + pactus.network.NetworkOuterClass.GetNetworkInfoResponse other = (pactus.network.NetworkOuterClass.GetNetworkInfoResponse) obj; + + if (!getNetworkName() + .equals(other.getNetworkName())) return false; + if (getTotalSentBytes() + != other.getTotalSentBytes()) return false; + if (getTotalReceivedBytes() + != other.getTotalReceivedBytes()) return false; + if (getConnectedPeersCount4() + != other.getConnectedPeersCount4()) return false; + if (!getConnectedPeers5List() + .equals(other.getConnectedPeers5List())) return false; + if (!internalGetSentBytes().equals( + other.internalGetSentBytes())) return false; + if (!internalGetReceivedBytes().equals( + other.internalGetReceivedBytes())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NETWORK_NAME_FIELD_NUMBER; + hash = (53 * hash) + getNetworkName().hashCode(); + hash = (37 * hash) + TOTAL_SENT_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalSentBytes()); + hash = (37 * hash) + TOTAL_RECEIVED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalReceivedBytes()); + hash = (37 * hash) + CONNECTED_PEERS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getConnectedPeersCount4(); + if (getConnectedPeers5Count() > 0) { + hash = (37 * hash) + CONNECTED_PEERS_FIELD_NUMBER; + hash = (53 * hash) + getConnectedPeers5List().hashCode(); + } + if (!internalGetSentBytes().getMap().isEmpty()) { + hash = (37 * hash) + SENT_BYTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetSentBytes().hashCode(); + } + if (!internalGetReceivedBytes().getMap().isEmpty()) { + hash = (37 * hash) + RECEIVED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetReceivedBytes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.network.NetworkOuterClass.GetNetworkInfoResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing information about the overall network.
+     * 
+ * + * Protobuf type {@code pactus.GetNetworkInfoResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetNetworkInfoResponse) + pactus.network.NetworkOuterClass.GetNetworkInfoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 6: + return internalGetSentBytes(); + case 7: + return internalGetReceivedBytes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 6: + return internalGetMutableSentBytes(); + case 7: + return internalGetMutableReceivedBytes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.GetNetworkInfoResponse.class, pactus.network.NetworkOuterClass.GetNetworkInfoResponse.Builder.class); + } + + // Construct using pactus.network.NetworkOuterClass.GetNetworkInfoResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + networkName_ = ""; + + totalSentBytes_ = 0L; + + totalReceivedBytes_ = 0L; + + connectedPeersCount4_ = 0; + + if (connectedPeers5Builder_ == null) { + connectedPeers5_ = java.util.Collections.emptyList(); + } else { + connectedPeers5_ = null; + connectedPeers5Builder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableSentBytes().clear(); + internalGetMutableReceivedBytes().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNetworkInfoResponse_descriptor; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNetworkInfoResponse getDefaultInstanceForType() { + return pactus.network.NetworkOuterClass.GetNetworkInfoResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNetworkInfoResponse build() { + pactus.network.NetworkOuterClass.GetNetworkInfoResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNetworkInfoResponse buildPartial() { + pactus.network.NetworkOuterClass.GetNetworkInfoResponse result = new pactus.network.NetworkOuterClass.GetNetworkInfoResponse(this); + int from_bitField0_ = bitField0_; + result.networkName_ = networkName_; + result.totalSentBytes_ = totalSentBytes_; + result.totalReceivedBytes_ = totalReceivedBytes_; + result.connectedPeersCount4_ = connectedPeersCount4_; + if (connectedPeers5Builder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + connectedPeers5_ = java.util.Collections.unmodifiableList(connectedPeers5_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.connectedPeers5_ = connectedPeers5_; + } else { + result.connectedPeers5_ = connectedPeers5Builder_.build(); + } + result.sentBytes_ = internalGetSentBytes(); + result.sentBytes_.makeImmutable(); + result.receivedBytes_ = internalGetReceivedBytes(); + result.receivedBytes_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.network.NetworkOuterClass.GetNetworkInfoResponse) { + return mergeFrom((pactus.network.NetworkOuterClass.GetNetworkInfoResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.network.NetworkOuterClass.GetNetworkInfoResponse other) { + if (other == pactus.network.NetworkOuterClass.GetNetworkInfoResponse.getDefaultInstance()) return this; + if (!other.getNetworkName().isEmpty()) { + networkName_ = other.networkName_; + onChanged(); + } + if (other.getTotalSentBytes() != 0L) { + setTotalSentBytes(other.getTotalSentBytes()); + } + if (other.getTotalReceivedBytes() != 0L) { + setTotalReceivedBytes(other.getTotalReceivedBytes()); + } + if (other.getConnectedPeersCount4() != 0) { + setConnectedPeersCount4(other.getConnectedPeersCount4()); + } + if (connectedPeers5Builder_ == null) { + if (!other.connectedPeers5_.isEmpty()) { + if (connectedPeers5_.isEmpty()) { + connectedPeers5_ = other.connectedPeers5_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConnectedPeers5IsMutable(); + connectedPeers5_.addAll(other.connectedPeers5_); + } + onChanged(); + } + } else { + if (!other.connectedPeers5_.isEmpty()) { + if (connectedPeers5Builder_.isEmpty()) { + connectedPeers5Builder_.dispose(); + connectedPeers5Builder_ = null; + connectedPeers5_ = other.connectedPeers5_; + bitField0_ = (bitField0_ & ~0x00000001); + connectedPeers5Builder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConnectedPeers5FieldBuilder() : null; + } else { + connectedPeers5Builder_.addAllMessages(other.connectedPeers5_); + } + } + } + internalGetMutableSentBytes().mergeFrom( + other.internalGetSentBytes()); + internalGetMutableReceivedBytes().mergeFrom( + other.internalGetReceivedBytes()); + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + networkName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + totalSentBytes_ = input.readInt64(); + + break; + } // case 16 + case 24: { + totalReceivedBytes_ = input.readInt64(); + + break; + } // case 24 + case 32: { + connectedPeersCount4_ = input.readUInt32(); + + break; + } // case 32 + case 42: { + pactus.network.NetworkOuterClass.PeerInfo m = + input.readMessage( + pactus.network.NetworkOuterClass.PeerInfo.parser(), + extensionRegistry); + if (connectedPeers5Builder_ == null) { + ensureConnectedPeers5IsMutable(); + connectedPeers5_.add(m); + } else { + connectedPeers5Builder_.addMessage(m); + } + break; + } // case 42 + case 50: { + com.google.protobuf.MapEntry + sentBytes__ = input.readMessage( + SentBytesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSentBytes().getMutableMap().put( + sentBytes__.getKey(), sentBytes__.getValue()); + break; + } // case 50 + case 58: { + com.google.protobuf.MapEntry + receivedBytes__ = input.readMessage( + ReceivedBytesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableReceivedBytes().getMutableMap().put( + receivedBytes__.getKey(), receivedBytes__.getValue()); + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object networkName_ = ""; + /** + *
+       * Name of the network.
+       * 
+ * + * string network_name = 1 [json_name = "networkName"]; + * @return The networkName. + */ + public java.lang.String getNetworkName() { + java.lang.Object ref = networkName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + networkName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Name of the network.
+       * 
+ * + * string network_name = 1 [json_name = "networkName"]; + * @return The bytes for networkName. + */ + public com.google.protobuf.ByteString + getNetworkNameBytes() { + java.lang.Object ref = networkName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + networkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Name of the network.
+       * 
+ * + * string network_name = 1 [json_name = "networkName"]; + * @param value The networkName to set. + * @return This builder for chaining. + */ + public Builder setNetworkName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + networkName_ = value; + onChanged(); + return this; + } + /** + *
+       * Name of the network.
+       * 
+ * + * string network_name = 1 [json_name = "networkName"]; + * @return This builder for chaining. + */ + public Builder clearNetworkName() { + + networkName_ = getDefaultInstance().getNetworkName(); + onChanged(); + return this; + } + /** + *
+       * Name of the network.
+       * 
+ * + * string network_name = 1 [json_name = "networkName"]; + * @param value The bytes for networkName to set. + * @return This builder for chaining. + */ + public Builder setNetworkNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + networkName_ = value; + onChanged(); + return this; + } + + private long totalSentBytes_ ; + /** + *
+       * Total bytes sent across the network.
+       * 
+ * + * int64 total_sent_bytes = 2 [json_name = "totalSentBytes"]; + * @return The totalSentBytes. + */ + @java.lang.Override + public long getTotalSentBytes() { + return totalSentBytes_; + } + /** + *
+       * Total bytes sent across the network.
+       * 
+ * + * int64 total_sent_bytes = 2 [json_name = "totalSentBytes"]; + * @param value The totalSentBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalSentBytes(long value) { + + totalSentBytes_ = value; + onChanged(); + return this; + } + /** + *
+       * Total bytes sent across the network.
+       * 
+ * + * int64 total_sent_bytes = 2 [json_name = "totalSentBytes"]; + * @return This builder for chaining. + */ + public Builder clearTotalSentBytes() { + + totalSentBytes_ = 0L; + onChanged(); + return this; + } + + private long totalReceivedBytes_ ; + /** + *
+       * Total bytes received across the network.
+       * 
+ * + * int64 total_received_bytes = 3 [json_name = "totalReceivedBytes"]; + * @return The totalReceivedBytes. + */ + @java.lang.Override + public long getTotalReceivedBytes() { + return totalReceivedBytes_; + } + /** + *
+       * Total bytes received across the network.
+       * 
+ * + * int64 total_received_bytes = 3 [json_name = "totalReceivedBytes"]; + * @param value The totalReceivedBytes to set. + * @return This builder for chaining. + */ + public Builder setTotalReceivedBytes(long value) { + + totalReceivedBytes_ = value; + onChanged(); + return this; + } + /** + *
+       * Total bytes received across the network.
+       * 
+ * + * int64 total_received_bytes = 3 [json_name = "totalReceivedBytes"]; + * @return This builder for chaining. + */ + public Builder clearTotalReceivedBytes() { + + totalReceivedBytes_ = 0L; + onChanged(); + return this; + } + + private int connectedPeersCount4_ ; + /** + *
+       * Number of connected peers.
+       * 
+ * + * uint32 connected_peers_count = 4 [json_name = "connectedPeersCount"]; + * @return The connectedPeersCount. + */ + @java.lang.Override + public int getConnectedPeersCount4() { + return connectedPeersCount4_; + } + /** + *
+       * Number of connected peers.
+       * 
+ * + * uint32 connected_peers_count = 4 [json_name = "connectedPeersCount"]; + * @param value The connectedPeersCount to set. + * @return This builder for chaining. + */ + public Builder setConnectedPeersCount4(int value) { + + connectedPeersCount4_ = value; + onChanged(); + return this; + } + /** + *
+       * Number of connected peers.
+       * 
+ * + * uint32 connected_peers_count = 4 [json_name = "connectedPeersCount"]; + * @return This builder for chaining. + */ + public Builder clearConnectedPeersCount4() { + + connectedPeersCount4_ = 0; + onChanged(); + return this; + } + + private java.util.List connectedPeers5_ = + java.util.Collections.emptyList(); + private void ensureConnectedPeers5IsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + connectedPeers5_ = new java.util.ArrayList(connectedPeers5_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.network.NetworkOuterClass.PeerInfo, pactus.network.NetworkOuterClass.PeerInfo.Builder, pactus.network.NetworkOuterClass.PeerInfoOrBuilder> connectedPeers5Builder_; + + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public java.util.List getConnectedPeers5List() { + if (connectedPeers5Builder_ == null) { + return java.util.Collections.unmodifiableList(connectedPeers5_); + } else { + return connectedPeers5Builder_.getMessageList(); + } + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public int getConnectedPeers5Count() { + if (connectedPeers5Builder_ == null) { + return connectedPeers5_.size(); + } else { + return connectedPeers5Builder_.getCount(); + } + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public pactus.network.NetworkOuterClass.PeerInfo getConnectedPeers5(int index) { + if (connectedPeers5Builder_ == null) { + return connectedPeers5_.get(index); + } else { + return connectedPeers5Builder_.getMessage(index); + } + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public Builder setConnectedPeers5( + int index, pactus.network.NetworkOuterClass.PeerInfo value) { + if (connectedPeers5Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectedPeers5IsMutable(); + connectedPeers5_.set(index, value); + onChanged(); + } else { + connectedPeers5Builder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public Builder setConnectedPeers5( + int index, pactus.network.NetworkOuterClass.PeerInfo.Builder builderForValue) { + if (connectedPeers5Builder_ == null) { + ensureConnectedPeers5IsMutable(); + connectedPeers5_.set(index, builderForValue.build()); + onChanged(); + } else { + connectedPeers5Builder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public Builder addConnectedPeers5(pactus.network.NetworkOuterClass.PeerInfo value) { + if (connectedPeers5Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectedPeers5IsMutable(); + connectedPeers5_.add(value); + onChanged(); + } else { + connectedPeers5Builder_.addMessage(value); + } + return this; + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public Builder addConnectedPeers5( + int index, pactus.network.NetworkOuterClass.PeerInfo value) { + if (connectedPeers5Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConnectedPeers5IsMutable(); + connectedPeers5_.add(index, value); + onChanged(); + } else { + connectedPeers5Builder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public Builder addConnectedPeers5( + pactus.network.NetworkOuterClass.PeerInfo.Builder builderForValue) { + if (connectedPeers5Builder_ == null) { + ensureConnectedPeers5IsMutable(); + connectedPeers5_.add(builderForValue.build()); + onChanged(); + } else { + connectedPeers5Builder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public Builder addConnectedPeers5( + int index, pactus.network.NetworkOuterClass.PeerInfo.Builder builderForValue) { + if (connectedPeers5Builder_ == null) { + ensureConnectedPeers5IsMutable(); + connectedPeers5_.add(index, builderForValue.build()); + onChanged(); + } else { + connectedPeers5Builder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public Builder addAllConnectedPeers5( + java.lang.Iterable values) { + if (connectedPeers5Builder_ == null) { + ensureConnectedPeers5IsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, connectedPeers5_); + onChanged(); + } else { + connectedPeers5Builder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public Builder clearConnectedPeers5() { + if (connectedPeers5Builder_ == null) { + connectedPeers5_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + connectedPeers5Builder_.clear(); + } + return this; + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public Builder removeConnectedPeers5(int index) { + if (connectedPeers5Builder_ == null) { + ensureConnectedPeers5IsMutable(); + connectedPeers5_.remove(index); + onChanged(); + } else { + connectedPeers5Builder_.remove(index); + } + return this; + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public pactus.network.NetworkOuterClass.PeerInfo.Builder getConnectedPeers5Builder( + int index) { + return getConnectedPeers5FieldBuilder().getBuilder(index); + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public pactus.network.NetworkOuterClass.PeerInfoOrBuilder getConnectedPeers5OrBuilder( + int index) { + if (connectedPeers5Builder_ == null) { + return connectedPeers5_.get(index); } else { + return connectedPeers5Builder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public java.util.List + getConnectedPeers5OrBuilderList() { + if (connectedPeers5Builder_ != null) { + return connectedPeers5Builder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(connectedPeers5_); + } + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public pactus.network.NetworkOuterClass.PeerInfo.Builder addConnectedPeers5Builder() { + return getConnectedPeers5FieldBuilder().addBuilder( + pactus.network.NetworkOuterClass.PeerInfo.getDefaultInstance()); + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public pactus.network.NetworkOuterClass.PeerInfo.Builder addConnectedPeers5Builder( + int index) { + return getConnectedPeers5FieldBuilder().addBuilder( + index, pactus.network.NetworkOuterClass.PeerInfo.getDefaultInstance()); + } + /** + *
+       * List of connected peers.
+       * 
+ * + * repeated .pactus.PeerInfo connected_peers = 5 [json_name = "connectedPeers"]; + */ + public java.util.List + getConnectedPeers5BuilderList() { + return getConnectedPeers5FieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.network.NetworkOuterClass.PeerInfo, pactus.network.NetworkOuterClass.PeerInfo.Builder, pactus.network.NetworkOuterClass.PeerInfoOrBuilder> + getConnectedPeers5FieldBuilder() { + if (connectedPeers5Builder_ == null) { + connectedPeers5Builder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pactus.network.NetworkOuterClass.PeerInfo, pactus.network.NetworkOuterClass.PeerInfo.Builder, pactus.network.NetworkOuterClass.PeerInfoOrBuilder>( + connectedPeers5_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + connectedPeers5_ = null; + } + return connectedPeers5Builder_; + } + + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Long> sentBytes_; + private com.google.protobuf.MapField + internalGetSentBytes() { + if (sentBytes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SentBytesDefaultEntryHolder.defaultEntry); + } + return sentBytes_; + } + private com.google.protobuf.MapField + internalGetMutableSentBytes() { + onChanged();; + if (sentBytes_ == null) { + sentBytes_ = com.google.protobuf.MapField.newMapField( + SentBytesDefaultEntryHolder.defaultEntry); + } + if (!sentBytes_.isMutable()) { + sentBytes_ = sentBytes_.copy(); + } + return sentBytes_; + } + + public int getSentBytesCount() { + return internalGetSentBytes().getMap().size(); + } + /** + *
+       * Bytes sent per peer ID.
+       * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + + @java.lang.Override + public boolean containsSentBytes( + int key) { + + return internalGetSentBytes().getMap().containsKey(key); + } + /** + * Use {@link #getSentBytesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSentBytes() { + return getSentBytesMap(); + } + /** + *
+       * Bytes sent per peer ID.
+       * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public java.util.Map getSentBytesMap() { + return internalGetSentBytes().getMap(); + } + /** + *
+       * Bytes sent per peer ID.
+       * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public long getSentBytesOrDefault( + int key, + long defaultValue) { + + java.util.Map map = + internalGetSentBytes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Bytes sent per peer ID.
+       * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public long getSentBytesOrThrow( + int key) { + + java.util.Map map = + internalGetSentBytes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearSentBytes() { + internalGetMutableSentBytes().getMutableMap() + .clear(); + return this; + } + /** + *
+       * Bytes sent per peer ID.
+       * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + + public Builder removeSentBytes( + int key) { + + internalGetMutableSentBytes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSentBytes() { + return internalGetMutableSentBytes().getMutableMap(); + } + /** + *
+       * Bytes sent per peer ID.
+       * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + public Builder putSentBytes( + int key, + long value) { + + + internalGetMutableSentBytes().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * Bytes sent per peer ID.
+       * 
+ * + * map<int32, int64> sent_bytes = 6 [json_name = "sentBytes"]; + */ + + public Builder putAllSentBytes( + java.util.Map values) { + internalGetMutableSentBytes().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Long> receivedBytes_; + private com.google.protobuf.MapField + internalGetReceivedBytes() { + if (receivedBytes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ReceivedBytesDefaultEntryHolder.defaultEntry); + } + return receivedBytes_; + } + private com.google.protobuf.MapField + internalGetMutableReceivedBytes() { + onChanged();; + if (receivedBytes_ == null) { + receivedBytes_ = com.google.protobuf.MapField.newMapField( + ReceivedBytesDefaultEntryHolder.defaultEntry); + } + if (!receivedBytes_.isMutable()) { + receivedBytes_ = receivedBytes_.copy(); + } + return receivedBytes_; + } + + public int getReceivedBytesCount() { + return internalGetReceivedBytes().getMap().size(); + } + /** + *
+       * Bytes received per peer ID.
+       * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + + @java.lang.Override + public boolean containsReceivedBytes( + int key) { + + return internalGetReceivedBytes().getMap().containsKey(key); + } + /** + * Use {@link #getReceivedBytesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getReceivedBytes() { + return getReceivedBytesMap(); + } + /** + *
+       * Bytes received per peer ID.
+       * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public java.util.Map getReceivedBytesMap() { + return internalGetReceivedBytes().getMap(); + } + /** + *
+       * Bytes received per peer ID.
+       * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public long getReceivedBytesOrDefault( + int key, + long defaultValue) { + + java.util.Map map = + internalGetReceivedBytes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Bytes received per peer ID.
+       * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public long getReceivedBytesOrThrow( + int key) { + + java.util.Map map = + internalGetReceivedBytes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearReceivedBytes() { + internalGetMutableReceivedBytes().getMutableMap() + .clear(); + return this; + } + /** + *
+       * Bytes received per peer ID.
+       * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + + public Builder removeReceivedBytes( + int key) { + + internalGetMutableReceivedBytes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableReceivedBytes() { + return internalGetMutableReceivedBytes().getMutableMap(); + } + /** + *
+       * Bytes received per peer ID.
+       * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + public Builder putReceivedBytes( + int key, + long value) { + + + internalGetMutableReceivedBytes().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * Bytes received per peer ID.
+       * 
+ * + * map<int32, int64> received_bytes = 7 [json_name = "receivedBytes"]; + */ + + public Builder putAllReceivedBytes( + java.util.Map values) { + internalGetMutableReceivedBytes().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetNetworkInfoResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetNetworkInfoResponse) + private static final pactus.network.NetworkOuterClass.GetNetworkInfoResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.GetNetworkInfoResponse(); + } + + public static pactus.network.NetworkOuterClass.GetNetworkInfoResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNetworkInfoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNetworkInfoResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetNodeInfoRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetNodeInfoRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + *
+   * Request message for retrieving information about a specific node in the
+   * network.
+   * 
+ * + * Protobuf type {@code pactus.GetNodeInfoRequest} + */ + public static final class GetNodeInfoRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetNodeInfoRequest) + GetNodeInfoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNodeInfoRequest.newBuilder() to construct. + private GetNodeInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNodeInfoRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNodeInfoRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.GetNodeInfoRequest.class, pactus.network.NetworkOuterClass.GetNodeInfoRequest.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.network.NetworkOuterClass.GetNodeInfoRequest)) { + return super.equals(obj); + } + pactus.network.NetworkOuterClass.GetNodeInfoRequest other = (pactus.network.NetworkOuterClass.GetNodeInfoRequest) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.network.NetworkOuterClass.GetNodeInfoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for retrieving information about a specific node in the
+     * network.
+     * 
+ * + * Protobuf type {@code pactus.GetNodeInfoRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetNodeInfoRequest) + pactus.network.NetworkOuterClass.GetNodeInfoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.GetNodeInfoRequest.class, pactus.network.NetworkOuterClass.GetNodeInfoRequest.Builder.class); + } + + // Construct using pactus.network.NetworkOuterClass.GetNodeInfoRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoRequest_descriptor; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNodeInfoRequest getDefaultInstanceForType() { + return pactus.network.NetworkOuterClass.GetNodeInfoRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNodeInfoRequest build() { + pactus.network.NetworkOuterClass.GetNodeInfoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNodeInfoRequest buildPartial() { + pactus.network.NetworkOuterClass.GetNodeInfoRequest result = new pactus.network.NetworkOuterClass.GetNodeInfoRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.network.NetworkOuterClass.GetNodeInfoRequest) { + return mergeFrom((pactus.network.NetworkOuterClass.GetNodeInfoRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.network.NetworkOuterClass.GetNodeInfoRequest other) { + if (other == pactus.network.NetworkOuterClass.GetNodeInfoRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetNodeInfoRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetNodeInfoRequest) + private static final pactus.network.NetworkOuterClass.GetNodeInfoRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.GetNodeInfoRequest(); + } + + public static pactus.network.NetworkOuterClass.GetNodeInfoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNodeInfoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNodeInfoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetNodeInfoResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetNodeInfoResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Moniker of the node.
+     * 
+ * + * string moniker = 1 [json_name = "moniker"]; + * @return The moniker. + */ + java.lang.String getMoniker(); + /** + *
+     * Moniker of the node.
+     * 
+ * + * string moniker = 1 [json_name = "moniker"]; + * @return The bytes for moniker. + */ + com.google.protobuf.ByteString + getMonikerBytes(); + + /** + *
+     * Agent information of the node.
+     * 
+ * + * string agent = 2 [json_name = "agent"]; + * @return The agent. + */ + java.lang.String getAgent(); + /** + *
+     * Agent information of the node.
+     * 
+ * + * string agent = 2 [json_name = "agent"]; + * @return The bytes for agent. + */ + com.google.protobuf.ByteString + getAgentBytes(); + + /** + *
+     * Peer ID of the node.
+     * 
+ * + * string peer_id = 3 [json_name = "peerId"]; + * @return The peerId. + */ + java.lang.String getPeerId(); + /** + *
+     * Peer ID of the node.
+     * 
+ * + * string peer_id = 3 [json_name = "peerId"]; + * @return The bytes for peerId. + */ + com.google.protobuf.ByteString + getPeerIdBytes(); + + /** + *
+     * Timestamp when the node started.
+     * 
+ * + * uint64 started_at = 4 [json_name = "startedAt"]; + * @return The startedAt. + */ + long getStartedAt(); + + /** + *
+     * Reachability status of the node.
+     * 
+ * + * string reachability = 5 [json_name = "reachability"]; + * @return The reachability. + */ + java.lang.String getReachability(); + /** + *
+     * Reachability status of the node.
+     * 
+ * + * string reachability = 5 [json_name = "reachability"]; + * @return The bytes for reachability. + */ + com.google.protobuf.ByteString + getReachabilityBytes(); + + /** + *
+     * A bitfield indicating the services provided by the node.
+     * 
+ * + * int32 services = 6 [json_name = "services"]; + * @return The services. + */ + int getServices(); + + /** + *
+     * Names of services provided by the node.
+     * 
+ * + * string services_names = 7 [json_name = "servicesNames"]; + * @return The servicesNames. + */ + java.lang.String getServicesNames(); + /** + *
+     * Names of services provided by the node.
+     * 
+ * + * string services_names = 7 [json_name = "servicesNames"]; + * @return The bytes for servicesNames. + */ + com.google.protobuf.ByteString + getServicesNamesBytes(); + + /** + *
+     * List of addresses associated with the node.
+     * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @return A list containing the localAddrs. + */ + java.util.List + getLocalAddrsList(); + /** + *
+     * List of addresses associated with the node.
+     * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @return The count of localAddrs. + */ + int getLocalAddrsCount(); + /** + *
+     * List of addresses associated with the node.
+     * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @param index The index of the element to return. + * @return The localAddrs at the given index. + */ + java.lang.String getLocalAddrs(int index); + /** + *
+     * List of addresses associated with the node.
+     * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @param index The index of the value to return. + * @return The bytes of the localAddrs at the given index. + */ + com.google.protobuf.ByteString + getLocalAddrsBytes(int index); + + /** + *
+     * List of protocols supported by the node.
+     * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @return A list containing the protocols. + */ + java.util.List + getProtocolsList(); + /** + *
+     * List of protocols supported by the node.
+     * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @return The count of protocols. + */ + int getProtocolsCount(); + /** + *
+     * List of protocols supported by the node.
+     * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + java.lang.String getProtocols(int index); + /** + *
+     * List of protocols supported by the node.
+     * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param index The index of the value to return. + * @return The bytes of the protocols at the given index. + */ + com.google.protobuf.ByteString + getProtocolsBytes(int index); + + /** + *
+     * Clock offset of the node.
+     * 
+ * + * double clock_offset = 13 [json_name = "clockOffset"]; + * @return The clockOffset. + */ + double getClockOffset(); + + /** + *
+     * Information about the node's connections.
+     * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * @return Whether the connectionInfo field is set. + */ + boolean hasConnectionInfo(); + /** + *
+     * Information about the node's connections.
+     * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * @return The connectionInfo. + */ + pactus.network.NetworkOuterClass.ConnectionInfo getConnectionInfo(); + /** + *
+     * Information about the node's connections.
+     * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder(); + } + /** + *
+   * Response message containing information about a specific node in the network.
+   * 
+ * + * Protobuf type {@code pactus.GetNodeInfoResponse} + */ + public static final class GetNodeInfoResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetNodeInfoResponse) + GetNodeInfoResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNodeInfoResponse.newBuilder() to construct. + private GetNodeInfoResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNodeInfoResponse() { + moniker_ = ""; + agent_ = ""; + peerId_ = ""; + reachability_ = ""; + servicesNames_ = ""; + localAddrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNodeInfoResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.GetNodeInfoResponse.class, pactus.network.NetworkOuterClass.GetNodeInfoResponse.Builder.class); + } + + public static final int MONIKER_FIELD_NUMBER = 1; + private volatile java.lang.Object moniker_; + /** + *
+     * Moniker of the node.
+     * 
+ * + * string moniker = 1 [json_name = "moniker"]; + * @return The moniker. + */ + @java.lang.Override + public java.lang.String getMoniker() { + java.lang.Object ref = moniker_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + moniker_ = s; + return s; + } + } + /** + *
+     * Moniker of the node.
+     * 
+ * + * string moniker = 1 [json_name = "moniker"]; + * @return The bytes for moniker. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMonikerBytes() { + java.lang.Object ref = moniker_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + moniker_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGENT_FIELD_NUMBER = 2; + private volatile java.lang.Object agent_; + /** + *
+     * Agent information of the node.
+     * 
+ * + * string agent = 2 [json_name = "agent"]; + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } + } + /** + *
+     * Agent information of the node.
+     * 
+ * + * string agent = 2 [json_name = "agent"]; + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object peerId_; + /** + *
+     * Peer ID of the node.
+     * 
+ * + * string peer_id = 3 [json_name = "peerId"]; + * @return The peerId. + */ + @java.lang.Override + public java.lang.String getPeerId() { + java.lang.Object ref = peerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerId_ = s; + return s; + } + } + /** + *
+     * Peer ID of the node.
+     * 
+ * + * string peer_id = 3 [json_name = "peerId"]; + * @return The bytes for peerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPeerIdBytes() { + java.lang.Object ref = peerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + peerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STARTED_AT_FIELD_NUMBER = 4; + private long startedAt_; + /** + *
+     * Timestamp when the node started.
+     * 
+ * + * uint64 started_at = 4 [json_name = "startedAt"]; + * @return The startedAt. + */ + @java.lang.Override + public long getStartedAt() { + return startedAt_; + } + + public static final int REACHABILITY_FIELD_NUMBER = 5; + private volatile java.lang.Object reachability_; + /** + *
+     * Reachability status of the node.
+     * 
+ * + * string reachability = 5 [json_name = "reachability"]; + * @return The reachability. + */ + @java.lang.Override + public java.lang.String getReachability() { + java.lang.Object ref = reachability_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reachability_ = s; + return s; + } + } + /** + *
+     * Reachability status of the node.
+     * 
+ * + * string reachability = 5 [json_name = "reachability"]; + * @return The bytes for reachability. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReachabilityBytes() { + java.lang.Object ref = reachability_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + reachability_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICES_FIELD_NUMBER = 6; + private int services_; + /** + *
+     * A bitfield indicating the services provided by the node.
+     * 
+ * + * int32 services = 6 [json_name = "services"]; + * @return The services. + */ + @java.lang.Override + public int getServices() { + return services_; + } + + public static final int SERVICES_NAMES_FIELD_NUMBER = 7; + private volatile java.lang.Object servicesNames_; + /** + *
+     * Names of services provided by the node.
+     * 
+ * + * string services_names = 7 [json_name = "servicesNames"]; + * @return The servicesNames. + */ + @java.lang.Override + public java.lang.String getServicesNames() { + java.lang.Object ref = servicesNames_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servicesNames_ = s; + return s; + } + } + /** + *
+     * Names of services provided by the node.
+     * 
+ * + * string services_names = 7 [json_name = "servicesNames"]; + * @return The bytes for servicesNames. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getServicesNamesBytes() { + java.lang.Object ref = servicesNames_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + servicesNames_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOCAL_ADDRS_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList localAddrs_; + /** + *
+     * List of addresses associated with the node.
+     * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @return A list containing the localAddrs. + */ + public com.google.protobuf.ProtocolStringList + getLocalAddrsList() { + return localAddrs_; + } + /** + *
+     * List of addresses associated with the node.
+     * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @return The count of localAddrs. + */ + public int getLocalAddrsCount() { + return localAddrs_.size(); + } + /** + *
+     * List of addresses associated with the node.
+     * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @param index The index of the element to return. + * @return The localAddrs at the given index. + */ + public java.lang.String getLocalAddrs(int index) { + return localAddrs_.get(index); + } + /** + *
+     * List of addresses associated with the node.
+     * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @param index The index of the value to return. + * @return The bytes of the localAddrs at the given index. + */ + public com.google.protobuf.ByteString + getLocalAddrsBytes(int index) { + return localAddrs_.getByteString(index); + } + + public static final int PROTOCOLS_FIELD_NUMBER = 9; + private com.google.protobuf.LazyStringList protocols_; + /** + *
+     * List of protocols supported by the node.
+     * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @return A list containing the protocols. + */ + public com.google.protobuf.ProtocolStringList + getProtocolsList() { + return protocols_; + } + /** + *
+     * List of protocols supported by the node.
+     * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @return The count of protocols. + */ + public int getProtocolsCount() { + return protocols_.size(); + } + /** + *
+     * List of protocols supported by the node.
+     * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + public java.lang.String getProtocols(int index) { + return protocols_.get(index); + } + /** + *
+     * List of protocols supported by the node.
+     * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param index The index of the value to return. + * @return The bytes of the protocols at the given index. + */ + public com.google.protobuf.ByteString + getProtocolsBytes(int index) { + return protocols_.getByteString(index); + } + + public static final int CLOCK_OFFSET_FIELD_NUMBER = 13; + private double clockOffset_; + /** + *
+     * Clock offset of the node.
+     * 
+ * + * double clock_offset = 13 [json_name = "clockOffset"]; + * @return The clockOffset. + */ + @java.lang.Override + public double getClockOffset() { + return clockOffset_; + } + + public static final int CONNECTION_INFO_FIELD_NUMBER = 14; + private pactus.network.NetworkOuterClass.ConnectionInfo connectionInfo_; + /** + *
+     * Information about the node's connections.
+     * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * @return Whether the connectionInfo field is set. + */ + @java.lang.Override + public boolean hasConnectionInfo() { + return connectionInfo_ != null; + } + /** + *
+     * Information about the node's connections.
+     * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * @return The connectionInfo. + */ + @java.lang.Override + public pactus.network.NetworkOuterClass.ConnectionInfo getConnectionInfo() { + return connectionInfo_ == null ? pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_; + } + /** + *
+     * Information about the node's connections.
+     * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + @java.lang.Override + public pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder() { + return getConnectionInfo(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moniker_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, moniker_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, agent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, peerId_); + } + if (startedAt_ != 0L) { + output.writeUInt64(4, startedAt_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reachability_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, reachability_); + } + if (services_ != 0) { + output.writeInt32(6, services_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servicesNames_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, servicesNames_); + } + for (int i = 0; i < localAddrs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, localAddrs_.getRaw(i)); + } + for (int i = 0; i < protocols_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, protocols_.getRaw(i)); + } + if (java.lang.Double.doubleToRawLongBits(clockOffset_) != 0) { + output.writeDouble(13, clockOffset_); + } + if (connectionInfo_ != null) { + output.writeMessage(14, getConnectionInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moniker_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, moniker_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, agent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, peerId_); + } + if (startedAt_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, startedAt_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reachability_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, reachability_); + } + if (services_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, services_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servicesNames_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, servicesNames_); + } + { + int dataSize = 0; + for (int i = 0; i < localAddrs_.size(); i++) { + dataSize += computeStringSizeNoTag(localAddrs_.getRaw(i)); + } + size += dataSize; + size += 1 * getLocalAddrsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < protocols_.size(); i++) { + dataSize += computeStringSizeNoTag(protocols_.getRaw(i)); + } + size += dataSize; + size += 1 * getProtocolsList().size(); + } + if (java.lang.Double.doubleToRawLongBits(clockOffset_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(13, clockOffset_); + } + if (connectionInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getConnectionInfo()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.network.NetworkOuterClass.GetNodeInfoResponse)) { + return super.equals(obj); + } + pactus.network.NetworkOuterClass.GetNodeInfoResponse other = (pactus.network.NetworkOuterClass.GetNodeInfoResponse) obj; + + if (!getMoniker() + .equals(other.getMoniker())) return false; + if (!getAgent() + .equals(other.getAgent())) return false; + if (!getPeerId() + .equals(other.getPeerId())) return false; + if (getStartedAt() + != other.getStartedAt()) return false; + if (!getReachability() + .equals(other.getReachability())) return false; + if (getServices() + != other.getServices()) return false; + if (!getServicesNames() + .equals(other.getServicesNames())) return false; + if (!getLocalAddrsList() + .equals(other.getLocalAddrsList())) return false; + if (!getProtocolsList() + .equals(other.getProtocolsList())) return false; + if (java.lang.Double.doubleToLongBits(getClockOffset()) + != java.lang.Double.doubleToLongBits( + other.getClockOffset())) return false; + if (hasConnectionInfo() != other.hasConnectionInfo()) return false; + if (hasConnectionInfo()) { + if (!getConnectionInfo() + .equals(other.getConnectionInfo())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MONIKER_FIELD_NUMBER; + hash = (53 * hash) + getMoniker().hashCode(); + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + hash = (37 * hash) + PEER_ID_FIELD_NUMBER; + hash = (53 * hash) + getPeerId().hashCode(); + hash = (37 * hash) + STARTED_AT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStartedAt()); + hash = (37 * hash) + REACHABILITY_FIELD_NUMBER; + hash = (53 * hash) + getReachability().hashCode(); + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServices(); + hash = (37 * hash) + SERVICES_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getServicesNames().hashCode(); + if (getLocalAddrsCount() > 0) { + hash = (37 * hash) + LOCAL_ADDRS_FIELD_NUMBER; + hash = (53 * hash) + getLocalAddrsList().hashCode(); + } + if (getProtocolsCount() > 0) { + hash = (37 * hash) + PROTOCOLS_FIELD_NUMBER; + hash = (53 * hash) + getProtocolsList().hashCode(); + } + hash = (37 * hash) + CLOCK_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getClockOffset())); + if (hasConnectionInfo()) { + hash = (37 * hash) + CONNECTION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getConnectionInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.network.NetworkOuterClass.GetNodeInfoResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing information about a specific node in the network.
+     * 
+ * + * Protobuf type {@code pactus.GetNodeInfoResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetNodeInfoResponse) + pactus.network.NetworkOuterClass.GetNodeInfoResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.GetNodeInfoResponse.class, pactus.network.NetworkOuterClass.GetNodeInfoResponse.Builder.class); + } + + // Construct using pactus.network.NetworkOuterClass.GetNodeInfoResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + moniker_ = ""; + + agent_ = ""; + + peerId_ = ""; + + startedAt_ = 0L; + + reachability_ = ""; + + services_ = 0; + + servicesNames_ = ""; + + localAddrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + clockOffset_ = 0D; + + if (connectionInfoBuilder_ == null) { + connectionInfo_ = null; + } else { + connectionInfo_ = null; + connectionInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.network.NetworkOuterClass.internal_static_pactus_GetNodeInfoResponse_descriptor; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNodeInfoResponse getDefaultInstanceForType() { + return pactus.network.NetworkOuterClass.GetNodeInfoResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNodeInfoResponse build() { + pactus.network.NetworkOuterClass.GetNodeInfoResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNodeInfoResponse buildPartial() { + pactus.network.NetworkOuterClass.GetNodeInfoResponse result = new pactus.network.NetworkOuterClass.GetNodeInfoResponse(this); + int from_bitField0_ = bitField0_; + result.moniker_ = moniker_; + result.agent_ = agent_; + result.peerId_ = peerId_; + result.startedAt_ = startedAt_; + result.reachability_ = reachability_; + result.services_ = services_; + result.servicesNames_ = servicesNames_; + if (((bitField0_ & 0x00000001) != 0)) { + localAddrs_ = localAddrs_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.localAddrs_ = localAddrs_; + if (((bitField0_ & 0x00000002) != 0)) { + protocols_ = protocols_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.protocols_ = protocols_; + result.clockOffset_ = clockOffset_; + if (connectionInfoBuilder_ == null) { + result.connectionInfo_ = connectionInfo_; + } else { + result.connectionInfo_ = connectionInfoBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.network.NetworkOuterClass.GetNodeInfoResponse) { + return mergeFrom((pactus.network.NetworkOuterClass.GetNodeInfoResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.network.NetworkOuterClass.GetNodeInfoResponse other) { + if (other == pactus.network.NetworkOuterClass.GetNodeInfoResponse.getDefaultInstance()) return this; + if (!other.getMoniker().isEmpty()) { + moniker_ = other.moniker_; + onChanged(); + } + if (!other.getAgent().isEmpty()) { + agent_ = other.agent_; + onChanged(); + } + if (!other.getPeerId().isEmpty()) { + peerId_ = other.peerId_; + onChanged(); + } + if (other.getStartedAt() != 0L) { + setStartedAt(other.getStartedAt()); + } + if (!other.getReachability().isEmpty()) { + reachability_ = other.reachability_; + onChanged(); + } + if (other.getServices() != 0) { + setServices(other.getServices()); + } + if (!other.getServicesNames().isEmpty()) { + servicesNames_ = other.servicesNames_; + onChanged(); + } + if (!other.localAddrs_.isEmpty()) { + if (localAddrs_.isEmpty()) { + localAddrs_ = other.localAddrs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLocalAddrsIsMutable(); + localAddrs_.addAll(other.localAddrs_); + } + onChanged(); + } + if (!other.protocols_.isEmpty()) { + if (protocols_.isEmpty()) { + protocols_ = other.protocols_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureProtocolsIsMutable(); + protocols_.addAll(other.protocols_); + } + onChanged(); + } + if (other.getClockOffset() != 0D) { + setClockOffset(other.getClockOffset()); + } + if (other.hasConnectionInfo()) { + mergeConnectionInfo(other.getConnectionInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + moniker_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + agent_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + peerId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: { + startedAt_ = input.readUInt64(); + + break; + } // case 32 + case 42: { + reachability_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: { + services_ = input.readInt32(); + + break; + } // case 48 + case 58: { + servicesNames_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + ensureLocalAddrsIsMutable(); + localAddrs_.add(s); + break; + } // case 66 + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + ensureProtocolsIsMutable(); + protocols_.add(s); + break; + } // case 74 + case 105: { + clockOffset_ = input.readDouble(); + + break; + } // case 105 + case 114: { + input.readMessage( + getConnectionInfoFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 114 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object moniker_ = ""; + /** + *
+       * Moniker of the node.
+       * 
+ * + * string moniker = 1 [json_name = "moniker"]; + * @return The moniker. + */ + public java.lang.String getMoniker() { + java.lang.Object ref = moniker_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + moniker_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Moniker of the node.
+       * 
+ * + * string moniker = 1 [json_name = "moniker"]; + * @return The bytes for moniker. + */ + public com.google.protobuf.ByteString + getMonikerBytes() { + java.lang.Object ref = moniker_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + moniker_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Moniker of the node.
+       * 
+ * + * string moniker = 1 [json_name = "moniker"]; + * @param value The moniker to set. + * @return This builder for chaining. + */ + public Builder setMoniker( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + moniker_ = value; + onChanged(); + return this; + } + /** + *
+       * Moniker of the node.
+       * 
+ * + * string moniker = 1 [json_name = "moniker"]; + * @return This builder for chaining. + */ + public Builder clearMoniker() { + + moniker_ = getDefaultInstance().getMoniker(); + onChanged(); + return this; + } + /** + *
+       * Moniker of the node.
+       * 
+ * + * string moniker = 1 [json_name = "moniker"]; + * @param value The bytes for moniker to set. + * @return This builder for chaining. + */ + public Builder setMonikerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + moniker_ = value; + onChanged(); + return this; + } + + private java.lang.Object agent_ = ""; + /** + *
+       * Agent information of the node.
+       * 
+ * + * string agent = 2 [json_name = "agent"]; + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Agent information of the node.
+       * 
+ * + * string agent = 2 [json_name = "agent"]; + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString + getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Agent information of the node.
+       * 
+ * + * string agent = 2 [json_name = "agent"]; + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + agent_ = value; + onChanged(); + return this; + } + /** + *
+       * Agent information of the node.
+       * 
+ * + * string agent = 2 [json_name = "agent"]; + * @return This builder for chaining. + */ + public Builder clearAgent() { + + agent_ = getDefaultInstance().getAgent(); + onChanged(); + return this; + } + /** + *
+       * Agent information of the node.
+       * 
+ * + * string agent = 2 [json_name = "agent"]; + * @param value The bytes for agent to set. + * @return This builder for chaining. + */ + public Builder setAgentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + agent_ = value; + onChanged(); + return this; + } + + private java.lang.Object peerId_ = ""; + /** + *
+       * Peer ID of the node.
+       * 
+ * + * string peer_id = 3 [json_name = "peerId"]; + * @return The peerId. + */ + public java.lang.String getPeerId() { + java.lang.Object ref = peerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Peer ID of the node.
+       * 
+ * + * string peer_id = 3 [json_name = "peerId"]; + * @return The bytes for peerId. + */ + public com.google.protobuf.ByteString + getPeerIdBytes() { + java.lang.Object ref = peerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + peerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Peer ID of the node.
+       * 
+ * + * string peer_id = 3 [json_name = "peerId"]; + * @param value The peerId to set. + * @return This builder for chaining. + */ + public Builder setPeerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + peerId_ = value; + onChanged(); + return this; + } + /** + *
+       * Peer ID of the node.
+       * 
+ * + * string peer_id = 3 [json_name = "peerId"]; + * @return This builder for chaining. + */ + public Builder clearPeerId() { + + peerId_ = getDefaultInstance().getPeerId(); + onChanged(); + return this; + } + /** + *
+       * Peer ID of the node.
+       * 
+ * + * string peer_id = 3 [json_name = "peerId"]; + * @param value The bytes for peerId to set. + * @return This builder for chaining. + */ + public Builder setPeerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + peerId_ = value; + onChanged(); + return this; + } + + private long startedAt_ ; + /** + *
+       * Timestamp when the node started.
+       * 
+ * + * uint64 started_at = 4 [json_name = "startedAt"]; + * @return The startedAt. + */ + @java.lang.Override + public long getStartedAt() { + return startedAt_; + } + /** + *
+       * Timestamp when the node started.
+       * 
+ * + * uint64 started_at = 4 [json_name = "startedAt"]; + * @param value The startedAt to set. + * @return This builder for chaining. + */ + public Builder setStartedAt(long value) { + + startedAt_ = value; + onChanged(); + return this; + } + /** + *
+       * Timestamp when the node started.
+       * 
+ * + * uint64 started_at = 4 [json_name = "startedAt"]; + * @return This builder for chaining. + */ + public Builder clearStartedAt() { + + startedAt_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object reachability_ = ""; + /** + *
+       * Reachability status of the node.
+       * 
+ * + * string reachability = 5 [json_name = "reachability"]; + * @return The reachability. + */ + public java.lang.String getReachability() { + java.lang.Object ref = reachability_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reachability_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Reachability status of the node.
+       * 
+ * + * string reachability = 5 [json_name = "reachability"]; + * @return The bytes for reachability. + */ + public com.google.protobuf.ByteString + getReachabilityBytes() { + java.lang.Object ref = reachability_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + reachability_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Reachability status of the node.
+       * 
+ * + * string reachability = 5 [json_name = "reachability"]; + * @param value The reachability to set. + * @return This builder for chaining. + */ + public Builder setReachability( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + reachability_ = value; + onChanged(); + return this; + } + /** + *
+       * Reachability status of the node.
+       * 
+ * + * string reachability = 5 [json_name = "reachability"]; + * @return This builder for chaining. + */ + public Builder clearReachability() { + + reachability_ = getDefaultInstance().getReachability(); + onChanged(); + return this; + } + /** + *
+       * Reachability status of the node.
+       * 
+ * + * string reachability = 5 [json_name = "reachability"]; + * @param value The bytes for reachability to set. + * @return This builder for chaining. + */ + public Builder setReachabilityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + reachability_ = value; + onChanged(); + return this; + } + + private int services_ ; + /** + *
+       * A bitfield indicating the services provided by the node.
+       * 
+ * + * int32 services = 6 [json_name = "services"]; + * @return The services. + */ + @java.lang.Override + public int getServices() { + return services_; + } + /** + *
+       * A bitfield indicating the services provided by the node.
+       * 
+ * + * int32 services = 6 [json_name = "services"]; + * @param value The services to set. + * @return This builder for chaining. + */ + public Builder setServices(int value) { + + services_ = value; + onChanged(); + return this; + } + /** + *
+       * A bitfield indicating the services provided by the node.
+       * 
+ * + * int32 services = 6 [json_name = "services"]; + * @return This builder for chaining. + */ + public Builder clearServices() { + + services_ = 0; + onChanged(); + return this; + } + + private java.lang.Object servicesNames_ = ""; + /** + *
+       * Names of services provided by the node.
+       * 
+ * + * string services_names = 7 [json_name = "servicesNames"]; + * @return The servicesNames. + */ + public java.lang.String getServicesNames() { + java.lang.Object ref = servicesNames_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servicesNames_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Names of services provided by the node.
+       * 
+ * + * string services_names = 7 [json_name = "servicesNames"]; + * @return The bytes for servicesNames. + */ + public com.google.protobuf.ByteString + getServicesNamesBytes() { + java.lang.Object ref = servicesNames_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + servicesNames_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Names of services provided by the node.
+       * 
+ * + * string services_names = 7 [json_name = "servicesNames"]; + * @param value The servicesNames to set. + * @return This builder for chaining. + */ + public Builder setServicesNames( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + servicesNames_ = value; + onChanged(); + return this; + } + /** + *
+       * Names of services provided by the node.
+       * 
+ * + * string services_names = 7 [json_name = "servicesNames"]; + * @return This builder for chaining. + */ + public Builder clearServicesNames() { + + servicesNames_ = getDefaultInstance().getServicesNames(); + onChanged(); + return this; + } + /** + *
+       * Names of services provided by the node.
+       * 
+ * + * string services_names = 7 [json_name = "servicesNames"]; + * @param value The bytes for servicesNames to set. + * @return This builder for chaining. + */ + public Builder setServicesNamesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + servicesNames_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList localAddrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLocalAddrsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + localAddrs_ = new com.google.protobuf.LazyStringArrayList(localAddrs_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * List of addresses associated with the node.
+       * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @return A list containing the localAddrs. + */ + public com.google.protobuf.ProtocolStringList + getLocalAddrsList() { + return localAddrs_.getUnmodifiableView(); + } + /** + *
+       * List of addresses associated with the node.
+       * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @return The count of localAddrs. + */ + public int getLocalAddrsCount() { + return localAddrs_.size(); + } + /** + *
+       * List of addresses associated with the node.
+       * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @param index The index of the element to return. + * @return The localAddrs at the given index. + */ + public java.lang.String getLocalAddrs(int index) { + return localAddrs_.get(index); + } + /** + *
+       * List of addresses associated with the node.
+       * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @param index The index of the value to return. + * @return The bytes of the localAddrs at the given index. + */ + public com.google.protobuf.ByteString + getLocalAddrsBytes(int index) { + return localAddrs_.getByteString(index); + } + /** + *
+       * List of addresses associated with the node.
+       * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @param index The index to set the value at. + * @param value The localAddrs to set. + * @return This builder for chaining. + */ + public Builder setLocalAddrs( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalAddrsIsMutable(); + localAddrs_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * List of addresses associated with the node.
+       * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @param value The localAddrs to add. + * @return This builder for chaining. + */ + public Builder addLocalAddrs( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalAddrsIsMutable(); + localAddrs_.add(value); + onChanged(); + return this; + } + /** + *
+       * List of addresses associated with the node.
+       * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @param values The localAddrs to add. + * @return This builder for chaining. + */ + public Builder addAllLocalAddrs( + java.lang.Iterable values) { + ensureLocalAddrsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, localAddrs_); + onChanged(); + return this; + } + /** + *
+       * List of addresses associated with the node.
+       * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @return This builder for chaining. + */ + public Builder clearLocalAddrs() { + localAddrs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * List of addresses associated with the node.
+       * 
+ * + * repeated string local_addrs = 8 [json_name = "localAddrs"]; + * @param value The bytes of the localAddrs to add. + * @return This builder for chaining. + */ + public Builder addLocalAddrsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLocalAddrsIsMutable(); + localAddrs_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureProtocolsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + protocols_ = new com.google.protobuf.LazyStringArrayList(protocols_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @return A list containing the protocols. + */ + public com.google.protobuf.ProtocolStringList + getProtocolsList() { + return protocols_.getUnmodifiableView(); + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @return The count of protocols. + */ + public int getProtocolsCount() { + return protocols_.size(); + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + public java.lang.String getProtocols(int index) { + return protocols_.get(index); + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param index The index of the value to return. + * @return The bytes of the protocols at the given index. + */ + public com.google.protobuf.ByteString + getProtocolsBytes(int index) { + return protocols_.getByteString(index); + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param index The index to set the value at. + * @param value The protocols to set. + * @return This builder for chaining. + */ + public Builder setProtocols( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param value The protocols to add. + * @return This builder for chaining. + */ + public Builder addProtocols( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.add(value); + onChanged(); + return this; + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param values The protocols to add. + * @return This builder for chaining. + */ + public Builder addAllProtocols( + java.lang.Iterable values) { + ensureProtocolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, protocols_); + onChanged(); + return this; + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @return This builder for chaining. + */ + public Builder clearProtocols() { + protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * List of protocols supported by the node.
+       * 
+ * + * repeated string protocols = 9 [json_name = "protocols"]; + * @param value The bytes of the protocols to add. + * @return This builder for chaining. + */ + public Builder addProtocolsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProtocolsIsMutable(); + protocols_.add(value); + onChanged(); + return this; + } + + private double clockOffset_ ; + /** + *
+       * Clock offset of the node.
+       * 
+ * + * double clock_offset = 13 [json_name = "clockOffset"]; + * @return The clockOffset. + */ + @java.lang.Override + public double getClockOffset() { + return clockOffset_; + } + /** + *
+       * Clock offset of the node.
+       * 
+ * + * double clock_offset = 13 [json_name = "clockOffset"]; + * @param value The clockOffset to set. + * @return This builder for chaining. + */ + public Builder setClockOffset(double value) { + + clockOffset_ = value; + onChanged(); + return this; + } + /** + *
+       * Clock offset of the node.
+       * 
+ * + * double clock_offset = 13 [json_name = "clockOffset"]; + * @return This builder for chaining. + */ + public Builder clearClockOffset() { + + clockOffset_ = 0D; + onChanged(); + return this; + } + + private pactus.network.NetworkOuterClass.ConnectionInfo connectionInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder> connectionInfoBuilder_; + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * @return Whether the connectionInfo field is set. + */ + public boolean hasConnectionInfo() { + return connectionInfoBuilder_ != null || connectionInfo_ != null; + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + * @return The connectionInfo. + */ + public pactus.network.NetworkOuterClass.ConnectionInfo getConnectionInfo() { + if (connectionInfoBuilder_ == null) { + return connectionInfo_ == null ? pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_; + } else { + return connectionInfoBuilder_.getMessage(); + } + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public Builder setConnectionInfo(pactus.network.NetworkOuterClass.ConnectionInfo value) { + if (connectionInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + connectionInfo_ = value; + onChanged(); + } else { + connectionInfoBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public Builder setConnectionInfo( + pactus.network.NetworkOuterClass.ConnectionInfo.Builder builderForValue) { + if (connectionInfoBuilder_ == null) { + connectionInfo_ = builderForValue.build(); + onChanged(); + } else { + connectionInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public Builder mergeConnectionInfo(pactus.network.NetworkOuterClass.ConnectionInfo value) { + if (connectionInfoBuilder_ == null) { + if (connectionInfo_ != null) { + connectionInfo_ = + pactus.network.NetworkOuterClass.ConnectionInfo.newBuilder(connectionInfo_).mergeFrom(value).buildPartial(); + } else { + connectionInfo_ = value; + } + onChanged(); + } else { + connectionInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public Builder clearConnectionInfo() { + if (connectionInfoBuilder_ == null) { + connectionInfo_ = null; + onChanged(); + } else { + connectionInfo_ = null; + connectionInfoBuilder_ = null; + } + + return this; + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public pactus.network.NetworkOuterClass.ConnectionInfo.Builder getConnectionInfoBuilder() { + + onChanged(); + return getConnectionInfoFieldBuilder().getBuilder(); + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + public pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder getConnectionInfoOrBuilder() { + if (connectionInfoBuilder_ != null) { + return connectionInfoBuilder_.getMessageOrBuilder(); + } else { + return connectionInfo_ == null ? + pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance() : connectionInfo_; + } + } + /** + *
+       * Information about the node's connections.
+       * 
+ * + * .pactus.ConnectionInfo connection_info = 14 [json_name = "connectionInfo"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder> + getConnectionInfoFieldBuilder() { + if (connectionInfoBuilder_ == null) { + connectionInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.network.NetworkOuterClass.ConnectionInfo, pactus.network.NetworkOuterClass.ConnectionInfo.Builder, pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder>( + getConnectionInfo(), + getParentForChildren(), + isClean()); + connectionInfo_ = null; + } + return connectionInfoBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetNodeInfoResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetNodeInfoResponse) + private static final pactus.network.NetworkOuterClass.GetNodeInfoResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.GetNodeInfoResponse(); + } + + public static pactus.network.NetworkOuterClass.GetNodeInfoResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNodeInfoResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.GetNodeInfoResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PeerInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.PeerInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Status of the peer.
+     * 
+ * + * int32 status = 1 [json_name = "status"]; + * @return The status. + */ + int getStatus(); + + /** + *
+     * Moniker of the peer.
+     * 
+ * + * string moniker = 2 [json_name = "moniker"]; + * @return The moniker. + */ + java.lang.String getMoniker(); + /** + *
+     * Moniker of the peer.
+     * 
+ * + * string moniker = 2 [json_name = "moniker"]; + * @return The bytes for moniker. + */ + com.google.protobuf.ByteString + getMonikerBytes(); + + /** + *
+     * Agent information of the peer.
+     * 
+ * + * string agent = 3 [json_name = "agent"]; + * @return The agent. + */ + java.lang.String getAgent(); + /** + *
+     * Agent information of the peer.
+     * 
+ * + * string agent = 3 [json_name = "agent"]; + * @return The bytes for agent. + */ + com.google.protobuf.ByteString + getAgentBytes(); + + /** + *
+     * Peer ID of the peer.
+     * 
+ * + * string peer_id = 4 [json_name = "peerId"]; + * @return The peerId. + */ + java.lang.String getPeerId(); + /** + *
+     * Peer ID of the peer.
+     * 
+ * + * string peer_id = 4 [json_name = "peerId"]; + * @return The bytes for peerId. + */ + com.google.protobuf.ByteString + getPeerIdBytes(); + + /** + *
+     * Consensus keys used by the peer.
+     * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @return A list containing the consensusKeys. + */ + java.util.List + getConsensusKeysList(); + /** + *
+     * Consensus keys used by the peer.
+     * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @return The count of consensusKeys. + */ + int getConsensusKeysCount(); + /** + *
+     * Consensus keys used by the peer.
+     * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @param index The index of the element to return. + * @return The consensusKeys at the given index. + */ + java.lang.String getConsensusKeys(int index); + /** + *
+     * Consensus keys used by the peer.
+     * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @param index The index of the value to return. + * @return The bytes of the consensusKeys at the given index. + */ + com.google.protobuf.ByteString + getConsensusKeysBytes(int index); + + /** + *
+     * Consensus addresses of the peer.
+     * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @return A list containing the consensusAddresses. + */ + java.util.List + getConsensusAddressesList(); + /** + *
+     * Consensus addresses of the peer.
+     * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @return The count of consensusAddresses. + */ + int getConsensusAddressesCount(); + /** + *
+     * Consensus addresses of the peer.
+     * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @param index The index of the element to return. + * @return The consensusAddresses at the given index. + */ + java.lang.String getConsensusAddresses(int index); + /** + *
+     * Consensus addresses of the peer.
+     * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @param index The index of the value to return. + * @return The bytes of the consensusAddresses at the given index. + */ + com.google.protobuf.ByteString + getConsensusAddressesBytes(int index); + + /** + *
+     * Services provided by the peer.
+     * 
+ * + * uint32 services = 7 [json_name = "services"]; + * @return The services. + */ + int getServices(); + + /** + *
+     * Hash of the last block the peer knows.
+     * 
+ * + * string last_block_hash = 8 [json_name = "lastBlockHash"]; + * @return The lastBlockHash. + */ + java.lang.String getLastBlockHash(); + /** + *
+     * Hash of the last block the peer knows.
+     * 
+ * + * string last_block_hash = 8 [json_name = "lastBlockHash"]; + * @return The bytes for lastBlockHash. + */ + com.google.protobuf.ByteString + getLastBlockHashBytes(); + + /** + *
+     * Blockchain height of the peer.
+     * 
+ * + * uint32 height = 9 [json_name = "height"]; + * @return The height. + */ + int getHeight(); + + /** + *
+     * Number of received bundles.
+     * 
+ * + * int32 received_bundles = 10 [json_name = "receivedBundles"]; + * @return The receivedBundles. + */ + int getReceivedBundles(); + + /** + *
+     * Number of invalid bundles received.
+     * 
+ * + * int32 invalid_bundles = 11 [json_name = "invalidBundles"]; + * @return The invalidBundles. + */ + int getInvalidBundles(); + + /** + *
+     * Timestamp of the last sent bundle.
+     * 
+ * + * int64 last_sent = 12 [json_name = "lastSent"]; + * @return The lastSent. + */ + long getLastSent(); + + /** + *
+     * Timestamp of the last received bundle.
+     * 
+ * + * int64 last_received = 13 [json_name = "lastReceived"]; + * @return The lastReceived. + */ + long getLastReceived(); + + /** + *
+     * Bytes sent per message type.
+     * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + int getSentBytesCount(); + /** + *
+     * Bytes sent per message type.
+     * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + boolean containsSentBytes( + int key); + /** + * Use {@link #getSentBytesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSentBytes(); + /** + *
+     * Bytes sent per message type.
+     * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + java.util.Map + getSentBytesMap(); + /** + *
+     * Bytes sent per message type.
+     * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + + long getSentBytesOrDefault( + int key, + long defaultValue); + /** + *
+     * Bytes sent per message type.
+     * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + + long getSentBytesOrThrow( + int key); + + /** + *
+     * Bytes received per message type.
+     * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + int getReceivedBytesCount(); + /** + *
+     * Bytes received per message type.
+     * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + boolean containsReceivedBytes( + int key); + /** + * Use {@link #getReceivedBytesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getReceivedBytes(); + /** + *
+     * Bytes received per message type.
+     * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + java.util.Map + getReceivedBytesMap(); + /** + *
+     * Bytes received per message type.
+     * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + + long getReceivedBytesOrDefault( + int key, + long defaultValue); + /** + *
+     * Bytes received per message type.
+     * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + + long getReceivedBytesOrThrow( + int key); + + /** + *
+     * Network address of the peer.
+     * 
+ * + * string address = 16 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * Network address of the peer.
+     * 
+ * + * string address = 16 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + + /** + *
+     * Direction of connection with the peer.
+     * 
+ * + * string direction = 17 [json_name = "direction"]; + * @return The direction. + */ + java.lang.String getDirection(); + /** + *
+     * Direction of connection with the peer.
+     * 
+ * + * string direction = 17 [json_name = "direction"]; + * @return The bytes for direction. + */ + com.google.protobuf.ByteString + getDirectionBytes(); + + /** + *
+     * List of protocols supported by the peer.
+     * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @return A list containing the protocols. + */ + java.util.List + getProtocolsList(); + /** + *
+     * List of protocols supported by the peer.
+     * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @return The count of protocols. + */ + int getProtocolsCount(); + /** + *
+     * List of protocols supported by the peer.
+     * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + java.lang.String getProtocols(int index); + /** + *
+     * List of protocols supported by the peer.
+     * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @param index The index of the value to return. + * @return The bytes of the protocols at the given index. + */ + com.google.protobuf.ByteString + getProtocolsBytes(int index); + + /** + *
+     * Total download sessions with the peer.
+     * 
+ * + * int32 total_sessions = 19 [json_name = "totalSessions"]; + * @return The totalSessions. + */ + int getTotalSessions(); + + /** + *
+     * Completed download sessions with the peer.
+     * 
+ * + * int32 completed_sessions = 20 [json_name = "completedSessions"]; + * @return The completedSessions. + */ + int getCompletedSessions(); + } + /** + *
+   * Information about a peer in the network.
+   * 
+ * + * Protobuf type {@code pactus.PeerInfo} + */ + public static final class PeerInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.PeerInfo) + PeerInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use PeerInfo.newBuilder() to construct. + private PeerInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PeerInfo() { + moniker_ = ""; + agent_ = ""; + peerId_ = ""; + consensusKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + consensusAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + lastBlockHash_ = ""; + address_ = ""; + direction_ = ""; + protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PeerInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 14: + return internalGetSentBytes(); + case 15: + return internalGetReceivedBytes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.PeerInfo.class, pactus.network.NetworkOuterClass.PeerInfo.Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 1; + private int status_; + /** + *
+     * Status of the peer.
+     * 
+ * + * int32 status = 1 [json_name = "status"]; + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + + public static final int MONIKER_FIELD_NUMBER = 2; + private volatile java.lang.Object moniker_; + /** + *
+     * Moniker of the peer.
+     * 
+ * + * string moniker = 2 [json_name = "moniker"]; + * @return The moniker. + */ + @java.lang.Override + public java.lang.String getMoniker() { + java.lang.Object ref = moniker_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + moniker_ = s; + return s; + } + } + /** + *
+     * Moniker of the peer.
+     * 
+ * + * string moniker = 2 [json_name = "moniker"]; + * @return The bytes for moniker. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMonikerBytes() { + java.lang.Object ref = moniker_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + moniker_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AGENT_FIELD_NUMBER = 3; + private volatile java.lang.Object agent_; + /** + *
+     * Agent information of the peer.
+     * 
+ * + * string agent = 3 [json_name = "agent"]; + * @return The agent. + */ + @java.lang.Override + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } + } + /** + *
+     * Agent information of the peer.
+     * 
+ * + * string agent = 3 [json_name = "agent"]; + * @return The bytes for agent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PEER_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object peerId_; + /** + *
+     * Peer ID of the peer.
+     * 
+ * + * string peer_id = 4 [json_name = "peerId"]; + * @return The peerId. + */ + @java.lang.Override + public java.lang.String getPeerId() { + java.lang.Object ref = peerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerId_ = s; + return s; + } + } + /** + *
+     * Peer ID of the peer.
+     * 
+ * + * string peer_id = 4 [json_name = "peerId"]; + * @return The bytes for peerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPeerIdBytes() { + java.lang.Object ref = peerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + peerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONSENSUS_KEYS_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList consensusKeys_; + /** + *
+     * Consensus keys used by the peer.
+     * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @return A list containing the consensusKeys. + */ + public com.google.protobuf.ProtocolStringList + getConsensusKeysList() { + return consensusKeys_; + } + /** + *
+     * Consensus keys used by the peer.
+     * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @return The count of consensusKeys. + */ + public int getConsensusKeysCount() { + return consensusKeys_.size(); + } + /** + *
+     * Consensus keys used by the peer.
+     * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @param index The index of the element to return. + * @return The consensusKeys at the given index. + */ + public java.lang.String getConsensusKeys(int index) { + return consensusKeys_.get(index); + } + /** + *
+     * Consensus keys used by the peer.
+     * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @param index The index of the value to return. + * @return The bytes of the consensusKeys at the given index. + */ + public com.google.protobuf.ByteString + getConsensusKeysBytes(int index) { + return consensusKeys_.getByteString(index); + } + + public static final int CONSENSUS_ADDRESSES_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList consensusAddresses_; + /** + *
+     * Consensus addresses of the peer.
+     * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @return A list containing the consensusAddresses. + */ + public com.google.protobuf.ProtocolStringList + getConsensusAddressesList() { + return consensusAddresses_; + } + /** + *
+     * Consensus addresses of the peer.
+     * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @return The count of consensusAddresses. + */ + public int getConsensusAddressesCount() { + return consensusAddresses_.size(); + } + /** + *
+     * Consensus addresses of the peer.
+     * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @param index The index of the element to return. + * @return The consensusAddresses at the given index. + */ + public java.lang.String getConsensusAddresses(int index) { + return consensusAddresses_.get(index); + } + /** + *
+     * Consensus addresses of the peer.
+     * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @param index The index of the value to return. + * @return The bytes of the consensusAddresses at the given index. + */ + public com.google.protobuf.ByteString + getConsensusAddressesBytes(int index) { + return consensusAddresses_.getByteString(index); + } + + public static final int SERVICES_FIELD_NUMBER = 7; + private int services_; + /** + *
+     * Services provided by the peer.
+     * 
+ * + * uint32 services = 7 [json_name = "services"]; + * @return The services. + */ + @java.lang.Override + public int getServices() { + return services_; + } + + public static final int LAST_BLOCK_HASH_FIELD_NUMBER = 8; + private volatile java.lang.Object lastBlockHash_; + /** + *
+     * Hash of the last block the peer knows.
+     * 
+ * + * string last_block_hash = 8 [json_name = "lastBlockHash"]; + * @return The lastBlockHash. + */ + @java.lang.Override + public java.lang.String getLastBlockHash() { + java.lang.Object ref = lastBlockHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastBlockHash_ = s; + return s; + } + } + /** + *
+     * Hash of the last block the peer knows.
+     * 
+ * + * string last_block_hash = 8 [json_name = "lastBlockHash"]; + * @return The bytes for lastBlockHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLastBlockHashBytes() { + java.lang.Object ref = lastBlockHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lastBlockHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEIGHT_FIELD_NUMBER = 9; + private int height_; + /** + *
+     * Blockchain height of the peer.
+     * 
+ * + * uint32 height = 9 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int RECEIVED_BUNDLES_FIELD_NUMBER = 10; + private int receivedBundles_; + /** + *
+     * Number of received bundles.
+     * 
+ * + * int32 received_bundles = 10 [json_name = "receivedBundles"]; + * @return The receivedBundles. + */ + @java.lang.Override + public int getReceivedBundles() { + return receivedBundles_; + } + + public static final int INVALID_BUNDLES_FIELD_NUMBER = 11; + private int invalidBundles_; + /** + *
+     * Number of invalid bundles received.
+     * 
+ * + * int32 invalid_bundles = 11 [json_name = "invalidBundles"]; + * @return The invalidBundles. + */ + @java.lang.Override + public int getInvalidBundles() { + return invalidBundles_; + } + + public static final int LAST_SENT_FIELD_NUMBER = 12; + private long lastSent_; + /** + *
+     * Timestamp of the last sent bundle.
+     * 
+ * + * int64 last_sent = 12 [json_name = "lastSent"]; + * @return The lastSent. + */ + @java.lang.Override + public long getLastSent() { + return lastSent_; + } + + public static final int LAST_RECEIVED_FIELD_NUMBER = 13; + private long lastReceived_; + /** + *
+     * Timestamp of the last received bundle.
+     * 
+ * + * int64 last_received = 13 [json_name = "lastReceived"]; + * @return The lastReceived. + */ + @java.lang.Override + public long getLastReceived() { + return lastReceived_; + } + + public static final int SENT_BYTES_FIELD_NUMBER = 14; + private static final class SentBytesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.Long> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_SentBytesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Long> sentBytes_; + private com.google.protobuf.MapField + internalGetSentBytes() { + if (sentBytes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SentBytesDefaultEntryHolder.defaultEntry); + } + return sentBytes_; + } + + public int getSentBytesCount() { + return internalGetSentBytes().getMap().size(); + } + /** + *
+     * Bytes sent per message type.
+     * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + + @java.lang.Override + public boolean containsSentBytes( + int key) { + + return internalGetSentBytes().getMap().containsKey(key); + } + /** + * Use {@link #getSentBytesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSentBytes() { + return getSentBytesMap(); + } + /** + *
+     * Bytes sent per message type.
+     * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public java.util.Map getSentBytesMap() { + return internalGetSentBytes().getMap(); + } + /** + *
+     * Bytes sent per message type.
+     * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public long getSentBytesOrDefault( + int key, + long defaultValue) { + + java.util.Map map = + internalGetSentBytes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Bytes sent per message type.
+     * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public long getSentBytesOrThrow( + int key) { + + java.util.Map map = + internalGetSentBytes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int RECEIVED_BYTES_FIELD_NUMBER = 15; + private static final class ReceivedBytesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, java.lang.Long> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_ReceivedBytesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Long> receivedBytes_; + private com.google.protobuf.MapField + internalGetReceivedBytes() { + if (receivedBytes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ReceivedBytesDefaultEntryHolder.defaultEntry); + } + return receivedBytes_; + } + + public int getReceivedBytesCount() { + return internalGetReceivedBytes().getMap().size(); + } + /** + *
+     * Bytes received per message type.
+     * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + + @java.lang.Override + public boolean containsReceivedBytes( + int key) { + + return internalGetReceivedBytes().getMap().containsKey(key); + } + /** + * Use {@link #getReceivedBytesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getReceivedBytes() { + return getReceivedBytesMap(); + } + /** + *
+     * Bytes received per message type.
+     * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public java.util.Map getReceivedBytesMap() { + return internalGetReceivedBytes().getMap(); + } + /** + *
+     * Bytes received per message type.
+     * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public long getReceivedBytesOrDefault( + int key, + long defaultValue) { + + java.util.Map map = + internalGetReceivedBytes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * Bytes received per message type.
+     * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public long getReceivedBytesOrThrow( + int key) { + + java.util.Map map = + internalGetReceivedBytes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ADDRESS_FIELD_NUMBER = 16; + private volatile java.lang.Object address_; + /** + *
+     * Network address of the peer.
+     * 
+ * + * string address = 16 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * Network address of the peer.
+     * 
+ * + * string address = 16 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIRECTION_FIELD_NUMBER = 17; + private volatile java.lang.Object direction_; + /** + *
+     * Direction of connection with the peer.
+     * 
+ * + * string direction = 17 [json_name = "direction"]; + * @return The direction. + */ + @java.lang.Override + public java.lang.String getDirection() { + java.lang.Object ref = direction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + direction_ = s; + return s; + } + } + /** + *
+     * Direction of connection with the peer.
+     * 
+ * + * string direction = 17 [json_name = "direction"]; + * @return The bytes for direction. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDirectionBytes() { + java.lang.Object ref = direction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + direction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOLS_FIELD_NUMBER = 18; + private com.google.protobuf.LazyStringList protocols_; + /** + *
+     * List of protocols supported by the peer.
+     * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @return A list containing the protocols. + */ + public com.google.protobuf.ProtocolStringList + getProtocolsList() { + return protocols_; + } + /** + *
+     * List of protocols supported by the peer.
+     * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @return The count of protocols. + */ + public int getProtocolsCount() { + return protocols_.size(); + } + /** + *
+     * List of protocols supported by the peer.
+     * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + public java.lang.String getProtocols(int index) { + return protocols_.get(index); + } + /** + *
+     * List of protocols supported by the peer.
+     * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @param index The index of the value to return. + * @return The bytes of the protocols at the given index. + */ + public com.google.protobuf.ByteString + getProtocolsBytes(int index) { + return protocols_.getByteString(index); + } + + public static final int TOTAL_SESSIONS_FIELD_NUMBER = 19; + private int totalSessions_; + /** + *
+     * Total download sessions with the peer.
+     * 
+ * + * int32 total_sessions = 19 [json_name = "totalSessions"]; + * @return The totalSessions. + */ + @java.lang.Override + public int getTotalSessions() { + return totalSessions_; + } + + public static final int COMPLETED_SESSIONS_FIELD_NUMBER = 20; + private int completedSessions_; + /** + *
+     * Completed download sessions with the peer.
+     * 
+ * + * int32 completed_sessions = 20 [json_name = "completedSessions"]; + * @return The completedSessions. + */ + @java.lang.Override + public int getCompletedSessions() { + return completedSessions_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (status_ != 0) { + output.writeInt32(1, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moniker_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, moniker_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, agent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, peerId_); + } + for (int i = 0; i < consensusKeys_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, consensusKeys_.getRaw(i)); + } + for (int i = 0; i < consensusAddresses_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, consensusAddresses_.getRaw(i)); + } + if (services_ != 0) { + output.writeUInt32(7, services_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastBlockHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, lastBlockHash_); + } + if (height_ != 0) { + output.writeUInt32(9, height_); + } + if (receivedBundles_ != 0) { + output.writeInt32(10, receivedBundles_); + } + if (invalidBundles_ != 0) { + output.writeInt32(11, invalidBundles_); + } + if (lastSent_ != 0L) { + output.writeInt64(12, lastSent_); + } + if (lastReceived_ != 0L) { + output.writeInt64(13, lastReceived_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetSentBytes(), + SentBytesDefaultEntryHolder.defaultEntry, + 14); + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetReceivedBytes(), + ReceivedBytesDefaultEntryHolder.defaultEntry, + 15); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(direction_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, direction_); + } + for (int i = 0; i < protocols_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, protocols_.getRaw(i)); + } + if (totalSessions_ != 0) { + output.writeInt32(19, totalSessions_); + } + if (completedSessions_ != 0) { + output.writeInt32(20, completedSessions_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, status_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moniker_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, moniker_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, agent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(peerId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, peerId_); + } + { + int dataSize = 0; + for (int i = 0; i < consensusKeys_.size(); i++) { + dataSize += computeStringSizeNoTag(consensusKeys_.getRaw(i)); + } + size += dataSize; + size += 1 * getConsensusKeysList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < consensusAddresses_.size(); i++) { + dataSize += computeStringSizeNoTag(consensusAddresses_.getRaw(i)); + } + size += dataSize; + size += 1 * getConsensusAddressesList().size(); + } + if (services_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, services_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lastBlockHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, lastBlockHash_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, height_); + } + if (receivedBundles_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(10, receivedBundles_); + } + if (invalidBundles_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(11, invalidBundles_); + } + if (lastSent_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, lastSent_); + } + if (lastReceived_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(13, lastReceived_); + } + for (java.util.Map.Entry entry + : internalGetSentBytes().getMap().entrySet()) { + com.google.protobuf.MapEntry + sentBytes__ = SentBytesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, sentBytes__); + } + for (java.util.Map.Entry entry + : internalGetReceivedBytes().getMap().entrySet()) { + com.google.protobuf.MapEntry + receivedBytes__ = ReceivedBytesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, receivedBytes__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(direction_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, direction_); + } + { + int dataSize = 0; + for (int i = 0; i < protocols_.size(); i++) { + dataSize += computeStringSizeNoTag(protocols_.getRaw(i)); + } + size += dataSize; + size += 2 * getProtocolsList().size(); + } + if (totalSessions_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(19, totalSessions_); + } + if (completedSessions_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(20, completedSessions_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.network.NetworkOuterClass.PeerInfo)) { + return super.equals(obj); + } + pactus.network.NetworkOuterClass.PeerInfo other = (pactus.network.NetworkOuterClass.PeerInfo) obj; + + if (getStatus() + != other.getStatus()) return false; + if (!getMoniker() + .equals(other.getMoniker())) return false; + if (!getAgent() + .equals(other.getAgent())) return false; + if (!getPeerId() + .equals(other.getPeerId())) return false; + if (!getConsensusKeysList() + .equals(other.getConsensusKeysList())) return false; + if (!getConsensusAddressesList() + .equals(other.getConsensusAddressesList())) return false; + if (getServices() + != other.getServices()) return false; + if (!getLastBlockHash() + .equals(other.getLastBlockHash())) return false; + if (getHeight() + != other.getHeight()) return false; + if (getReceivedBundles() + != other.getReceivedBundles()) return false; + if (getInvalidBundles() + != other.getInvalidBundles()) return false; + if (getLastSent() + != other.getLastSent()) return false; + if (getLastReceived() + != other.getLastReceived()) return false; + if (!internalGetSentBytes().equals( + other.internalGetSentBytes())) return false; + if (!internalGetReceivedBytes().equals( + other.internalGetReceivedBytes())) return false; + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getDirection() + .equals(other.getDirection())) return false; + if (!getProtocolsList() + .equals(other.getProtocolsList())) return false; + if (getTotalSessions() + != other.getTotalSessions()) return false; + if (getCompletedSessions() + != other.getCompletedSessions()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus(); + hash = (37 * hash) + MONIKER_FIELD_NUMBER; + hash = (53 * hash) + getMoniker().hashCode(); + hash = (37 * hash) + AGENT_FIELD_NUMBER; + hash = (53 * hash) + getAgent().hashCode(); + hash = (37 * hash) + PEER_ID_FIELD_NUMBER; + hash = (53 * hash) + getPeerId().hashCode(); + if (getConsensusKeysCount() > 0) { + hash = (37 * hash) + CONSENSUS_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getConsensusKeysList().hashCode(); + } + if (getConsensusAddressesCount() > 0) { + hash = (37 * hash) + CONSENSUS_ADDRESSES_FIELD_NUMBER; + hash = (53 * hash) + getConsensusAddressesList().hashCode(); + } + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServices(); + hash = (37 * hash) + LAST_BLOCK_HASH_FIELD_NUMBER; + hash = (53 * hash) + getLastBlockHash().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + RECEIVED_BUNDLES_FIELD_NUMBER; + hash = (53 * hash) + getReceivedBundles(); + hash = (37 * hash) + INVALID_BUNDLES_FIELD_NUMBER; + hash = (53 * hash) + getInvalidBundles(); + hash = (37 * hash) + LAST_SENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLastSent()); + hash = (37 * hash) + LAST_RECEIVED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLastReceived()); + if (!internalGetSentBytes().getMap().isEmpty()) { + hash = (37 * hash) + SENT_BYTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetSentBytes().hashCode(); + } + if (!internalGetReceivedBytes().getMap().isEmpty()) { + hash = (37 * hash) + RECEIVED_BYTES_FIELD_NUMBER; + hash = (53 * hash) + internalGetReceivedBytes().hashCode(); + } + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + DIRECTION_FIELD_NUMBER; + hash = (53 * hash) + getDirection().hashCode(); + if (getProtocolsCount() > 0) { + hash = (37 * hash) + PROTOCOLS_FIELD_NUMBER; + hash = (53 * hash) + getProtocolsList().hashCode(); + } + hash = (37 * hash) + TOTAL_SESSIONS_FIELD_NUMBER; + hash = (53 * hash) + getTotalSessions(); + hash = (37 * hash) + COMPLETED_SESSIONS_FIELD_NUMBER; + hash = (53 * hash) + getCompletedSessions(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.PeerInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.network.NetworkOuterClass.PeerInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Information about a peer in the network.
+     * 
+ * + * Protobuf type {@code pactus.PeerInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.PeerInfo) + pactus.network.NetworkOuterClass.PeerInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 14: + return internalGetSentBytes(); + case 15: + return internalGetReceivedBytes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 14: + return internalGetMutableSentBytes(); + case 15: + return internalGetMutableReceivedBytes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.PeerInfo.class, pactus.network.NetworkOuterClass.PeerInfo.Builder.class); + } + + // Construct using pactus.network.NetworkOuterClass.PeerInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + status_ = 0; + + moniker_ = ""; + + agent_ = ""; + + peerId_ = ""; + + consensusKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + consensusAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + services_ = 0; + + lastBlockHash_ = ""; + + height_ = 0; + + receivedBundles_ = 0; + + invalidBundles_ = 0; + + lastSent_ = 0L; + + lastReceived_ = 0L; + + internalGetMutableSentBytes().clear(); + internalGetMutableReceivedBytes().clear(); + address_ = ""; + + direction_ = ""; + + protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + totalSessions_ = 0; + + completedSessions_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.network.NetworkOuterClass.internal_static_pactus_PeerInfo_descriptor; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.PeerInfo getDefaultInstanceForType() { + return pactus.network.NetworkOuterClass.PeerInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.PeerInfo build() { + pactus.network.NetworkOuterClass.PeerInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.PeerInfo buildPartial() { + pactus.network.NetworkOuterClass.PeerInfo result = new pactus.network.NetworkOuterClass.PeerInfo(this); + int from_bitField0_ = bitField0_; + result.status_ = status_; + result.moniker_ = moniker_; + result.agent_ = agent_; + result.peerId_ = peerId_; + if (((bitField0_ & 0x00000001) != 0)) { + consensusKeys_ = consensusKeys_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.consensusKeys_ = consensusKeys_; + if (((bitField0_ & 0x00000002) != 0)) { + consensusAddresses_ = consensusAddresses_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.consensusAddresses_ = consensusAddresses_; + result.services_ = services_; + result.lastBlockHash_ = lastBlockHash_; + result.height_ = height_; + result.receivedBundles_ = receivedBundles_; + result.invalidBundles_ = invalidBundles_; + result.lastSent_ = lastSent_; + result.lastReceived_ = lastReceived_; + result.sentBytes_ = internalGetSentBytes(); + result.sentBytes_.makeImmutable(); + result.receivedBytes_ = internalGetReceivedBytes(); + result.receivedBytes_.makeImmutable(); + result.address_ = address_; + result.direction_ = direction_; + if (((bitField0_ & 0x00000010) != 0)) { + protocols_ = protocols_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.protocols_ = protocols_; + result.totalSessions_ = totalSessions_; + result.completedSessions_ = completedSessions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.network.NetworkOuterClass.PeerInfo) { + return mergeFrom((pactus.network.NetworkOuterClass.PeerInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.network.NetworkOuterClass.PeerInfo other) { + if (other == pactus.network.NetworkOuterClass.PeerInfo.getDefaultInstance()) return this; + if (other.getStatus() != 0) { + setStatus(other.getStatus()); + } + if (!other.getMoniker().isEmpty()) { + moniker_ = other.moniker_; + onChanged(); + } + if (!other.getAgent().isEmpty()) { + agent_ = other.agent_; + onChanged(); + } + if (!other.getPeerId().isEmpty()) { + peerId_ = other.peerId_; + onChanged(); + } + if (!other.consensusKeys_.isEmpty()) { + if (consensusKeys_.isEmpty()) { + consensusKeys_ = other.consensusKeys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConsensusKeysIsMutable(); + consensusKeys_.addAll(other.consensusKeys_); + } + onChanged(); + } + if (!other.consensusAddresses_.isEmpty()) { + if (consensusAddresses_.isEmpty()) { + consensusAddresses_ = other.consensusAddresses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureConsensusAddressesIsMutable(); + consensusAddresses_.addAll(other.consensusAddresses_); + } + onChanged(); + } + if (other.getServices() != 0) { + setServices(other.getServices()); + } + if (!other.getLastBlockHash().isEmpty()) { + lastBlockHash_ = other.lastBlockHash_; + onChanged(); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getReceivedBundles() != 0) { + setReceivedBundles(other.getReceivedBundles()); + } + if (other.getInvalidBundles() != 0) { + setInvalidBundles(other.getInvalidBundles()); + } + if (other.getLastSent() != 0L) { + setLastSent(other.getLastSent()); + } + if (other.getLastReceived() != 0L) { + setLastReceived(other.getLastReceived()); + } + internalGetMutableSentBytes().mergeFrom( + other.internalGetSentBytes()); + internalGetMutableReceivedBytes().mergeFrom( + other.internalGetReceivedBytes()); + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + if (!other.getDirection().isEmpty()) { + direction_ = other.direction_; + onChanged(); + } + if (!other.protocols_.isEmpty()) { + if (protocols_.isEmpty()) { + protocols_ = other.protocols_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureProtocolsIsMutable(); + protocols_.addAll(other.protocols_); + } + onChanged(); + } + if (other.getTotalSessions() != 0) { + setTotalSessions(other.getTotalSessions()); + } + if (other.getCompletedSessions() != 0) { + setCompletedSessions(other.getCompletedSessions()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + status_ = input.readInt32(); + + break; + } // case 8 + case 18: { + moniker_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + agent_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + peerId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + ensureConsensusKeysIsMutable(); + consensusKeys_.add(s); + break; + } // case 42 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureConsensusAddressesIsMutable(); + consensusAddresses_.add(s); + break; + } // case 50 + case 56: { + services_ = input.readUInt32(); + + break; + } // case 56 + case 66: { + lastBlockHash_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 72: { + height_ = input.readUInt32(); + + break; + } // case 72 + case 80: { + receivedBundles_ = input.readInt32(); + + break; + } // case 80 + case 88: { + invalidBundles_ = input.readInt32(); + + break; + } // case 88 + case 96: { + lastSent_ = input.readInt64(); + + break; + } // case 96 + case 104: { + lastReceived_ = input.readInt64(); + + break; + } // case 104 + case 114: { + com.google.protobuf.MapEntry + sentBytes__ = input.readMessage( + SentBytesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSentBytes().getMutableMap().put( + sentBytes__.getKey(), sentBytes__.getValue()); + break; + } // case 114 + case 122: { + com.google.protobuf.MapEntry + receivedBytes__ = input.readMessage( + ReceivedBytesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableReceivedBytes().getMutableMap().put( + receivedBytes__.getKey(), receivedBytes__.getValue()); + break; + } // case 122 + case 130: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 130 + case 138: { + direction_ = input.readStringRequireUtf8(); + + break; + } // case 138 + case 146: { + java.lang.String s = input.readStringRequireUtf8(); + ensureProtocolsIsMutable(); + protocols_.add(s); + break; + } // case 146 + case 152: { + totalSessions_ = input.readInt32(); + + break; + } // case 152 + case 160: { + completedSessions_ = input.readInt32(); + + break; + } // case 160 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int status_ ; + /** + *
+       * Status of the peer.
+       * 
+ * + * int32 status = 1 [json_name = "status"]; + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + /** + *
+       * Status of the peer.
+       * 
+ * + * int32 status = 1 [json_name = "status"]; + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * Status of the peer.
+       * 
+ * + * int32 status = 1 [json_name = "status"]; + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private java.lang.Object moniker_ = ""; + /** + *
+       * Moniker of the peer.
+       * 
+ * + * string moniker = 2 [json_name = "moniker"]; + * @return The moniker. + */ + public java.lang.String getMoniker() { + java.lang.Object ref = moniker_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + moniker_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Moniker of the peer.
+       * 
+ * + * string moniker = 2 [json_name = "moniker"]; + * @return The bytes for moniker. + */ + public com.google.protobuf.ByteString + getMonikerBytes() { + java.lang.Object ref = moniker_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + moniker_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Moniker of the peer.
+       * 
+ * + * string moniker = 2 [json_name = "moniker"]; + * @param value The moniker to set. + * @return This builder for chaining. + */ + public Builder setMoniker( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + moniker_ = value; + onChanged(); + return this; + } + /** + *
+       * Moniker of the peer.
+       * 
+ * + * string moniker = 2 [json_name = "moniker"]; + * @return This builder for chaining. + */ + public Builder clearMoniker() { + + moniker_ = getDefaultInstance().getMoniker(); + onChanged(); + return this; + } + /** + *
+       * Moniker of the peer.
+       * 
+ * + * string moniker = 2 [json_name = "moniker"]; + * @param value The bytes for moniker to set. + * @return This builder for chaining. + */ + public Builder setMonikerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + moniker_ = value; + onChanged(); + return this; + } + + private java.lang.Object agent_ = ""; + /** + *
+       * Agent information of the peer.
+       * 
+ * + * string agent = 3 [json_name = "agent"]; + * @return The agent. + */ + public java.lang.String getAgent() { + java.lang.Object ref = agent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + agent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Agent information of the peer.
+       * 
+ * + * string agent = 3 [json_name = "agent"]; + * @return The bytes for agent. + */ + public com.google.protobuf.ByteString + getAgentBytes() { + java.lang.Object ref = agent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + agent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Agent information of the peer.
+       * 
+ * + * string agent = 3 [json_name = "agent"]; + * @param value The agent to set. + * @return This builder for chaining. + */ + public Builder setAgent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + agent_ = value; + onChanged(); + return this; + } + /** + *
+       * Agent information of the peer.
+       * 
+ * + * string agent = 3 [json_name = "agent"]; + * @return This builder for chaining. + */ + public Builder clearAgent() { + + agent_ = getDefaultInstance().getAgent(); + onChanged(); + return this; + } + /** + *
+       * Agent information of the peer.
+       * 
+ * + * string agent = 3 [json_name = "agent"]; + * @param value The bytes for agent to set. + * @return This builder for chaining. + */ + public Builder setAgentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + agent_ = value; + onChanged(); + return this; + } + + private java.lang.Object peerId_ = ""; + /** + *
+       * Peer ID of the peer.
+       * 
+ * + * string peer_id = 4 [json_name = "peerId"]; + * @return The peerId. + */ + public java.lang.String getPeerId() { + java.lang.Object ref = peerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + peerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Peer ID of the peer.
+       * 
+ * + * string peer_id = 4 [json_name = "peerId"]; + * @return The bytes for peerId. + */ + public com.google.protobuf.ByteString + getPeerIdBytes() { + java.lang.Object ref = peerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + peerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Peer ID of the peer.
+       * 
+ * + * string peer_id = 4 [json_name = "peerId"]; + * @param value The peerId to set. + * @return This builder for chaining. + */ + public Builder setPeerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + peerId_ = value; + onChanged(); + return this; + } + /** + *
+       * Peer ID of the peer.
+       * 
+ * + * string peer_id = 4 [json_name = "peerId"]; + * @return This builder for chaining. + */ + public Builder clearPeerId() { + + peerId_ = getDefaultInstance().getPeerId(); + onChanged(); + return this; + } + /** + *
+       * Peer ID of the peer.
+       * 
+ * + * string peer_id = 4 [json_name = "peerId"]; + * @param value The bytes for peerId to set. + * @return This builder for chaining. + */ + public Builder setPeerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + peerId_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList consensusKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureConsensusKeysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + consensusKeys_ = new com.google.protobuf.LazyStringArrayList(consensusKeys_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * Consensus keys used by the peer.
+       * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @return A list containing the consensusKeys. + */ + public com.google.protobuf.ProtocolStringList + getConsensusKeysList() { + return consensusKeys_.getUnmodifiableView(); + } + /** + *
+       * Consensus keys used by the peer.
+       * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @return The count of consensusKeys. + */ + public int getConsensusKeysCount() { + return consensusKeys_.size(); + } + /** + *
+       * Consensus keys used by the peer.
+       * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @param index The index of the element to return. + * @return The consensusKeys at the given index. + */ + public java.lang.String getConsensusKeys(int index) { + return consensusKeys_.get(index); + } + /** + *
+       * Consensus keys used by the peer.
+       * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @param index The index of the value to return. + * @return The bytes of the consensusKeys at the given index. + */ + public com.google.protobuf.ByteString + getConsensusKeysBytes(int index) { + return consensusKeys_.getByteString(index); + } + /** + *
+       * Consensus keys used by the peer.
+       * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @param index The index to set the value at. + * @param value The consensusKeys to set. + * @return This builder for chaining. + */ + public Builder setConsensusKeys( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsensusKeysIsMutable(); + consensusKeys_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Consensus keys used by the peer.
+       * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @param value The consensusKeys to add. + * @return This builder for chaining. + */ + public Builder addConsensusKeys( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsensusKeysIsMutable(); + consensusKeys_.add(value); + onChanged(); + return this; + } + /** + *
+       * Consensus keys used by the peer.
+       * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @param values The consensusKeys to add. + * @return This builder for chaining. + */ + public Builder addAllConsensusKeys( + java.lang.Iterable values) { + ensureConsensusKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consensusKeys_); + onChanged(); + return this; + } + /** + *
+       * Consensus keys used by the peer.
+       * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @return This builder for chaining. + */ + public Builder clearConsensusKeys() { + consensusKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Consensus keys used by the peer.
+       * 
+ * + * repeated string consensus_keys = 5 [json_name = "consensusKeys"]; + * @param value The bytes of the consensusKeys to add. + * @return This builder for chaining. + */ + public Builder addConsensusKeysBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureConsensusKeysIsMutable(); + consensusKeys_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList consensusAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureConsensusAddressesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + consensusAddresses_ = new com.google.protobuf.LazyStringArrayList(consensusAddresses_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * Consensus addresses of the peer.
+       * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @return A list containing the consensusAddresses. + */ + public com.google.protobuf.ProtocolStringList + getConsensusAddressesList() { + return consensusAddresses_.getUnmodifiableView(); + } + /** + *
+       * Consensus addresses of the peer.
+       * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @return The count of consensusAddresses. + */ + public int getConsensusAddressesCount() { + return consensusAddresses_.size(); + } + /** + *
+       * Consensus addresses of the peer.
+       * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @param index The index of the element to return. + * @return The consensusAddresses at the given index. + */ + public java.lang.String getConsensusAddresses(int index) { + return consensusAddresses_.get(index); + } + /** + *
+       * Consensus addresses of the peer.
+       * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @param index The index of the value to return. + * @return The bytes of the consensusAddresses at the given index. + */ + public com.google.protobuf.ByteString + getConsensusAddressesBytes(int index) { + return consensusAddresses_.getByteString(index); + } + /** + *
+       * Consensus addresses of the peer.
+       * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @param index The index to set the value at. + * @param value The consensusAddresses to set. + * @return This builder for chaining. + */ + public Builder setConsensusAddresses( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsensusAddressesIsMutable(); + consensusAddresses_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Consensus addresses of the peer.
+       * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @param value The consensusAddresses to add. + * @return This builder for chaining. + */ + public Builder addConsensusAddresses( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsensusAddressesIsMutable(); + consensusAddresses_.add(value); + onChanged(); + return this; + } + /** + *
+       * Consensus addresses of the peer.
+       * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @param values The consensusAddresses to add. + * @return This builder for chaining. + */ + public Builder addAllConsensusAddresses( + java.lang.Iterable values) { + ensureConsensusAddressesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, consensusAddresses_); + onChanged(); + return this; + } + /** + *
+       * Consensus addresses of the peer.
+       * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @return This builder for chaining. + */ + public Builder clearConsensusAddresses() { + consensusAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * Consensus addresses of the peer.
+       * 
+ * + * repeated string consensus_addresses = 6 [json_name = "consensusAddresses"]; + * @param value The bytes of the consensusAddresses to add. + * @return This builder for chaining. + */ + public Builder addConsensusAddressesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureConsensusAddressesIsMutable(); + consensusAddresses_.add(value); + onChanged(); + return this; + } + + private int services_ ; + /** + *
+       * Services provided by the peer.
+       * 
+ * + * uint32 services = 7 [json_name = "services"]; + * @return The services. + */ + @java.lang.Override + public int getServices() { + return services_; + } + /** + *
+       * Services provided by the peer.
+       * 
+ * + * uint32 services = 7 [json_name = "services"]; + * @param value The services to set. + * @return This builder for chaining. + */ + public Builder setServices(int value) { + + services_ = value; + onChanged(); + return this; + } + /** + *
+       * Services provided by the peer.
+       * 
+ * + * uint32 services = 7 [json_name = "services"]; + * @return This builder for chaining. + */ + public Builder clearServices() { + + services_ = 0; + onChanged(); + return this; + } + + private java.lang.Object lastBlockHash_ = ""; + /** + *
+       * Hash of the last block the peer knows.
+       * 
+ * + * string last_block_hash = 8 [json_name = "lastBlockHash"]; + * @return The lastBlockHash. + */ + public java.lang.String getLastBlockHash() { + java.lang.Object ref = lastBlockHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastBlockHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Hash of the last block the peer knows.
+       * 
+ * + * string last_block_hash = 8 [json_name = "lastBlockHash"]; + * @return The bytes for lastBlockHash. + */ + public com.google.protobuf.ByteString + getLastBlockHashBytes() { + java.lang.Object ref = lastBlockHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + lastBlockHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Hash of the last block the peer knows.
+       * 
+ * + * string last_block_hash = 8 [json_name = "lastBlockHash"]; + * @param value The lastBlockHash to set. + * @return This builder for chaining. + */ + public Builder setLastBlockHash( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + lastBlockHash_ = value; + onChanged(); + return this; + } + /** + *
+       * Hash of the last block the peer knows.
+       * 
+ * + * string last_block_hash = 8 [json_name = "lastBlockHash"]; + * @return This builder for chaining. + */ + public Builder clearLastBlockHash() { + + lastBlockHash_ = getDefaultInstance().getLastBlockHash(); + onChanged(); + return this; + } + /** + *
+       * Hash of the last block the peer knows.
+       * 
+ * + * string last_block_hash = 8 [json_name = "lastBlockHash"]; + * @param value The bytes for lastBlockHash to set. + * @return This builder for chaining. + */ + public Builder setLastBlockHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lastBlockHash_ = value; + onChanged(); + return this; + } + + private int height_ ; + /** + *
+       * Blockchain height of the peer.
+       * 
+ * + * uint32 height = 9 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + *
+       * Blockchain height of the peer.
+       * 
+ * + * uint32 height = 9 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + onChanged(); + return this; + } + /** + *
+       * Blockchain height of the peer.
+       * 
+ * + * uint32 height = 9 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + + height_ = 0; + onChanged(); + return this; + } + + private int receivedBundles_ ; + /** + *
+       * Number of received bundles.
+       * 
+ * + * int32 received_bundles = 10 [json_name = "receivedBundles"]; + * @return The receivedBundles. + */ + @java.lang.Override + public int getReceivedBundles() { + return receivedBundles_; + } + /** + *
+       * Number of received bundles.
+       * 
+ * + * int32 received_bundles = 10 [json_name = "receivedBundles"]; + * @param value The receivedBundles to set. + * @return This builder for chaining. + */ + public Builder setReceivedBundles(int value) { + + receivedBundles_ = value; + onChanged(); + return this; + } + /** + *
+       * Number of received bundles.
+       * 
+ * + * int32 received_bundles = 10 [json_name = "receivedBundles"]; + * @return This builder for chaining. + */ + public Builder clearReceivedBundles() { + + receivedBundles_ = 0; + onChanged(); + return this; + } + + private int invalidBundles_ ; + /** + *
+       * Number of invalid bundles received.
+       * 
+ * + * int32 invalid_bundles = 11 [json_name = "invalidBundles"]; + * @return The invalidBundles. + */ + @java.lang.Override + public int getInvalidBundles() { + return invalidBundles_; + } + /** + *
+       * Number of invalid bundles received.
+       * 
+ * + * int32 invalid_bundles = 11 [json_name = "invalidBundles"]; + * @param value The invalidBundles to set. + * @return This builder for chaining. + */ + public Builder setInvalidBundles(int value) { + + invalidBundles_ = value; + onChanged(); + return this; + } + /** + *
+       * Number of invalid bundles received.
+       * 
+ * + * int32 invalid_bundles = 11 [json_name = "invalidBundles"]; + * @return This builder for chaining. + */ + public Builder clearInvalidBundles() { + + invalidBundles_ = 0; + onChanged(); + return this; + } + + private long lastSent_ ; + /** + *
+       * Timestamp of the last sent bundle.
+       * 
+ * + * int64 last_sent = 12 [json_name = "lastSent"]; + * @return The lastSent. + */ + @java.lang.Override + public long getLastSent() { + return lastSent_; + } + /** + *
+       * Timestamp of the last sent bundle.
+       * 
+ * + * int64 last_sent = 12 [json_name = "lastSent"]; + * @param value The lastSent to set. + * @return This builder for chaining. + */ + public Builder setLastSent(long value) { + + lastSent_ = value; + onChanged(); + return this; + } + /** + *
+       * Timestamp of the last sent bundle.
+       * 
+ * + * int64 last_sent = 12 [json_name = "lastSent"]; + * @return This builder for chaining. + */ + public Builder clearLastSent() { + + lastSent_ = 0L; + onChanged(); + return this; + } + + private long lastReceived_ ; + /** + *
+       * Timestamp of the last received bundle.
+       * 
+ * + * int64 last_received = 13 [json_name = "lastReceived"]; + * @return The lastReceived. + */ + @java.lang.Override + public long getLastReceived() { + return lastReceived_; + } + /** + *
+       * Timestamp of the last received bundle.
+       * 
+ * + * int64 last_received = 13 [json_name = "lastReceived"]; + * @param value The lastReceived to set. + * @return This builder for chaining. + */ + public Builder setLastReceived(long value) { + + lastReceived_ = value; + onChanged(); + return this; + } + /** + *
+       * Timestamp of the last received bundle.
+       * 
+ * + * int64 last_received = 13 [json_name = "lastReceived"]; + * @return This builder for chaining. + */ + public Builder clearLastReceived() { + + lastReceived_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Long> sentBytes_; + private com.google.protobuf.MapField + internalGetSentBytes() { + if (sentBytes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SentBytesDefaultEntryHolder.defaultEntry); + } + return sentBytes_; + } + private com.google.protobuf.MapField + internalGetMutableSentBytes() { + onChanged();; + if (sentBytes_ == null) { + sentBytes_ = com.google.protobuf.MapField.newMapField( + SentBytesDefaultEntryHolder.defaultEntry); + } + if (!sentBytes_.isMutable()) { + sentBytes_ = sentBytes_.copy(); + } + return sentBytes_; + } + + public int getSentBytesCount() { + return internalGetSentBytes().getMap().size(); + } + /** + *
+       * Bytes sent per message type.
+       * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + + @java.lang.Override + public boolean containsSentBytes( + int key) { + + return internalGetSentBytes().getMap().containsKey(key); + } + /** + * Use {@link #getSentBytesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getSentBytes() { + return getSentBytesMap(); + } + /** + *
+       * Bytes sent per message type.
+       * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public java.util.Map getSentBytesMap() { + return internalGetSentBytes().getMap(); + } + /** + *
+       * Bytes sent per message type.
+       * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public long getSentBytesOrDefault( + int key, + long defaultValue) { + + java.util.Map map = + internalGetSentBytes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Bytes sent per message type.
+       * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + @java.lang.Override + + public long getSentBytesOrThrow( + int key) { + + java.util.Map map = + internalGetSentBytes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearSentBytes() { + internalGetMutableSentBytes().getMutableMap() + .clear(); + return this; + } + /** + *
+       * Bytes sent per message type.
+       * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + + public Builder removeSentBytes( + int key) { + + internalGetMutableSentBytes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSentBytes() { + return internalGetMutableSentBytes().getMutableMap(); + } + /** + *
+       * Bytes sent per message type.
+       * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + public Builder putSentBytes( + int key, + long value) { + + + internalGetMutableSentBytes().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * Bytes sent per message type.
+       * 
+ * + * map<int32, int64> sent_bytes = 14 [json_name = "sentBytes"]; + */ + + public Builder putAllSentBytes( + java.util.Map values) { + internalGetMutableSentBytes().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.Integer, java.lang.Long> receivedBytes_; + private com.google.protobuf.MapField + internalGetReceivedBytes() { + if (receivedBytes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ReceivedBytesDefaultEntryHolder.defaultEntry); + } + return receivedBytes_; + } + private com.google.protobuf.MapField + internalGetMutableReceivedBytes() { + onChanged();; + if (receivedBytes_ == null) { + receivedBytes_ = com.google.protobuf.MapField.newMapField( + ReceivedBytesDefaultEntryHolder.defaultEntry); + } + if (!receivedBytes_.isMutable()) { + receivedBytes_ = receivedBytes_.copy(); + } + return receivedBytes_; + } + + public int getReceivedBytesCount() { + return internalGetReceivedBytes().getMap().size(); + } + /** + *
+       * Bytes received per message type.
+       * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + + @java.lang.Override + public boolean containsReceivedBytes( + int key) { + + return internalGetReceivedBytes().getMap().containsKey(key); + } + /** + * Use {@link #getReceivedBytesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getReceivedBytes() { + return getReceivedBytesMap(); + } + /** + *
+       * Bytes received per message type.
+       * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public java.util.Map getReceivedBytesMap() { + return internalGetReceivedBytes().getMap(); + } + /** + *
+       * Bytes received per message type.
+       * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public long getReceivedBytesOrDefault( + int key, + long defaultValue) { + + java.util.Map map = + internalGetReceivedBytes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * Bytes received per message type.
+       * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + @java.lang.Override + + public long getReceivedBytesOrThrow( + int key) { + + java.util.Map map = + internalGetReceivedBytes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearReceivedBytes() { + internalGetMutableReceivedBytes().getMutableMap() + .clear(); + return this; + } + /** + *
+       * Bytes received per message type.
+       * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + + public Builder removeReceivedBytes( + int key) { + + internalGetMutableReceivedBytes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableReceivedBytes() { + return internalGetMutableReceivedBytes().getMutableMap(); + } + /** + *
+       * Bytes received per message type.
+       * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + public Builder putReceivedBytes( + int key, + long value) { + + + internalGetMutableReceivedBytes().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * Bytes received per message type.
+       * 
+ * + * map<int32, int64> received_bytes = 15 [json_name = "receivedBytes"]; + */ + + public Builder putAllReceivedBytes( + java.util.Map values) { + internalGetMutableReceivedBytes().getMutableMap() + .putAll(values); + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * Network address of the peer.
+       * 
+ * + * string address = 16 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Network address of the peer.
+       * 
+ * + * string address = 16 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Network address of the peer.
+       * 
+ * + * string address = 16 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * Network address of the peer.
+       * 
+ * + * string address = 16 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * Network address of the peer.
+       * 
+ * + * string address = 16 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + + private java.lang.Object direction_ = ""; + /** + *
+       * Direction of connection with the peer.
+       * 
+ * + * string direction = 17 [json_name = "direction"]; + * @return The direction. + */ + public java.lang.String getDirection() { + java.lang.Object ref = direction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + direction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Direction of connection with the peer.
+       * 
+ * + * string direction = 17 [json_name = "direction"]; + * @return The bytes for direction. + */ + public com.google.protobuf.ByteString + getDirectionBytes() { + java.lang.Object ref = direction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + direction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Direction of connection with the peer.
+       * 
+ * + * string direction = 17 [json_name = "direction"]; + * @param value The direction to set. + * @return This builder for chaining. + */ + public Builder setDirection( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + direction_ = value; + onChanged(); + return this; + } + /** + *
+       * Direction of connection with the peer.
+       * 
+ * + * string direction = 17 [json_name = "direction"]; + * @return This builder for chaining. + */ + public Builder clearDirection() { + + direction_ = getDefaultInstance().getDirection(); + onChanged(); + return this; + } + /** + *
+       * Direction of connection with the peer.
+       * 
+ * + * string direction = 17 [json_name = "direction"]; + * @param value The bytes for direction to set. + * @return This builder for chaining. + */ + public Builder setDirectionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + direction_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureProtocolsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + protocols_ = new com.google.protobuf.LazyStringArrayList(protocols_); + bitField0_ |= 0x00000010; + } + } + /** + *
+       * List of protocols supported by the peer.
+       * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @return A list containing the protocols. + */ + public com.google.protobuf.ProtocolStringList + getProtocolsList() { + return protocols_.getUnmodifiableView(); + } + /** + *
+       * List of protocols supported by the peer.
+       * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @return The count of protocols. + */ + public int getProtocolsCount() { + return protocols_.size(); + } + /** + *
+       * List of protocols supported by the peer.
+       * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @param index The index of the element to return. + * @return The protocols at the given index. + */ + public java.lang.String getProtocols(int index) { + return protocols_.get(index); + } + /** + *
+       * List of protocols supported by the peer.
+       * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @param index The index of the value to return. + * @return The bytes of the protocols at the given index. + */ + public com.google.protobuf.ByteString + getProtocolsBytes(int index) { + return protocols_.getByteString(index); + } + /** + *
+       * List of protocols supported by the peer.
+       * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @param index The index to set the value at. + * @param value The protocols to set. + * @return This builder for chaining. + */ + public Builder setProtocols( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * List of protocols supported by the peer.
+       * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @param value The protocols to add. + * @return This builder for chaining. + */ + public Builder addProtocols( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProtocolsIsMutable(); + protocols_.add(value); + onChanged(); + return this; + } + /** + *
+       * List of protocols supported by the peer.
+       * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @param values The protocols to add. + * @return This builder for chaining. + */ + public Builder addAllProtocols( + java.lang.Iterable values) { + ensureProtocolsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, protocols_); + onChanged(); + return this; + } + /** + *
+       * List of protocols supported by the peer.
+       * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @return This builder for chaining. + */ + public Builder clearProtocols() { + protocols_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+       * List of protocols supported by the peer.
+       * 
+ * + * repeated string protocols = 18 [json_name = "protocols"]; + * @param value The bytes of the protocols to add. + * @return This builder for chaining. + */ + public Builder addProtocolsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProtocolsIsMutable(); + protocols_.add(value); + onChanged(); + return this; + } + + private int totalSessions_ ; + /** + *
+       * Total download sessions with the peer.
+       * 
+ * + * int32 total_sessions = 19 [json_name = "totalSessions"]; + * @return The totalSessions. + */ + @java.lang.Override + public int getTotalSessions() { + return totalSessions_; + } + /** + *
+       * Total download sessions with the peer.
+       * 
+ * + * int32 total_sessions = 19 [json_name = "totalSessions"]; + * @param value The totalSessions to set. + * @return This builder for chaining. + */ + public Builder setTotalSessions(int value) { + + totalSessions_ = value; + onChanged(); + return this; + } + /** + *
+       * Total download sessions with the peer.
+       * 
+ * + * int32 total_sessions = 19 [json_name = "totalSessions"]; + * @return This builder for chaining. + */ + public Builder clearTotalSessions() { + + totalSessions_ = 0; + onChanged(); + return this; + } + + private int completedSessions_ ; + /** + *
+       * Completed download sessions with the peer.
+       * 
+ * + * int32 completed_sessions = 20 [json_name = "completedSessions"]; + * @return The completedSessions. + */ + @java.lang.Override + public int getCompletedSessions() { + return completedSessions_; + } + /** + *
+       * Completed download sessions with the peer.
+       * 
+ * + * int32 completed_sessions = 20 [json_name = "completedSessions"]; + * @param value The completedSessions to set. + * @return This builder for chaining. + */ + public Builder setCompletedSessions(int value) { + + completedSessions_ = value; + onChanged(); + return this; + } + /** + *
+       * Completed download sessions with the peer.
+       * 
+ * + * int32 completed_sessions = 20 [json_name = "completedSessions"]; + * @return This builder for chaining. + */ + public Builder clearCompletedSessions() { + + completedSessions_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.PeerInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.PeerInfo) + private static final pactus.network.NetworkOuterClass.PeerInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.PeerInfo(); + } + + public static pactus.network.NetworkOuterClass.PeerInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PeerInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.PeerInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ConnectionInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.ConnectionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Total number of connections.
+     * 
+ * + * uint64 connections = 1 [json_name = "connections"]; + * @return The connections. + */ + long getConnections(); + + /** + *
+     * Number of inbound connections.
+     * 
+ * + * uint64 inbound_connections = 2 [json_name = "inboundConnections"]; + * @return The inboundConnections. + */ + long getInboundConnections(); + + /** + *
+     * Number of outbound connections.
+     * 
+ * + * uint64 outbound_connections = 3 [json_name = "outboundConnections"]; + * @return The outboundConnections. + */ + long getOutboundConnections(); + } + /** + *
+   * ConnectionInfo contains information about the node's connections.
+   * 
+ * + * Protobuf type {@code pactus.ConnectionInfo} + */ + public static final class ConnectionInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.ConnectionInfo) + ConnectionInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConnectionInfo.newBuilder() to construct. + private ConnectionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ConnectionInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ConnectionInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_ConnectionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_ConnectionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.ConnectionInfo.class, pactus.network.NetworkOuterClass.ConnectionInfo.Builder.class); + } + + public static final int CONNECTIONS_FIELD_NUMBER = 1; + private long connections_; + /** + *
+     * Total number of connections.
+     * 
+ * + * uint64 connections = 1 [json_name = "connections"]; + * @return The connections. + */ + @java.lang.Override + public long getConnections() { + return connections_; + } + + public static final int INBOUND_CONNECTIONS_FIELD_NUMBER = 2; + private long inboundConnections_; + /** + *
+     * Number of inbound connections.
+     * 
+ * + * uint64 inbound_connections = 2 [json_name = "inboundConnections"]; + * @return The inboundConnections. + */ + @java.lang.Override + public long getInboundConnections() { + return inboundConnections_; + } + + public static final int OUTBOUND_CONNECTIONS_FIELD_NUMBER = 3; + private long outboundConnections_; + /** + *
+     * Number of outbound connections.
+     * 
+ * + * uint64 outbound_connections = 3 [json_name = "outboundConnections"]; + * @return The outboundConnections. + */ + @java.lang.Override + public long getOutboundConnections() { + return outboundConnections_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (connections_ != 0L) { + output.writeUInt64(1, connections_); + } + if (inboundConnections_ != 0L) { + output.writeUInt64(2, inboundConnections_); + } + if (outboundConnections_ != 0L) { + output.writeUInt64(3, outboundConnections_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (connections_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, connections_); + } + if (inboundConnections_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, inboundConnections_); + } + if (outboundConnections_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, outboundConnections_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.network.NetworkOuterClass.ConnectionInfo)) { + return super.equals(obj); + } + pactus.network.NetworkOuterClass.ConnectionInfo other = (pactus.network.NetworkOuterClass.ConnectionInfo) obj; + + if (getConnections() + != other.getConnections()) return false; + if (getInboundConnections() + != other.getInboundConnections()) return false; + if (getOutboundConnections() + != other.getOutboundConnections()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getConnections()); + hash = (37 * hash) + INBOUND_CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getInboundConnections()); + hash = (37 * hash) + OUTBOUND_CONNECTIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOutboundConnections()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.network.NetworkOuterClass.ConnectionInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.network.NetworkOuterClass.ConnectionInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * ConnectionInfo contains information about the node's connections.
+     * 
+ * + * Protobuf type {@code pactus.ConnectionInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.ConnectionInfo) + pactus.network.NetworkOuterClass.ConnectionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.network.NetworkOuterClass.internal_static_pactus_ConnectionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.network.NetworkOuterClass.internal_static_pactus_ConnectionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.network.NetworkOuterClass.ConnectionInfo.class, pactus.network.NetworkOuterClass.ConnectionInfo.Builder.class); + } + + // Construct using pactus.network.NetworkOuterClass.ConnectionInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + connections_ = 0L; + + inboundConnections_ = 0L; + + outboundConnections_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.network.NetworkOuterClass.internal_static_pactus_ConnectionInfo_descriptor; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.ConnectionInfo getDefaultInstanceForType() { + return pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.ConnectionInfo build() { + pactus.network.NetworkOuterClass.ConnectionInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.ConnectionInfo buildPartial() { + pactus.network.NetworkOuterClass.ConnectionInfo result = new pactus.network.NetworkOuterClass.ConnectionInfo(this); + result.connections_ = connections_; + result.inboundConnections_ = inboundConnections_; + result.outboundConnections_ = outboundConnections_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.network.NetworkOuterClass.ConnectionInfo) { + return mergeFrom((pactus.network.NetworkOuterClass.ConnectionInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.network.NetworkOuterClass.ConnectionInfo other) { + if (other == pactus.network.NetworkOuterClass.ConnectionInfo.getDefaultInstance()) return this; + if (other.getConnections() != 0L) { + setConnections(other.getConnections()); + } + if (other.getInboundConnections() != 0L) { + setInboundConnections(other.getInboundConnections()); + } + if (other.getOutboundConnections() != 0L) { + setOutboundConnections(other.getOutboundConnections()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + connections_ = input.readUInt64(); + + break; + } // case 8 + case 16: { + inboundConnections_ = input.readUInt64(); + + break; + } // case 16 + case 24: { + outboundConnections_ = input.readUInt64(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private long connections_ ; + /** + *
+       * Total number of connections.
+       * 
+ * + * uint64 connections = 1 [json_name = "connections"]; + * @return The connections. + */ + @java.lang.Override + public long getConnections() { + return connections_; + } + /** + *
+       * Total number of connections.
+       * 
+ * + * uint64 connections = 1 [json_name = "connections"]; + * @param value The connections to set. + * @return This builder for chaining. + */ + public Builder setConnections(long value) { + + connections_ = value; + onChanged(); + return this; + } + /** + *
+       * Total number of connections.
+       * 
+ * + * uint64 connections = 1 [json_name = "connections"]; + * @return This builder for chaining. + */ + public Builder clearConnections() { + + connections_ = 0L; + onChanged(); + return this; + } + + private long inboundConnections_ ; + /** + *
+       * Number of inbound connections.
+       * 
+ * + * uint64 inbound_connections = 2 [json_name = "inboundConnections"]; + * @return The inboundConnections. + */ + @java.lang.Override + public long getInboundConnections() { + return inboundConnections_; + } + /** + *
+       * Number of inbound connections.
+       * 
+ * + * uint64 inbound_connections = 2 [json_name = "inboundConnections"]; + * @param value The inboundConnections to set. + * @return This builder for chaining. + */ + public Builder setInboundConnections(long value) { + + inboundConnections_ = value; + onChanged(); + return this; + } + /** + *
+       * Number of inbound connections.
+       * 
+ * + * uint64 inbound_connections = 2 [json_name = "inboundConnections"]; + * @return This builder for chaining. + */ + public Builder clearInboundConnections() { + + inboundConnections_ = 0L; + onChanged(); + return this; + } + + private long outboundConnections_ ; + /** + *
+       * Number of outbound connections.
+       * 
+ * + * uint64 outbound_connections = 3 [json_name = "outboundConnections"]; + * @return The outboundConnections. + */ + @java.lang.Override + public long getOutboundConnections() { + return outboundConnections_; + } + /** + *
+       * Number of outbound connections.
+       * 
+ * + * uint64 outbound_connections = 3 [json_name = "outboundConnections"]; + * @param value The outboundConnections to set. + * @return This builder for chaining. + */ + public Builder setOutboundConnections(long value) { + + outboundConnections_ = value; + onChanged(); + return this; + } + /** + *
+       * Number of outbound connections.
+       * 
+ * + * uint64 outbound_connections = 3 [json_name = "outboundConnections"]; + * @return This builder for chaining. + */ + public Builder clearOutboundConnections() { + + outboundConnections_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.ConnectionInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.ConnectionInfo) + private static final pactus.network.NetworkOuterClass.ConnectionInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.network.NetworkOuterClass.ConnectionInfo(); + } + + public static pactus.network.NetworkOuterClass.ConnectionInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConnectionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.network.NetworkOuterClass.ConnectionInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetNetworkInfoRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetNetworkInfoResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetNodeInfoRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetNodeInfoResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_PeerInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_PeerInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_PeerInfo_SentBytesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_PeerInfo_SentBytesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_PeerInfo_ReceivedBytesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_PeerInfo_ReceivedBytesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_ConnectionInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_ConnectionInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\rnetwork.proto\022\006pactus\">\n\025GetNetworkInf" + + "oRequest\022%\n\016only_connected\030\001 \001(\010R\ronlyCo" + + "nnected\"\256\004\n\026GetNetworkInfoResponse\022!\n\014ne" + + "twork_name\030\001 \001(\tR\013networkName\022(\n\020total_s" + + "ent_bytes\030\002 \001(\003R\016totalSentBytes\0220\n\024total" + + "_received_bytes\030\003 \001(\003R\022totalReceivedByte" + + "s\0222\n\025connected_peers_count\030\004 \001(\rR\023connec" + + "tedPeersCount\0229\n\017connected_peers\030\005 \003(\0132\020" + + ".pactus.PeerInfoR\016connectedPeers\022L\n\nsent" + + "_bytes\030\006 \003(\0132-.pactus.GetNetworkInfoResp" + + "onse.SentBytesEntryR\tsentBytes\022X\n\016receiv" + + "ed_bytes\030\007 \003(\01321.pactus.GetNetworkInfoRe" + + "sponse.ReceivedBytesEntryR\rreceivedBytes" + + "\032<\n\016SentBytesEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005" + + "value\030\002 \001(\003R\005value:\0028\001\032@\n\022ReceivedBytesE" + + "ntry\022\020\n\003key\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\003R\005v" + + "alue:\0028\001\"\024\n\022GetNodeInfoRequest\"\207\003\n\023GetNo" + + "deInfoResponse\022\030\n\007moniker\030\001 \001(\tR\007moniker" + + "\022\024\n\005agent\030\002 \001(\tR\005agent\022\027\n\007peer_id\030\003 \001(\tR" + + "\006peerId\022\035\n\nstarted_at\030\004 \001(\004R\tstartedAt\022\"" + + "\n\014reachability\030\005 \001(\tR\014reachability\022\032\n\010se" + + "rvices\030\006 \001(\005R\010services\022%\n\016services_names" + + "\030\007 \001(\tR\rservicesNames\022\037\n\013local_addrs\030\010 \003" + + "(\tR\nlocalAddrs\022\034\n\tprotocols\030\t \003(\tR\tproto" + + "cols\022!\n\014clock_offset\030\r \001(\001R\013clockOffset\022" + + "?\n\017connection_info\030\016 \001(\0132\026.pactus.Connec" + + "tionInfoR\016connectionInfo\"\355\006\n\010PeerInfo\022\026\n" + + "\006status\030\001 \001(\005R\006status\022\030\n\007moniker\030\002 \001(\tR\007" + + "moniker\022\024\n\005agent\030\003 \001(\tR\005agent\022\027\n\007peer_id" + + "\030\004 \001(\tR\006peerId\022%\n\016consensus_keys\030\005 \003(\tR\r" + + "consensusKeys\022/\n\023consensus_addresses\030\006 \003" + + "(\tR\022consensusAddresses\022\032\n\010services\030\007 \001(\r" + + "R\010services\022&\n\017last_block_hash\030\010 \001(\tR\rlas" + + "tBlockHash\022\026\n\006height\030\t \001(\rR\006height\022)\n\020re" + + "ceived_bundles\030\n \001(\005R\017receivedBundles\022\'\n" + + "\017invalid_bundles\030\013 \001(\005R\016invalidBundles\022\033" + + "\n\tlast_sent\030\014 \001(\003R\010lastSent\022#\n\rlast_rece" + + "ived\030\r \001(\003R\014lastReceived\022>\n\nsent_bytes\030\016" + + " \003(\0132\037.pactus.PeerInfo.SentBytesEntryR\ts" + + "entBytes\022J\n\016received_bytes\030\017 \003(\0132#.pactu" + + "s.PeerInfo.ReceivedBytesEntryR\rreceivedB" + + "ytes\022\030\n\007address\030\020 \001(\tR\007address\022\034\n\tdirect" + + "ion\030\021 \001(\tR\tdirection\022\034\n\tprotocols\030\022 \003(\tR" + + "\tprotocols\022%\n\016total_sessions\030\023 \001(\005R\rtota" + + "lSessions\022-\n\022completed_sessions\030\024 \001(\005R\021c" + + "ompletedSessions\032<\n\016SentBytesEntry\022\020\n\003ke" + + "y\030\001 \001(\005R\003key\022\024\n\005value\030\002 \001(\003R\005value:\0028\001\032@" + + "\n\022ReceivedBytesEntry\022\020\n\003key\030\001 \001(\005R\003key\022\024" + + "\n\005value\030\002 \001(\003R\005value:\0028\001\"\226\001\n\016ConnectionI" + + "nfo\022 \n\013connections\030\001 \001(\004R\013connections\022/\n" + + "\023inbound_connections\030\002 \001(\004R\022inboundConne" + + "ctions\0221\n\024outbound_connections\030\003 \001(\004R\023ou" + + "tboundConnections2\242\001\n\007Network\022O\n\016GetNetw" + + "orkInfo\022\035.pactus.GetNetworkInfoRequest\032\036" + + ".pactus.GetNetworkInfoResponse\022F\n\013GetNod" + + "eInfo\022\032.pactus.GetNodeInfoRequest\032\033.pact" + + "us.GetNodeInfoResponseBB\n\016pactus.network" + + "Z0github.com/pactus-project/pactus/www/g" + + "rpc/pactusb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pactus_GetNetworkInfoRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pactus_GetNetworkInfoRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetNetworkInfoRequest_descriptor, + new java.lang.String[] { "OnlyConnected", }); + internal_static_pactus_GetNetworkInfoResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_pactus_GetNetworkInfoResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetNetworkInfoResponse_descriptor, + new java.lang.String[] { "NetworkName", "TotalSentBytes", "TotalReceivedBytes", "ConnectedPeersCount4", "ConnectedPeers5", "SentBytes", "ReceivedBytes", }); + internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_descriptor = + internal_static_pactus_GetNetworkInfoResponse_descriptor.getNestedTypes().get(0); + internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetNetworkInfoResponse_SentBytesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_descriptor = + internal_static_pactus_GetNetworkInfoResponse_descriptor.getNestedTypes().get(1); + internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetNetworkInfoResponse_ReceivedBytesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_pactus_GetNodeInfoRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_pactus_GetNodeInfoRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetNodeInfoRequest_descriptor, + new java.lang.String[] { }); + internal_static_pactus_GetNodeInfoResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_pactus_GetNodeInfoResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetNodeInfoResponse_descriptor, + new java.lang.String[] { "Moniker", "Agent", "PeerId", "StartedAt", "Reachability", "Services", "ServicesNames", "LocalAddrs", "Protocols", "ClockOffset", "ConnectionInfo", }); + internal_static_pactus_PeerInfo_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_pactus_PeerInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_PeerInfo_descriptor, + new java.lang.String[] { "Status", "Moniker", "Agent", "PeerId", "ConsensusKeys", "ConsensusAddresses", "Services", "LastBlockHash", "Height", "ReceivedBundles", "InvalidBundles", "LastSent", "LastReceived", "SentBytes", "ReceivedBytes", "Address", "Direction", "Protocols", "TotalSessions", "CompletedSessions", }); + internal_static_pactus_PeerInfo_SentBytesEntry_descriptor = + internal_static_pactus_PeerInfo_descriptor.getNestedTypes().get(0); + internal_static_pactus_PeerInfo_SentBytesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_PeerInfo_SentBytesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_pactus_PeerInfo_ReceivedBytesEntry_descriptor = + internal_static_pactus_PeerInfo_descriptor.getNestedTypes().get(1); + internal_static_pactus_PeerInfo_ReceivedBytesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_PeerInfo_ReceivedBytesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_pactus_ConnectionInfo_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_pactus_ConnectionInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_ConnectionInfo_descriptor, + new java.lang.String[] { "Connections", "InboundConnections", "OutboundConnections", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java b/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java new file mode 100644 index 000000000..4c1630cd2 --- /dev/null +++ b/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java @@ -0,0 +1,574 @@ +package pactus.transaction; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Transaction service defines various RPC methods for interacting with
+ * transactions.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.50.2)", + comments = "Source: transaction.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class TransactionGrpc { + + private TransactionGrpc() {} + + public static final String SERVICE_NAME = "pactus.Transaction"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getGetTransactionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTransaction", + requestType = pactus.transaction.TransactionOuterClass.GetTransactionRequest.class, + responseType = pactus.transaction.TransactionOuterClass.GetTransactionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTransactionMethod() { + io.grpc.MethodDescriptor getGetTransactionMethod; + if ((getGetTransactionMethod = TransactionGrpc.getGetTransactionMethod) == null) { + synchronized (TransactionGrpc.class) { + if ((getGetTransactionMethod = TransactionGrpc.getGetTransactionMethod) == null) { + TransactionGrpc.getGetTransactionMethod = getGetTransactionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetTransaction")) + .build(); + } + } + } + return getGetTransactionMethod; + } + + private static volatile io.grpc.MethodDescriptor getCalculateFeeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CalculateFee", + requestType = pactus.transaction.TransactionOuterClass.CalculateFeeRequest.class, + responseType = pactus.transaction.TransactionOuterClass.CalculateFeeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCalculateFeeMethod() { + io.grpc.MethodDescriptor getCalculateFeeMethod; + if ((getCalculateFeeMethod = TransactionGrpc.getCalculateFeeMethod) == null) { + synchronized (TransactionGrpc.class) { + if ((getCalculateFeeMethod = TransactionGrpc.getCalculateFeeMethod) == null) { + TransactionGrpc.getCalculateFeeMethod = getCalculateFeeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CalculateFee")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.CalculateFeeRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.CalculateFeeResponse.getDefaultInstance())) + .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("CalculateFee")) + .build(); + } + } + } + return getCalculateFeeMethod; + } + + private static volatile io.grpc.MethodDescriptor getBroadcastTransactionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BroadcastTransaction", + requestType = pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.class, + responseType = pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBroadcastTransactionMethod() { + io.grpc.MethodDescriptor getBroadcastTransactionMethod; + if ((getBroadcastTransactionMethod = TransactionGrpc.getBroadcastTransactionMethod) == null) { + synchronized (TransactionGrpc.class) { + if ((getBroadcastTransactionMethod = TransactionGrpc.getBroadcastTransactionMethod) == null) { + TransactionGrpc.getBroadcastTransactionMethod = getBroadcastTransactionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BroadcastTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("BroadcastTransaction")) + .build(); + } + } + } + return getBroadcastTransactionMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetRawTransactionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRawTransaction", + requestType = pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.class, + responseType = pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetRawTransactionMethod() { + io.grpc.MethodDescriptor getGetRawTransactionMethod; + if ((getGetRawTransactionMethod = TransactionGrpc.getGetRawTransactionMethod) == null) { + synchronized (TransactionGrpc.class) { + if ((getGetRawTransactionMethod = TransactionGrpc.getGetRawTransactionMethod) == null) { + TransactionGrpc.getGetRawTransactionMethod = getGetRawTransactionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRawTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetRawTransaction")) + .build(); + } + } + } + return getGetRawTransactionMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static TransactionStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TransactionStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransactionStub(channel, callOptions); + } + }; + return TransactionStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static TransactionBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TransactionBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransactionBlockingStub(channel, callOptions); + } + }; + return TransactionBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static TransactionFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public TransactionFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransactionFutureStub(channel, callOptions); + } + }; + return TransactionFutureStub.newStub(factory, channel); + } + + /** + *
+   * Transaction service defines various RPC methods for interacting with
+   * transactions.
+   * 
+ */ + public static abstract class TransactionImplBase implements io.grpc.BindableService { + + /** + *
+     * GetTransaction retrieves transaction details based on the provided request
+     * parameters.
+     * 
+ */ + public void getTransaction(pactus.transaction.TransactionOuterClass.GetTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTransactionMethod(), responseObserver); + } + + /** + *
+     * CalculateFee calculates the transaction fee based on the specified amount
+     * and payload type.
+     * 
+ */ + public void calculateFee(pactus.transaction.TransactionOuterClass.CalculateFeeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCalculateFeeMethod(), responseObserver); + } + + /** + *
+     * BroadcastTransaction broadcasts a signed transaction to the network.
+     * 
+ */ + public void broadcastTransaction(pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBroadcastTransactionMethod(), responseObserver); + } + + /** + *
+     * GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.
+     * 
+ */ + public void getRawTransaction(pactus.transaction.TransactionOuterClass.GetRawTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawTransactionMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetTransactionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.transaction.TransactionOuterClass.GetTransactionRequest, + pactus.transaction.TransactionOuterClass.GetTransactionResponse>( + this, METHODID_GET_TRANSACTION))) + .addMethod( + getCalculateFeeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.transaction.TransactionOuterClass.CalculateFeeRequest, + pactus.transaction.TransactionOuterClass.CalculateFeeResponse>( + this, METHODID_CALCULATE_FEE))) + .addMethod( + getBroadcastTransactionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest, + pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse>( + this, METHODID_BROADCAST_TRANSACTION))) + .addMethod( + getGetRawTransactionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.transaction.TransactionOuterClass.GetRawTransactionRequest, + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse>( + this, METHODID_GET_RAW_TRANSACTION))) + .build(); + } + } + + /** + *
+   * Transaction service defines various RPC methods for interacting with
+   * transactions.
+   * 
+ */ + public static final class TransactionStub extends io.grpc.stub.AbstractAsyncStub { + private TransactionStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TransactionStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransactionStub(channel, callOptions); + } + + /** + *
+     * GetTransaction retrieves transaction details based on the provided request
+     * parameters.
+     * 
+ */ + public void getTransaction(pactus.transaction.TransactionOuterClass.GetTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTransactionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * CalculateFee calculates the transaction fee based on the specified amount
+     * and payload type.
+     * 
+ */ + public void calculateFee(pactus.transaction.TransactionOuterClass.CalculateFeeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCalculateFeeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * BroadcastTransaction broadcasts a signed transaction to the network.
+     * 
+ */ + public void broadcastTransaction(pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBroadcastTransactionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.
+     * 
+ */ + public void getRawTransaction(pactus.transaction.TransactionOuterClass.GetRawTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRawTransactionMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Transaction service defines various RPC methods for interacting with
+   * transactions.
+   * 
+ */ + public static final class TransactionBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private TransactionBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TransactionBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransactionBlockingStub(channel, callOptions); + } + + /** + *
+     * GetTransaction retrieves transaction details based on the provided request
+     * parameters.
+     * 
+ */ + public pactus.transaction.TransactionOuterClass.GetTransactionResponse getTransaction(pactus.transaction.TransactionOuterClass.GetTransactionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTransactionMethod(), getCallOptions(), request); + } + + /** + *
+     * CalculateFee calculates the transaction fee based on the specified amount
+     * and payload type.
+     * 
+ */ + public pactus.transaction.TransactionOuterClass.CalculateFeeResponse calculateFee(pactus.transaction.TransactionOuterClass.CalculateFeeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCalculateFeeMethod(), getCallOptions(), request); + } + + /** + *
+     * BroadcastTransaction broadcasts a signed transaction to the network.
+     * 
+ */ + public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse broadcastTransaction(pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBroadcastTransactionMethod(), getCallOptions(), request); + } + + /** + *
+     * GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.
+     * 
+ */ + public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawTransaction(pactus.transaction.TransactionOuterClass.GetRawTransactionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRawTransactionMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Transaction service defines various RPC methods for interacting with
+   * transactions.
+   * 
+ */ + public static final class TransactionFutureStub extends io.grpc.stub.AbstractFutureStub { + private TransactionFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected TransactionFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new TransactionFutureStub(channel, callOptions); + } + + /** + *
+     * GetTransaction retrieves transaction details based on the provided request
+     * parameters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getTransaction( + pactus.transaction.TransactionOuterClass.GetTransactionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTransactionMethod(), getCallOptions()), request); + } + + /** + *
+     * CalculateFee calculates the transaction fee based on the specified amount
+     * and payload type.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture calculateFee( + pactus.transaction.TransactionOuterClass.CalculateFeeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCalculateFeeMethod(), getCallOptions()), request); + } + + /** + *
+     * BroadcastTransaction broadcasts a signed transaction to the network.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture broadcastTransaction( + pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBroadcastTransactionMethod(), getCallOptions()), request); + } + + /** + *
+     * GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getRawTransaction( + pactus.transaction.TransactionOuterClass.GetRawTransactionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRawTransactionMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_TRANSACTION = 0; + private static final int METHODID_CALCULATE_FEE = 1; + private static final int METHODID_BROADCAST_TRANSACTION = 2; + private static final int METHODID_GET_RAW_TRANSACTION = 3; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final TransactionImplBase serviceImpl; + private final int methodId; + + MethodHandlers(TransactionImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_TRANSACTION: + serviceImpl.getTransaction((pactus.transaction.TransactionOuterClass.GetTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CALCULATE_FEE: + serviceImpl.calculateFee((pactus.transaction.TransactionOuterClass.CalculateFeeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BROADCAST_TRANSACTION: + serviceImpl.broadcastTransaction((pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RAW_TRANSACTION: + serviceImpl.getRawTransaction((pactus.transaction.TransactionOuterClass.GetRawTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class TransactionBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + TransactionBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return pactus.transaction.TransactionOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Transaction"); + } + } + + private static final class TransactionFileDescriptorSupplier + extends TransactionBaseDescriptorSupplier { + TransactionFileDescriptorSupplier() {} + } + + private static final class TransactionMethodDescriptorSupplier + extends TransactionBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + TransactionMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (TransactionGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new TransactionFileDescriptorSupplier()) + .addMethod(getGetTransactionMethod()) + .addMethod(getCalculateFeeMethod()) + .addMethod(getBroadcastTransactionMethod()) + .addMethod(getGetRawTransactionMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java new file mode 100644 index 000000000..f805db30b --- /dev/null +++ b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java @@ -0,0 +1,17954 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: transaction.proto + +package pactus.transaction; + +public final class TransactionOuterClass { + private TransactionOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + *
+   * Enumeration for different types of transaction payloads.
+   * 
+ * + * Protobuf enum {@code pactus.PayloadType} + */ + public enum PayloadType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unknown payload type.
+     * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+     * Transfer payload type.
+     * 
+ * + * TRANSFER_PAYLOAD = 1; + */ + TRANSFER_PAYLOAD(1), + /** + *
+     * Bond payload type.
+     * 
+ * + * BOND_PAYLOAD = 2; + */ + BOND_PAYLOAD(2), + /** + *
+     * Sortition payload type.
+     * 
+ * + * SORTITION_PAYLOAD = 3; + */ + SORTITION_PAYLOAD(3), + /** + *
+     * Unbond payload type.
+     * 
+ * + * UNBOND_PAYLOAD = 4; + */ + UNBOND_PAYLOAD(4), + /** + *
+     * Withdraw payload type.
+     * 
+ * + * WITHDRAW_PAYLOAD = 5; + */ + WITHDRAW_PAYLOAD(5), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unknown payload type.
+     * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+     * Transfer payload type.
+     * 
+ * + * TRANSFER_PAYLOAD = 1; + */ + public static final int TRANSFER_PAYLOAD_VALUE = 1; + /** + *
+     * Bond payload type.
+     * 
+ * + * BOND_PAYLOAD = 2; + */ + public static final int BOND_PAYLOAD_VALUE = 2; + /** + *
+     * Sortition payload type.
+     * 
+ * + * SORTITION_PAYLOAD = 3; + */ + public static final int SORTITION_PAYLOAD_VALUE = 3; + /** + *
+     * Unbond payload type.
+     * 
+ * + * UNBOND_PAYLOAD = 4; + */ + public static final int UNBOND_PAYLOAD_VALUE = 4; + /** + *
+     * Withdraw payload type.
+     * 
+ * + * WITHDRAW_PAYLOAD = 5; + */ + public static final int WITHDRAW_PAYLOAD_VALUE = 5; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PayloadType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PayloadType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return TRANSFER_PAYLOAD; + case 2: return BOND_PAYLOAD; + case 3: return SORTITION_PAYLOAD; + case 4: return UNBOND_PAYLOAD; + case 5: return WITHDRAW_PAYLOAD; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PayloadType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PayloadType findValueByNumber(int number) { + return PayloadType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final PayloadType[] VALUES = values(); + + public static PayloadType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PayloadType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pactus.PayloadType) + } + + /** + *
+   * Enumeration for verbosity levels when requesting transaction details.
+   * 
+ * + * Protobuf enum {@code pactus.TransactionVerbosity} + */ + public enum TransactionVerbosity + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Request transaction data only.
+     * 
+ * + * TRANSACTION_DATA = 0; + */ + TRANSACTION_DATA(0), + /** + *
+     * Request detailed transaction information.
+     * 
+ * + * TRANSACTION_INFO = 1; + */ + TRANSACTION_INFO(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Request transaction data only.
+     * 
+ * + * TRANSACTION_DATA = 0; + */ + public static final int TRANSACTION_DATA_VALUE = 0; + /** + *
+     * Request detailed transaction information.
+     * 
+ * + * TRANSACTION_INFO = 1; + */ + public static final int TRANSACTION_INFO_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransactionVerbosity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static TransactionVerbosity forNumber(int value) { + switch (value) { + case 0: return TRANSACTION_DATA; + case 1: return TRANSACTION_INFO; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TransactionVerbosity> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TransactionVerbosity findValueByNumber(int number) { + return TransactionVerbosity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.getDescriptor().getEnumTypes().get(1); + } + + private static final TransactionVerbosity[] VALUES = values(); + + public static TransactionVerbosity valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private TransactionVerbosity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pactus.TransactionVerbosity) + } + + public interface GetTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The unique ID of the transaction to retrieve.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+     * The unique ID of the transaction to retrieve.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+     * The verbosity level for transaction details.
+     * 
+ * + * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The enum numeric value on the wire for verbosity. + */ + int getVerbosityValue(); + /** + *
+     * The verbosity level for transaction details.
+     * 
+ * + * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The verbosity. + */ + pactus.transaction.TransactionOuterClass.TransactionVerbosity getVerbosity(); + } + /** + *
+   * Request message for retrieving transaction details.
+   * 
+ * + * Protobuf type {@code pactus.GetTransactionRequest} + */ + public static final class GetTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetTransactionRequest) + GetTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTransactionRequest.newBuilder() to construct. + private GetTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetTransactionRequest() { + id_ = ""; + verbosity_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetTransactionRequest.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + *
+     * The unique ID of the transaction to retrieve.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+     * The unique ID of the transaction to retrieve.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERBOSITY_FIELD_NUMBER = 2; + private int verbosity_; + /** + *
+     * The verbosity level for transaction details.
+     * 
+ * + * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The enum numeric value on the wire for verbosity. + */ + @java.lang.Override public int getVerbosityValue() { + return verbosity_; + } + /** + *
+     * The verbosity level for transaction details.
+     * 
+ * + * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The verbosity. + */ + @java.lang.Override public pactus.transaction.TransactionOuterClass.TransactionVerbosity getVerbosity() { + @SuppressWarnings("deprecation") + pactus.transaction.TransactionOuterClass.TransactionVerbosity result = pactus.transaction.TransactionOuterClass.TransactionVerbosity.valueOf(verbosity_); + return result == null ? pactus.transaction.TransactionOuterClass.TransactionVerbosity.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (verbosity_ != pactus.transaction.TransactionOuterClass.TransactionVerbosity.TRANSACTION_DATA.getNumber()) { + output.writeEnum(2, verbosity_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (verbosity_ != pactus.transaction.TransactionOuterClass.TransactionVerbosity.TRANSACTION_DATA.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, verbosity_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetTransactionRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (verbosity_ != other.verbosity_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + VERBOSITY_FIELD_NUMBER; + hash = (53 * hash) + verbosity_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for retrieving transaction details.
+     * 
+ * + * Protobuf type {@code pactus.GetTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetTransactionRequest) + pactus.transaction.TransactionOuterClass.GetTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + verbosity_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetTransactionRequest build() { + pactus.transaction.TransactionOuterClass.GetTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.GetTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetTransactionRequest(this); + result.id_ = id_; + result.verbosity_ = verbosity_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.GetTransactionRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (other.verbosity_ != 0) { + setVerbosityValue(other.getVerbosityValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + verbosity_ = input.readEnum(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+       * The unique ID of the transaction to retrieve.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The unique ID of the transaction to retrieve.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The unique ID of the transaction to retrieve.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + *
+       * The unique ID of the transaction to retrieve.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + *
+       * The unique ID of the transaction to retrieve.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private int verbosity_ = 0; + /** + *
+       * The verbosity level for transaction details.
+       * 
+ * + * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The enum numeric value on the wire for verbosity. + */ + @java.lang.Override public int getVerbosityValue() { + return verbosity_; + } + /** + *
+       * The verbosity level for transaction details.
+       * 
+ * + * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; + * @param value The enum numeric value on the wire for verbosity to set. + * @return This builder for chaining. + */ + public Builder setVerbosityValue(int value) { + + verbosity_ = value; + onChanged(); + return this; + } + /** + *
+       * The verbosity level for transaction details.
+       * 
+ * + * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return The verbosity. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionVerbosity getVerbosity() { + @SuppressWarnings("deprecation") + pactus.transaction.TransactionOuterClass.TransactionVerbosity result = pactus.transaction.TransactionOuterClass.TransactionVerbosity.valueOf(verbosity_); + return result == null ? pactus.transaction.TransactionOuterClass.TransactionVerbosity.UNRECOGNIZED : result; + } + /** + *
+       * The verbosity level for transaction details.
+       * 
+ * + * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; + * @param value The verbosity to set. + * @return This builder for chaining. + */ + public Builder setVerbosity(pactus.transaction.TransactionOuterClass.TransactionVerbosity value) { + if (value == null) { + throw new NullPointerException(); + } + + verbosity_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The verbosity level for transaction details.
+       * 
+ * + * .pactus.TransactionVerbosity verbosity = 2 [json_name = "verbosity"]; + * @return This builder for chaining. + */ + public Builder clearVerbosity() { + + verbosity_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.GetTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.GetTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetTransactionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetTransactionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The height of the block containing the transaction.
+     * 
+ * + * uint32 block_height = 1 [json_name = "blockHeight"]; + * @return The blockHeight. + */ + int getBlockHeight(); + + /** + *
+     * The UNIX timestamp of the block containing the transaction.
+     * 
+ * + * uint32 block_time = 2 [json_name = "blockTime"]; + * @return The blockTime. + */ + int getBlockTime(); + + /** + *
+     * Detailed information about the transaction.
+     * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + * @return Whether the transaction field is set. + */ + boolean hasTransaction(); + /** + *
+     * Detailed information about the transaction.
+     * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + * @return The transaction. + */ + pactus.transaction.TransactionOuterClass.TransactionInfo getTransaction(); + /** + *
+     * Detailed information about the transaction.
+     * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + */ + pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder(); + } + /** + *
+   * Response message containing details of a transaction.
+   * 
+ * + * Protobuf type {@code pactus.GetTransactionResponse} + */ + public static final class GetTransactionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetTransactionResponse) + GetTransactionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTransactionResponse.newBuilder() to construct. + private GetTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetTransactionResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetTransactionResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetTransactionResponse.class, pactus.transaction.TransactionOuterClass.GetTransactionResponse.Builder.class); + } + + public static final int BLOCK_HEIGHT_FIELD_NUMBER = 1; + private int blockHeight_; + /** + *
+     * The height of the block containing the transaction.
+     * 
+ * + * uint32 block_height = 1 [json_name = "blockHeight"]; + * @return The blockHeight. + */ + @java.lang.Override + public int getBlockHeight() { + return blockHeight_; + } + + public static final int BLOCK_TIME_FIELD_NUMBER = 2; + private int blockTime_; + /** + *
+     * The UNIX timestamp of the block containing the transaction.
+     * 
+ * + * uint32 block_time = 2 [json_name = "blockTime"]; + * @return The blockTime. + */ + @java.lang.Override + public int getBlockTime() { + return blockTime_; + } + + public static final int TRANSACTION_FIELD_NUMBER = 3; + private pactus.transaction.TransactionOuterClass.TransactionInfo transaction_; + /** + *
+     * Detailed information about the transaction.
+     * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + * @return Whether the transaction field is set. + */ + @java.lang.Override + public boolean hasTransaction() { + return transaction_ != null; + } + /** + *
+     * Detailed information about the transaction.
+     * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + * @return The transaction. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionInfo getTransaction() { + return transaction_ == null ? pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_; + } + /** + *
+     * Detailed information about the transaction.
+     * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder() { + return getTransaction(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (blockHeight_ != 0) { + output.writeUInt32(1, blockHeight_); + } + if (blockTime_ != 0) { + output.writeUInt32(2, blockTime_); + } + if (transaction_ != null) { + output.writeMessage(3, getTransaction()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (blockHeight_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, blockHeight_); + } + if (blockTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, blockTime_); + } + if (transaction_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTransaction()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetTransactionResponse)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetTransactionResponse other = (pactus.transaction.TransactionOuterClass.GetTransactionResponse) obj; + + if (getBlockHeight() + != other.getBlockHeight()) return false; + if (getBlockTime() + != other.getBlockTime()) return false; + if (hasTransaction() != other.hasTransaction()) return false; + if (hasTransaction()) { + if (!getTransaction() + .equals(other.getTransaction())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BLOCK_HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getBlockHeight(); + hash = (37 * hash) + BLOCK_TIME_FIELD_NUMBER; + hash = (53 * hash) + getBlockTime(); + if (hasTransaction()) { + hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getTransaction().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetTransactionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing details of a transaction.
+     * 
+ * + * Protobuf type {@code pactus.GetTransactionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetTransactionResponse) + pactus.transaction.TransactionOuterClass.GetTransactionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetTransactionResponse.class, pactus.transaction.TransactionOuterClass.GetTransactionResponse.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetTransactionResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + blockHeight_ = 0; + + blockTime_ = 0; + + if (transactionBuilder_ == null) { + transaction_ = null; + } else { + transaction_ = null; + transactionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetTransactionResponse_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetTransactionResponse getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetTransactionResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetTransactionResponse build() { + pactus.transaction.TransactionOuterClass.GetTransactionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetTransactionResponse buildPartial() { + pactus.transaction.TransactionOuterClass.GetTransactionResponse result = new pactus.transaction.TransactionOuterClass.GetTransactionResponse(this); + result.blockHeight_ = blockHeight_; + result.blockTime_ = blockTime_; + if (transactionBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = transactionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetTransactionResponse) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetTransactionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetTransactionResponse other) { + if (other == pactus.transaction.TransactionOuterClass.GetTransactionResponse.getDefaultInstance()) return this; + if (other.getBlockHeight() != 0) { + setBlockHeight(other.getBlockHeight()); + } + if (other.getBlockTime() != 0) { + setBlockTime(other.getBlockTime()); + } + if (other.hasTransaction()) { + mergeTransaction(other.getTransaction()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + blockHeight_ = input.readUInt32(); + + break; + } // case 8 + case 16: { + blockTime_ = input.readUInt32(); + + break; + } // case 16 + case 26: { + input.readMessage( + getTransactionFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int blockHeight_ ; + /** + *
+       * The height of the block containing the transaction.
+       * 
+ * + * uint32 block_height = 1 [json_name = "blockHeight"]; + * @return The blockHeight. + */ + @java.lang.Override + public int getBlockHeight() { + return blockHeight_; + } + /** + *
+       * The height of the block containing the transaction.
+       * 
+ * + * uint32 block_height = 1 [json_name = "blockHeight"]; + * @param value The blockHeight to set. + * @return This builder for chaining. + */ + public Builder setBlockHeight(int value) { + + blockHeight_ = value; + onChanged(); + return this; + } + /** + *
+       * The height of the block containing the transaction.
+       * 
+ * + * uint32 block_height = 1 [json_name = "blockHeight"]; + * @return This builder for chaining. + */ + public Builder clearBlockHeight() { + + blockHeight_ = 0; + onChanged(); + return this; + } + + private int blockTime_ ; + /** + *
+       * The UNIX timestamp of the block containing the transaction.
+       * 
+ * + * uint32 block_time = 2 [json_name = "blockTime"]; + * @return The blockTime. + */ + @java.lang.Override + public int getBlockTime() { + return blockTime_; + } + /** + *
+       * The UNIX timestamp of the block containing the transaction.
+       * 
+ * + * uint32 block_time = 2 [json_name = "blockTime"]; + * @param value The blockTime to set. + * @return This builder for chaining. + */ + public Builder setBlockTime(int value) { + + blockTime_ = value; + onChanged(); + return this; + } + /** + *
+       * The UNIX timestamp of the block containing the transaction.
+       * 
+ * + * uint32 block_time = 2 [json_name = "blockTime"]; + * @return This builder for chaining. + */ + public Builder clearBlockTime() { + + blockTime_ = 0; + onChanged(); + return this; + } + + private pactus.transaction.TransactionOuterClass.TransactionInfo transaction_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> transactionBuilder_; + /** + *
+       * Detailed information about the transaction.
+       * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + * @return Whether the transaction field is set. + */ + public boolean hasTransaction() { + return transactionBuilder_ != null || transaction_ != null; + } + /** + *
+       * Detailed information about the transaction.
+       * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + * @return The transaction. + */ + public pactus.transaction.TransactionOuterClass.TransactionInfo getTransaction() { + if (transactionBuilder_ == null) { + return transaction_ == null ? pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_; + } else { + return transactionBuilder_.getMessage(); + } + } + /** + *
+       * Detailed information about the transaction.
+       * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + */ + public Builder setTransaction(pactus.transaction.TransactionOuterClass.TransactionInfo value) { + if (transactionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + transactionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Detailed information about the transaction.
+       * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + */ + public Builder setTransaction( + pactus.transaction.TransactionOuterClass.TransactionInfo.Builder builderForValue) { + if (transactionBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + transactionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Detailed information about the transaction.
+       * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + */ + public Builder mergeTransaction(pactus.transaction.TransactionOuterClass.TransactionInfo value) { + if (transactionBuilder_ == null) { + if (transaction_ != null) { + transaction_ = + pactus.transaction.TransactionOuterClass.TransactionInfo.newBuilder(transaction_).mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + transactionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Detailed information about the transaction.
+       * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + */ + public Builder clearTransaction() { + if (transactionBuilder_ == null) { + transaction_ = null; + onChanged(); + } else { + transaction_ = null; + transactionBuilder_ = null; + } + + return this; + } + /** + *
+       * Detailed information about the transaction.
+       * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfo.Builder getTransactionBuilder() { + + onChanged(); + return getTransactionFieldBuilder().getBuilder(); + } + /** + *
+       * Detailed information about the transaction.
+       * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + */ + public pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder getTransactionOrBuilder() { + if (transactionBuilder_ != null) { + return transactionBuilder_.getMessageOrBuilder(); + } else { + return transaction_ == null ? + pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance() : transaction_; + } + } + /** + *
+       * Detailed information about the transaction.
+       * 
+ * + * .pactus.TransactionInfo transaction = 3 [json_name = "transaction"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder> + getTransactionFieldBuilder() { + if (transactionBuilder_ == null) { + transactionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.TransactionInfo, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder, pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder>( + getTransaction(), + getParentForChildren(), + isClean()); + transaction_ = null; + } + return transactionBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetTransactionResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetTransactionResponse) + private static final pactus.transaction.TransactionOuterClass.GetTransactionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetTransactionResponse(); + } + + public static pactus.transaction.TransactionOuterClass.GetTransactionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTransactionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetTransactionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CalculateFeeRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.CalculateFeeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The amount involved in the transaction, specified in NanoPAC.
+     * 
+ * + * int64 amount = 1 [json_name = "amount"]; + * @return The amount. + */ + long getAmount(); + + /** + *
+     * The type of transaction payload.
+     * 
+ * + * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; + * @return The enum numeric value on the wire for payloadType. + */ + int getPayloadTypeValue(); + /** + *
+     * The type of transaction payload.
+     * 
+ * + * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; + * @return The payloadType. + */ + pactus.transaction.TransactionOuterClass.PayloadType getPayloadType(); + + /** + *
+     * Indicates if the amount should be fixed and include the fee.
+     * 
+ * + * bool fixed_amount = 3 [json_name = "fixedAmount"]; + * @return The fixedAmount. + */ + boolean getFixedAmount(); + } + /** + *
+   * Request message for calculating transaction fee.
+   * 
+ * + * Protobuf type {@code pactus.CalculateFeeRequest} + */ + public static final class CalculateFeeRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.CalculateFeeRequest) + CalculateFeeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CalculateFeeRequest.newBuilder() to construct. + private CalculateFeeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CalculateFeeRequest() { + payloadType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CalculateFeeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.CalculateFeeRequest.class, pactus.transaction.TransactionOuterClass.CalculateFeeRequest.Builder.class); + } + + public static final int AMOUNT_FIELD_NUMBER = 1; + private long amount_; + /** + *
+     * The amount involved in the transaction, specified in NanoPAC.
+     * 
+ * + * int64 amount = 1 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + + public static final int PAYLOAD_TYPE_FIELD_NUMBER = 2; + private int payloadType_; + /** + *
+     * The type of transaction payload.
+     * 
+ * + * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; + * @return The enum numeric value on the wire for payloadType. + */ + @java.lang.Override public int getPayloadTypeValue() { + return payloadType_; + } + /** + *
+     * The type of transaction payload.
+     * 
+ * + * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; + * @return The payloadType. + */ + @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { + @SuppressWarnings("deprecation") + pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); + return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; + } + + public static final int FIXED_AMOUNT_FIELD_NUMBER = 3; + private boolean fixedAmount_; + /** + *
+     * Indicates if the amount should be fixed and include the fee.
+     * 
+ * + * bool fixed_amount = 3 [json_name = "fixedAmount"]; + * @return The fixedAmount. + */ + @java.lang.Override + public boolean getFixedAmount() { + return fixedAmount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (amount_ != 0L) { + output.writeInt64(1, amount_); + } + if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { + output.writeEnum(2, payloadType_); + } + if (fixedAmount_ != false) { + output.writeBool(3, fixedAmount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (amount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, amount_); + } + if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, payloadType_); + } + if (fixedAmount_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, fixedAmount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.CalculateFeeRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.CalculateFeeRequest other = (pactus.transaction.TransactionOuterClass.CalculateFeeRequest) obj; + + if (getAmount() + != other.getAmount()) return false; + if (payloadType_ != other.payloadType_) return false; + if (getFixedAmount() + != other.getFixedAmount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAmount()); + hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + payloadType_; + hash = (37 * hash) + FIXED_AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFixedAmount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.CalculateFeeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for calculating transaction fee.
+     * 
+ * + * Protobuf type {@code pactus.CalculateFeeRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.CalculateFeeRequest) + pactus.transaction.TransactionOuterClass.CalculateFeeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.CalculateFeeRequest.class, pactus.transaction.TransactionOuterClass.CalculateFeeRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.CalculateFeeRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + amount_ = 0L; + + payloadType_ = 0; + + fixedAmount_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.CalculateFeeRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.CalculateFeeRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.CalculateFeeRequest build() { + pactus.transaction.TransactionOuterClass.CalculateFeeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.CalculateFeeRequest buildPartial() { + pactus.transaction.TransactionOuterClass.CalculateFeeRequest result = new pactus.transaction.TransactionOuterClass.CalculateFeeRequest(this); + result.amount_ = amount_; + result.payloadType_ = payloadType_; + result.fixedAmount_ = fixedAmount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.CalculateFeeRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.CalculateFeeRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.CalculateFeeRequest other) { + if (other == pactus.transaction.TransactionOuterClass.CalculateFeeRequest.getDefaultInstance()) return this; + if (other.getAmount() != 0L) { + setAmount(other.getAmount()); + } + if (other.payloadType_ != 0) { + setPayloadTypeValue(other.getPayloadTypeValue()); + } + if (other.getFixedAmount() != false) { + setFixedAmount(other.getFixedAmount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + amount_ = input.readInt64(); + + break; + } // case 8 + case 16: { + payloadType_ = input.readEnum(); + + break; + } // case 16 + case 24: { + fixedAmount_ = input.readBool(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private long amount_ ; + /** + *
+       * The amount involved in the transaction, specified in NanoPAC.
+       * 
+ * + * int64 amount = 1 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + /** + *
+       * The amount involved in the transaction, specified in NanoPAC.
+       * 
+ * + * int64 amount = 1 [json_name = "amount"]; + * @param value The amount to set. + * @return This builder for chaining. + */ + public Builder setAmount(long value) { + + amount_ = value; + onChanged(); + return this; + } + /** + *
+       * The amount involved in the transaction, specified in NanoPAC.
+       * 
+ * + * int64 amount = 1 [json_name = "amount"]; + * @return This builder for chaining. + */ + public Builder clearAmount() { + + amount_ = 0L; + onChanged(); + return this; + } + + private int payloadType_ = 0; + /** + *
+       * The type of transaction payload.
+       * 
+ * + * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; + * @return The enum numeric value on the wire for payloadType. + */ + @java.lang.Override public int getPayloadTypeValue() { + return payloadType_; + } + /** + *
+       * The type of transaction payload.
+       * 
+ * + * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; + * @param value The enum numeric value on the wire for payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadTypeValue(int value) { + + payloadType_ = value; + onChanged(); + return this; + } + /** + *
+       * The type of transaction payload.
+       * 
+ * + * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; + * @return The payloadType. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { + @SuppressWarnings("deprecation") + pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); + return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; + } + /** + *
+       * The type of transaction payload.
+       * 
+ * + * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; + * @param value The payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadType(pactus.transaction.TransactionOuterClass.PayloadType value) { + if (value == null) { + throw new NullPointerException(); + } + + payloadType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The type of transaction payload.
+       * 
+ * + * .pactus.PayloadType payload_type = 2 [json_name = "payloadType"]; + * @return This builder for chaining. + */ + public Builder clearPayloadType() { + + payloadType_ = 0; + onChanged(); + return this; + } + + private boolean fixedAmount_ ; + /** + *
+       * Indicates if the amount should be fixed and include the fee.
+       * 
+ * + * bool fixed_amount = 3 [json_name = "fixedAmount"]; + * @return The fixedAmount. + */ + @java.lang.Override + public boolean getFixedAmount() { + return fixedAmount_; + } + /** + *
+       * Indicates if the amount should be fixed and include the fee.
+       * 
+ * + * bool fixed_amount = 3 [json_name = "fixedAmount"]; + * @param value The fixedAmount to set. + * @return This builder for chaining. + */ + public Builder setFixedAmount(boolean value) { + + fixedAmount_ = value; + onChanged(); + return this; + } + /** + *
+       * Indicates if the amount should be fixed and include the fee.
+       * 
+ * + * bool fixed_amount = 3 [json_name = "fixedAmount"]; + * @return This builder for chaining. + */ + public Builder clearFixedAmount() { + + fixedAmount_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.CalculateFeeRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.CalculateFeeRequest) + private static final pactus.transaction.TransactionOuterClass.CalculateFeeRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.CalculateFeeRequest(); + } + + public static pactus.transaction.TransactionOuterClass.CalculateFeeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CalculateFeeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.CalculateFeeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CalculateFeeResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.CalculateFeeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The calculated amount in NanoPAC.
+     * 
+ * + * int64 amount = 1 [json_name = "amount"]; + * @return The amount. + */ + long getAmount(); + + /** + *
+     * The calculated transaction fee in NanoPAC.
+     * 
+ * + * int64 fee = 2 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); + } + /** + *
+   * Response message containing the calculated transaction fee.
+   * 
+ * + * Protobuf type {@code pactus.CalculateFeeResponse} + */ + public static final class CalculateFeeResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.CalculateFeeResponse) + CalculateFeeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CalculateFeeResponse.newBuilder() to construct. + private CalculateFeeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CalculateFeeResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CalculateFeeResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.CalculateFeeResponse.class, pactus.transaction.TransactionOuterClass.CalculateFeeResponse.Builder.class); + } + + public static final int AMOUNT_FIELD_NUMBER = 1; + private long amount_; + /** + *
+     * The calculated amount in NanoPAC.
+     * 
+ * + * int64 amount = 1 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + + public static final int FEE_FIELD_NUMBER = 2; + private long fee_; + /** + *
+     * The calculated transaction fee in NanoPAC.
+     * 
+ * + * int64 fee = 2 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (amount_ != 0L) { + output.writeInt64(1, amount_); + } + if (fee_ != 0L) { + output.writeInt64(2, fee_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (amount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, amount_); + } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, fee_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.CalculateFeeResponse)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.CalculateFeeResponse other = (pactus.transaction.TransactionOuterClass.CalculateFeeResponse) obj; + + if (getAmount() + != other.getAmount()) return false; + if (getFee() + != other.getFee()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAmount()); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.CalculateFeeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the calculated transaction fee.
+     * 
+ * + * Protobuf type {@code pactus.CalculateFeeResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.CalculateFeeResponse) + pactus.transaction.TransactionOuterClass.CalculateFeeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.CalculateFeeResponse.class, pactus.transaction.TransactionOuterClass.CalculateFeeResponse.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.CalculateFeeResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + amount_ = 0L; + + fee_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_CalculateFeeResponse_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.CalculateFeeResponse getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.CalculateFeeResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.CalculateFeeResponse build() { + pactus.transaction.TransactionOuterClass.CalculateFeeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.CalculateFeeResponse buildPartial() { + pactus.transaction.TransactionOuterClass.CalculateFeeResponse result = new pactus.transaction.TransactionOuterClass.CalculateFeeResponse(this); + result.amount_ = amount_; + result.fee_ = fee_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.CalculateFeeResponse) { + return mergeFrom((pactus.transaction.TransactionOuterClass.CalculateFeeResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.CalculateFeeResponse other) { + if (other == pactus.transaction.TransactionOuterClass.CalculateFeeResponse.getDefaultInstance()) return this; + if (other.getAmount() != 0L) { + setAmount(other.getAmount()); + } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + amount_ = input.readInt64(); + + break; + } // case 8 + case 16: { + fee_ = input.readInt64(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private long amount_ ; + /** + *
+       * The calculated amount in NanoPAC.
+       * 
+ * + * int64 amount = 1 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + /** + *
+       * The calculated amount in NanoPAC.
+       * 
+ * + * int64 amount = 1 [json_name = "amount"]; + * @param value The amount to set. + * @return This builder for chaining. + */ + public Builder setAmount(long value) { + + amount_ = value; + onChanged(); + return this; + } + /** + *
+       * The calculated amount in NanoPAC.
+       * 
+ * + * int64 amount = 1 [json_name = "amount"]; + * @return This builder for chaining. + */ + public Builder clearAmount() { + + amount_ = 0L; + onChanged(); + return this; + } + + private long fee_ ; + /** + *
+       * The calculated transaction fee in NanoPAC.
+       * 
+ * + * int64 fee = 2 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
+       * The calculated transaction fee in NanoPAC.
+       * 
+ * + * int64 fee = 2 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
+       * The calculated transaction fee in NanoPAC.
+       * 
+ * + * int64 fee = 2 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.CalculateFeeResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.CalculateFeeResponse) + private static final pactus.transaction.TransactionOuterClass.CalculateFeeResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.CalculateFeeResponse(); + } + + public static pactus.transaction.TransactionOuterClass.CalculateFeeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CalculateFeeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.CalculateFeeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BroadcastTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.BroadcastTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The signed raw transaction data to be broadcasted.
+     * 
+ * + * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; + * @return The signedRawTransaction. + */ + java.lang.String getSignedRawTransaction(); + /** + *
+     * The signed raw transaction data to be broadcasted.
+     * 
+ * + * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; + * @return The bytes for signedRawTransaction. + */ + com.google.protobuf.ByteString + getSignedRawTransactionBytes(); + } + /** + *
+   * Request message for broadcasting a signed transaction.
+   * 
+ * + * Protobuf type {@code pactus.BroadcastTransactionRequest} + */ + public static final class BroadcastTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.BroadcastTransactionRequest) + BroadcastTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BroadcastTransactionRequest.newBuilder() to construct. + private BroadcastTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BroadcastTransactionRequest() { + signedRawTransaction_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BroadcastTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.class, pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.Builder.class); + } + + public static final int SIGNED_RAW_TRANSACTION_FIELD_NUMBER = 1; + private volatile java.lang.Object signedRawTransaction_; + /** + *
+     * The signed raw transaction data to be broadcasted.
+     * 
+ * + * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; + * @return The signedRawTransaction. + */ + @java.lang.Override + public java.lang.String getSignedRawTransaction() { + java.lang.Object ref = signedRawTransaction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedRawTransaction_ = s; + return s; + } + } + /** + *
+     * The signed raw transaction data to be broadcasted.
+     * 
+ * + * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; + * @return The bytes for signedRawTransaction. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignedRawTransactionBytes() { + java.lang.Object ref = signedRawTransaction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signedRawTransaction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRawTransaction_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signedRawTransaction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRawTransaction_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signedRawTransaction_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest other = (pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest) obj; + + if (!getSignedRawTransaction() + .equals(other.getSignedRawTransaction())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIGNED_RAW_TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getSignedRawTransaction().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for broadcasting a signed transaction.
+     * 
+ * + * Protobuf type {@code pactus.BroadcastTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.BroadcastTransactionRequest) + pactus.transaction.TransactionOuterClass.BroadcastTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.class, pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + signedRawTransaction_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest build() { + pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest result = new pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest(this); + result.signedRawTransaction_ = signedRawTransaction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest.getDefaultInstance()) return this; + if (!other.getSignedRawTransaction().isEmpty()) { + signedRawTransaction_ = other.signedRawTransaction_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + signedRawTransaction_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object signedRawTransaction_ = ""; + /** + *
+       * The signed raw transaction data to be broadcasted.
+       * 
+ * + * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; + * @return The signedRawTransaction. + */ + public java.lang.String getSignedRawTransaction() { + java.lang.Object ref = signedRawTransaction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedRawTransaction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The signed raw transaction data to be broadcasted.
+       * 
+ * + * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; + * @return The bytes for signedRawTransaction. + */ + public com.google.protobuf.ByteString + getSignedRawTransactionBytes() { + java.lang.Object ref = signedRawTransaction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signedRawTransaction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The signed raw transaction data to be broadcasted.
+       * 
+ * + * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; + * @param value The signedRawTransaction to set. + * @return This builder for chaining. + */ + public Builder setSignedRawTransaction( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + signedRawTransaction_ = value; + onChanged(); + return this; + } + /** + *
+       * The signed raw transaction data to be broadcasted.
+       * 
+ * + * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; + * @return This builder for chaining. + */ + public Builder clearSignedRawTransaction() { + + signedRawTransaction_ = getDefaultInstance().getSignedRawTransaction(); + onChanged(); + return this; + } + /** + *
+       * The signed raw transaction data to be broadcasted.
+       * 
+ * + * string signed_raw_transaction = 1 [json_name = "signedRawTransaction"]; + * @param value The bytes for signedRawTransaction to set. + * @return This builder for chaining. + */ + public Builder setSignedRawTransactionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + signedRawTransaction_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.BroadcastTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.BroadcastTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BroadcastTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.BroadcastTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BroadcastTransactionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.BroadcastTransactionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The unique ID of the broadcasted transaction.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+     * The unique ID of the broadcasted transaction.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + } + /** + *
+   * Response message containing the ID of the broadcasted transaction.
+   * 
+ * + * Protobuf type {@code pactus.BroadcastTransactionResponse} + */ + public static final class BroadcastTransactionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.BroadcastTransactionResponse) + BroadcastTransactionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BroadcastTransactionResponse.newBuilder() to construct. + private BroadcastTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BroadcastTransactionResponse() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BroadcastTransactionResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.class, pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + *
+     * The unique ID of the broadcasted transaction.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+     * The unique ID of the broadcasted transaction.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse other = (pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the ID of the broadcasted transaction.
+     * 
+ * + * Protobuf type {@code pactus.BroadcastTransactionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.BroadcastTransactionResponse) + pactus.transaction.TransactionOuterClass.BroadcastTransactionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.class, pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BroadcastTransactionResponse_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse build() { + pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse buildPartial() { + pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse result = new pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse(this); + result.id_ = id_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse) { + return mergeFrom((pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse other) { + if (other == pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+       * The unique ID of the broadcasted transaction.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The unique ID of the broadcasted transaction.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The unique ID of the broadcasted transaction.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + *
+       * The unique ID of the broadcasted transaction.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + *
+       * The unique ID of the broadcasted transaction.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.BroadcastTransactionResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.BroadcastTransactionResponse) + private static final pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse(); + } + + public static pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BroadcastTransactionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.BroadcastTransactionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetRawTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetRawTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The lock time for the transaction. If not set, defaults to the last block
+     * height.
+     * 
+ * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + int getLockTime(); + + /** + *
+     * A memo string for the transaction.
+     * 
+ * + * string memo = 2 [json_name = "memo"]; + * @return The memo. + */ + java.lang.String getMemo(); + /** + *
+     * A memo string for the transaction.
+     * 
+ * + * string memo = 2 [json_name = "memo"]; + * @return The bytes for memo. + */ + com.google.protobuf.ByteString + getMemoBytes(); + + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * @return Whether the transfer field is set. + */ + boolean hasTransfer(); + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * @return The transfer. + */ + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getTransfer(); + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + */ + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder getTransferOrBuilder(); + + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * @return Whether the bond field is set. + */ + boolean hasBond(); + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * @return The bond. + */ + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getBond(); + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + */ + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder getBondOrBuilder(); + + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * @return Whether the unbond field is set. + */ + boolean hasUnbond(); + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * @return The unbond. + */ + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getUnbond(); + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + */ + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder getUnbondOrBuilder(); + + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * @return Whether the withdraw field is set. + */ + boolean hasWithdraw(); + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * @return The withdraw. + */ + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getWithdraw(); + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + */ + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder getWithdrawOrBuilder(); + + public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.TransactionCase getTransactionCase(); + } + /** + *
+   * Request message for retrieving raw details of transaction.
+   * 
+ * + * Protobuf type {@code pactus.GetRawTransactionRequest} + */ + public static final class GetRawTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetRawTransactionRequest) + GetRawTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRawTransactionRequest.newBuilder() to construct. + private GetRawTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRawTransactionRequest() { + memo_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRawTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.Builder.class); + } + + private int transactionCase_ = 0; + private java.lang.Object transaction_; + public enum TransactionCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TRANSFER(3), + BOND(4), + UNBOND(5), + WITHDRAW(6), + TRANSACTION_NOT_SET(0); + private final int value; + private TransactionCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TransactionCase valueOf(int value) { + return forNumber(value); + } + + public static TransactionCase forNumber(int value) { + switch (value) { + case 3: return TRANSFER; + case 4: return BOND; + case 5: return UNBOND; + case 6: return WITHDRAW; + case 0: return TRANSACTION_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TransactionCase + getTransactionCase() { + return TransactionCase.forNumber( + transactionCase_); + } + + public static final int LOCK_TIME_FIELD_NUMBER = 1; + private int lockTime_; + /** + *
+     * The lock time for the transaction. If not set, defaults to the last block
+     * height.
+     * 
+ * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + + public static final int MEMO_FIELD_NUMBER = 2; + private volatile java.lang.Object memo_; + /** + *
+     * A memo string for the transaction.
+     * 
+ * + * string memo = 2 [json_name = "memo"]; + * @return The memo. + */ + @java.lang.Override + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } + } + /** + *
+     * A memo string for the transaction.
+     * 
+ * + * string memo = 2 [json_name = "memo"]; + * @return The bytes for memo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSFER_FIELD_NUMBER = 3; + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * @return Whether the transfer field is set. + */ + @java.lang.Override + public boolean hasTransfer() { + return transactionCase_ == 3; + } + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * @return The transfer. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getTransfer() { + if (transactionCase_ == 3) { + return (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + } + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder getTransferOrBuilder() { + if (transactionCase_ == 3) { + return (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + } + + public static final int BOND_FIELD_NUMBER = 4; + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * @return Whether the bond field is set. + */ + @java.lang.Override + public boolean hasBond() { + return transactionCase_ == 4; + } + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * @return The bond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getBond() { + if (transactionCase_ == 4) { + return (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + } + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder getBondOrBuilder() { + if (transactionCase_ == 4) { + return (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + } + + public static final int UNBOND_FIELD_NUMBER = 5; + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * @return Whether the unbond field is set. + */ + @java.lang.Override + public boolean hasUnbond() { + return transactionCase_ == 5; + } + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * @return The unbond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getUnbond() { + if (transactionCase_ == 5) { + return (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + } + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder getUnbondOrBuilder() { + if (transactionCase_ == 5) { + return (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + } + + public static final int WITHDRAW_FIELD_NUMBER = 6; + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * @return Whether the withdraw field is set. + */ + @java.lang.Override + public boolean hasWithdraw() { + return transactionCase_ == 6; + } + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * @return The withdraw. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getWithdraw() { + if (transactionCase_ == 6) { + return (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + } + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder getWithdrawOrBuilder() { + if (transactionCase_ == 6) { + return (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (lockTime_ != 0) { + output.writeUInt32(1, lockTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, memo_); + } + if (transactionCase_ == 3) { + output.writeMessage(3, (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_); + } + if (transactionCase_ == 4) { + output.writeMessage(4, (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_); + } + if (transactionCase_ == 5) { + output.writeMessage(5, (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_); + } + if (transactionCase_ == 6) { + output.writeMessage(6, (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lockTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, lockTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, memo_); + } + if (transactionCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_); + } + if (transactionCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_); + } + if (transactionCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_); + } + if (transactionCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetRawTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawTransactionRequest) obj; + + if (getLockTime() + != other.getLockTime()) return false; + if (!getMemo() + .equals(other.getMemo())) return false; + if (!getTransactionCase().equals(other.getTransactionCase())) return false; + switch (transactionCase_) { + case 3: + if (!getTransfer() + .equals(other.getTransfer())) return false; + break; + case 4: + if (!getBond() + .equals(other.getBond())) return false; + break; + case 5: + if (!getUnbond() + .equals(other.getUnbond())) return false; + break; + case 6: + if (!getWithdraw() + .equals(other.getWithdraw())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLockTime(); + hash = (37 * hash) + MEMO_FIELD_NUMBER; + hash = (53 * hash) + getMemo().hashCode(); + switch (transactionCase_) { + case 3: + hash = (37 * hash) + TRANSFER_FIELD_NUMBER; + hash = (53 * hash) + getTransfer().hashCode(); + break; + case 4: + hash = (37 * hash) + BOND_FIELD_NUMBER; + hash = (53 * hash) + getBond().hashCode(); + break; + case 5: + hash = (37 * hash) + UNBOND_FIELD_NUMBER; + hash = (53 * hash) + getUnbond().hashCode(); + break; + case 6: + hash = (37 * hash) + WITHDRAW_FIELD_NUMBER; + hash = (53 * hash) + getWithdraw().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for retrieving raw details of transaction.
+     * 
+ * + * Protobuf type {@code pactus.GetRawTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetRawTransactionRequest) + pactus.transaction.TransactionOuterClass.GetRawTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + lockTime_ = 0; + + memo_ = ""; + + if (transferBuilder_ != null) { + transferBuilder_.clear(); + } + if (bondBuilder_ != null) { + bondBuilder_.clear(); + } + if (unbondBuilder_ != null) { + unbondBuilder_.clear(); + } + if (withdrawBuilder_ != null) { + withdrawBuilder_.clear(); + } + transactionCase_ = 0; + transaction_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest build() { + pactus.transaction.TransactionOuterClass.GetRawTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.GetRawTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawTransactionRequest(this); + result.lockTime_ = lockTime_; + result.memo_ = memo_; + if (transactionCase_ == 3) { + if (transferBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = transferBuilder_.build(); + } + } + if (transactionCase_ == 4) { + if (bondBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = bondBuilder_.build(); + } + } + if (transactionCase_ == 5) { + if (unbondBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = unbondBuilder_.build(); + } + } + if (transactionCase_ == 6) { + if (withdrawBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = withdrawBuilder_.build(); + } + } + result.transactionCase_ = transactionCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetRawTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.getDefaultInstance()) return this; + if (other.getLockTime() != 0) { + setLockTime(other.getLockTime()); + } + if (!other.getMemo().isEmpty()) { + memo_ = other.memo_; + onChanged(); + } + switch (other.getTransactionCase()) { + case TRANSFER: { + mergeTransfer(other.getTransfer()); + break; + } + case BOND: { + mergeBond(other.getBond()); + break; + } + case UNBOND: { + mergeUnbond(other.getUnbond()); + break; + } + case WITHDRAW: { + mergeWithdraw(other.getWithdraw()); + break; + } + case TRANSACTION_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + lockTime_ = input.readUInt32(); + + break; + } // case 8 + case 18: { + memo_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + input.readMessage( + getTransferFieldBuilder().getBuilder(), + extensionRegistry); + transactionCase_ = 3; + break; + } // case 26 + case 34: { + input.readMessage( + getBondFieldBuilder().getBuilder(), + extensionRegistry); + transactionCase_ = 4; + break; + } // case 34 + case 42: { + input.readMessage( + getUnbondFieldBuilder().getBuilder(), + extensionRegistry); + transactionCase_ = 5; + break; + } // case 42 + case 50: { + input.readMessage( + getWithdrawFieldBuilder().getBuilder(), + extensionRegistry); + transactionCase_ = 6; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int transactionCase_ = 0; + private java.lang.Object transaction_; + public TransactionCase + getTransactionCase() { + return TransactionCase.forNumber( + transactionCase_); + } + + public Builder clearTransaction() { + transactionCase_ = 0; + transaction_ = null; + onChanged(); + return this; + } + + + private int lockTime_ ; + /** + *
+       * The lock time for the transaction. If not set, defaults to the last block
+       * height.
+       * 
+ * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + /** + *
+       * The lock time for the transaction. If not set, defaults to the last block
+       * height.
+       * 
+ * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @param value The lockTime to set. + * @return This builder for chaining. + */ + public Builder setLockTime(int value) { + + lockTime_ = value; + onChanged(); + return this; + } + /** + *
+       * The lock time for the transaction. If not set, defaults to the last block
+       * height.
+       * 
+ * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return This builder for chaining. + */ + public Builder clearLockTime() { + + lockTime_ = 0; + onChanged(); + return this; + } + + private java.lang.Object memo_ = ""; + /** + *
+       * A memo string for the transaction.
+       * 
+ * + * string memo = 2 [json_name = "memo"]; + * @return The memo. + */ + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A memo string for the transaction.
+       * 
+ * + * string memo = 2 [json_name = "memo"]; + * @return The bytes for memo. + */ + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A memo string for the transaction.
+       * 
+ * + * string memo = 2 [json_name = "memo"]; + * @param value The memo to set. + * @return This builder for chaining. + */ + public Builder setMemo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memo_ = value; + onChanged(); + return this; + } + /** + *
+       * A memo string for the transaction.
+       * 
+ * + * string memo = 2 [json_name = "memo"]; + * @return This builder for chaining. + */ + public Builder clearMemo() { + + memo_ = getDefaultInstance().getMemo(); + onChanged(); + return this; + } + /** + *
+       * A memo string for the transaction.
+       * 
+ * + * string memo = 2 [json_name = "memo"]; + * @param value The bytes for memo to set. + * @return This builder for chaining. + */ + public Builder setMemoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memo_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder> transferBuilder_; + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * @return Whether the transfer field is set. + */ + @java.lang.Override + public boolean hasTransfer() { + return transactionCase_ == 3; + } + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * @return The transfer. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getTransfer() { + if (transferBuilder_ == null) { + if (transactionCase_ == 3) { + return (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + } else { + if (transactionCase_ == 3) { + return transferBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + } + } + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + */ + public Builder setTransfer(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest value) { + if (transferBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + transferBuilder_.setMessage(value); + } + transactionCase_ = 3; + return this; + } + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + */ + public Builder setTransfer( + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder builderForValue) { + if (transferBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + transferBuilder_.setMessage(builderForValue.build()); + } + transactionCase_ = 3; + return this; + } + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + */ + public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest value) { + if (transferBuilder_ == null) { + if (transactionCase_ == 3 && + transaction_ != pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance()) { + transaction_ = pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.newBuilder((pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_) + .mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + if (transactionCase_ == 3) { + transferBuilder_.mergeFrom(value); + } else { + transferBuilder_.setMessage(value); + } + } + transactionCase_ = 3; + return this; + } + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + */ + public Builder clearTransfer() { + if (transferBuilder_ == null) { + if (transactionCase_ == 3) { + transactionCase_ = 0; + transaction_ = null; + onChanged(); + } + } else { + if (transactionCase_ == 3) { + transactionCase_ = 0; + transaction_ = null; + } + transferBuilder_.clear(); + } + return this; + } + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + */ + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder getTransferBuilder() { + return getTransferFieldBuilder().getBuilder(); + } + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder getTransferOrBuilder() { + if ((transactionCase_ == 3) && (transferBuilder_ != null)) { + return transferBuilder_.getMessageOrBuilder(); + } else { + if (transactionCase_ == 3) { + return (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + } + } + /** + * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder> + getTransferFieldBuilder() { + if (transferBuilder_ == null) { + if (!(transactionCase_ == 3)) { + transaction_ = pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + } + transferBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder>( + (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_, + getParentForChildren(), + isClean()); + transaction_ = null; + } + transactionCase_ = 3; + onChanged();; + return transferBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder> bondBuilder_; + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * @return Whether the bond field is set. + */ + @java.lang.Override + public boolean hasBond() { + return transactionCase_ == 4; + } + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * @return The bond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getBond() { + if (bondBuilder_ == null) { + if (transactionCase_ == 4) { + return (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + } else { + if (transactionCase_ == 4) { + return bondBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + } + } + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + */ + public Builder setBond(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest value) { + if (bondBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + bondBuilder_.setMessage(value); + } + transactionCase_ = 4; + return this; + } + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + */ + public Builder setBond( + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder builderForValue) { + if (bondBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + bondBuilder_.setMessage(builderForValue.build()); + } + transactionCase_ = 4; + return this; + } + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + */ + public Builder mergeBond(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest value) { + if (bondBuilder_ == null) { + if (transactionCase_ == 4 && + transaction_ != pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance()) { + transaction_ = pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.newBuilder((pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_) + .mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + if (transactionCase_ == 4) { + bondBuilder_.mergeFrom(value); + } else { + bondBuilder_.setMessage(value); + } + } + transactionCase_ = 4; + return this; + } + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + */ + public Builder clearBond() { + if (bondBuilder_ == null) { + if (transactionCase_ == 4) { + transactionCase_ = 0; + transaction_ = null; + onChanged(); + } + } else { + if (transactionCase_ == 4) { + transactionCase_ = 0; + transaction_ = null; + } + bondBuilder_.clear(); + } + return this; + } + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + */ + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder getBondBuilder() { + return getBondFieldBuilder().getBuilder(); + } + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder getBondOrBuilder() { + if ((transactionCase_ == 4) && (bondBuilder_ != null)) { + return bondBuilder_.getMessageOrBuilder(); + } else { + if (transactionCase_ == 4) { + return (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + } + } + /** + * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder> + getBondFieldBuilder() { + if (bondBuilder_ == null) { + if (!(transactionCase_ == 4)) { + transaction_ = pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + } + bondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder>( + (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_, + getParentForChildren(), + isClean()); + transaction_ = null; + } + transactionCase_ = 4; + onChanged();; + return bondBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder> unbondBuilder_; + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * @return Whether the unbond field is set. + */ + @java.lang.Override + public boolean hasUnbond() { + return transactionCase_ == 5; + } + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * @return The unbond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getUnbond() { + if (unbondBuilder_ == null) { + if (transactionCase_ == 5) { + return (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + } else { + if (transactionCase_ == 5) { + return unbondBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + } + } + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + */ + public Builder setUnbond(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest value) { + if (unbondBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + unbondBuilder_.setMessage(value); + } + transactionCase_ = 5; + return this; + } + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + */ + public Builder setUnbond( + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder builderForValue) { + if (unbondBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + unbondBuilder_.setMessage(builderForValue.build()); + } + transactionCase_ = 5; + return this; + } + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + */ + public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest value) { + if (unbondBuilder_ == null) { + if (transactionCase_ == 5 && + transaction_ != pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance()) { + transaction_ = pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.newBuilder((pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_) + .mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + if (transactionCase_ == 5) { + unbondBuilder_.mergeFrom(value); + } else { + unbondBuilder_.setMessage(value); + } + } + transactionCase_ = 5; + return this; + } + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + */ + public Builder clearUnbond() { + if (unbondBuilder_ == null) { + if (transactionCase_ == 5) { + transactionCase_ = 0; + transaction_ = null; + onChanged(); + } + } else { + if (transactionCase_ == 5) { + transactionCase_ = 0; + transaction_ = null; + } + unbondBuilder_.clear(); + } + return this; + } + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + */ + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder getUnbondBuilder() { + return getUnbondFieldBuilder().getBuilder(); + } + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder getUnbondOrBuilder() { + if ((transactionCase_ == 5) && (unbondBuilder_ != null)) { + return unbondBuilder_.getMessageOrBuilder(); + } else { + if (transactionCase_ == 5) { + return (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + } + } + /** + * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder> + getUnbondFieldBuilder() { + if (unbondBuilder_ == null) { + if (!(transactionCase_ == 5)) { + transaction_ = pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + } + unbondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder>( + (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_, + getParentForChildren(), + isClean()); + transaction_ = null; + } + transactionCase_ = 5; + onChanged();; + return unbondBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder> withdrawBuilder_; + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * @return Whether the withdraw field is set. + */ + @java.lang.Override + public boolean hasWithdraw() { + return transactionCase_ == 6; + } + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * @return The withdraw. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getWithdraw() { + if (withdrawBuilder_ == null) { + if (transactionCase_ == 6) { + return (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + } else { + if (transactionCase_ == 6) { + return withdrawBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + } + } + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + */ + public Builder setWithdraw(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest value) { + if (withdrawBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + withdrawBuilder_.setMessage(value); + } + transactionCase_ = 6; + return this; + } + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + */ + public Builder setWithdraw( + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder builderForValue) { + if (withdrawBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + withdrawBuilder_.setMessage(builderForValue.build()); + } + transactionCase_ = 6; + return this; + } + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + */ + public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest value) { + if (withdrawBuilder_ == null) { + if (transactionCase_ == 6 && + transaction_ != pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance()) { + transaction_ = pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.newBuilder((pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_) + .mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + if (transactionCase_ == 6) { + withdrawBuilder_.mergeFrom(value); + } else { + withdrawBuilder_.setMessage(value); + } + } + transactionCase_ = 6; + return this; + } + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + */ + public Builder clearWithdraw() { + if (withdrawBuilder_ == null) { + if (transactionCase_ == 6) { + transactionCase_ = 0; + transaction_ = null; + onChanged(); + } + } else { + if (transactionCase_ == 6) { + transactionCase_ = 0; + transaction_ = null; + } + withdrawBuilder_.clear(); + } + return this; + } + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + */ + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder getWithdrawBuilder() { + return getWithdrawFieldBuilder().getBuilder(); + } + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder getWithdrawOrBuilder() { + if ((transactionCase_ == 6) && (withdrawBuilder_ != null)) { + return withdrawBuilder_.getMessageOrBuilder(); + } else { + if (transactionCase_ == 6) { + return (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_; + } + return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + } + } + /** + * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder> + getWithdrawFieldBuilder() { + if (withdrawBuilder_ == null) { + if (!(transactionCase_ == 6)) { + transaction_ = pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + } + withdrawBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder>( + (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_, + getParentForChildren(), + isClean()); + transaction_ = null; + } + transactionCase_ = 6; + onChanged();; + return withdrawBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetRawTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetRawTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.GetRawTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.GetRawTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRawTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetRawTransferTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetRawTransferTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The sender's account address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + java.lang.String getSender(); + /** + *
+     * The sender's account address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + com.google.protobuf.ByteString + getSenderBytes(); + + /** + *
+     * The receiver's account address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + java.lang.String getReceiver(); + /** + *
+     * The receiver's account address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + com.google.protobuf.ByteString + getReceiverBytes(); + + /** + *
+     * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
+     * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + long getAmount(); + + /** + *
+     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+     * 
+ * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); + } + /** + *
+   * Request message for retrieving raw details of a transfer transaction.
+   * 
+ * + * Protobuf type {@code pactus.GetRawTransferTransactionRequest} + */ + public static final class GetRawTransferTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetRawTransferTransactionRequest) + GetRawTransferTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRawTransferTransactionRequest.newBuilder() to construct. + private GetRawTransferTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRawTransferTransactionRequest() { + sender_ = ""; + receiver_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRawTransferTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder.class); + } + + public static final int SENDER_FIELD_NUMBER = 1; + private volatile java.lang.Object sender_; + /** + *
+     * The sender's account address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + @java.lang.Override + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } + } + /** + *
+     * The sender's account address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECEIVER_FIELD_NUMBER = 2; + private volatile java.lang.Object receiver_; + /** + *
+     * The receiver's account address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + @java.lang.Override + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } + } + /** + *
+     * The receiver's account address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AMOUNT_FIELD_NUMBER = 3; + private long amount_; + /** + *
+     * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
+     * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + + public static final int FEE_FIELD_NUMBER = 4; + private long fee_; + /** + *
+     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+     * 
+ * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_); + } + if (amount_ != 0L) { + output.writeInt64(3, amount_); + } + if (fee_ != 0L) { + output.writeInt64(4, fee_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_); + } + if (amount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, amount_); + } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, fee_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) obj; + + if (!getSender() + .equals(other.getSender())) return false; + if (!getReceiver() + .equals(other.getReceiver())) return false; + if (getAmount() + != other.getAmount()) return false; + if (getFee() + != other.getFee()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SENDER_FIELD_NUMBER; + hash = (53 * hash) + getSender().hashCode(); + hash = (37 * hash) + RECEIVER_FIELD_NUMBER; + hash = (53 * hash) + getReceiver().hashCode(); + hash = (37 * hash) + AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAmount()); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for retrieving raw details of a transfer transaction.
+     * 
+ * + * Protobuf type {@code pactus.GetRawTransferTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetRawTransferTransactionRequest) + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + sender_ = ""; + + receiver_ = ""; + + amount_ = 0L; + + fee_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest build() { + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest(this); + result.sender_ = sender_; + result.receiver_ = receiver_; + result.amount_ = amount_; + result.fee_ = fee_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance()) return this; + if (!other.getSender().isEmpty()) { + sender_ = other.sender_; + onChanged(); + } + if (!other.getReceiver().isEmpty()) { + receiver_ = other.receiver_; + onChanged(); + } + if (other.getAmount() != 0L) { + setAmount(other.getAmount()); + } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + sender_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + receiver_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + amount_ = input.readInt64(); + + break; + } // case 24 + case 32: { + fee_ = input.readInt64(); + + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object sender_ = ""; + /** + *
+       * The sender's account address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The sender's account address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The sender's account address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @param value The sender to set. + * @return This builder for chaining. + */ + public Builder setSender( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sender_ = value; + onChanged(); + return this; + } + /** + *
+       * The sender's account address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return This builder for chaining. + */ + public Builder clearSender() { + + sender_ = getDefaultInstance().getSender(); + onChanged(); + return this; + } + /** + *
+       * The sender's account address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @param value The bytes for sender to set. + * @return This builder for chaining. + */ + public Builder setSenderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sender_ = value; + onChanged(); + return this; + } + + private java.lang.Object receiver_ = ""; + /** + *
+       * The receiver's account address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The receiver's account address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The receiver's account address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @param value The receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiver( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + receiver_ = value; + onChanged(); + return this; + } + /** + *
+       * The receiver's account address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return This builder for chaining. + */ + public Builder clearReceiver() { + + receiver_ = getDefaultInstance().getReceiver(); + onChanged(); + return this; + } + /** + *
+       * The receiver's account address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @param value The bytes for receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiverBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + receiver_ = value; + onChanged(); + return this; + } + + private long amount_ ; + /** + *
+       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + /** + *
+       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @param value The amount to set. + * @return This builder for chaining. + */ + public Builder setAmount(long value) { + + amount_ = value; + onChanged(); + return this; + } + /** + *
+       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return This builder for chaining. + */ + public Builder clearAmount() { + + amount_ = 0L; + onChanged(); + return this; + } + + private long fee_ ; + /** + *
+       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+       * 
+ * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
+       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+       * 
+ * + * int64 fee = 4 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
+       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+       * 
+ * + * int64 fee = 4 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetRawTransferTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetRawTransferTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRawTransferTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetRawBondTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetRawBondTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The sender's account address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + java.lang.String getSender(); + /** + *
+     * The sender's account address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + com.google.protobuf.ByteString + getSenderBytes(); + + /** + *
+     * The receiver's validator address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + java.lang.String getReceiver(); + /** + *
+     * The receiver's validator address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + com.google.protobuf.ByteString + getReceiverBytes(); + + /** + *
+     * The stake amount in NanoPAC. Must be greater than 0.
+     * 
+ * + * int64 stake = 3 [json_name = "stake"]; + * @return The stake. + */ + long getStake(); + + /** + *
+     * The public key of the validator.
+     * 
+ * + * string public_key = 4 [json_name = "publicKey"]; + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + *
+     * The public key of the validator.
+     * 
+ * + * string public_key = 4 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString + getPublicKeyBytes(); + + /** + *
+     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+     * 
+ * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); + } + /** + *
+   * Request message for retrieving raw details of a bond transaction.
+   * 
+ * + * Protobuf type {@code pactus.GetRawBondTransactionRequest} + */ + public static final class GetRawBondTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetRawBondTransactionRequest) + GetRawBondTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRawBondTransactionRequest.newBuilder() to construct. + private GetRawBondTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRawBondTransactionRequest() { + sender_ = ""; + receiver_ = ""; + publicKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRawBondTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder.class); + } + + public static final int SENDER_FIELD_NUMBER = 1; + private volatile java.lang.Object sender_; + /** + *
+     * The sender's account address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + @java.lang.Override + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } + } + /** + *
+     * The sender's account address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECEIVER_FIELD_NUMBER = 2; + private volatile java.lang.Object receiver_; + /** + *
+     * The receiver's validator address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + @java.lang.Override + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } + } + /** + *
+     * The receiver's validator address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STAKE_FIELD_NUMBER = 3; + private long stake_; + /** + *
+     * The stake amount in NanoPAC. Must be greater than 0.
+     * 
+ * + * int64 stake = 3 [json_name = "stake"]; + * @return The stake. + */ + @java.lang.Override + public long getStake() { + return stake_; + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 4; + private volatile java.lang.Object publicKey_; + /** + *
+     * The public key of the validator.
+     * 
+ * + * string public_key = 4 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + *
+     * The public key of the validator.
+     * 
+ * + * string public_key = 4 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEE_FIELD_NUMBER = 5; + private long fee_; + /** + *
+     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+     * 
+ * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_); + } + if (stake_ != 0L) { + output.writeInt64(3, stake_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, publicKey_); + } + if (fee_ != 0L) { + output.writeInt64(5, fee_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_); + } + if (stake_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, stake_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, publicKey_); + } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, fee_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) obj; + + if (!getSender() + .equals(other.getSender())) return false; + if (!getReceiver() + .equals(other.getReceiver())) return false; + if (getStake() + != other.getStake()) return false; + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (getFee() + != other.getFee()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SENDER_FIELD_NUMBER; + hash = (53 * hash) + getSender().hashCode(); + hash = (37 * hash) + RECEIVER_FIELD_NUMBER; + hash = (53 * hash) + getReceiver().hashCode(); + hash = (37 * hash) + STAKE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStake()); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for retrieving raw details of a bond transaction.
+     * 
+ * + * Protobuf type {@code pactus.GetRawBondTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetRawBondTransactionRequest) + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + sender_ = ""; + + receiver_ = ""; + + stake_ = 0L; + + publicKey_ = ""; + + fee_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest build() { + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest(this); + result.sender_ = sender_; + result.receiver_ = receiver_; + result.stake_ = stake_; + result.publicKey_ = publicKey_; + result.fee_ = fee_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance()) return this; + if (!other.getSender().isEmpty()) { + sender_ = other.sender_; + onChanged(); + } + if (!other.getReceiver().isEmpty()) { + receiver_ = other.receiver_; + onChanged(); + } + if (other.getStake() != 0L) { + setStake(other.getStake()); + } + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + sender_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + receiver_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + stake_ = input.readInt64(); + + break; + } // case 24 + case 34: { + publicKey_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: { + fee_ = input.readInt64(); + + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object sender_ = ""; + /** + *
+       * The sender's account address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The sender's account address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The sender's account address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @param value The sender to set. + * @return This builder for chaining. + */ + public Builder setSender( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sender_ = value; + onChanged(); + return this; + } + /** + *
+       * The sender's account address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return This builder for chaining. + */ + public Builder clearSender() { + + sender_ = getDefaultInstance().getSender(); + onChanged(); + return this; + } + /** + *
+       * The sender's account address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @param value The bytes for sender to set. + * @return This builder for chaining. + */ + public Builder setSenderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sender_ = value; + onChanged(); + return this; + } + + private java.lang.Object receiver_ = ""; + /** + *
+       * The receiver's validator address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The receiver's validator address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The receiver's validator address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @param value The receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiver( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + receiver_ = value; + onChanged(); + return this; + } + /** + *
+       * The receiver's validator address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return This builder for chaining. + */ + public Builder clearReceiver() { + + receiver_ = getDefaultInstance().getReceiver(); + onChanged(); + return this; + } + /** + *
+       * The receiver's validator address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @param value The bytes for receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiverBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + receiver_ = value; + onChanged(); + return this; + } + + private long stake_ ; + /** + *
+       * The stake amount in NanoPAC. Must be greater than 0.
+       * 
+ * + * int64 stake = 3 [json_name = "stake"]; + * @return The stake. + */ + @java.lang.Override + public long getStake() { + return stake_; + } + /** + *
+       * The stake amount in NanoPAC. Must be greater than 0.
+       * 
+ * + * int64 stake = 3 [json_name = "stake"]; + * @param value The stake to set. + * @return This builder for chaining. + */ + public Builder setStake(long value) { + + stake_ = value; + onChanged(); + return this; + } + /** + *
+       * The stake amount in NanoPAC. Must be greater than 0.
+       * 
+ * + * int64 stake = 3 [json_name = "stake"]; + * @return This builder for chaining. + */ + public Builder clearStake() { + + stake_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object publicKey_ = ""; + /** + *
+       * The public key of the validator.
+       * 
+ * + * string public_key = 4 [json_name = "publicKey"]; + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The public key of the validator.
+       * 
+ * + * string public_key = 4 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The public key of the validator.
+       * 
+ * + * string public_key = 4 [json_name = "publicKey"]; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + *
+       * The public key of the validator.
+       * 
+ * + * string public_key = 4 [json_name = "publicKey"]; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + /** + *
+       * The public key of the validator.
+       * 
+ * + * string public_key = 4 [json_name = "publicKey"]; + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKey_ = value; + onChanged(); + return this; + } + + private long fee_ ; + /** + *
+       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+       * 
+ * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
+       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+       * 
+ * + * int64 fee = 5 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
+       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+       * 
+ * + * int64 fee = 5 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetRawBondTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetRawBondTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRawBondTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetRawUnbondTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetRawUnbondTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The address of the validator to unbond from.
+     * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + java.lang.String getValidatorAddress(); + /** + *
+     * The address of the validator to unbond from.
+     * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + com.google.protobuf.ByteString + getValidatorAddressBytes(); + } + /** + *
+   * Request message for retrieving raw details of an unbond transaction.
+   * 
+ * + * Protobuf type {@code pactus.GetRawUnbondTransactionRequest} + */ + public static final class GetRawUnbondTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetRawUnbondTransactionRequest) + GetRawUnbondTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRawUnbondTransactionRequest.newBuilder() to construct. + private GetRawUnbondTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRawUnbondTransactionRequest() { + validatorAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRawUnbondTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder.class); + } + + public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object validatorAddress_; + /** + *
+     * The address of the validator to unbond from.
+     * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + @java.lang.Override + public java.lang.String getValidatorAddress() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validatorAddress_ = s; + return s; + } + } + /** + *
+     * The address of the validator to unbond from.
+     * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValidatorAddressBytes() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validatorAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, validatorAddress_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, validatorAddress_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) obj; + + if (!getValidatorAddress() + .equals(other.getValidatorAddress())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getValidatorAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for retrieving raw details of an unbond transaction.
+     * 
+ * + * Protobuf type {@code pactus.GetRawUnbondTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetRawUnbondTransactionRequest) + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + validatorAddress_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest build() { + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest(this); + result.validatorAddress_ = validatorAddress_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance()) return this; + if (!other.getValidatorAddress().isEmpty()) { + validatorAddress_ = other.validatorAddress_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + validatorAddress_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object validatorAddress_ = ""; + /** + *
+       * The address of the validator to unbond from.
+       * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + public java.lang.String getValidatorAddress() { + java.lang.Object ref = validatorAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validatorAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the validator to unbond from.
+       * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + public com.google.protobuf.ByteString + getValidatorAddressBytes() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validatorAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the validator to unbond from.
+       * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @param value The validatorAddress to set. + * @return This builder for chaining. + */ + public Builder setValidatorAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + validatorAddress_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the validator to unbond from.
+       * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return This builder for chaining. + */ + public Builder clearValidatorAddress() { + + validatorAddress_ = getDefaultInstance().getValidatorAddress(); + onChanged(); + return this; + } + /** + *
+       * The address of the validator to unbond from.
+       * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @param value The bytes for validatorAddress to set. + * @return This builder for chaining. + */ + public Builder setValidatorAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + validatorAddress_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetRawUnbondTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetRawUnbondTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRawUnbondTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetRawWithdrawTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetRawWithdrawTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The address of the validator to withdraw from.
+     * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + java.lang.String getValidatorAddress(); + /** + *
+     * The address of the validator to withdraw from.
+     * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + com.google.protobuf.ByteString + getValidatorAddressBytes(); + + /** + *
+     * The address of the account to withdraw to.
+     * 
+ * + * string account_address = 2 [json_name = "accountAddress"]; + * @return The accountAddress. + */ + java.lang.String getAccountAddress(); + /** + *
+     * The address of the account to withdraw to.
+     * 
+ * + * string account_address = 2 [json_name = "accountAddress"]; + * @return The bytes for accountAddress. + */ + com.google.protobuf.ByteString + getAccountAddressBytes(); + + /** + *
+     * The withdrawal amount in NanoPAC. Must be greater than 0.
+     * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + long getAmount(); + + /** + *
+     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+     * 
+ * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); + } + /** + *
+   * Request message for retrieving raw details of a withdraw transaction.
+   * 
+ * + * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest} + */ + public static final class GetRawWithdrawTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetRawWithdrawTransactionRequest) + GetRawWithdrawTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRawWithdrawTransactionRequest.newBuilder() to construct. + private GetRawWithdrawTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRawWithdrawTransactionRequest() { + validatorAddress_ = ""; + accountAddress_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRawWithdrawTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder.class); + } + + public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object validatorAddress_; + /** + *
+     * The address of the validator to withdraw from.
+     * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + @java.lang.Override + public java.lang.String getValidatorAddress() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validatorAddress_ = s; + return s; + } + } + /** + *
+     * The address of the validator to withdraw from.
+     * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValidatorAddressBytes() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validatorAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCOUNT_ADDRESS_FIELD_NUMBER = 2; + private volatile java.lang.Object accountAddress_; + /** + *
+     * The address of the account to withdraw to.
+     * 
+ * + * string account_address = 2 [json_name = "accountAddress"]; + * @return The accountAddress. + */ + @java.lang.Override + public java.lang.String getAccountAddress() { + java.lang.Object ref = accountAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountAddress_ = s; + return s; + } + } + /** + *
+     * The address of the account to withdraw to.
+     * 
+ * + * string account_address = 2 [json_name = "accountAddress"]; + * @return The bytes for accountAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAccountAddressBytes() { + java.lang.Object ref = accountAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + accountAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AMOUNT_FIELD_NUMBER = 3; + private long amount_; + /** + *
+     * The withdrawal amount in NanoPAC. Must be greater than 0.
+     * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + + public static final int FEE_FIELD_NUMBER = 4; + private long fee_; + /** + *
+     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+     * 
+ * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, validatorAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accountAddress_); + } + if (amount_ != 0L) { + output.writeInt64(3, amount_); + } + if (fee_ != 0L) { + output.writeInt64(4, fee_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, validatorAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accountAddress_); + } + if (amount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, amount_); + } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, fee_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) obj; + + if (!getValidatorAddress() + .equals(other.getValidatorAddress())) return false; + if (!getAccountAddress() + .equals(other.getAccountAddress())) return false; + if (getAmount() + != other.getAmount()) return false; + if (getFee() + != other.getFee()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getValidatorAddress().hashCode(); + hash = (37 * hash) + ACCOUNT_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAccountAddress().hashCode(); + hash = (37 * hash) + AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAmount()); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for retrieving raw details of a withdraw transaction.
+     * 
+ * + * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetRawWithdrawTransactionRequest) + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + validatorAddress_ = ""; + + accountAddress_ = ""; + + amount_ = 0L; + + fee_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest build() { + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest(this); + result.validatorAddress_ = validatorAddress_; + result.accountAddress_ = accountAddress_; + result.amount_ = amount_; + result.fee_ = fee_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance()) return this; + if (!other.getValidatorAddress().isEmpty()) { + validatorAddress_ = other.validatorAddress_; + onChanged(); + } + if (!other.getAccountAddress().isEmpty()) { + accountAddress_ = other.accountAddress_; + onChanged(); + } + if (other.getAmount() != 0L) { + setAmount(other.getAmount()); + } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + validatorAddress_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + accountAddress_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + amount_ = input.readInt64(); + + break; + } // case 24 + case 32: { + fee_ = input.readInt64(); + + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object validatorAddress_ = ""; + /** + *
+       * The address of the validator to withdraw from.
+       * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + public java.lang.String getValidatorAddress() { + java.lang.Object ref = validatorAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validatorAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the validator to withdraw from.
+       * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + public com.google.protobuf.ByteString + getValidatorAddressBytes() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validatorAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the validator to withdraw from.
+       * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @param value The validatorAddress to set. + * @return This builder for chaining. + */ + public Builder setValidatorAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + validatorAddress_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the validator to withdraw from.
+       * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return This builder for chaining. + */ + public Builder clearValidatorAddress() { + + validatorAddress_ = getDefaultInstance().getValidatorAddress(); + onChanged(); + return this; + } + /** + *
+       * The address of the validator to withdraw from.
+       * 
+ * + * string validator_address = 1 [json_name = "validatorAddress"]; + * @param value The bytes for validatorAddress to set. + * @return This builder for chaining. + */ + public Builder setValidatorAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + validatorAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object accountAddress_ = ""; + /** + *
+       * The address of the account to withdraw to.
+       * 
+ * + * string account_address = 2 [json_name = "accountAddress"]; + * @return The accountAddress. + */ + public java.lang.String getAccountAddress() { + java.lang.Object ref = accountAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the account to withdraw to.
+       * 
+ * + * string account_address = 2 [json_name = "accountAddress"]; + * @return The bytes for accountAddress. + */ + public com.google.protobuf.ByteString + getAccountAddressBytes() { + java.lang.Object ref = accountAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + accountAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the account to withdraw to.
+       * 
+ * + * string account_address = 2 [json_name = "accountAddress"]; + * @param value The accountAddress to set. + * @return This builder for chaining. + */ + public Builder setAccountAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + accountAddress_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the account to withdraw to.
+       * 
+ * + * string account_address = 2 [json_name = "accountAddress"]; + * @return This builder for chaining. + */ + public Builder clearAccountAddress() { + + accountAddress_ = getDefaultInstance().getAccountAddress(); + onChanged(); + return this; + } + /** + *
+       * The address of the account to withdraw to.
+       * 
+ * + * string account_address = 2 [json_name = "accountAddress"]; + * @param value The bytes for accountAddress to set. + * @return This builder for chaining. + */ + public Builder setAccountAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + accountAddress_ = value; + onChanged(); + return this; + } + + private long amount_ ; + /** + *
+       * The withdrawal amount in NanoPAC. Must be greater than 0.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + /** + *
+       * The withdrawal amount in NanoPAC. Must be greater than 0.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @param value The amount to set. + * @return This builder for chaining. + */ + public Builder setAmount(long value) { + + amount_ = value; + onChanged(); + return this; + } + /** + *
+       * The withdrawal amount in NanoPAC. Must be greater than 0.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return This builder for chaining. + */ + public Builder clearAmount() { + + amount_ = 0L; + onChanged(); + return this; + } + + private long fee_ ; + /** + *
+       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+       * 
+ * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
+       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+       * 
+ * + * int64 fee = 4 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
+       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
+       * 
+ * + * int64 fee = 4 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetRawWithdrawTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetRawWithdrawTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRawWithdrawTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetRawTransactionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetRawTransactionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The raw transaction data.
+     * 
+ * + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return The rawTransaction. + */ + java.lang.String getRawTransaction(); + /** + *
+     * The raw transaction data.
+     * 
+ * + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return The bytes for rawTransaction. + */ + com.google.protobuf.ByteString + getRawTransactionBytes(); + } + /** + *
+   * Response message containing raw transaction data.
+   * 
+ * + * Protobuf type {@code pactus.GetRawTransactionResponse} + */ + public static final class GetRawTransactionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetRawTransactionResponse) + GetRawTransactionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRawTransactionResponse.newBuilder() to construct. + private GetRawTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRawTransactionResponse() { + rawTransaction_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRawTransactionResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.Builder.class); + } + + public static final int RAW_TRANSACTION_FIELD_NUMBER = 1; + private volatile java.lang.Object rawTransaction_; + /** + *
+     * The raw transaction data.
+     * 
+ * + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return The rawTransaction. + */ + @java.lang.Override + public java.lang.String getRawTransaction() { + java.lang.Object ref = rawTransaction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rawTransaction_ = s; + return s; + } + } + /** + *
+     * The raw transaction data.
+     * 
+ * + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return The bytes for rawTransaction. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRawTransactionBytes() { + java.lang.Object ref = rawTransaction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rawTransaction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rawTransaction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rawTransaction_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawTransactionResponse)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse other = (pactus.transaction.TransactionOuterClass.GetRawTransactionResponse) obj; + + if (!getRawTransaction() + .equals(other.getRawTransaction())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RAW_TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getRawTransaction().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawTransactionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing raw transaction data.
+     * 
+ * + * Protobuf type {@code pactus.GetRawTransactionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetRawTransactionResponse) + pactus.transaction.TransactionOuterClass.GetRawTransactionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + rawTransaction_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse build() { + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse buildPartial() { + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse result = new pactus.transaction.TransactionOuterClass.GetRawTransactionResponse(this); + result.rawTransaction_ = rawTransaction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetRawTransactionResponse) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawTransactionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransactionResponse other) { + if (other == pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance()) return this; + if (!other.getRawTransaction().isEmpty()) { + rawTransaction_ = other.rawTransaction_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + rawTransaction_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object rawTransaction_ = ""; + /** + *
+       * The raw transaction data.
+       * 
+ * + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return The rawTransaction. + */ + public java.lang.String getRawTransaction() { + java.lang.Object ref = rawTransaction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rawTransaction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The raw transaction data.
+       * 
+ * + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return The bytes for rawTransaction. + */ + public com.google.protobuf.ByteString + getRawTransactionBytes() { + java.lang.Object ref = rawTransaction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rawTransaction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The raw transaction data.
+       * 
+ * + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @param value The rawTransaction to set. + * @return This builder for chaining. + */ + public Builder setRawTransaction( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rawTransaction_ = value; + onChanged(); + return this; + } + /** + *
+       * The raw transaction data.
+       * 
+ * + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return This builder for chaining. + */ + public Builder clearRawTransaction() { + + rawTransaction_ = getDefaultInstance().getRawTransaction(); + onChanged(); + return this; + } + /** + *
+       * The raw transaction data.
+       * 
+ * + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @param value The bytes for rawTransaction to set. + * @return This builder for chaining. + */ + public Builder setRawTransactionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rawTransaction_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetRawTransactionResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetRawTransactionResponse) + private static final pactus.transaction.TransactionOuterClass.GetRawTransactionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawTransactionResponse(); + } + + public static pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRawTransactionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PayloadTransferOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.PayloadTransfer) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The sender's address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + java.lang.String getSender(); + /** + *
+     * The sender's address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + com.google.protobuf.ByteString + getSenderBytes(); + + /** + *
+     * The receiver's address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + java.lang.String getReceiver(); + /** + *
+     * The receiver's address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + com.google.protobuf.ByteString + getReceiverBytes(); + + /** + *
+     * The amount to be transferred in NanoPAC.
+     * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + long getAmount(); + } + /** + *
+   * Payload for a transfer transaction.
+   * 
+ * + * Protobuf type {@code pactus.PayloadTransfer} + */ + public static final class PayloadTransfer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.PayloadTransfer) + PayloadTransferOrBuilder { + private static final long serialVersionUID = 0L; + // Use PayloadTransfer.newBuilder() to construct. + private PayloadTransfer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PayloadTransfer() { + sender_ = ""; + receiver_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PayloadTransfer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadTransfer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadTransfer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.PayloadTransfer.class, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder.class); + } + + public static final int SENDER_FIELD_NUMBER = 1; + private volatile java.lang.Object sender_; + /** + *
+     * The sender's address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + @java.lang.Override + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } + } + /** + *
+     * The sender's address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECEIVER_FIELD_NUMBER = 2; + private volatile java.lang.Object receiver_; + /** + *
+     * The receiver's address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + @java.lang.Override + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } + } + /** + *
+     * The receiver's address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AMOUNT_FIELD_NUMBER = 3; + private long amount_; + /** + *
+     * The amount to be transferred in NanoPAC.
+     * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_); + } + if (amount_ != 0L) { + output.writeInt64(3, amount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_); + } + if (amount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, amount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.PayloadTransfer)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.PayloadTransfer other = (pactus.transaction.TransactionOuterClass.PayloadTransfer) obj; + + if (!getSender() + .equals(other.getSender())) return false; + if (!getReceiver() + .equals(other.getReceiver())) return false; + if (getAmount() + != other.getAmount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SENDER_FIELD_NUMBER; + hash = (53 * hash) + getSender().hashCode(); + hash = (37 * hash) + RECEIVER_FIELD_NUMBER; + hash = (53 * hash) + getReceiver().hashCode(); + hash = (37 * hash) + AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAmount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadTransfer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.PayloadTransfer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Payload for a transfer transaction.
+     * 
+ * + * Protobuf type {@code pactus.PayloadTransfer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.PayloadTransfer) + pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadTransfer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadTransfer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.PayloadTransfer.class, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.PayloadTransfer.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + sender_ = ""; + + receiver_ = ""; + + amount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadTransfer_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransfer getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransfer build() { + pactus.transaction.TransactionOuterClass.PayloadTransfer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransfer buildPartial() { + pactus.transaction.TransactionOuterClass.PayloadTransfer result = new pactus.transaction.TransactionOuterClass.PayloadTransfer(this); + result.sender_ = sender_; + result.receiver_ = receiver_; + result.amount_ = amount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.PayloadTransfer) { + return mergeFrom((pactus.transaction.TransactionOuterClass.PayloadTransfer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadTransfer other) { + if (other == pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance()) return this; + if (!other.getSender().isEmpty()) { + sender_ = other.sender_; + onChanged(); + } + if (!other.getReceiver().isEmpty()) { + receiver_ = other.receiver_; + onChanged(); + } + if (other.getAmount() != 0L) { + setAmount(other.getAmount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + sender_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + receiver_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + amount_ = input.readInt64(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object sender_ = ""; + /** + *
+       * The sender's address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The sender's address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The sender's address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @param value The sender to set. + * @return This builder for chaining. + */ + public Builder setSender( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sender_ = value; + onChanged(); + return this; + } + /** + *
+       * The sender's address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return This builder for chaining. + */ + public Builder clearSender() { + + sender_ = getDefaultInstance().getSender(); + onChanged(); + return this; + } + /** + *
+       * The sender's address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @param value The bytes for sender to set. + * @return This builder for chaining. + */ + public Builder setSenderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sender_ = value; + onChanged(); + return this; + } + + private java.lang.Object receiver_ = ""; + /** + *
+       * The receiver's address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The receiver's address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The receiver's address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @param value The receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiver( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + receiver_ = value; + onChanged(); + return this; + } + /** + *
+       * The receiver's address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return This builder for chaining. + */ + public Builder clearReceiver() { + + receiver_ = getDefaultInstance().getReceiver(); + onChanged(); + return this; + } + /** + *
+       * The receiver's address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @param value The bytes for receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiverBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + receiver_ = value; + onChanged(); + return this; + } + + private long amount_ ; + /** + *
+       * The amount to be transferred in NanoPAC.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + /** + *
+       * The amount to be transferred in NanoPAC.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @param value The amount to set. + * @return This builder for chaining. + */ + public Builder setAmount(long value) { + + amount_ = value; + onChanged(); + return this; + } + /** + *
+       * The amount to be transferred in NanoPAC.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return This builder for chaining. + */ + public Builder clearAmount() { + + amount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.PayloadTransfer) + } + + // @@protoc_insertion_point(class_scope:pactus.PayloadTransfer) + private static final pactus.transaction.TransactionOuterClass.PayloadTransfer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.PayloadTransfer(); + } + + public static pactus.transaction.TransactionOuterClass.PayloadTransfer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PayloadTransfer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransfer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PayloadBondOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.PayloadBond) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The sender's address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + java.lang.String getSender(); + /** + *
+     * The sender's address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + com.google.protobuf.ByteString + getSenderBytes(); + + /** + *
+     * The receiver's address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + java.lang.String getReceiver(); + /** + *
+     * The receiver's address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + com.google.protobuf.ByteString + getReceiverBytes(); + + /** + *
+     * The stake amount in NanoPAC.
+     * 
+ * + * int64 stake = 3 [json_name = "stake"]; + * @return The stake. + */ + long getStake(); + } + /** + *
+   * Payload for a bond transaction.
+   * 
+ * + * Protobuf type {@code pactus.PayloadBond} + */ + public static final class PayloadBond extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.PayloadBond) + PayloadBondOrBuilder { + private static final long serialVersionUID = 0L; + // Use PayloadBond.newBuilder() to construct. + private PayloadBond(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PayloadBond() { + sender_ = ""; + receiver_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PayloadBond(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadBond_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadBond_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.PayloadBond.class, pactus.transaction.TransactionOuterClass.PayloadBond.Builder.class); + } + + public static final int SENDER_FIELD_NUMBER = 1; + private volatile java.lang.Object sender_; + /** + *
+     * The sender's address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + @java.lang.Override + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } + } + /** + *
+     * The sender's address.
+     * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECEIVER_FIELD_NUMBER = 2; + private volatile java.lang.Object receiver_; + /** + *
+     * The receiver's address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + @java.lang.Override + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } + } + /** + *
+     * The receiver's address.
+     * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STAKE_FIELD_NUMBER = 3; + private long stake_; + /** + *
+     * The stake amount in NanoPAC.
+     * 
+ * + * int64 stake = 3 [json_name = "stake"]; + * @return The stake. + */ + @java.lang.Override + public long getStake() { + return stake_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_); + } + if (stake_ != 0L) { + output.writeInt64(3, stake_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_); + } + if (stake_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, stake_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.PayloadBond)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.PayloadBond other = (pactus.transaction.TransactionOuterClass.PayloadBond) obj; + + if (!getSender() + .equals(other.getSender())) return false; + if (!getReceiver() + .equals(other.getReceiver())) return false; + if (getStake() + != other.getStake()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SENDER_FIELD_NUMBER; + hash = (53 * hash) + getSender().hashCode(); + hash = (37 * hash) + RECEIVER_FIELD_NUMBER; + hash = (53 * hash) + getReceiver().hashCode(); + hash = (37 * hash) + STAKE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStake()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadBond parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.PayloadBond prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Payload for a bond transaction.
+     * 
+ * + * Protobuf type {@code pactus.PayloadBond} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.PayloadBond) + pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadBond_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadBond_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.PayloadBond.class, pactus.transaction.TransactionOuterClass.PayloadBond.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.PayloadBond.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + sender_ = ""; + + receiver_ = ""; + + stake_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadBond_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBond getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBond build() { + pactus.transaction.TransactionOuterClass.PayloadBond result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBond buildPartial() { + pactus.transaction.TransactionOuterClass.PayloadBond result = new pactus.transaction.TransactionOuterClass.PayloadBond(this); + result.sender_ = sender_; + result.receiver_ = receiver_; + result.stake_ = stake_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.PayloadBond) { + return mergeFrom((pactus.transaction.TransactionOuterClass.PayloadBond)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadBond other) { + if (other == pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance()) return this; + if (!other.getSender().isEmpty()) { + sender_ = other.sender_; + onChanged(); + } + if (!other.getReceiver().isEmpty()) { + receiver_ = other.receiver_; + onChanged(); + } + if (other.getStake() != 0L) { + setStake(other.getStake()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + sender_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + receiver_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + stake_ = input.readInt64(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object sender_ = ""; + /** + *
+       * The sender's address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The sender. + */ + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The sender's address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return The bytes for sender. + */ + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The sender's address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @param value The sender to set. + * @return This builder for chaining. + */ + public Builder setSender( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sender_ = value; + onChanged(); + return this; + } + /** + *
+       * The sender's address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @return This builder for chaining. + */ + public Builder clearSender() { + + sender_ = getDefaultInstance().getSender(); + onChanged(); + return this; + } + /** + *
+       * The sender's address.
+       * 
+ * + * string sender = 1 [json_name = "sender"]; + * @param value The bytes for sender to set. + * @return This builder for chaining. + */ + public Builder setSenderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sender_ = value; + onChanged(); + return this; + } + + private java.lang.Object receiver_ = ""; + /** + *
+       * The receiver's address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The receiver. + */ + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The receiver's address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The receiver's address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @param value The receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiver( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + receiver_ = value; + onChanged(); + return this; + } + /** + *
+       * The receiver's address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @return This builder for chaining. + */ + public Builder clearReceiver() { + + receiver_ = getDefaultInstance().getReceiver(); + onChanged(); + return this; + } + /** + *
+       * The receiver's address.
+       * 
+ * + * string receiver = 2 [json_name = "receiver"]; + * @param value The bytes for receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiverBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + receiver_ = value; + onChanged(); + return this; + } + + private long stake_ ; + /** + *
+       * The stake amount in NanoPAC.
+       * 
+ * + * int64 stake = 3 [json_name = "stake"]; + * @return The stake. + */ + @java.lang.Override + public long getStake() { + return stake_; + } + /** + *
+       * The stake amount in NanoPAC.
+       * 
+ * + * int64 stake = 3 [json_name = "stake"]; + * @param value The stake to set. + * @return This builder for chaining. + */ + public Builder setStake(long value) { + + stake_ = value; + onChanged(); + return this; + } + /** + *
+       * The stake amount in NanoPAC.
+       * 
+ * + * int64 stake = 3 [json_name = "stake"]; + * @return This builder for chaining. + */ + public Builder clearStake() { + + stake_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.PayloadBond) + } + + // @@protoc_insertion_point(class_scope:pactus.PayloadBond) + private static final pactus.transaction.TransactionOuterClass.PayloadBond DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.PayloadBond(); + } + + public static pactus.transaction.TransactionOuterClass.PayloadBond getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PayloadBond parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBond getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PayloadSortitionOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.PayloadSortition) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The validator address associated with the sortition proof.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The validator address associated with the sortition proof.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + + /** + *
+     * The proof for the sortition.
+     * 
+ * + * string proof = 2 [json_name = "proof"]; + * @return The proof. + */ + java.lang.String getProof(); + /** + *
+     * The proof for the sortition.
+     * 
+ * + * string proof = 2 [json_name = "proof"]; + * @return The bytes for proof. + */ + com.google.protobuf.ByteString + getProofBytes(); + } + /** + *
+   * Payload for a sortition transaction.
+   * 
+ * + * Protobuf type {@code pactus.PayloadSortition} + */ + public static final class PayloadSortition extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.PayloadSortition) + PayloadSortitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use PayloadSortition.newBuilder() to construct. + private PayloadSortition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PayloadSortition() { + address_ = ""; + proof_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PayloadSortition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadSortition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadSortition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.PayloadSortition.class, pactus.transaction.TransactionOuterClass.PayloadSortition.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object address_; + /** + *
+     * The validator address associated with the sortition proof.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The validator address associated with the sortition proof.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROOF_FIELD_NUMBER = 2; + private volatile java.lang.Object proof_; + /** + *
+     * The proof for the sortition.
+     * 
+ * + * string proof = 2 [json_name = "proof"]; + * @return The proof. + */ + @java.lang.Override + public java.lang.String getProof() { + java.lang.Object ref = proof_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proof_ = s; + return s; + } + } + /** + *
+     * The proof for the sortition.
+     * 
+ * + * string proof = 2 [json_name = "proof"]; + * @return The bytes for proof. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProofBytes() { + java.lang.Object ref = proof_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + proof_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proof_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, proof_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(proof_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, proof_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.PayloadSortition)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.PayloadSortition other = (pactus.transaction.TransactionOuterClass.PayloadSortition) obj; + + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getProof() + .equals(other.getProof())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + PROOF_FIELD_NUMBER; + hash = (53 * hash) + getProof().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadSortition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.PayloadSortition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Payload for a sortition transaction.
+     * 
+ * + * Protobuf type {@code pactus.PayloadSortition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.PayloadSortition) + pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadSortition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadSortition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.PayloadSortition.class, pactus.transaction.TransactionOuterClass.PayloadSortition.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.PayloadSortition.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + address_ = ""; + + proof_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadSortition_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadSortition getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadSortition build() { + pactus.transaction.TransactionOuterClass.PayloadSortition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadSortition buildPartial() { + pactus.transaction.TransactionOuterClass.PayloadSortition result = new pactus.transaction.TransactionOuterClass.PayloadSortition(this); + result.address_ = address_; + result.proof_ = proof_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.PayloadSortition) { + return mergeFrom((pactus.transaction.TransactionOuterClass.PayloadSortition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadSortition other) { + if (other == pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance()) return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + if (!other.getProof().isEmpty()) { + proof_ = other.proof_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + proof_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * The validator address associated with the sortition proof.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The validator address associated with the sortition proof.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The validator address associated with the sortition proof.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The validator address associated with the sortition proof.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The validator address associated with the sortition proof.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + + private java.lang.Object proof_ = ""; + /** + *
+       * The proof for the sortition.
+       * 
+ * + * string proof = 2 [json_name = "proof"]; + * @return The proof. + */ + public java.lang.String getProof() { + java.lang.Object ref = proof_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + proof_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The proof for the sortition.
+       * 
+ * + * string proof = 2 [json_name = "proof"]; + * @return The bytes for proof. + */ + public com.google.protobuf.ByteString + getProofBytes() { + java.lang.Object ref = proof_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + proof_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The proof for the sortition.
+       * 
+ * + * string proof = 2 [json_name = "proof"]; + * @param value The proof to set. + * @return This builder for chaining. + */ + public Builder setProof( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + proof_ = value; + onChanged(); + return this; + } + /** + *
+       * The proof for the sortition.
+       * 
+ * + * string proof = 2 [json_name = "proof"]; + * @return This builder for chaining. + */ + public Builder clearProof() { + + proof_ = getDefaultInstance().getProof(); + onChanged(); + return this; + } + /** + *
+       * The proof for the sortition.
+       * 
+ * + * string proof = 2 [json_name = "proof"]; + * @param value The bytes for proof to set. + * @return This builder for chaining. + */ + public Builder setProofBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + proof_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.PayloadSortition) + } + + // @@protoc_insertion_point(class_scope:pactus.PayloadSortition) + private static final pactus.transaction.TransactionOuterClass.PayloadSortition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.PayloadSortition(); + } + + public static pactus.transaction.TransactionOuterClass.PayloadSortition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PayloadSortition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadSortition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PayloadUnbondOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.PayloadUnbond) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The address of the validator to unbond from.
+     * 
+ * + * string validator = 1 [json_name = "validator"]; + * @return The validator. + */ + java.lang.String getValidator(); + /** + *
+     * The address of the validator to unbond from.
+     * 
+ * + * string validator = 1 [json_name = "validator"]; + * @return The bytes for validator. + */ + com.google.protobuf.ByteString + getValidatorBytes(); + } + /** + *
+   * Payload for an unbond transaction.
+   * 
+ * + * Protobuf type {@code pactus.PayloadUnbond} + */ + public static final class PayloadUnbond extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.PayloadUnbond) + PayloadUnbondOrBuilder { + private static final long serialVersionUID = 0L; + // Use PayloadUnbond.newBuilder() to construct. + private PayloadUnbond(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PayloadUnbond() { + validator_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PayloadUnbond(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadUnbond_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadUnbond_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.PayloadUnbond.class, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder.class); + } + + public static final int VALIDATOR_FIELD_NUMBER = 1; + private volatile java.lang.Object validator_; + /** + *
+     * The address of the validator to unbond from.
+     * 
+ * + * string validator = 1 [json_name = "validator"]; + * @return The validator. + */ + @java.lang.Override + public java.lang.String getValidator() { + java.lang.Object ref = validator_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validator_ = s; + return s; + } + } + /** + *
+     * The address of the validator to unbond from.
+     * 
+ * + * string validator = 1 [json_name = "validator"]; + * @return The bytes for validator. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValidatorBytes() { + java.lang.Object ref = validator_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validator_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, validator_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validator_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, validator_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.PayloadUnbond)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.PayloadUnbond other = (pactus.transaction.TransactionOuterClass.PayloadUnbond) obj; + + if (!getValidator() + .equals(other.getValidator())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + VALIDATOR_FIELD_NUMBER; + hash = (53 * hash) + getValidator().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadUnbond parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.PayloadUnbond prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Payload for an unbond transaction.
+     * 
+ * + * Protobuf type {@code pactus.PayloadUnbond} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.PayloadUnbond) + pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadUnbond_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadUnbond_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.PayloadUnbond.class, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.PayloadUnbond.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + validator_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadUnbond_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbond getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbond build() { + pactus.transaction.TransactionOuterClass.PayloadUnbond result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbond buildPartial() { + pactus.transaction.TransactionOuterClass.PayloadUnbond result = new pactus.transaction.TransactionOuterClass.PayloadUnbond(this); + result.validator_ = validator_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.PayloadUnbond) { + return mergeFrom((pactus.transaction.TransactionOuterClass.PayloadUnbond)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadUnbond other) { + if (other == pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance()) return this; + if (!other.getValidator().isEmpty()) { + validator_ = other.validator_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + validator_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object validator_ = ""; + /** + *
+       * The address of the validator to unbond from.
+       * 
+ * + * string validator = 1 [json_name = "validator"]; + * @return The validator. + */ + public java.lang.String getValidator() { + java.lang.Object ref = validator_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validator_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address of the validator to unbond from.
+       * 
+ * + * string validator = 1 [json_name = "validator"]; + * @return The bytes for validator. + */ + public com.google.protobuf.ByteString + getValidatorBytes() { + java.lang.Object ref = validator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address of the validator to unbond from.
+       * 
+ * + * string validator = 1 [json_name = "validator"]; + * @param value The validator to set. + * @return This builder for chaining. + */ + public Builder setValidator( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + validator_ = value; + onChanged(); + return this; + } + /** + *
+       * The address of the validator to unbond from.
+       * 
+ * + * string validator = 1 [json_name = "validator"]; + * @return This builder for chaining. + */ + public Builder clearValidator() { + + validator_ = getDefaultInstance().getValidator(); + onChanged(); + return this; + } + /** + *
+       * The address of the validator to unbond from.
+       * 
+ * + * string validator = 1 [json_name = "validator"]; + * @param value The bytes for validator to set. + * @return This builder for chaining. + */ + public Builder setValidatorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + validator_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.PayloadUnbond) + } + + // @@protoc_insertion_point(class_scope:pactus.PayloadUnbond) + private static final pactus.transaction.TransactionOuterClass.PayloadUnbond DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.PayloadUnbond(); + } + + public static pactus.transaction.TransactionOuterClass.PayloadUnbond getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PayloadUnbond parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbond getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PayloadWithdrawOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.PayloadWithdraw) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The address to withdraw from.
+     * 
+ * + * string from = 1 [json_name = "from"]; + * @return The from. + */ + java.lang.String getFrom(); + /** + *
+     * The address to withdraw from.
+     * 
+ * + * string from = 1 [json_name = "from"]; + * @return The bytes for from. + */ + com.google.protobuf.ByteString + getFromBytes(); + + /** + *
+     * The address to withdraw to.
+     * 
+ * + * string to = 2 [json_name = "to"]; + * @return The to. + */ + java.lang.String getTo(); + /** + *
+     * The address to withdraw to.
+     * 
+ * + * string to = 2 [json_name = "to"]; + * @return The bytes for to. + */ + com.google.protobuf.ByteString + getToBytes(); + + /** + *
+     * The withdrawal amount in NanoPAC.
+     * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + long getAmount(); + } + /** + *
+   * Payload for a withdraw transaction.
+   * 
+ * + * Protobuf type {@code pactus.PayloadWithdraw} + */ + public static final class PayloadWithdraw extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.PayloadWithdraw) + PayloadWithdrawOrBuilder { + private static final long serialVersionUID = 0L; + // Use PayloadWithdraw.newBuilder() to construct. + private PayloadWithdraw(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PayloadWithdraw() { + from_ = ""; + to_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PayloadWithdraw(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.PayloadWithdraw.class, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder.class); + } + + public static final int FROM_FIELD_NUMBER = 1; + private volatile java.lang.Object from_; + /** + *
+     * The address to withdraw from.
+     * 
+ * + * string from = 1 [json_name = "from"]; + * @return The from. + */ + @java.lang.Override + public java.lang.String getFrom() { + java.lang.Object ref = from_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + from_ = s; + return s; + } + } + /** + *
+     * The address to withdraw from.
+     * 
+ * + * string from = 1 [json_name = "from"]; + * @return The bytes for from. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFromBytes() { + java.lang.Object ref = from_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + from_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TO_FIELD_NUMBER = 2; + private volatile java.lang.Object to_; + /** + *
+     * The address to withdraw to.
+     * 
+ * + * string to = 2 [json_name = "to"]; + * @return The to. + */ + @java.lang.Override + public java.lang.String getTo() { + java.lang.Object ref = to_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + to_ = s; + return s; + } + } + /** + *
+     * The address to withdraw to.
+     * 
+ * + * string to = 2 [json_name = "to"]; + * @return The bytes for to. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getToBytes() { + java.lang.Object ref = to_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + to_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AMOUNT_FIELD_NUMBER = 3; + private long amount_; + /** + *
+     * The withdrawal amount in NanoPAC.
+     * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(from_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, from_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(to_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, to_); + } + if (amount_ != 0L) { + output.writeInt64(3, amount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(from_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, from_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(to_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, to_); + } + if (amount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, amount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.PayloadWithdraw)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.PayloadWithdraw other = (pactus.transaction.TransactionOuterClass.PayloadWithdraw) obj; + + if (!getFrom() + .equals(other.getFrom())) return false; + if (!getTo() + .equals(other.getTo())) return false; + if (getAmount() + != other.getAmount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FROM_FIELD_NUMBER; + hash = (53 * hash) + getFrom().hashCode(); + hash = (37 * hash) + TO_FIELD_NUMBER; + hash = (53 * hash) + getTo().hashCode(); + hash = (37 * hash) + AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAmount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.PayloadWithdraw prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Payload for a withdraw transaction.
+     * 
+ * + * Protobuf type {@code pactus.PayloadWithdraw} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.PayloadWithdraw) + pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.PayloadWithdraw.class, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.PayloadWithdraw.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + from_ = ""; + + to_ = ""; + + amount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_PayloadWithdraw_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdraw getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdraw build() { + pactus.transaction.TransactionOuterClass.PayloadWithdraw result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdraw buildPartial() { + pactus.transaction.TransactionOuterClass.PayloadWithdraw result = new pactus.transaction.TransactionOuterClass.PayloadWithdraw(this); + result.from_ = from_; + result.to_ = to_; + result.amount_ = amount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.PayloadWithdraw) { + return mergeFrom((pactus.transaction.TransactionOuterClass.PayloadWithdraw)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadWithdraw other) { + if (other == pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance()) return this; + if (!other.getFrom().isEmpty()) { + from_ = other.from_; + onChanged(); + } + if (!other.getTo().isEmpty()) { + to_ = other.to_; + onChanged(); + } + if (other.getAmount() != 0L) { + setAmount(other.getAmount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + from_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + to_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + amount_ = input.readInt64(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object from_ = ""; + /** + *
+       * The address to withdraw from.
+       * 
+ * + * string from = 1 [json_name = "from"]; + * @return The from. + */ + public java.lang.String getFrom() { + java.lang.Object ref = from_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + from_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address to withdraw from.
+       * 
+ * + * string from = 1 [json_name = "from"]; + * @return The bytes for from. + */ + public com.google.protobuf.ByteString + getFromBytes() { + java.lang.Object ref = from_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + from_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address to withdraw from.
+       * 
+ * + * string from = 1 [json_name = "from"]; + * @param value The from to set. + * @return This builder for chaining. + */ + public Builder setFrom( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + from_ = value; + onChanged(); + return this; + } + /** + *
+       * The address to withdraw from.
+       * 
+ * + * string from = 1 [json_name = "from"]; + * @return This builder for chaining. + */ + public Builder clearFrom() { + + from_ = getDefaultInstance().getFrom(); + onChanged(); + return this; + } + /** + *
+       * The address to withdraw from.
+       * 
+ * + * string from = 1 [json_name = "from"]; + * @param value The bytes for from to set. + * @return This builder for chaining. + */ + public Builder setFromBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + from_ = value; + onChanged(); + return this; + } + + private java.lang.Object to_ = ""; + /** + *
+       * The address to withdraw to.
+       * 
+ * + * string to = 2 [json_name = "to"]; + * @return The to. + */ + public java.lang.String getTo() { + java.lang.Object ref = to_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + to_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address to withdraw to.
+       * 
+ * + * string to = 2 [json_name = "to"]; + * @return The bytes for to. + */ + public com.google.protobuf.ByteString + getToBytes() { + java.lang.Object ref = to_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + to_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address to withdraw to.
+       * 
+ * + * string to = 2 [json_name = "to"]; + * @param value The to to set. + * @return This builder for chaining. + */ + public Builder setTo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + to_ = value; + onChanged(); + return this; + } + /** + *
+       * The address to withdraw to.
+       * 
+ * + * string to = 2 [json_name = "to"]; + * @return This builder for chaining. + */ + public Builder clearTo() { + + to_ = getDefaultInstance().getTo(); + onChanged(); + return this; + } + /** + *
+       * The address to withdraw to.
+       * 
+ * + * string to = 2 [json_name = "to"]; + * @param value The bytes for to to set. + * @return This builder for chaining. + */ + public Builder setToBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + to_ = value; + onChanged(); + return this; + } + + private long amount_ ; + /** + *
+       * The withdrawal amount in NanoPAC.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + /** + *
+       * The withdrawal amount in NanoPAC.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @param value The amount to set. + * @return This builder for chaining. + */ + public Builder setAmount(long value) { + + amount_ = value; + onChanged(); + return this; + } + /** + *
+       * The withdrawal amount in NanoPAC.
+       * 
+ * + * int64 amount = 3 [json_name = "amount"]; + * @return This builder for chaining. + */ + public Builder clearAmount() { + + amount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.PayloadWithdraw) + } + + // @@protoc_insertion_point(class_scope:pactus.PayloadWithdraw) + private static final pactus.transaction.TransactionOuterClass.PayloadWithdraw DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.PayloadWithdraw(); + } + + public static pactus.transaction.TransactionOuterClass.PayloadWithdraw getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PayloadWithdraw parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdraw getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TransactionInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.TransactionInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The unique ID of the transaction.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+     * The unique ID of the transaction.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+     * The raw transaction data.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The data. + */ + java.lang.String getData(); + /** + *
+     * The raw transaction data.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The bytes for data. + */ + com.google.protobuf.ByteString + getDataBytes(); + + /** + *
+     * The version of the transaction.
+     * 
+ * + * int32 version = 3 [json_name = "version"]; + * @return The version. + */ + int getVersion(); + + /** + *
+     * The lock time for the transaction.
+     * 
+ * + * uint32 lock_time = 4 [json_name = "lockTime"]; + * @return The lockTime. + */ + int getLockTime(); + + /** + *
+     * The value of the transaction in NanoPAC.
+     * 
+ * + * int64 value = 5 [json_name = "value"]; + * @return The value. + */ + long getValue(); + + /** + *
+     * The fee for the transaction in NanoPAC.
+     * 
+ * + * int64 fee = 6 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); + + /** + *
+     * The type of transaction payload.
+     * 
+ * + * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; + * @return The enum numeric value on the wire for payloadType. + */ + int getPayloadTypeValue(); + /** + *
+     * The type of transaction payload.
+     * 
+ * + * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; + * @return The payloadType. + */ + pactus.transaction.TransactionOuterClass.PayloadType getPayloadType(); + + /** + *
+     * Transfer transaction payload.
+     * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + * @return Whether the transfer field is set. + */ + boolean hasTransfer(); + /** + *
+     * Transfer transaction payload.
+     * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + * @return The transfer. + */ + pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer(); + /** + *
+     * Transfer transaction payload.
+     * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + */ + pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder(); + + /** + *
+     * Bond transaction payload.
+     * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + * @return Whether the bond field is set. + */ + boolean hasBond(); + /** + *
+     * Bond transaction payload.
+     * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + * @return The bond. + */ + pactus.transaction.TransactionOuterClass.PayloadBond getBond(); + /** + *
+     * Bond transaction payload.
+     * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + */ + pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder(); + + /** + *
+     * Sortition transaction payload.
+     * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + * @return Whether the sortition field is set. + */ + boolean hasSortition(); + /** + *
+     * Sortition transaction payload.
+     * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + * @return The sortition. + */ + pactus.transaction.TransactionOuterClass.PayloadSortition getSortition(); + /** + *
+     * Sortition transaction payload.
+     * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + */ + pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder getSortitionOrBuilder(); + + /** + *
+     * Unbond transaction payload.
+     * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + * @return Whether the unbond field is set. + */ + boolean hasUnbond(); + /** + *
+     * Unbond transaction payload.
+     * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + * @return The unbond. + */ + pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond(); + /** + *
+     * Unbond transaction payload.
+     * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + */ + pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder(); + + /** + *
+     * Withdraw transaction payload.
+     * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + * @return Whether the withdraw field is set. + */ + boolean hasWithdraw(); + /** + *
+     * Withdraw transaction payload.
+     * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + * @return The withdraw. + */ + pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw(); + /** + *
+     * Withdraw transaction payload.
+     * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + */ + pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder(); + + /** + *
+     * A memo string for the transaction.
+     * 
+ * + * string memo = 8 [json_name = "memo"]; + * @return The memo. + */ + java.lang.String getMemo(); + /** + *
+     * A memo string for the transaction.
+     * 
+ * + * string memo = 8 [json_name = "memo"]; + * @return The bytes for memo. + */ + com.google.protobuf.ByteString + getMemoBytes(); + + /** + *
+     * The public key associated with the transaction.
+     * 
+ * + * string public_key = 9 [json_name = "publicKey"]; + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + *
+     * The public key associated with the transaction.
+     * 
+ * + * string public_key = 9 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString + getPublicKeyBytes(); + + /** + *
+     * The signature for the transaction.
+     * 
+ * + * string signature = 10 [json_name = "signature"]; + * @return The signature. + */ + java.lang.String getSignature(); + /** + *
+     * The signature for the transaction.
+     * 
+ * + * string signature = 10 [json_name = "signature"]; + * @return The bytes for signature. + */ + com.google.protobuf.ByteString + getSignatureBytes(); + + public pactus.transaction.TransactionOuterClass.TransactionInfo.PayloadCase getPayloadCase(); + } + /** + *
+   * Information about a transaction.
+   * 
+ * + * Protobuf type {@code pactus.TransactionInfo} + */ + public static final class TransactionInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.TransactionInfo) + TransactionInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransactionInfo.newBuilder() to construct. + private TransactionInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TransactionInfo() { + id_ = ""; + data_ = ""; + payloadType_ = 0; + memo_ = ""; + publicKey_ = ""; + signature_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TransactionInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransactionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransactionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.TransactionInfo.class, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder.class); + } + + private int payloadCase_ = 0; + private java.lang.Object payload_; + public enum PayloadCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TRANSFER(30), + BOND(31), + SORTITION(32), + UNBOND(33), + WITHDRAW(34), + PAYLOAD_NOT_SET(0); + private final int value; + private PayloadCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 30: return TRANSFER; + case 31: return BOND; + case 32: return SORTITION; + case 33: return UNBOND; + case 34: return WITHDRAW; + case 0: return PAYLOAD_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public PayloadCase + getPayloadCase() { + return PayloadCase.forNumber( + payloadCase_); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object id_; + /** + *
+     * The unique ID of the transaction.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+     * The unique ID of the transaction.
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 2; + private volatile java.lang.Object data_; + /** + *
+     * The raw transaction data.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public java.lang.String getData() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } + } + /** + *
+     * The raw transaction data.
+     * 
+ * + * string data = 2 [json_name = "data"]; + * @return The bytes for data. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 3; + private int version_; + /** + *
+     * The version of the transaction.
+     * 
+ * + * int32 version = 3 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public int getVersion() { + return version_; + } + + public static final int LOCK_TIME_FIELD_NUMBER = 4; + private int lockTime_; + /** + *
+     * The lock time for the transaction.
+     * 
+ * + * uint32 lock_time = 4 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + + public static final int VALUE_FIELD_NUMBER = 5; + private long value_; + /** + *
+     * The value of the transaction in NanoPAC.
+     * 
+ * + * int64 value = 5 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public long getValue() { + return value_; + } + + public static final int FEE_FIELD_NUMBER = 6; + private long fee_; + /** + *
+     * The fee for the transaction in NanoPAC.
+     * 
+ * + * int64 fee = 6 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + + public static final int PAYLOAD_TYPE_FIELD_NUMBER = 7; + private int payloadType_; + /** + *
+     * The type of transaction payload.
+     * 
+ * + * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; + * @return The enum numeric value on the wire for payloadType. + */ + @java.lang.Override public int getPayloadTypeValue() { + return payloadType_; + } + /** + *
+     * The type of transaction payload.
+     * 
+ * + * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; + * @return The payloadType. + */ + @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { + @SuppressWarnings("deprecation") + pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); + return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; + } + + public static final int TRANSFER_FIELD_NUMBER = 30; + /** + *
+     * Transfer transaction payload.
+     * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + * @return Whether the transfer field is set. + */ + @java.lang.Override + public boolean hasTransfer() { + return payloadCase_ == 30; + } + /** + *
+     * Transfer transaction payload.
+     * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + * @return The transfer. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer() { + if (payloadCase_ == 30) { + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } + /** + *
+     * Transfer transaction payload.
+     * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() { + if (payloadCase_ == 30) { + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } + + public static final int BOND_FIELD_NUMBER = 31; + /** + *
+     * Bond transaction payload.
+     * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + * @return Whether the bond field is set. + */ + @java.lang.Override + public boolean hasBond() { + return payloadCase_ == 31; + } + /** + *
+     * Bond transaction payload.
+     * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + * @return The bond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBond getBond() { + if (payloadCase_ == 31) { + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } + /** + *
+     * Bond transaction payload.
+     * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() { + if (payloadCase_ == 31) { + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } + + public static final int SORTITION_FIELD_NUMBER = 32; + /** + *
+     * Sortition transaction payload.
+     * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + * @return Whether the sortition field is set. + */ + @java.lang.Override + public boolean hasSortition() { + return payloadCase_ == 32; + } + /** + *
+     * Sortition transaction payload.
+     * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + * @return The sortition. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadSortition getSortition() { + if (payloadCase_ == 32) { + return (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); + } + /** + *
+     * Sortition transaction payload.
+     * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder getSortitionOrBuilder() { + if (payloadCase_ == 32) { + return (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); + } + + public static final int UNBOND_FIELD_NUMBER = 33; + /** + *
+     * Unbond transaction payload.
+     * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + * @return Whether the unbond field is set. + */ + @java.lang.Override + public boolean hasUnbond() { + return payloadCase_ == 33; + } + /** + *
+     * Unbond transaction payload.
+     * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + * @return The unbond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond() { + if (payloadCase_ == 33) { + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } + /** + *
+     * Unbond transaction payload.
+     * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() { + if (payloadCase_ == 33) { + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } + + public static final int WITHDRAW_FIELD_NUMBER = 34; + /** + *
+     * Withdraw transaction payload.
+     * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + * @return Whether the withdraw field is set. + */ + @java.lang.Override + public boolean hasWithdraw() { + return payloadCase_ == 34; + } + /** + *
+     * Withdraw transaction payload.
+     * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + * @return The withdraw. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw() { + if (payloadCase_ == 34) { + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } + /** + *
+     * Withdraw transaction payload.
+     * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() { + if (payloadCase_ == 34) { + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } + + public static final int MEMO_FIELD_NUMBER = 8; + private volatile java.lang.Object memo_; + /** + *
+     * A memo string for the transaction.
+     * 
+ * + * string memo = 8 [json_name = "memo"]; + * @return The memo. + */ + @java.lang.Override + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } + } + /** + *
+     * A memo string for the transaction.
+     * 
+ * + * string memo = 8 [json_name = "memo"]; + * @return The bytes for memo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 9; + private volatile java.lang.Object publicKey_; + /** + *
+     * The public key associated with the transaction.
+     * 
+ * + * string public_key = 9 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + *
+     * The public key associated with the transaction.
+     * 
+ * + * string public_key = 9 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNATURE_FIELD_NUMBER = 10; + private volatile java.lang.Object signature_; + /** + *
+     * The signature for the transaction.
+     * 
+ * + * string signature = 10 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } + } + /** + *
+     * The signature for the transaction.
+     * 
+ * + * string signature = 10 [json_name = "signature"]; + * @return The bytes for signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); + } + if (version_ != 0) { + output.writeInt32(3, version_); + } + if (lockTime_ != 0) { + output.writeUInt32(4, lockTime_); + } + if (value_ != 0L) { + output.writeInt64(5, value_); + } + if (fee_ != 0L) { + output.writeInt64(6, fee_); + } + if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { + output.writeEnum(7, payloadType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, memo_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, publicKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, signature_); + } + if (payloadCase_ == 30) { + output.writeMessage(30, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); + } + if (payloadCase_ == 31) { + output.writeMessage(31, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); + } + if (payloadCase_ == 32) { + output.writeMessage(32, (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_); + } + if (payloadCase_ == 33) { + output.writeMessage(33, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); + } + if (payloadCase_ == 34) { + output.writeMessage(34, (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); + } + if (version_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, version_); + } + if (lockTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, lockTime_); + } + if (value_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, value_); + } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, fee_); + } + if (payloadType_ != pactus.transaction.TransactionOuterClass.PayloadType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, payloadType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, memo_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, publicKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, signature_); + } + if (payloadCase_ == 30) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); + } + if (payloadCase_ == 31) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(31, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); + } + if (payloadCase_ == 32) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(32, (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_); + } + if (payloadCase_ == 33) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(33, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); + } + if (payloadCase_ == 34) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(34, (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.TransactionInfo)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.TransactionInfo other = (pactus.transaction.TransactionOuterClass.TransactionInfo) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getData() + .equals(other.getData())) return false; + if (getVersion() + != other.getVersion()) return false; + if (getLockTime() + != other.getLockTime()) return false; + if (getValue() + != other.getValue()) return false; + if (getFee() + != other.getFee()) return false; + if (payloadType_ != other.payloadType_) return false; + if (!getMemo() + .equals(other.getMemo())) return false; + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (!getSignature() + .equals(other.getSignature())) return false; + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 30: + if (!getTransfer() + .equals(other.getTransfer())) return false; + break; + case 31: + if (!getBond() + .equals(other.getBond())) return false; + break; + case 32: + if (!getSortition() + .equals(other.getSortition())) return false; + break; + case 33: + if (!getUnbond() + .equals(other.getUnbond())) return false; + break; + case 34: + if (!getWithdraw() + .equals(other.getWithdraw())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion(); + hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLockTime(); + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getValue()); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); + hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + payloadType_; + hash = (37 * hash) + MEMO_FIELD_NUMBER; + hash = (53 * hash) + getMemo().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + switch (payloadCase_) { + case 30: + hash = (37 * hash) + TRANSFER_FIELD_NUMBER; + hash = (53 * hash) + getTransfer().hashCode(); + break; + case 31: + hash = (37 * hash) + BOND_FIELD_NUMBER; + hash = (53 * hash) + getBond().hashCode(); + break; + case 32: + hash = (37 * hash) + SORTITION_FIELD_NUMBER; + hash = (53 * hash) + getSortition().hashCode(); + break; + case 33: + hash = (37 * hash) + UNBOND_FIELD_NUMBER; + hash = (53 * hash) + getUnbond().hashCode(); + break; + case 34: + hash = (37 * hash) + WITHDRAW_FIELD_NUMBER; + hash = (53 * hash) + getWithdraw().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.TransactionInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.TransactionInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Information about a transaction.
+     * 
+ * + * Protobuf type {@code pactus.TransactionInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.TransactionInfo) + pactus.transaction.TransactionOuterClass.TransactionInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransactionInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransactionInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.TransactionInfo.class, pactus.transaction.TransactionOuterClass.TransactionInfo.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.TransactionInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + data_ = ""; + + version_ = 0; + + lockTime_ = 0; + + value_ = 0L; + + fee_ = 0L; + + payloadType_ = 0; + + if (transferBuilder_ != null) { + transferBuilder_.clear(); + } + if (bondBuilder_ != null) { + bondBuilder_.clear(); + } + if (sortitionBuilder_ != null) { + sortitionBuilder_.clear(); + } + if (unbondBuilder_ != null) { + unbondBuilder_.clear(); + } + if (withdrawBuilder_ != null) { + withdrawBuilder_.clear(); + } + memo_ = ""; + + publicKey_ = ""; + + signature_ = ""; + + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransactionInfo_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionInfo build() { + pactus.transaction.TransactionOuterClass.TransactionInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionInfo buildPartial() { + pactus.transaction.TransactionOuterClass.TransactionInfo result = new pactus.transaction.TransactionOuterClass.TransactionInfo(this); + result.id_ = id_; + result.data_ = data_; + result.version_ = version_; + result.lockTime_ = lockTime_; + result.value_ = value_; + result.fee_ = fee_; + result.payloadType_ = payloadType_; + if (payloadCase_ == 30) { + if (transferBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = transferBuilder_.build(); + } + } + if (payloadCase_ == 31) { + if (bondBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = bondBuilder_.build(); + } + } + if (payloadCase_ == 32) { + if (sortitionBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = sortitionBuilder_.build(); + } + } + if (payloadCase_ == 33) { + if (unbondBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = unbondBuilder_.build(); + } + } + if (payloadCase_ == 34) { + if (withdrawBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = withdrawBuilder_.build(); + } + } + result.memo_ = memo_; + result.publicKey_ = publicKey_; + result.signature_ = signature_; + result.payloadCase_ = payloadCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.TransactionInfo) { + return mergeFrom((pactus.transaction.TransactionOuterClass.TransactionInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.TransactionInfo other) { + if (other == pactus.transaction.TransactionOuterClass.TransactionInfo.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getData().isEmpty()) { + data_ = other.data_; + onChanged(); + } + if (other.getVersion() != 0) { + setVersion(other.getVersion()); + } + if (other.getLockTime() != 0) { + setLockTime(other.getLockTime()); + } + if (other.getValue() != 0L) { + setValue(other.getValue()); + } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } + if (other.payloadType_ != 0) { + setPayloadTypeValue(other.getPayloadTypeValue()); + } + if (!other.getMemo().isEmpty()) { + memo_ = other.memo_; + onChanged(); + } + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } + if (!other.getSignature().isEmpty()) { + signature_ = other.signature_; + onChanged(); + } + switch (other.getPayloadCase()) { + case TRANSFER: { + mergeTransfer(other.getTransfer()); + break; + } + case BOND: { + mergeBond(other.getBond()); + break; + } + case SORTITION: { + mergeSortition(other.getSortition()); + break; + } + case UNBOND: { + mergeUnbond(other.getUnbond()); + break; + } + case WITHDRAW: { + mergeWithdraw(other.getWithdraw()); + break; + } + case PAYLOAD_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + data_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + version_ = input.readInt32(); + + break; + } // case 24 + case 32: { + lockTime_ = input.readUInt32(); + + break; + } // case 32 + case 40: { + value_ = input.readInt64(); + + break; + } // case 40 + case 48: { + fee_ = input.readInt64(); + + break; + } // case 48 + case 56: { + payloadType_ = input.readEnum(); + + break; + } // case 56 + case 66: { + memo_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: { + publicKey_ = input.readStringRequireUtf8(); + + break; + } // case 74 + case 82: { + signature_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 242: { + input.readMessage( + getTransferFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 30; + break; + } // case 242 + case 250: { + input.readMessage( + getBondFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 31; + break; + } // case 250 + case 258: { + input.readMessage( + getSortitionFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 32; + break; + } // case 258 + case 266: { + input.readMessage( + getUnbondFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 33; + break; + } // case 266 + case 274: { + input.readMessage( + getWithdrawFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 34; + break; + } // case 274 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int payloadCase_ = 0; + private java.lang.Object payload_; + public PayloadCase + getPayloadCase() { + return PayloadCase.forNumber( + payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + + private java.lang.Object id_ = ""; + /** + *
+       * The unique ID of the transaction.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The unique ID of the transaction.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The unique ID of the transaction.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + *
+       * The unique ID of the transaction.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + *
+       * The unique ID of the transaction.
+       * 
+ * + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object data_ = ""; + /** + *
+       * The raw transaction data.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @return The data. + */ + public java.lang.String getData() { + java.lang.Object ref = data_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The raw transaction data.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @return The bytes for data. + */ + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The raw transaction data.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       * The raw transaction data.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + /** + *
+       * The raw transaction data.
+       * 
+ * + * string data = 2 [json_name = "data"]; + * @param value The bytes for data to set. + * @return This builder for chaining. + */ + public Builder setDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + data_ = value; + onChanged(); + return this; + } + + private int version_ ; + /** + *
+       * The version of the transaction.
+       * 
+ * + * int32 version = 3 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public int getVersion() { + return version_; + } + /** + *
+       * The version of the transaction.
+       * 
+ * + * int32 version = 3 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(int value) { + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * The version of the transaction.
+       * 
+ * + * int32 version = 3 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = 0; + onChanged(); + return this; + } + + private int lockTime_ ; + /** + *
+       * The lock time for the transaction.
+       * 
+ * + * uint32 lock_time = 4 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + /** + *
+       * The lock time for the transaction.
+       * 
+ * + * uint32 lock_time = 4 [json_name = "lockTime"]; + * @param value The lockTime to set. + * @return This builder for chaining. + */ + public Builder setLockTime(int value) { + + lockTime_ = value; + onChanged(); + return this; + } + /** + *
+       * The lock time for the transaction.
+       * 
+ * + * uint32 lock_time = 4 [json_name = "lockTime"]; + * @return This builder for chaining. + */ + public Builder clearLockTime() { + + lockTime_ = 0; + onChanged(); + return this; + } + + private long value_ ; + /** + *
+       * The value of the transaction in NanoPAC.
+       * 
+ * + * int64 value = 5 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public long getValue() { + return value_; + } + /** + *
+       * The value of the transaction in NanoPAC.
+       * 
+ * + * int64 value = 5 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(long value) { + + value_ = value; + onChanged(); + return this; + } + /** + *
+       * The value of the transaction in NanoPAC.
+       * 
+ * + * int64 value = 5 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = 0L; + onChanged(); + return this; + } + + private long fee_ ; + /** + *
+       * The fee for the transaction in NanoPAC.
+       * 
+ * + * int64 fee = 6 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
+       * The fee for the transaction in NanoPAC.
+       * 
+ * + * int64 fee = 6 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
+       * The fee for the transaction in NanoPAC.
+       * 
+ * + * int64 fee = 6 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } + + private int payloadType_ = 0; + /** + *
+       * The type of transaction payload.
+       * 
+ * + * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; + * @return The enum numeric value on the wire for payloadType. + */ + @java.lang.Override public int getPayloadTypeValue() { + return payloadType_; + } + /** + *
+       * The type of transaction payload.
+       * 
+ * + * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; + * @param value The enum numeric value on the wire for payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadTypeValue(int value) { + + payloadType_ = value; + onChanged(); + return this; + } + /** + *
+       * The type of transaction payload.
+       * 
+ * + * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; + * @return The payloadType. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadType getPayloadType() { + @SuppressWarnings("deprecation") + pactus.transaction.TransactionOuterClass.PayloadType result = pactus.transaction.TransactionOuterClass.PayloadType.valueOf(payloadType_); + return result == null ? pactus.transaction.TransactionOuterClass.PayloadType.UNRECOGNIZED : result; + } + /** + *
+       * The type of transaction payload.
+       * 
+ * + * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; + * @param value The payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadType(pactus.transaction.TransactionOuterClass.PayloadType value) { + if (value == null) { + throw new NullPointerException(); + } + + payloadType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The type of transaction payload.
+       * 
+ * + * .pactus.PayloadType payload_type = 7 [json_name = "payloadType"]; + * @return This builder for chaining. + */ + public Builder clearPayloadType() { + + payloadType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder> transferBuilder_; + /** + *
+       * Transfer transaction payload.
+       * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + * @return Whether the transfer field is set. + */ + @java.lang.Override + public boolean hasTransfer() { + return payloadCase_ == 30; + } + /** + *
+       * Transfer transaction payload.
+       * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + * @return The transfer. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer() { + if (transferBuilder_ == null) { + if (payloadCase_ == 30) { + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } else { + if (payloadCase_ == 30) { + return transferBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } + } + /** + *
+       * Transfer transaction payload.
+       * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + */ + public Builder setTransfer(pactus.transaction.TransactionOuterClass.PayloadTransfer value) { + if (transferBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + transferBuilder_.setMessage(value); + } + payloadCase_ = 30; + return this; + } + /** + *
+       * Transfer transaction payload.
+       * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + */ + public Builder setTransfer( + pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder builderForValue) { + if (transferBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + transferBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 30; + return this; + } + /** + *
+       * Transfer transaction payload.
+       * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + */ + public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.PayloadTransfer value) { + if (transferBuilder_ == null) { + if (payloadCase_ == 30 && + payload_ != pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance()) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadTransfer.newBuilder((pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 30) { + transferBuilder_.mergeFrom(value); + } else { + transferBuilder_.setMessage(value); + } + } + payloadCase_ = 30; + return this; + } + /** + *
+       * Transfer transaction payload.
+       * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + */ + public Builder clearTransfer() { + if (transferBuilder_ == null) { + if (payloadCase_ == 30) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 30) { + payloadCase_ = 0; + payload_ = null; + } + transferBuilder_.clear(); + } + return this; + } + /** + *
+       * Transfer transaction payload.
+       * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + */ + public pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder getTransferBuilder() { + return getTransferFieldBuilder().getBuilder(); + } + /** + *
+       * Transfer transaction payload.
+       * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() { + if ((payloadCase_ == 30) && (transferBuilder_ != null)) { + return transferBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 30) { + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } + } + /** + *
+       * Transfer transaction payload.
+       * 
+ * + * .pactus.PayloadTransfer transfer = 30 [json_name = "transfer"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder> + getTransferFieldBuilder() { + if (transferBuilder_ == null) { + if (!(payloadCase_ == 30)) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); + } + transferBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder>( + (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 30; + onChanged();; + return transferBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder> bondBuilder_; + /** + *
+       * Bond transaction payload.
+       * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + * @return Whether the bond field is set. + */ + @java.lang.Override + public boolean hasBond() { + return payloadCase_ == 31; + } + /** + *
+       * Bond transaction payload.
+       * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + * @return The bond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBond getBond() { + if (bondBuilder_ == null) { + if (payloadCase_ == 31) { + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } else { + if (payloadCase_ == 31) { + return bondBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } + } + /** + *
+       * Bond transaction payload.
+       * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + */ + public Builder setBond(pactus.transaction.TransactionOuterClass.PayloadBond value) { + if (bondBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + bondBuilder_.setMessage(value); + } + payloadCase_ = 31; + return this; + } + /** + *
+       * Bond transaction payload.
+       * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + */ + public Builder setBond( + pactus.transaction.TransactionOuterClass.PayloadBond.Builder builderForValue) { + if (bondBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + bondBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 31; + return this; + } + /** + *
+       * Bond transaction payload.
+       * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + */ + public Builder mergeBond(pactus.transaction.TransactionOuterClass.PayloadBond value) { + if (bondBuilder_ == null) { + if (payloadCase_ == 31 && + payload_ != pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance()) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadBond.newBuilder((pactus.transaction.TransactionOuterClass.PayloadBond) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 31) { + bondBuilder_.mergeFrom(value); + } else { + bondBuilder_.setMessage(value); + } + } + payloadCase_ = 31; + return this; + } + /** + *
+       * Bond transaction payload.
+       * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + */ + public Builder clearBond() { + if (bondBuilder_ == null) { + if (payloadCase_ == 31) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 31) { + payloadCase_ = 0; + payload_ = null; + } + bondBuilder_.clear(); + } + return this; + } + /** + *
+       * Bond transaction payload.
+       * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + */ + public pactus.transaction.TransactionOuterClass.PayloadBond.Builder getBondBuilder() { + return getBondFieldBuilder().getBuilder(); + } + /** + *
+       * Bond transaction payload.
+       * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() { + if ((payloadCase_ == 31) && (bondBuilder_ != null)) { + return bondBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 31) { + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } + } + /** + *
+       * Bond transaction payload.
+       * 
+ * + * .pactus.PayloadBond bond = 31 [json_name = "bond"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder> + getBondFieldBuilder() { + if (bondBuilder_ == null) { + if (!(payloadCase_ == 31)) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); + } + bondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder>( + (pactus.transaction.TransactionOuterClass.PayloadBond) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 31; + onChanged();; + return bondBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadSortition, pactus.transaction.TransactionOuterClass.PayloadSortition.Builder, pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder> sortitionBuilder_; + /** + *
+       * Sortition transaction payload.
+       * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + * @return Whether the sortition field is set. + */ + @java.lang.Override + public boolean hasSortition() { + return payloadCase_ == 32; + } + /** + *
+       * Sortition transaction payload.
+       * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + * @return The sortition. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadSortition getSortition() { + if (sortitionBuilder_ == null) { + if (payloadCase_ == 32) { + return (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); + } else { + if (payloadCase_ == 32) { + return sortitionBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); + } + } + /** + *
+       * Sortition transaction payload.
+       * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + */ + public Builder setSortition(pactus.transaction.TransactionOuterClass.PayloadSortition value) { + if (sortitionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + sortitionBuilder_.setMessage(value); + } + payloadCase_ = 32; + return this; + } + /** + *
+       * Sortition transaction payload.
+       * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + */ + public Builder setSortition( + pactus.transaction.TransactionOuterClass.PayloadSortition.Builder builderForValue) { + if (sortitionBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + sortitionBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 32; + return this; + } + /** + *
+       * Sortition transaction payload.
+       * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + */ + public Builder mergeSortition(pactus.transaction.TransactionOuterClass.PayloadSortition value) { + if (sortitionBuilder_ == null) { + if (payloadCase_ == 32 && + payload_ != pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance()) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadSortition.newBuilder((pactus.transaction.TransactionOuterClass.PayloadSortition) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 32) { + sortitionBuilder_.mergeFrom(value); + } else { + sortitionBuilder_.setMessage(value); + } + } + payloadCase_ = 32; + return this; + } + /** + *
+       * Sortition transaction payload.
+       * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + */ + public Builder clearSortition() { + if (sortitionBuilder_ == null) { + if (payloadCase_ == 32) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 32) { + payloadCase_ = 0; + payload_ = null; + } + sortitionBuilder_.clear(); + } + return this; + } + /** + *
+       * Sortition transaction payload.
+       * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + */ + public pactus.transaction.TransactionOuterClass.PayloadSortition.Builder getSortitionBuilder() { + return getSortitionFieldBuilder().getBuilder(); + } + /** + *
+       * Sortition transaction payload.
+       * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder getSortitionOrBuilder() { + if ((payloadCase_ == 32) && (sortitionBuilder_ != null)) { + return sortitionBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 32) { + return (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); + } + } + /** + *
+       * Sortition transaction payload.
+       * 
+ * + * .pactus.PayloadSortition sortition = 32 [json_name = "sortition"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadSortition, pactus.transaction.TransactionOuterClass.PayloadSortition.Builder, pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder> + getSortitionFieldBuilder() { + if (sortitionBuilder_ == null) { + if (!(payloadCase_ == 32)) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadSortition.getDefaultInstance(); + } + sortitionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadSortition, pactus.transaction.TransactionOuterClass.PayloadSortition.Builder, pactus.transaction.TransactionOuterClass.PayloadSortitionOrBuilder>( + (pactus.transaction.TransactionOuterClass.PayloadSortition) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 32; + onChanged();; + return sortitionBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder> unbondBuilder_; + /** + *
+       * Unbond transaction payload.
+       * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + * @return Whether the unbond field is set. + */ + @java.lang.Override + public boolean hasUnbond() { + return payloadCase_ == 33; + } + /** + *
+       * Unbond transaction payload.
+       * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + * @return The unbond. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond() { + if (unbondBuilder_ == null) { + if (payloadCase_ == 33) { + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } else { + if (payloadCase_ == 33) { + return unbondBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } + } + /** + *
+       * Unbond transaction payload.
+       * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + */ + public Builder setUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbond value) { + if (unbondBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + unbondBuilder_.setMessage(value); + } + payloadCase_ = 33; + return this; + } + /** + *
+       * Unbond transaction payload.
+       * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + */ + public Builder setUnbond( + pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder builderForValue) { + if (unbondBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + unbondBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 33; + return this; + } + /** + *
+       * Unbond transaction payload.
+       * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + */ + public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbond value) { + if (unbondBuilder_ == null) { + if (payloadCase_ == 33 && + payload_ != pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance()) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadUnbond.newBuilder((pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 33) { + unbondBuilder_.mergeFrom(value); + } else { + unbondBuilder_.setMessage(value); + } + } + payloadCase_ = 33; + return this; + } + /** + *
+       * Unbond transaction payload.
+       * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + */ + public Builder clearUnbond() { + if (unbondBuilder_ == null) { + if (payloadCase_ == 33) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 33) { + payloadCase_ = 0; + payload_ = null; + } + unbondBuilder_.clear(); + } + return this; + } + /** + *
+       * Unbond transaction payload.
+       * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + */ + public pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder getUnbondBuilder() { + return getUnbondFieldBuilder().getBuilder(); + } + /** + *
+       * Unbond transaction payload.
+       * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() { + if ((payloadCase_ == 33) && (unbondBuilder_ != null)) { + return unbondBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 33) { + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } + } + /** + *
+       * Unbond transaction payload.
+       * 
+ * + * .pactus.PayloadUnbond unbond = 33 [json_name = "unbond"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder> + getUnbondFieldBuilder() { + if (unbondBuilder_ == null) { + if (!(payloadCase_ == 33)) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); + } + unbondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder>( + (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 33; + onChanged();; + return unbondBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder> withdrawBuilder_; + /** + *
+       * Withdraw transaction payload.
+       * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + * @return Whether the withdraw field is set. + */ + @java.lang.Override + public boolean hasWithdraw() { + return payloadCase_ == 34; + } + /** + *
+       * Withdraw transaction payload.
+       * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + * @return The withdraw. + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw() { + if (withdrawBuilder_ == null) { + if (payloadCase_ == 34) { + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } else { + if (payloadCase_ == 34) { + return withdrawBuilder_.getMessage(); + } + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } + } + /** + *
+       * Withdraw transaction payload.
+       * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + */ + public Builder setWithdraw(pactus.transaction.TransactionOuterClass.PayloadWithdraw value) { + if (withdrawBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + withdrawBuilder_.setMessage(value); + } + payloadCase_ = 34; + return this; + } + /** + *
+       * Withdraw transaction payload.
+       * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + */ + public Builder setWithdraw( + pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder builderForValue) { + if (withdrawBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + withdrawBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 34; + return this; + } + /** + *
+       * Withdraw transaction payload.
+       * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + */ + public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.PayloadWithdraw value) { + if (withdrawBuilder_ == null) { + if (payloadCase_ == 34 && + payload_ != pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance()) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadWithdraw.newBuilder((pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_) + .mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 34) { + withdrawBuilder_.mergeFrom(value); + } else { + withdrawBuilder_.setMessage(value); + } + } + payloadCase_ = 34; + return this; + } + /** + *
+       * Withdraw transaction payload.
+       * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + */ + public Builder clearWithdraw() { + if (withdrawBuilder_ == null) { + if (payloadCase_ == 34) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 34) { + payloadCase_ = 0; + payload_ = null; + } + withdrawBuilder_.clear(); + } + return this; + } + /** + *
+       * Withdraw transaction payload.
+       * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + */ + public pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder getWithdrawBuilder() { + return getWithdrawFieldBuilder().getBuilder(); + } + /** + *
+       * Withdraw transaction payload.
+       * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + */ + @java.lang.Override + public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() { + if ((payloadCase_ == 34) && (withdrawBuilder_ != null)) { + return withdrawBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 34) { + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; + } + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } + } + /** + *
+       * Withdraw transaction payload.
+       * 
+ * + * .pactus.PayloadWithdraw withdraw = 34 [json_name = "withdraw"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder> + getWithdrawFieldBuilder() { + if (withdrawBuilder_ == null) { + if (!(payloadCase_ == 34)) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); + } + withdrawBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder>( + (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 34; + onChanged();; + return withdrawBuilder_; + } + + private java.lang.Object memo_ = ""; + /** + *
+       * A memo string for the transaction.
+       * 
+ * + * string memo = 8 [json_name = "memo"]; + * @return The memo. + */ + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A memo string for the transaction.
+       * 
+ * + * string memo = 8 [json_name = "memo"]; + * @return The bytes for memo. + */ + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A memo string for the transaction.
+       * 
+ * + * string memo = 8 [json_name = "memo"]; + * @param value The memo to set. + * @return This builder for chaining. + */ + public Builder setMemo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memo_ = value; + onChanged(); + return this; + } + /** + *
+       * A memo string for the transaction.
+       * 
+ * + * string memo = 8 [json_name = "memo"]; + * @return This builder for chaining. + */ + public Builder clearMemo() { + + memo_ = getDefaultInstance().getMemo(); + onChanged(); + return this; + } + /** + *
+       * A memo string for the transaction.
+       * 
+ * + * string memo = 8 [json_name = "memo"]; + * @param value The bytes for memo to set. + * @return This builder for chaining. + */ + public Builder setMemoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memo_ = value; + onChanged(); + return this; + } + + private java.lang.Object publicKey_ = ""; + /** + *
+       * The public key associated with the transaction.
+       * 
+ * + * string public_key = 9 [json_name = "publicKey"]; + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The public key associated with the transaction.
+       * 
+ * + * string public_key = 9 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The public key associated with the transaction.
+       * 
+ * + * string public_key = 9 [json_name = "publicKey"]; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + *
+       * The public key associated with the transaction.
+       * 
+ * + * string public_key = 9 [json_name = "publicKey"]; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + /** + *
+       * The public key associated with the transaction.
+       * 
+ * + * string public_key = 9 [json_name = "publicKey"]; + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object signature_ = ""; + /** + *
+       * The signature for the transaction.
+       * 
+ * + * string signature = 10 [json_name = "signature"]; + * @return The signature. + */ + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The signature for the transaction.
+       * 
+ * + * string signature = 10 [json_name = "signature"]; + * @return The bytes for signature. + */ + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The signature for the transaction.
+       * 
+ * + * string signature = 10 [json_name = "signature"]; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + signature_ = value; + onChanged(); + return this; + } + /** + *
+       * The signature for the transaction.
+       * 
+ * + * string signature = 10 [json_name = "signature"]; + * @return This builder for chaining. + */ + public Builder clearSignature() { + + signature_ = getDefaultInstance().getSignature(); + onChanged(); + return this; + } + /** + *
+       * The signature for the transaction.
+       * 
+ * + * string signature = 10 [json_name = "signature"]; + * @param value The bytes for signature to set. + * @return This builder for chaining. + */ + public Builder setSignatureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + signature_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.TransactionInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.TransactionInfo) + private static final pactus.transaction.TransactionOuterClass.TransactionInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.TransactionInfo(); + } + + public static pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransactionInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetTransactionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetTransactionResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetTransactionResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_CalculateFeeRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_CalculateFeeRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_CalculateFeeResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_CalculateFeeResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_BroadcastTransactionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_BroadcastTransactionResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetRawTransactionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetRawTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetRawTransferTransactionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetRawBondTransactionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetRawTransactionResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_PayloadTransfer_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_PayloadTransfer_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_PayloadBond_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_PayloadBond_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_PayloadSortition_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_PayloadSortition_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_PayloadUnbond_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_PayloadUnbond_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_PayloadWithdraw_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_PayloadWithdraw_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_TransactionInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_TransactionInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021transaction.proto\022\006pactus\"c\n\025GetTransa" + + "ctionRequest\022\016\n\002id\030\001 \001(\tR\002id\022:\n\tverbosit" + + "y\030\002 \001(\0162\034.pactus.TransactionVerbosityR\tv" + + "erbosity\"\225\001\n\026GetTransactionResponse\022!\n\014b" + + "lock_height\030\001 \001(\rR\013blockHeight\022\035\n\nblock_" + + "time\030\002 \001(\rR\tblockTime\0229\n\013transaction\030\003 \001" + + "(\0132\027.pactus.TransactionInfoR\013transaction" + + "\"\210\001\n\023CalculateFeeRequest\022\026\n\006amount\030\001 \001(\003" + + "R\006amount\0226\n\014payload_type\030\002 \001(\0162\023.pactus." + + "PayloadTypeR\013payloadType\022!\n\014fixed_amount" + + "\030\003 \001(\010R\013fixedAmount\"@\n\024CalculateFeeRespo" + + "nse\022\026\n\006amount\030\001 \001(\003R\006amount\022\020\n\003fee\030\002 \001(\003" + + "R\003fee\"S\n\033BroadcastTransactionRequest\0224\n\026" + + "signed_raw_transaction\030\001 \001(\tR\024signedRawT" + + "ransaction\".\n\034BroadcastTransactionRespon" + + "se\022\016\n\002id\030\001 \001(\tR\002id\"\350\002\n\030GetRawTransaction" + + "Request\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022\022\n\004" + + "memo\030\002 \001(\tR\004memo\022F\n\010transfer\030\003 \001(\0132(.pac" + + "tus.GetRawTransferTransactionRequestH\000R\010" + + "transfer\022:\n\004bond\030\004 \001(\0132$.pactus.GetRawBo" + + "ndTransactionRequestH\000R\004bond\022@\n\006unbond\030\005" + + " \001(\0132&.pactus.GetRawUnbondTransactionReq" + + "uestH\000R\006unbond\022F\n\010withdraw\030\006 \001(\0132(.pactu" + + "s.GetRawWithdrawTransactionRequestH\000R\010wi" + + "thdrawB\r\n\013transaction\"\200\001\n GetRawTransfer" + + "TransactionRequest\022\026\n\006sender\030\001 \001(\tR\006send" + + "er\022\032\n\010receiver\030\002 \001(\tR\010receiver\022\026\n\006amount" + + "\030\003 \001(\003R\006amount\022\020\n\003fee\030\004 \001(\003R\003fee\"\231\001\n\034Get" + + "RawBondTransactionRequest\022\026\n\006sender\030\001 \001(" + + "\tR\006sender\022\032\n\010receiver\030\002 \001(\tR\010receiver\022\024\n" + + "\005stake\030\003 \001(\003R\005stake\022\035\n\npublic_key\030\004 \001(\tR" + + "\tpublicKey\022\020\n\003fee\030\005 \001(\003R\003fee\"M\n\036GetRawUn" + + "bondTransactionRequest\022+\n\021validator_addr" + + "ess\030\001 \001(\tR\020validatorAddress\"\242\001\n GetRawWi" + + "thdrawTransactionRequest\022+\n\021validator_ad" + + "dress\030\001 \001(\tR\020validatorAddress\022\'\n\017account" + + "_address\030\002 \001(\tR\016accountAddress\022\026\n\006amount" + + "\030\003 \001(\003R\006amount\022\020\n\003fee\030\004 \001(\003R\003fee\"D\n\031GetR" + + "awTransactionResponse\022\'\n\017raw_transaction" + + "\030\001 \001(\tR\016rawTransaction\"]\n\017PayloadTransfe" + + "r\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 " + + "\001(\tR\010receiver\022\026\n\006amount\030\003 \001(\003R\006amount\"W\n" + + "\013PayloadBond\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010" + + "receiver\030\002 \001(\tR\010receiver\022\024\n\005stake\030\003 \001(\003R" + + "\005stake\"B\n\020PayloadSortition\022\030\n\007address\030\001 " + + "\001(\tR\007address\022\024\n\005proof\030\002 \001(\tR\005proof\"-\n\rPa" + + "yloadUnbond\022\034\n\tvalidator\030\001 \001(\tR\tvalidato" + + "r\"M\n\017PayloadWithdraw\022\022\n\004from\030\001 \001(\tR\004from" + + "\022\016\n\002to\030\002 \001(\tR\002to\022\026\n\006amount\030\003 \001(\003R\006amount" + + "\"\254\004\n\017TransactionInfo\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004" + + "data\030\002 \001(\tR\004data\022\030\n\007version\030\003 \001(\005R\007versi" + + "on\022\033\n\tlock_time\030\004 \001(\rR\010lockTime\022\024\n\005value" + + "\030\005 \001(\003R\005value\022\020\n\003fee\030\006 \001(\003R\003fee\0226\n\014paylo" + + "ad_type\030\007 \001(\0162\023.pactus.PayloadTypeR\013payl" + + "oadType\0225\n\010transfer\030\036 \001(\0132\027.pactus.Paylo" + + "adTransferH\000R\010transfer\022)\n\004bond\030\037 \001(\0132\023.p" + + "actus.PayloadBondH\000R\004bond\0228\n\tsortition\030 " + + " \001(\0132\030.pactus.PayloadSortitionH\000R\tsortit" + + "ion\022/\n\006unbond\030! \001(\0132\025.pactus.PayloadUnbo" + + "ndH\000R\006unbond\0225\n\010withdraw\030\" \001(\0132\027.pactus." + + "PayloadWithdrawH\000R\010withdraw\022\022\n\004memo\030\010 \001(" + + "\tR\004memo\022\035\n\npublic_key\030\t \001(\tR\tpublicKey\022\034" + + "\n\tsignature\030\n \001(\tR\tsignatureB\t\n\007payload*" + + "\203\001\n\013PayloadType\022\013\n\007UNKNOWN\020\000\022\024\n\020TRANSFER" + + "_PAYLOAD\020\001\022\020\n\014BOND_PAYLOAD\020\002\022\025\n\021SORTITIO" + + "N_PAYLOAD\020\003\022\022\n\016UNBOND_PAYLOAD\020\004\022\024\n\020WITHD" + + "RAW_PAYLOAD\020\005*B\n\024TransactionVerbosity\022\024\n" + + "\020TRANSACTION_DATA\020\000\022\024\n\020TRANSACTION_INFO\020" + + "\0012\346\002\n\013Transaction\022O\n\016GetTransaction\022\035.pa" + + "ctus.GetTransactionRequest\032\036.pactus.GetT" + + "ransactionResponse\022I\n\014CalculateFee\022\033.pac" + + "tus.CalculateFeeRequest\032\034.pactus.Calcula" + + "teFeeResponse\022a\n\024BroadcastTransaction\022#." + + "pactus.BroadcastTransactionRequest\032$.pac" + + "tus.BroadcastTransactionResponse\022X\n\021GetR" + + "awTransaction\022 .pactus.GetRawTransaction" + + "Request\032!.pactus.GetRawTransactionRespon" + + "seBF\n\022pactus.transactionZ0github.com/pac" + + "tus-project/pactus/www/grpc/pactusb\006prot" + + "o3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pactus_GetTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pactus_GetTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetTransactionRequest_descriptor, + new java.lang.String[] { "Id", "Verbosity", }); + internal_static_pactus_GetTransactionResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_pactus_GetTransactionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetTransactionResponse_descriptor, + new java.lang.String[] { "BlockHeight", "BlockTime", "Transaction", }); + internal_static_pactus_CalculateFeeRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_pactus_CalculateFeeRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_CalculateFeeRequest_descriptor, + new java.lang.String[] { "Amount", "PayloadType", "FixedAmount", }); + internal_static_pactus_CalculateFeeResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_pactus_CalculateFeeResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_CalculateFeeResponse_descriptor, + new java.lang.String[] { "Amount", "Fee", }); + internal_static_pactus_BroadcastTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_pactus_BroadcastTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_BroadcastTransactionRequest_descriptor, + new java.lang.String[] { "SignedRawTransaction", }); + internal_static_pactus_BroadcastTransactionResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_pactus_BroadcastTransactionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_BroadcastTransactionResponse_descriptor, + new java.lang.String[] { "Id", }); + internal_static_pactus_GetRawTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_pactus_GetRawTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetRawTransactionRequest_descriptor, + new java.lang.String[] { "LockTime", "Memo", "Transfer", "Bond", "Unbond", "Withdraw", "Transaction", }); + internal_static_pactus_GetRawTransferTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetRawTransferTransactionRequest_descriptor, + new java.lang.String[] { "Sender", "Receiver", "Amount", "Fee", }); + internal_static_pactus_GetRawBondTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetRawBondTransactionRequest_descriptor, + new java.lang.String[] { "Sender", "Receiver", "Stake", "PublicKey", "Fee", }); + internal_static_pactus_GetRawUnbondTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetRawUnbondTransactionRequest_descriptor, + new java.lang.String[] { "ValidatorAddress", }); + internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor, + new java.lang.String[] { "ValidatorAddress", "AccountAddress", "Amount", "Fee", }); + internal_static_pactus_GetRawTransactionResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetRawTransactionResponse_descriptor, + new java.lang.String[] { "RawTransaction", }); + internal_static_pactus_PayloadTransfer_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_pactus_PayloadTransfer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_PayloadTransfer_descriptor, + new java.lang.String[] { "Sender", "Receiver", "Amount", }); + internal_static_pactus_PayloadBond_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_pactus_PayloadBond_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_PayloadBond_descriptor, + new java.lang.String[] { "Sender", "Receiver", "Stake", }); + internal_static_pactus_PayloadSortition_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_pactus_PayloadSortition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_PayloadSortition_descriptor, + new java.lang.String[] { "Address", "Proof", }); + internal_static_pactus_PayloadUnbond_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_pactus_PayloadUnbond_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_PayloadUnbond_descriptor, + new java.lang.String[] { "Validator", }); + internal_static_pactus_PayloadWithdraw_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_pactus_PayloadWithdraw_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_PayloadWithdraw_descriptor, + new java.lang.String[] { "From", "To", "Amount", }); + internal_static_pactus_TransactionInfo_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_pactus_TransactionInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_TransactionInfo_descriptor, + new java.lang.String[] { "Id", "Data", "Version", "LockTime", "Value", "Fee", "PayloadType", "Transfer", "Bond", "Sortition", "Unbond", "Withdraw", "Memo", "PublicKey", "Signature", "Payload", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/www/grpc/gen/java/pactus/utils/UtilsGrpc.java b/www/grpc/gen/java/pactus/utils/UtilsGrpc.java new file mode 100644 index 000000000..450a6db65 --- /dev/null +++ b/www/grpc/gen/java/pactus/utils/UtilsGrpc.java @@ -0,0 +1,394 @@ +package pactus.utils; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Utils service defines RPC methods for utility functions such as message
+ * signing and verification.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.50.2)", + comments = "Source: utils.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class UtilsGrpc { + + private UtilsGrpc() {} + + public static final String SERVICE_NAME = "pactus.Utils"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getSignMessageWithPrivateKeyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SignMessageWithPrivateKey", + requestType = pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.class, + responseType = pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSignMessageWithPrivateKeyMethod() { + io.grpc.MethodDescriptor getSignMessageWithPrivateKeyMethod; + if ((getSignMessageWithPrivateKeyMethod = UtilsGrpc.getSignMessageWithPrivateKeyMethod) == null) { + synchronized (UtilsGrpc.class) { + if ((getSignMessageWithPrivateKeyMethod = UtilsGrpc.getSignMessageWithPrivateKeyMethod) == null) { + UtilsGrpc.getSignMessageWithPrivateKeyMethod = getSignMessageWithPrivateKeyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SignMessageWithPrivateKey")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.getDefaultInstance())) + .setSchemaDescriptor(new UtilsMethodDescriptorSupplier("SignMessageWithPrivateKey")) + .build(); + } + } + } + return getSignMessageWithPrivateKeyMethod; + } + + private static volatile io.grpc.MethodDescriptor getVerifyMessageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "VerifyMessage", + requestType = pactus.utils.UtilsOuterClass.VerifyMessageRequest.class, + responseType = pactus.utils.UtilsOuterClass.VerifyMessageResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getVerifyMessageMethod() { + io.grpc.MethodDescriptor getVerifyMessageMethod; + if ((getVerifyMessageMethod = UtilsGrpc.getVerifyMessageMethod) == null) { + synchronized (UtilsGrpc.class) { + if ((getVerifyMessageMethod = UtilsGrpc.getVerifyMessageMethod) == null) { + UtilsGrpc.getVerifyMessageMethod = getVerifyMessageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "VerifyMessage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.utils.UtilsOuterClass.VerifyMessageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.utils.UtilsOuterClass.VerifyMessageResponse.getDefaultInstance())) + .setSchemaDescriptor(new UtilsMethodDescriptorSupplier("VerifyMessage")) + .build(); + } + } + } + return getVerifyMessageMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static UtilsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UtilsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UtilsStub(channel, callOptions); + } + }; + return UtilsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static UtilsBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UtilsBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UtilsBlockingStub(channel, callOptions); + } + }; + return UtilsBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static UtilsFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public UtilsFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UtilsFutureStub(channel, callOptions); + } + }; + return UtilsFutureStub.newStub(factory, channel); + } + + /** + *
+   * Utils service defines RPC methods for utility functions such as message
+   * signing and verification.
+   * 
+ */ + public static abstract class UtilsImplBase implements io.grpc.BindableService { + + /** + *
+     * SignMessageWithPrivateKey sign message with provided private key.
+     * 
+ */ + public void signMessageWithPrivateKey(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignMessageWithPrivateKeyMethod(), responseObserver); + } + + /** + *
+     * VerifyMessage verify signature with public key and message
+     * 
+ */ + public void verifyMessage(pactus.utils.UtilsOuterClass.VerifyMessageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getVerifyMessageMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSignMessageWithPrivateKeyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest, + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse>( + this, METHODID_SIGN_MESSAGE_WITH_PRIVATE_KEY))) + .addMethod( + getVerifyMessageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.utils.UtilsOuterClass.VerifyMessageRequest, + pactus.utils.UtilsOuterClass.VerifyMessageResponse>( + this, METHODID_VERIFY_MESSAGE))) + .build(); + } + } + + /** + *
+   * Utils service defines RPC methods for utility functions such as message
+   * signing and verification.
+   * 
+ */ + public static final class UtilsStub extends io.grpc.stub.AbstractAsyncStub { + private UtilsStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UtilsStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UtilsStub(channel, callOptions); + } + + /** + *
+     * SignMessageWithPrivateKey sign message with provided private key.
+     * 
+ */ + public void signMessageWithPrivateKey(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSignMessageWithPrivateKeyMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * VerifyMessage verify signature with public key and message
+     * 
+ */ + public void verifyMessage(pactus.utils.UtilsOuterClass.VerifyMessageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getVerifyMessageMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Utils service defines RPC methods for utility functions such as message
+   * signing and verification.
+   * 
+ */ + public static final class UtilsBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private UtilsBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UtilsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UtilsBlockingStub(channel, callOptions); + } + + /** + *
+     * SignMessageWithPrivateKey sign message with provided private key.
+     * 
+ */ + public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse signMessageWithPrivateKey(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSignMessageWithPrivateKeyMethod(), getCallOptions(), request); + } + + /** + *
+     * VerifyMessage verify signature with public key and message
+     * 
+ */ + public pactus.utils.UtilsOuterClass.VerifyMessageResponse verifyMessage(pactus.utils.UtilsOuterClass.VerifyMessageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getVerifyMessageMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Utils service defines RPC methods for utility functions such as message
+   * signing and verification.
+   * 
+ */ + public static final class UtilsFutureStub extends io.grpc.stub.AbstractFutureStub { + private UtilsFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected UtilsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new UtilsFutureStub(channel, callOptions); + } + + /** + *
+     * SignMessageWithPrivateKey sign message with provided private key.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture signMessageWithPrivateKey( + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSignMessageWithPrivateKeyMethod(), getCallOptions()), request); + } + + /** + *
+     * VerifyMessage verify signature with public key and message
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture verifyMessage( + pactus.utils.UtilsOuterClass.VerifyMessageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getVerifyMessageMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_SIGN_MESSAGE_WITH_PRIVATE_KEY = 0; + private static final int METHODID_VERIFY_MESSAGE = 1; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final UtilsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(UtilsImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_SIGN_MESSAGE_WITH_PRIVATE_KEY: + serviceImpl.signMessageWithPrivateKey((pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VERIFY_MESSAGE: + serviceImpl.verifyMessage((pactus.utils.UtilsOuterClass.VerifyMessageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class UtilsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + UtilsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return pactus.utils.UtilsOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Utils"); + } + } + + private static final class UtilsFileDescriptorSupplier + extends UtilsBaseDescriptorSupplier { + UtilsFileDescriptorSupplier() {} + } + + private static final class UtilsMethodDescriptorSupplier + extends UtilsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + UtilsMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (UtilsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new UtilsFileDescriptorSupplier()) + .addMethod(getSignMessageWithPrivateKeyMethod()) + .addMethod(getVerifyMessageMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/www/grpc/gen/java/pactus/utils/UtilsOuterClass.java b/www/grpc/gen/java/pactus/utils/UtilsOuterClass.java new file mode 100644 index 000000000..8d84758e5 --- /dev/null +++ b/www/grpc/gen/java/pactus/utils/UtilsOuterClass.java @@ -0,0 +1,2927 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: utils.proto + +package pactus.utils; + +public final class UtilsOuterClass { + private UtilsOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SignMessageWithPrivateKeyRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.SignMessageWithPrivateKeyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The private key to sign the message.
+     * 
+ * + * string private_key = 1 [json_name = "privateKey"]; + * @return The privateKey. + */ + java.lang.String getPrivateKey(); + /** + *
+     * The private key to sign the message.
+     * 
+ * + * string private_key = 1 [json_name = "privateKey"]; + * @return The bytes for privateKey. + */ + com.google.protobuf.ByteString + getPrivateKeyBytes(); + + /** + *
+     * The message to sign.
+     * 
+ * + * string message = 2 [json_name = "message"]; + * @return The message. + */ + java.lang.String getMessage(); + /** + *
+     * The message to sign.
+     * 
+ * + * string message = 2 [json_name = "message"]; + * @return The bytes for message. + */ + com.google.protobuf.ByteString + getMessageBytes(); + } + /** + *
+   * Request message for sign message with private key.
+   * 
+ * + * Protobuf type {@code pactus.SignMessageWithPrivateKeyRequest} + */ + public static final class SignMessageWithPrivateKeyRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.SignMessageWithPrivateKeyRequest) + SignMessageWithPrivateKeyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SignMessageWithPrivateKeyRequest.newBuilder() to construct. + private SignMessageWithPrivateKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SignMessageWithPrivateKeyRequest() { + privateKey_ = ""; + message_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SignMessageWithPrivateKeyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.class, pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.Builder.class); + } + + public static final int PRIVATE_KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object privateKey_; + /** + *
+     * The private key to sign the message.
+     * 
+ * + * string private_key = 1 [json_name = "privateKey"]; + * @return The privateKey. + */ + @java.lang.Override + public java.lang.String getPrivateKey() { + java.lang.Object ref = privateKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + privateKey_ = s; + return s; + } + } + /** + *
+     * The private key to sign the message.
+     * 
+ * + * string private_key = 1 [json_name = "privateKey"]; + * @return The bytes for privateKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrivateKeyBytes() { + java.lang.Object ref = privateKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + privateKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object message_; + /** + *
+     * The message to sign.
+     * 
+ * + * string message = 2 [json_name = "message"]; + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + *
+     * The message to sign.
+     * 
+ * + * string message = 2 [json_name = "message"]; + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(privateKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, privateKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(privateKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, privateKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest)) { + return super.equals(obj); + } + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest other = (pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest) obj; + + if (!getPrivateKey() + .equals(other.getPrivateKey())) return false; + if (!getMessage() + .equals(other.getMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRIVATE_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPrivateKey().hashCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for sign message with private key.
+     * 
+ * + * Protobuf type {@code pactus.SignMessageWithPrivateKeyRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.SignMessageWithPrivateKeyRequest) + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.class, pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.Builder.class); + } + + // Construct using pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + privateKey_ = ""; + + message_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest getDefaultInstanceForType() { + return pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest build() { + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest buildPartial() { + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest result = new pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest(this); + result.privateKey_ = privateKey_; + result.message_ = message_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest) { + return mergeFrom((pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest other) { + if (other == pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest.getDefaultInstance()) return this; + if (!other.getPrivateKey().isEmpty()) { + privateKey_ = other.privateKey_; + onChanged(); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + privateKey_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + message_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object privateKey_ = ""; + /** + *
+       * The private key to sign the message.
+       * 
+ * + * string private_key = 1 [json_name = "privateKey"]; + * @return The privateKey. + */ + public java.lang.String getPrivateKey() { + java.lang.Object ref = privateKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + privateKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The private key to sign the message.
+       * 
+ * + * string private_key = 1 [json_name = "privateKey"]; + * @return The bytes for privateKey. + */ + public com.google.protobuf.ByteString + getPrivateKeyBytes() { + java.lang.Object ref = privateKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + privateKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The private key to sign the message.
+       * 
+ * + * string private_key = 1 [json_name = "privateKey"]; + * @param value The privateKey to set. + * @return This builder for chaining. + */ + public Builder setPrivateKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + privateKey_ = value; + onChanged(); + return this; + } + /** + *
+       * The private key to sign the message.
+       * 
+ * + * string private_key = 1 [json_name = "privateKey"]; + * @return This builder for chaining. + */ + public Builder clearPrivateKey() { + + privateKey_ = getDefaultInstance().getPrivateKey(); + onChanged(); + return this; + } + /** + *
+       * The private key to sign the message.
+       * 
+ * + * string private_key = 1 [json_name = "privateKey"]; + * @param value The bytes for privateKey to set. + * @return This builder for chaining. + */ + public Builder setPrivateKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + privateKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + *
+       * The message to sign.
+       * 
+ * + * string message = 2 [json_name = "message"]; + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The message to sign.
+       * 
+ * + * string message = 2 [json_name = "message"]; + * @return The bytes for message. + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The message to sign.
+       * 
+ * + * string message = 2 [json_name = "message"]; + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + *
+       * The message to sign.
+       * 
+ * + * string message = 2 [json_name = "message"]; + * @return This builder for chaining. + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + *
+       * The message to sign.
+       * 
+ * + * string message = 2 [json_name = "message"]; + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.SignMessageWithPrivateKeyRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.SignMessageWithPrivateKeyRequest) + private static final pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest(); + } + + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SignMessageWithPrivateKeyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SignMessageWithPrivateKeyResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.SignMessageWithPrivateKeyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The signature of the message.
+     * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The signature. + */ + java.lang.String getSignature(); + /** + *
+     * The signature of the message.
+     * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The bytes for signature. + */ + com.google.protobuf.ByteString + getSignatureBytes(); + } + /** + *
+   * Response message containing the generated signature.
+   * 
+ * + * Protobuf type {@code pactus.SignMessageWithPrivateKeyResponse} + */ + public static final class SignMessageWithPrivateKeyResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.SignMessageWithPrivateKeyResponse) + SignMessageWithPrivateKeyResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SignMessageWithPrivateKeyResponse.newBuilder() to construct. + private SignMessageWithPrivateKeyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SignMessageWithPrivateKeyResponse() { + signature_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SignMessageWithPrivateKeyResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.class, pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.Builder.class); + } + + public static final int SIGNATURE_FIELD_NUMBER = 1; + private volatile java.lang.Object signature_; + /** + *
+     * The signature of the message.
+     * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } + } + /** + *
+     * The signature of the message.
+     * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The bytes for signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signature_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signature_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse)) { + return super.equals(obj); + } + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse other = (pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse) obj; + + if (!getSignature() + .equals(other.getSignature())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the generated signature.
+     * 
+ * + * Protobuf type {@code pactus.SignMessageWithPrivateKeyResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.SignMessageWithPrivateKeyResponse) + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.class, pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.Builder.class); + } + + // Construct using pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + signature_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse getDefaultInstanceForType() { + return pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse build() { + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse buildPartial() { + pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse result = new pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse(this); + result.signature_ = signature_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse) { + return mergeFrom((pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse other) { + if (other == pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse.getDefaultInstance()) return this; + if (!other.getSignature().isEmpty()) { + signature_ = other.signature_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + signature_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object signature_ = ""; + /** + *
+       * The signature of the message.
+       * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The signature. + */ + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The signature of the message.
+       * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The bytes for signature. + */ + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The signature of the message.
+       * 
+ * + * string signature = 1 [json_name = "signature"]; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + signature_ = value; + onChanged(); + return this; + } + /** + *
+       * The signature of the message.
+       * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return This builder for chaining. + */ + public Builder clearSignature() { + + signature_ = getDefaultInstance().getSignature(); + onChanged(); + return this; + } + /** + *
+       * The signature of the message.
+       * 
+ * + * string signature = 1 [json_name = "signature"]; + * @param value The bytes for signature to set. + * @return This builder for chaining. + */ + public Builder setSignatureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + signature_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.SignMessageWithPrivateKeyResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.SignMessageWithPrivateKeyResponse) + private static final pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse(); + } + + public static pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SignMessageWithPrivateKeyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.SignMessageWithPrivateKeyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VerifyMessageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.VerifyMessageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The signed message.
+     * 
+ * + * string message = 1 [json_name = "message"]; + * @return The message. + */ + java.lang.String getMessage(); + /** + *
+     * The signed message.
+     * 
+ * + * string message = 1 [json_name = "message"]; + * @return The bytes for message. + */ + com.google.protobuf.ByteString + getMessageBytes(); + + /** + *
+     * The signature of the message.
+     * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The signature. + */ + java.lang.String getSignature(); + /** + *
+     * The signature of the message.
+     * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The bytes for signature. + */ + com.google.protobuf.ByteString + getSignatureBytes(); + + /** + *
+     * The public key of the signer.
+     * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + *
+     * The public key of the signer.
+     * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString + getPublicKeyBytes(); + } + /** + *
+   * Request message for verifying a message signature.
+   * 
+ * + * Protobuf type {@code pactus.VerifyMessageRequest} + */ + public static final class VerifyMessageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.VerifyMessageRequest) + VerifyMessageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use VerifyMessageRequest.newBuilder() to construct. + private VerifyMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VerifyMessageRequest() { + message_ = ""; + signature_ = ""; + publicKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VerifyMessageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.utils.UtilsOuterClass.VerifyMessageRequest.class, pactus.utils.UtilsOuterClass.VerifyMessageRequest.Builder.class); + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + private volatile java.lang.Object message_; + /** + *
+     * The signed message.
+     * 
+ * + * string message = 1 [json_name = "message"]; + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + *
+     * The signed message.
+     * 
+ * + * string message = 1 [json_name = "message"]; + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNATURE_FIELD_NUMBER = 2; + private volatile java.lang.Object signature_; + /** + *
+     * The signature of the message.
+     * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } + } + /** + *
+     * The signature of the message.
+     * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The bytes for signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 3; + private volatile java.lang.Object publicKey_; + /** + *
+     * The public key of the signer.
+     * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + *
+     * The public key of the signer.
+     * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, signature_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publicKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, signature_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publicKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.utils.UtilsOuterClass.VerifyMessageRequest)) { + return super.equals(obj); + } + pactus.utils.UtilsOuterClass.VerifyMessageRequest other = (pactus.utils.UtilsOuterClass.VerifyMessageRequest) obj; + + if (!getMessage() + .equals(other.getMessage())) return false; + if (!getSignature() + .equals(other.getSignature())) return false; + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.utils.UtilsOuterClass.VerifyMessageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for verifying a message signature.
+     * 
+ * + * Protobuf type {@code pactus.VerifyMessageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.VerifyMessageRequest) + pactus.utils.UtilsOuterClass.VerifyMessageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.utils.UtilsOuterClass.VerifyMessageRequest.class, pactus.utils.UtilsOuterClass.VerifyMessageRequest.Builder.class); + } + + // Construct using pactus.utils.UtilsOuterClass.VerifyMessageRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + message_ = ""; + + signature_ = ""; + + publicKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageRequest_descriptor; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.VerifyMessageRequest getDefaultInstanceForType() { + return pactus.utils.UtilsOuterClass.VerifyMessageRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.VerifyMessageRequest build() { + pactus.utils.UtilsOuterClass.VerifyMessageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.VerifyMessageRequest buildPartial() { + pactus.utils.UtilsOuterClass.VerifyMessageRequest result = new pactus.utils.UtilsOuterClass.VerifyMessageRequest(this); + result.message_ = message_; + result.signature_ = signature_; + result.publicKey_ = publicKey_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.utils.UtilsOuterClass.VerifyMessageRequest) { + return mergeFrom((pactus.utils.UtilsOuterClass.VerifyMessageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.utils.UtilsOuterClass.VerifyMessageRequest other) { + if (other == pactus.utils.UtilsOuterClass.VerifyMessageRequest.getDefaultInstance()) return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } + if (!other.getSignature().isEmpty()) { + signature_ = other.signature_; + onChanged(); + } + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + message_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + signature_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + publicKey_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object message_ = ""; + /** + *
+       * The signed message.
+       * 
+ * + * string message = 1 [json_name = "message"]; + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The signed message.
+       * 
+ * + * string message = 1 [json_name = "message"]; + * @return The bytes for message. + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The signed message.
+       * 
+ * + * string message = 1 [json_name = "message"]; + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + *
+       * The signed message.
+       * 
+ * + * string message = 1 [json_name = "message"]; + * @return This builder for chaining. + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + *
+       * The signed message.
+       * 
+ * + * string message = 1 [json_name = "message"]; + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = value; + onChanged(); + return this; + } + + private java.lang.Object signature_ = ""; + /** + *
+       * The signature of the message.
+       * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The signature. + */ + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The signature of the message.
+       * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return The bytes for signature. + */ + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The signature of the message.
+       * 
+ * + * string signature = 2 [json_name = "signature"]; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + signature_ = value; + onChanged(); + return this; + } + /** + *
+       * The signature of the message.
+       * 
+ * + * string signature = 2 [json_name = "signature"]; + * @return This builder for chaining. + */ + public Builder clearSignature() { + + signature_ = getDefaultInstance().getSignature(); + onChanged(); + return this; + } + /** + *
+       * The signature of the message.
+       * 
+ * + * string signature = 2 [json_name = "signature"]; + * @param value The bytes for signature to set. + * @return This builder for chaining. + */ + public Builder setSignatureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + signature_ = value; + onChanged(); + return this; + } + + private java.lang.Object publicKey_ = ""; + /** + *
+       * The public key of the signer.
+       * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The public key of the signer.
+       * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The public key of the signer.
+       * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + *
+       * The public key of the signer.
+       * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + /** + *
+       * The public key of the signer.
+       * 
+ * + * string public_key = 3 [json_name = "publicKey"]; + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKey_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.VerifyMessageRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.VerifyMessageRequest) + private static final pactus.utils.UtilsOuterClass.VerifyMessageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.utils.UtilsOuterClass.VerifyMessageRequest(); + } + + public static pactus.utils.UtilsOuterClass.VerifyMessageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VerifyMessageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.VerifyMessageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VerifyMessageResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.VerifyMessageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Indicates if the signature is valid (true) or not (false).
+     * 
+ * + * bool is_valid = 1 [json_name = "isValid"]; + * @return The isValid. + */ + boolean getIsValid(); + } + /** + *
+   * Response message containing the resualt of validation of signature and message.
+   * 
+ * + * Protobuf type {@code pactus.VerifyMessageResponse} + */ + public static final class VerifyMessageResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.VerifyMessageResponse) + VerifyMessageResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use VerifyMessageResponse.newBuilder() to construct. + private VerifyMessageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VerifyMessageResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VerifyMessageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.utils.UtilsOuterClass.VerifyMessageResponse.class, pactus.utils.UtilsOuterClass.VerifyMessageResponse.Builder.class); + } + + public static final int IS_VALID_FIELD_NUMBER = 1; + private boolean isValid_; + /** + *
+     * Indicates if the signature is valid (true) or not (false).
+     * 
+ * + * bool is_valid = 1 [json_name = "isValid"]; + * @return The isValid. + */ + @java.lang.Override + public boolean getIsValid() { + return isValid_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (isValid_ != false) { + output.writeBool(1, isValid_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (isValid_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, isValid_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.utils.UtilsOuterClass.VerifyMessageResponse)) { + return super.equals(obj); + } + pactus.utils.UtilsOuterClass.VerifyMessageResponse other = (pactus.utils.UtilsOuterClass.VerifyMessageResponse) obj; + + if (getIsValid() + != other.getIsValid()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IS_VALID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsValid()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.utils.UtilsOuterClass.VerifyMessageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the resualt of validation of signature and message.
+     * 
+ * + * Protobuf type {@code pactus.VerifyMessageResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.VerifyMessageResponse) + pactus.utils.UtilsOuterClass.VerifyMessageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.utils.UtilsOuterClass.VerifyMessageResponse.class, pactus.utils.UtilsOuterClass.VerifyMessageResponse.Builder.class); + } + + // Construct using pactus.utils.UtilsOuterClass.VerifyMessageResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + isValid_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.utils.UtilsOuterClass.internal_static_pactus_VerifyMessageResponse_descriptor; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.VerifyMessageResponse getDefaultInstanceForType() { + return pactus.utils.UtilsOuterClass.VerifyMessageResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.VerifyMessageResponse build() { + pactus.utils.UtilsOuterClass.VerifyMessageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.VerifyMessageResponse buildPartial() { + pactus.utils.UtilsOuterClass.VerifyMessageResponse result = new pactus.utils.UtilsOuterClass.VerifyMessageResponse(this); + result.isValid_ = isValid_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.utils.UtilsOuterClass.VerifyMessageResponse) { + return mergeFrom((pactus.utils.UtilsOuterClass.VerifyMessageResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.utils.UtilsOuterClass.VerifyMessageResponse other) { + if (other == pactus.utils.UtilsOuterClass.VerifyMessageResponse.getDefaultInstance()) return this; + if (other.getIsValid() != false) { + setIsValid(other.getIsValid()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + isValid_ = input.readBool(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private boolean isValid_ ; + /** + *
+       * Indicates if the signature is valid (true) or not (false).
+       * 
+ * + * bool is_valid = 1 [json_name = "isValid"]; + * @return The isValid. + */ + @java.lang.Override + public boolean getIsValid() { + return isValid_; + } + /** + *
+       * Indicates if the signature is valid (true) or not (false).
+       * 
+ * + * bool is_valid = 1 [json_name = "isValid"]; + * @param value The isValid to set. + * @return This builder for chaining. + */ + public Builder setIsValid(boolean value) { + + isValid_ = value; + onChanged(); + return this; + } + /** + *
+       * Indicates if the signature is valid (true) or not (false).
+       * 
+ * + * bool is_valid = 1 [json_name = "isValid"]; + * @return This builder for chaining. + */ + public Builder clearIsValid() { + + isValid_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.VerifyMessageResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.VerifyMessageResponse) + private static final pactus.utils.UtilsOuterClass.VerifyMessageResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.utils.UtilsOuterClass.VerifyMessageResponse(); + } + + public static pactus.utils.UtilsOuterClass.VerifyMessageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VerifyMessageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.utils.UtilsOuterClass.VerifyMessageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_VerifyMessageRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_VerifyMessageRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_VerifyMessageResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_VerifyMessageResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\013utils.proto\022\006pactus\"]\n SignMessageWith" + + "PrivateKeyRequest\022\037\n\013private_key\030\001 \001(\tR\n" + + "privateKey\022\030\n\007message\030\002 \001(\tR\007message\"A\n!" + + "SignMessageWithPrivateKeyResponse\022\034\n\tsig" + + "nature\030\001 \001(\tR\tsignature\"m\n\024VerifyMessage" + + "Request\022\030\n\007message\030\001 \001(\tR\007message\022\034\n\tsig" + + "nature\030\002 \001(\tR\tsignature\022\035\n\npublic_key\030\003 " + + "\001(\tR\tpublicKey\"2\n\025VerifyMessageResponse\022" + + "\031\n\010is_valid\030\001 \001(\010R\007isValid2\307\001\n\005Utils\022p\n\031" + + "SignMessageWithPrivateKey\022(.pactus.SignM" + + "essageWithPrivateKeyRequest\032).pactus.Sig" + + "nMessageWithPrivateKeyResponse\022L\n\rVerify" + + "Message\022\034.pactus.VerifyMessageRequest\032\035." + + "pactus.VerifyMessageResponseB@\n\014pactus.u" + + "tilsZ0github.com/pactus-project/pactus/w" + + "ww/grpc/pactusb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pactus_SignMessageWithPrivateKeyRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_SignMessageWithPrivateKeyRequest_descriptor, + new java.lang.String[] { "PrivateKey", "Message", }); + internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_pactus_SignMessageWithPrivateKeyResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_SignMessageWithPrivateKeyResponse_descriptor, + new java.lang.String[] { "Signature", }); + internal_static_pactus_VerifyMessageRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_pactus_VerifyMessageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_VerifyMessageRequest_descriptor, + new java.lang.String[] { "Message", "Signature", "PublicKey", }); + internal_static_pactus_VerifyMessageResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_pactus_VerifyMessageResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_VerifyMessageResponse_descriptor, + new java.lang.String[] { "IsValid", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/www/grpc/gen/java/pactus/wallet/WalletGrpc.java b/www/grpc/gen/java/pactus/wallet/WalletGrpc.java new file mode 100644 index 000000000..806e827e8 --- /dev/null +++ b/www/grpc/gen/java/pactus/wallet/WalletGrpc.java @@ -0,0 +1,1081 @@ +package pactus.wallet; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + *
+ * Define the Wallet service with various RPC methods for wallet management.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.50.2)", + comments = "Source: wallet.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class WalletGrpc { + + private WalletGrpc() {} + + public static final String SERVICE_NAME = "pactus.Wallet"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getCreateWalletMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateWallet", + requestType = pactus.wallet.WalletOuterClass.CreateWalletRequest.class, + responseType = pactus.wallet.WalletOuterClass.CreateWalletResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateWalletMethod() { + io.grpc.MethodDescriptor getCreateWalletMethod; + if ((getCreateWalletMethod = WalletGrpc.getCreateWalletMethod) == null) { + synchronized (WalletGrpc.class) { + if ((getCreateWalletMethod = WalletGrpc.getCreateWalletMethod) == null) { + WalletGrpc.getCreateWalletMethod = getCreateWalletMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateWallet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.CreateWalletRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.CreateWalletResponse.getDefaultInstance())) + .setSchemaDescriptor(new WalletMethodDescriptorSupplier("CreateWallet")) + .build(); + } + } + } + return getCreateWalletMethod; + } + + private static volatile io.grpc.MethodDescriptor getRestoreWalletMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestoreWallet", + requestType = pactus.wallet.WalletOuterClass.RestoreWalletRequest.class, + responseType = pactus.wallet.WalletOuterClass.RestoreWalletResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRestoreWalletMethod() { + io.grpc.MethodDescriptor getRestoreWalletMethod; + if ((getRestoreWalletMethod = WalletGrpc.getRestoreWalletMethod) == null) { + synchronized (WalletGrpc.class) { + if ((getRestoreWalletMethod = WalletGrpc.getRestoreWalletMethod) == null) { + WalletGrpc.getRestoreWalletMethod = getRestoreWalletMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreWallet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.RestoreWalletRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.RestoreWalletResponse.getDefaultInstance())) + .setSchemaDescriptor(new WalletMethodDescriptorSupplier("RestoreWallet")) + .build(); + } + } + } + return getRestoreWalletMethod; + } + + private static volatile io.grpc.MethodDescriptor getLoadWalletMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LoadWallet", + requestType = pactus.wallet.WalletOuterClass.LoadWalletRequest.class, + responseType = pactus.wallet.WalletOuterClass.LoadWalletResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLoadWalletMethod() { + io.grpc.MethodDescriptor getLoadWalletMethod; + if ((getLoadWalletMethod = WalletGrpc.getLoadWalletMethod) == null) { + synchronized (WalletGrpc.class) { + if ((getLoadWalletMethod = WalletGrpc.getLoadWalletMethod) == null) { + WalletGrpc.getLoadWalletMethod = getLoadWalletMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "LoadWallet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.LoadWalletRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.LoadWalletResponse.getDefaultInstance())) + .setSchemaDescriptor(new WalletMethodDescriptorSupplier("LoadWallet")) + .build(); + } + } + } + return getLoadWalletMethod; + } + + private static volatile io.grpc.MethodDescriptor getUnloadWalletMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UnloadWallet", + requestType = pactus.wallet.WalletOuterClass.UnloadWalletRequest.class, + responseType = pactus.wallet.WalletOuterClass.UnloadWalletResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUnloadWalletMethod() { + io.grpc.MethodDescriptor getUnloadWalletMethod; + if ((getUnloadWalletMethod = WalletGrpc.getUnloadWalletMethod) == null) { + synchronized (WalletGrpc.class) { + if ((getUnloadWalletMethod = WalletGrpc.getUnloadWalletMethod) == null) { + WalletGrpc.getUnloadWalletMethod = getUnloadWalletMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UnloadWallet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.UnloadWalletRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.UnloadWalletResponse.getDefaultInstance())) + .setSchemaDescriptor(new WalletMethodDescriptorSupplier("UnloadWallet")) + .build(); + } + } + } + return getUnloadWalletMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTotalBalanceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTotalBalance", + requestType = pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.class, + responseType = pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTotalBalanceMethod() { + io.grpc.MethodDescriptor getGetTotalBalanceMethod; + if ((getGetTotalBalanceMethod = WalletGrpc.getGetTotalBalanceMethod) == null) { + synchronized (WalletGrpc.class) { + if ((getGetTotalBalanceMethod = WalletGrpc.getGetTotalBalanceMethod) == null) { + WalletGrpc.getGetTotalBalanceMethod = getGetTotalBalanceMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTotalBalance")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.getDefaultInstance())) + .setSchemaDescriptor(new WalletMethodDescriptorSupplier("GetTotalBalance")) + .build(); + } + } + } + return getGetTotalBalanceMethod; + } + + private static volatile io.grpc.MethodDescriptor getSignRawTransactionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SignRawTransaction", + requestType = pactus.wallet.WalletOuterClass.SignRawTransactionRequest.class, + responseType = pactus.wallet.WalletOuterClass.SignRawTransactionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSignRawTransactionMethod() { + io.grpc.MethodDescriptor getSignRawTransactionMethod; + if ((getSignRawTransactionMethod = WalletGrpc.getSignRawTransactionMethod) == null) { + synchronized (WalletGrpc.class) { + if ((getSignRawTransactionMethod = WalletGrpc.getSignRawTransactionMethod) == null) { + WalletGrpc.getSignRawTransactionMethod = getSignRawTransactionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SignRawTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.SignRawTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.SignRawTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new WalletMethodDescriptorSupplier("SignRawTransaction")) + .build(); + } + } + } + return getSignRawTransactionMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetValidatorAddressMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetValidatorAddress", + requestType = pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.class, + responseType = pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetValidatorAddressMethod() { + io.grpc.MethodDescriptor getGetValidatorAddressMethod; + if ((getGetValidatorAddressMethod = WalletGrpc.getGetValidatorAddressMethod) == null) { + synchronized (WalletGrpc.class) { + if ((getGetValidatorAddressMethod = WalletGrpc.getGetValidatorAddressMethod) == null) { + WalletGrpc.getGetValidatorAddressMethod = getGetValidatorAddressMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetValidatorAddress")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.getDefaultInstance())) + .setSchemaDescriptor(new WalletMethodDescriptorSupplier("GetValidatorAddress")) + .build(); + } + } + } + return getGetValidatorAddressMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetNewAddressMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNewAddress", + requestType = pactus.wallet.WalletOuterClass.GetNewAddressRequest.class, + responseType = pactus.wallet.WalletOuterClass.GetNewAddressResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetNewAddressMethod() { + io.grpc.MethodDescriptor getGetNewAddressMethod; + if ((getGetNewAddressMethod = WalletGrpc.getGetNewAddressMethod) == null) { + synchronized (WalletGrpc.class) { + if ((getGetNewAddressMethod = WalletGrpc.getGetNewAddressMethod) == null) { + WalletGrpc.getGetNewAddressMethod = getGetNewAddressMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNewAddress")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.GetNewAddressRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.GetNewAddressResponse.getDefaultInstance())) + .setSchemaDescriptor(new WalletMethodDescriptorSupplier("GetNewAddress")) + .build(); + } + } + } + return getGetNewAddressMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetAddressHistoryMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAddressHistory", + requestType = pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.class, + responseType = pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAddressHistoryMethod() { + io.grpc.MethodDescriptor getGetAddressHistoryMethod; + if ((getGetAddressHistoryMethod = WalletGrpc.getGetAddressHistoryMethod) == null) { + synchronized (WalletGrpc.class) { + if ((getGetAddressHistoryMethod = WalletGrpc.getGetAddressHistoryMethod) == null) { + WalletGrpc.getGetAddressHistoryMethod = getGetAddressHistoryMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAddressHistory")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.getDefaultInstance())) + .setSchemaDescriptor(new WalletMethodDescriptorSupplier("GetAddressHistory")) + .build(); + } + } + } + return getGetAddressHistoryMethod; + } + + private static volatile io.grpc.MethodDescriptor getSignMessageMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SignMessage", + requestType = pactus.wallet.WalletOuterClass.SignMessageRequest.class, + responseType = pactus.wallet.WalletOuterClass.SignMessageResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSignMessageMethod() { + io.grpc.MethodDescriptor getSignMessageMethod; + if ((getSignMessageMethod = WalletGrpc.getSignMessageMethod) == null) { + synchronized (WalletGrpc.class) { + if ((getSignMessageMethod = WalletGrpc.getSignMessageMethod) == null) { + WalletGrpc.getSignMessageMethod = getSignMessageMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SignMessage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.SignMessageRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.wallet.WalletOuterClass.SignMessageResponse.getDefaultInstance())) + .setSchemaDescriptor(new WalletMethodDescriptorSupplier("SignMessage")) + .build(); + } + } + } + return getSignMessageMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static WalletStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WalletStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WalletStub(channel, callOptions); + } + }; + return WalletStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static WalletBlockingStub newBlockingStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WalletBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WalletBlockingStub(channel, callOptions); + } + }; + return WalletBlockingStub.newStub(factory, channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static WalletFutureStub newFutureStub( + io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public WalletFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WalletFutureStub(channel, callOptions); + } + }; + return WalletFutureStub.newStub(factory, channel); + } + + /** + *
+   * Define the Wallet service with various RPC methods for wallet management.
+   * 
+ */ + public static abstract class WalletImplBase implements io.grpc.BindableService { + + /** + *
+     * CreateWallet creates a new wallet with the specified parameters.
+     * 
+ */ + public void createWallet(pactus.wallet.WalletOuterClass.CreateWalletRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateWalletMethod(), responseObserver); + } + + /** + *
+     * RestoreWallet restores an existing wallet with the given mnemonic.
+     * 
+ */ + public void restoreWallet(pactus.wallet.WalletOuterClass.RestoreWalletRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRestoreWalletMethod(), responseObserver); + } + + /** + *
+     * LoadWallet loads an existing wallet with the given name.
+     * 
+ */ + public void loadWallet(pactus.wallet.WalletOuterClass.LoadWalletRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getLoadWalletMethod(), responseObserver); + } + + /** + *
+     * UnloadWallet unloads a currently loaded wallet with the specified name.
+     * 
+ */ + public void unloadWallet(pactus.wallet.WalletOuterClass.UnloadWalletRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnloadWalletMethod(), responseObserver); + } + + /** + *
+     * GetTotalBalance returns the total available balance of the wallet.
+     * 
+ */ + public void getTotalBalance(pactus.wallet.WalletOuterClass.GetTotalBalanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTotalBalanceMethod(), responseObserver); + } + + /** + *
+     * SignRawTransaction signs a raw transaction for a specified wallet.
+     * 
+ */ + public void signRawTransaction(pactus.wallet.WalletOuterClass.SignRawTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignRawTransactionMethod(), responseObserver); + } + + /** + *
+     * GetValidatorAddress retrieves the validator address associated with a
+     * public key.
+     * 
+ */ + public void getValidatorAddress(pactus.wallet.WalletOuterClass.GetValidatorAddressRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetValidatorAddressMethod(), responseObserver); + } + + /** + *
+     * GetNewAddress generates a new address for the specified wallet.
+     * 
+ */ + public void getNewAddress(pactus.wallet.WalletOuterClass.GetNewAddressRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNewAddressMethod(), responseObserver); + } + + /** + *
+     * GetAddressHistory retrieves the transaction history of an address.
+     * 
+ */ + public void getAddressHistory(pactus.wallet.WalletOuterClass.GetAddressHistoryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAddressHistoryMethod(), responseObserver); + } + + /** + *
+     * SignMessage signs an arbitrary message.
+     * 
+ */ + public void signMessage(pactus.wallet.WalletOuterClass.SignMessageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSignMessageMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateWalletMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.wallet.WalletOuterClass.CreateWalletRequest, + pactus.wallet.WalletOuterClass.CreateWalletResponse>( + this, METHODID_CREATE_WALLET))) + .addMethod( + getRestoreWalletMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.wallet.WalletOuterClass.RestoreWalletRequest, + pactus.wallet.WalletOuterClass.RestoreWalletResponse>( + this, METHODID_RESTORE_WALLET))) + .addMethod( + getLoadWalletMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.wallet.WalletOuterClass.LoadWalletRequest, + pactus.wallet.WalletOuterClass.LoadWalletResponse>( + this, METHODID_LOAD_WALLET))) + .addMethod( + getUnloadWalletMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.wallet.WalletOuterClass.UnloadWalletRequest, + pactus.wallet.WalletOuterClass.UnloadWalletResponse>( + this, METHODID_UNLOAD_WALLET))) + .addMethod( + getGetTotalBalanceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.wallet.WalletOuterClass.GetTotalBalanceRequest, + pactus.wallet.WalletOuterClass.GetTotalBalanceResponse>( + this, METHODID_GET_TOTAL_BALANCE))) + .addMethod( + getSignRawTransactionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.wallet.WalletOuterClass.SignRawTransactionRequest, + pactus.wallet.WalletOuterClass.SignRawTransactionResponse>( + this, METHODID_SIGN_RAW_TRANSACTION))) + .addMethod( + getGetValidatorAddressMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.wallet.WalletOuterClass.GetValidatorAddressRequest, + pactus.wallet.WalletOuterClass.GetValidatorAddressResponse>( + this, METHODID_GET_VALIDATOR_ADDRESS))) + .addMethod( + getGetNewAddressMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.wallet.WalletOuterClass.GetNewAddressRequest, + pactus.wallet.WalletOuterClass.GetNewAddressResponse>( + this, METHODID_GET_NEW_ADDRESS))) + .addMethod( + getGetAddressHistoryMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.wallet.WalletOuterClass.GetAddressHistoryRequest, + pactus.wallet.WalletOuterClass.GetAddressHistoryResponse>( + this, METHODID_GET_ADDRESS_HISTORY))) + .addMethod( + getSignMessageMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.wallet.WalletOuterClass.SignMessageRequest, + pactus.wallet.WalletOuterClass.SignMessageResponse>( + this, METHODID_SIGN_MESSAGE))) + .build(); + } + } + + /** + *
+   * Define the Wallet service with various RPC methods for wallet management.
+   * 
+ */ + public static final class WalletStub extends io.grpc.stub.AbstractAsyncStub { + private WalletStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WalletStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WalletStub(channel, callOptions); + } + + /** + *
+     * CreateWallet creates a new wallet with the specified parameters.
+     * 
+ */ + public void createWallet(pactus.wallet.WalletOuterClass.CreateWalletRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateWalletMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * RestoreWallet restores an existing wallet with the given mnemonic.
+     * 
+ */ + public void restoreWallet(pactus.wallet.WalletOuterClass.RestoreWalletRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestoreWalletMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * LoadWallet loads an existing wallet with the given name.
+     * 
+ */ + public void loadWallet(pactus.wallet.WalletOuterClass.LoadWalletRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getLoadWalletMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * UnloadWallet unloads a currently loaded wallet with the specified name.
+     * 
+ */ + public void unloadWallet(pactus.wallet.WalletOuterClass.UnloadWalletRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUnloadWalletMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetTotalBalance returns the total available balance of the wallet.
+     * 
+ */ + public void getTotalBalance(pactus.wallet.WalletOuterClass.GetTotalBalanceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTotalBalanceMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * SignRawTransaction signs a raw transaction for a specified wallet.
+     * 
+ */ + public void signRawTransaction(pactus.wallet.WalletOuterClass.SignRawTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSignRawTransactionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetValidatorAddress retrieves the validator address associated with a
+     * public key.
+     * 
+ */ + public void getValidatorAddress(pactus.wallet.WalletOuterClass.GetValidatorAddressRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetValidatorAddressMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetNewAddress generates a new address for the specified wallet.
+     * 
+ */ + public void getNewAddress(pactus.wallet.WalletOuterClass.GetNewAddressRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNewAddressMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * GetAddressHistory retrieves the transaction history of an address.
+     * 
+ */ + public void getAddressHistory(pactus.wallet.WalletOuterClass.GetAddressHistoryRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAddressHistoryMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * SignMessage signs an arbitrary message.
+     * 
+ */ + public void signMessage(pactus.wallet.WalletOuterClass.SignMessageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getSignMessageMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Define the Wallet service with various RPC methods for wallet management.
+   * 
+ */ + public static final class WalletBlockingStub extends io.grpc.stub.AbstractBlockingStub { + private WalletBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WalletBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WalletBlockingStub(channel, callOptions); + } + + /** + *
+     * CreateWallet creates a new wallet with the specified parameters.
+     * 
+ */ + public pactus.wallet.WalletOuterClass.CreateWalletResponse createWallet(pactus.wallet.WalletOuterClass.CreateWalletRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateWalletMethod(), getCallOptions(), request); + } + + /** + *
+     * RestoreWallet restores an existing wallet with the given mnemonic.
+     * 
+ */ + public pactus.wallet.WalletOuterClass.RestoreWalletResponse restoreWallet(pactus.wallet.WalletOuterClass.RestoreWalletRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestoreWalletMethod(), getCallOptions(), request); + } + + /** + *
+     * LoadWallet loads an existing wallet with the given name.
+     * 
+ */ + public pactus.wallet.WalletOuterClass.LoadWalletResponse loadWallet(pactus.wallet.WalletOuterClass.LoadWalletRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getLoadWalletMethod(), getCallOptions(), request); + } + + /** + *
+     * UnloadWallet unloads a currently loaded wallet with the specified name.
+     * 
+ */ + public pactus.wallet.WalletOuterClass.UnloadWalletResponse unloadWallet(pactus.wallet.WalletOuterClass.UnloadWalletRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUnloadWalletMethod(), getCallOptions(), request); + } + + /** + *
+     * GetTotalBalance returns the total available balance of the wallet.
+     * 
+ */ + public pactus.wallet.WalletOuterClass.GetTotalBalanceResponse getTotalBalance(pactus.wallet.WalletOuterClass.GetTotalBalanceRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTotalBalanceMethod(), getCallOptions(), request); + } + + /** + *
+     * SignRawTransaction signs a raw transaction for a specified wallet.
+     * 
+ */ + public pactus.wallet.WalletOuterClass.SignRawTransactionResponse signRawTransaction(pactus.wallet.WalletOuterClass.SignRawTransactionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSignRawTransactionMethod(), getCallOptions(), request); + } + + /** + *
+     * GetValidatorAddress retrieves the validator address associated with a
+     * public key.
+     * 
+ */ + public pactus.wallet.WalletOuterClass.GetValidatorAddressResponse getValidatorAddress(pactus.wallet.WalletOuterClass.GetValidatorAddressRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetValidatorAddressMethod(), getCallOptions(), request); + } + + /** + *
+     * GetNewAddress generates a new address for the specified wallet.
+     * 
+ */ + public pactus.wallet.WalletOuterClass.GetNewAddressResponse getNewAddress(pactus.wallet.WalletOuterClass.GetNewAddressRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNewAddressMethod(), getCallOptions(), request); + } + + /** + *
+     * GetAddressHistory retrieves the transaction history of an address.
+     * 
+ */ + public pactus.wallet.WalletOuterClass.GetAddressHistoryResponse getAddressHistory(pactus.wallet.WalletOuterClass.GetAddressHistoryRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAddressHistoryMethod(), getCallOptions(), request); + } + + /** + *
+     * SignMessage signs an arbitrary message.
+     * 
+ */ + public pactus.wallet.WalletOuterClass.SignMessageResponse signMessage(pactus.wallet.WalletOuterClass.SignMessageRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getSignMessageMethod(), getCallOptions(), request); + } + } + + /** + *
+   * Define the Wallet service with various RPC methods for wallet management.
+   * 
+ */ + public static final class WalletFutureStub extends io.grpc.stub.AbstractFutureStub { + private WalletFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected WalletFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new WalletFutureStub(channel, callOptions); + } + + /** + *
+     * CreateWallet creates a new wallet with the specified parameters.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createWallet( + pactus.wallet.WalletOuterClass.CreateWalletRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateWalletMethod(), getCallOptions()), request); + } + + /** + *
+     * RestoreWallet restores an existing wallet with the given mnemonic.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture restoreWallet( + pactus.wallet.WalletOuterClass.RestoreWalletRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestoreWalletMethod(), getCallOptions()), request); + } + + /** + *
+     * LoadWallet loads an existing wallet with the given name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture loadWallet( + pactus.wallet.WalletOuterClass.LoadWalletRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getLoadWalletMethod(), getCallOptions()), request); + } + + /** + *
+     * UnloadWallet unloads a currently loaded wallet with the specified name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture unloadWallet( + pactus.wallet.WalletOuterClass.UnloadWalletRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUnloadWalletMethod(), getCallOptions()), request); + } + + /** + *
+     * GetTotalBalance returns the total available balance of the wallet.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getTotalBalance( + pactus.wallet.WalletOuterClass.GetTotalBalanceRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTotalBalanceMethod(), getCallOptions()), request); + } + + /** + *
+     * SignRawTransaction signs a raw transaction for a specified wallet.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture signRawTransaction( + pactus.wallet.WalletOuterClass.SignRawTransactionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSignRawTransactionMethod(), getCallOptions()), request); + } + + /** + *
+     * GetValidatorAddress retrieves the validator address associated with a
+     * public key.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getValidatorAddress( + pactus.wallet.WalletOuterClass.GetValidatorAddressRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetValidatorAddressMethod(), getCallOptions()), request); + } + + /** + *
+     * GetNewAddress generates a new address for the specified wallet.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getNewAddress( + pactus.wallet.WalletOuterClass.GetNewAddressRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNewAddressMethod(), getCallOptions()), request); + } + + /** + *
+     * GetAddressHistory retrieves the transaction history of an address.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getAddressHistory( + pactus.wallet.WalletOuterClass.GetAddressHistoryRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAddressHistoryMethod(), getCallOptions()), request); + } + + /** + *
+     * SignMessage signs an arbitrary message.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture signMessage( + pactus.wallet.WalletOuterClass.SignMessageRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getSignMessageMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_WALLET = 0; + private static final int METHODID_RESTORE_WALLET = 1; + private static final int METHODID_LOAD_WALLET = 2; + private static final int METHODID_UNLOAD_WALLET = 3; + private static final int METHODID_GET_TOTAL_BALANCE = 4; + private static final int METHODID_SIGN_RAW_TRANSACTION = 5; + private static final int METHODID_GET_VALIDATOR_ADDRESS = 6; + private static final int METHODID_GET_NEW_ADDRESS = 7; + private static final int METHODID_GET_ADDRESS_HISTORY = 8; + private static final int METHODID_SIGN_MESSAGE = 9; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final WalletImplBase serviceImpl; + private final int methodId; + + MethodHandlers(WalletImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_WALLET: + serviceImpl.createWallet((pactus.wallet.WalletOuterClass.CreateWalletRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESTORE_WALLET: + serviceImpl.restoreWallet((pactus.wallet.WalletOuterClass.RestoreWalletRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LOAD_WALLET: + serviceImpl.loadWallet((pactus.wallet.WalletOuterClass.LoadWalletRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNLOAD_WALLET: + serviceImpl.unloadWallet((pactus.wallet.WalletOuterClass.UnloadWalletRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TOTAL_BALANCE: + serviceImpl.getTotalBalance((pactus.wallet.WalletOuterClass.GetTotalBalanceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SIGN_RAW_TRANSACTION: + serviceImpl.signRawTransaction((pactus.wallet.WalletOuterClass.SignRawTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_VALIDATOR_ADDRESS: + serviceImpl.getValidatorAddress((pactus.wallet.WalletOuterClass.GetValidatorAddressRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NEW_ADDRESS: + serviceImpl.getNewAddress((pactus.wallet.WalletOuterClass.GetNewAddressRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ADDRESS_HISTORY: + serviceImpl.getAddressHistory((pactus.wallet.WalletOuterClass.GetAddressHistoryRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SIGN_MESSAGE: + serviceImpl.signMessage((pactus.wallet.WalletOuterClass.SignMessageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class WalletBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + WalletBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return pactus.wallet.WalletOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Wallet"); + } + } + + private static final class WalletFileDescriptorSupplier + extends WalletBaseDescriptorSupplier { + WalletFileDescriptorSupplier() {} + } + + private static final class WalletMethodDescriptorSupplier + extends WalletBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + WalletMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (WalletGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new WalletFileDescriptorSupplier()) + .addMethod(getCreateWalletMethod()) + .addMethod(getRestoreWalletMethod()) + .addMethod(getLoadWalletMethod()) + .addMethod(getUnloadWalletMethod()) + .addMethod(getGetTotalBalanceMethod()) + .addMethod(getSignRawTransactionMethod()) + .addMethod(getGetValidatorAddressMethod()) + .addMethod(getGetNewAddressMethod()) + .addMethod(getGetAddressHistoryMethod()) + .addMethod(getSignMessageMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/www/grpc/gen/java/pactus/wallet/WalletOuterClass.java b/www/grpc/gen/java/pactus/wallet/WalletOuterClass.java new file mode 100644 index 000000000..6e9fad838 --- /dev/null +++ b/www/grpc/gen/java/pactus/wallet/WalletOuterClass.java @@ -0,0 +1,17689 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: wallet.proto + +package pactus.wallet; + +public final class WalletOuterClass { + private WalletOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + *
+   * Enum for the address type.
+   * 
+ * + * Protobuf enum {@code pactus.AddressType} + */ + public enum AddressType + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Treasury address type.
+     * Should not be used to generate new addresses.
+     * 
+ * + * ADDRESS_TYPE_TREASURY = 0; + */ + ADDRESS_TYPE_TREASURY(0), + /** + *
+     * Validator address type.
+     * 
+ * + * ADDRESS_TYPE_VALIDATOR = 1; + */ + ADDRESS_TYPE_VALIDATOR(1), + /** + *
+     * Account address type with BLS signature scheme.
+     * 
+ * + * ADDRESS_TYPE_BLS_ACCOUNT = 2; + */ + ADDRESS_TYPE_BLS_ACCOUNT(2), + /** + *
+     * Account address type with Ed25519 signature scheme.
+     * Note: Generating a new Ed25519 address requires the wallet password.
+     * 
+ * + * ADDRESS_TYPE_ED25519_ACCOUNT = 3; + */ + ADDRESS_TYPE_ED25519_ACCOUNT(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Treasury address type.
+     * Should not be used to generate new addresses.
+     * 
+ * + * ADDRESS_TYPE_TREASURY = 0; + */ + public static final int ADDRESS_TYPE_TREASURY_VALUE = 0; + /** + *
+     * Validator address type.
+     * 
+ * + * ADDRESS_TYPE_VALIDATOR = 1; + */ + public static final int ADDRESS_TYPE_VALIDATOR_VALUE = 1; + /** + *
+     * Account address type with BLS signature scheme.
+     * 
+ * + * ADDRESS_TYPE_BLS_ACCOUNT = 2; + */ + public static final int ADDRESS_TYPE_BLS_ACCOUNT_VALUE = 2; + /** + *
+     * Account address type with Ed25519 signature scheme.
+     * Note: Generating a new Ed25519 address requires the wallet password.
+     * 
+ * + * ADDRESS_TYPE_ED25519_ACCOUNT = 3; + */ + public static final int ADDRESS_TYPE_ED25519_ACCOUNT_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AddressType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AddressType forNumber(int value) { + switch (value) { + case 0: return ADDRESS_TYPE_TREASURY; + case 1: return ADDRESS_TYPE_VALIDATOR; + case 2: return ADDRESS_TYPE_BLS_ACCOUNT; + case 3: return ADDRESS_TYPE_ED25519_ACCOUNT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AddressType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AddressType findValueByNumber(int number) { + return AddressType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final AddressType[] VALUES = values(); + + public static AddressType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AddressType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pactus.AddressType) + } + + public interface AddressInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.AddressInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The address string.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The address string.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + + /** + *
+     * The public key associated with the address.
+     * 
+ * + * string public_key = 2 [json_name = "publicKey"]; + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + *
+     * The public key associated with the address.
+     * 
+ * + * string public_key = 2 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString + getPublicKeyBytes(); + + /** + *
+     * A label associated with the address.
+     * 
+ * + * string label = 3 [json_name = "label"]; + * @return The label. + */ + java.lang.String getLabel(); + /** + *
+     * A label associated with the address.
+     * 
+ * + * string label = 3 [json_name = "label"]; + * @return The bytes for label. + */ + com.google.protobuf.ByteString + getLabelBytes(); + + /** + *
+     * The Hierarchical Deterministic path of the address within the wallet.
+     * 
+ * + * string path = 4 [json_name = "path"]; + * @return The path. + */ + java.lang.String getPath(); + /** + *
+     * The Hierarchical Deterministic path of the address within the wallet.
+     * 
+ * + * string path = 4 [json_name = "path"]; + * @return The bytes for path. + */ + com.google.protobuf.ByteString + getPathBytes(); + } + /** + *
+   * Message containing address information.
+   * 
+ * + * Protobuf type {@code pactus.AddressInfo} + */ + public static final class AddressInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.AddressInfo) + AddressInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AddressInfo.newBuilder() to construct. + private AddressInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AddressInfo() { + address_ = ""; + publicKey_ = ""; + label_ = ""; + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AddressInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_AddressInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_AddressInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.AddressInfo.class, pactus.wallet.WalletOuterClass.AddressInfo.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object address_; + /** + *
+     * The address string.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The address string.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 2; + private volatile java.lang.Object publicKey_; + /** + *
+     * The public key associated with the address.
+     * 
+ * + * string public_key = 2 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + *
+     * The public key associated with the address.
+     * 
+ * + * string public_key = 2 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABEL_FIELD_NUMBER = 3; + private volatile java.lang.Object label_; + /** + *
+     * A label associated with the address.
+     * 
+ * + * string label = 3 [json_name = "label"]; + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + *
+     * A label associated with the address.
+     * 
+ * + * string label = 3 [json_name = "label"]; + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 4; + private volatile java.lang.Object path_; + /** + *
+     * The Hierarchical Deterministic path of the address within the wallet.
+     * 
+ * + * string path = 4 [json_name = "path"]; + * @return The path. + */ + @java.lang.Override + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** + *
+     * The Hierarchical Deterministic path of the address within the wallet.
+     * 
+ * + * string path = 4 [json_name = "path"]; + * @return The bytes for path. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, publicKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, path_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, publicKey_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(path_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, path_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.AddressInfo)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.AddressInfo other = (pactus.wallet.WalletOuterClass.AddressInfo) obj; + + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (!getLabel() + .equals(other.getLabel())) return false; + if (!getPath() + .equals(other.getPath())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.AddressInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.AddressInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing address information.
+     * 
+ * + * Protobuf type {@code pactus.AddressInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.AddressInfo) + pactus.wallet.WalletOuterClass.AddressInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_AddressInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_AddressInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.AddressInfo.class, pactus.wallet.WalletOuterClass.AddressInfo.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.AddressInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + address_ = ""; + + publicKey_ = ""; + + label_ = ""; + + path_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_AddressInfo_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.AddressInfo getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.AddressInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.AddressInfo build() { + pactus.wallet.WalletOuterClass.AddressInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.AddressInfo buildPartial() { + pactus.wallet.WalletOuterClass.AddressInfo result = new pactus.wallet.WalletOuterClass.AddressInfo(this); + result.address_ = address_; + result.publicKey_ = publicKey_; + result.label_ = label_; + result.path_ = path_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.AddressInfo) { + return mergeFrom((pactus.wallet.WalletOuterClass.AddressInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.AddressInfo other) { + if (other == pactus.wallet.WalletOuterClass.AddressInfo.getDefaultInstance()) return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + publicKey_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + label_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + path_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * The address string.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address string.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address string.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The address string.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The address string.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + + private java.lang.Object publicKey_ = ""; + /** + *
+       * The public key associated with the address.
+       * 
+ * + * string public_key = 2 [json_name = "publicKey"]; + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The public key associated with the address.
+       * 
+ * + * string public_key = 2 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The public key associated with the address.
+       * 
+ * + * string public_key = 2 [json_name = "publicKey"]; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + *
+       * The public key associated with the address.
+       * 
+ * + * string public_key = 2 [json_name = "publicKey"]; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + /** + *
+       * The public key associated with the address.
+       * 
+ * + * string public_key = 2 [json_name = "publicKey"]; + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object label_ = ""; + /** + *
+       * A label associated with the address.
+       * 
+ * + * string label = 3 [json_name = "label"]; + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A label associated with the address.
+       * 
+ * + * string label = 3 [json_name = "label"]; + * @return The bytes for label. + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A label associated with the address.
+       * 
+ * + * string label = 3 [json_name = "label"]; + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + label_ = value; + onChanged(); + return this; + } + /** + *
+       * A label associated with the address.
+       * 
+ * + * string label = 3 [json_name = "label"]; + * @return This builder for chaining. + */ + public Builder clearLabel() { + + label_ = getDefaultInstance().getLabel(); + onChanged(); + return this; + } + /** + *
+       * A label associated with the address.
+       * 
+ * + * string label = 3 [json_name = "label"]; + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + label_ = value; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + *
+       * The Hierarchical Deterministic path of the address within the wallet.
+       * 
+ * + * string path = 4 [json_name = "path"]; + * @return The path. + */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The Hierarchical Deterministic path of the address within the wallet.
+       * 
+ * + * string path = 4 [json_name = "path"]; + * @return The bytes for path. + */ + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The Hierarchical Deterministic path of the address within the wallet.
+       * 
+ * + * string path = 4 [json_name = "path"]; + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** + *
+       * The Hierarchical Deterministic path of the address within the wallet.
+       * 
+ * + * string path = 4 [json_name = "path"]; + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + *
+       * The Hierarchical Deterministic path of the address within the wallet.
+       * 
+ * + * string path = 4 [json_name = "path"]; + * @param value The bytes for path to set. + * @return This builder for chaining. + */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.AddressInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.AddressInfo) + private static final pactus.wallet.WalletOuterClass.AddressInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.AddressInfo(); + } + + public static pactus.wallet.WalletOuterClass.AddressInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AddressInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.AddressInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HistoryInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.HistoryInfo) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The transaction ID hash.
+     * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The transactionId. + */ + java.lang.String getTransactionId(); + /** + *
+     * The transaction ID hash.
+     * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The bytes for transactionId. + */ + com.google.protobuf.ByteString + getTransactionIdBytes(); + + /** + *
+     * The timestamp of the transaction.
+     * 
+ * + * uint32 time = 2 [json_name = "time"]; + * @return The time. + */ + int getTime(); + + /** + *
+     * The payload type of the transaction.
+     * 
+ * + * string payload_type = 3 [json_name = "payloadType"]; + * @return The payloadType. + */ + java.lang.String getPayloadType(); + /** + *
+     * The payload type of the transaction.
+     * 
+ * + * string payload_type = 3 [json_name = "payloadType"]; + * @return The bytes for payloadType. + */ + com.google.protobuf.ByteString + getPayloadTypeBytes(); + + /** + *
+     * A description of the transaction.
+     * 
+ * + * string description = 4 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+     * A description of the transaction.
+     * 
+ * + * string description = 4 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+     * The amount involved in the transaction.
+     * 
+ * + * int64 amount = 5 [json_name = "amount"]; + * @return The amount. + */ + long getAmount(); + } + /** + *
+   * Message containing transaction history information for an address.
+   * 
+ * + * Protobuf type {@code pactus.HistoryInfo} + */ + public static final class HistoryInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.HistoryInfo) + HistoryInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use HistoryInfo.newBuilder() to construct. + private HistoryInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private HistoryInfo() { + transactionId_ = ""; + payloadType_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new HistoryInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_HistoryInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_HistoryInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.HistoryInfo.class, pactus.wallet.WalletOuterClass.HistoryInfo.Builder.class); + } + + public static final int TRANSACTION_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object transactionId_; + /** + *
+     * The transaction ID hash.
+     * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The transactionId. + */ + @java.lang.Override + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } + } + /** + *
+     * The transaction ID hash.
+     * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The bytes for transactionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TIME_FIELD_NUMBER = 2; + private int time_; + /** + *
+     * The timestamp of the transaction.
+     * 
+ * + * uint32 time = 2 [json_name = "time"]; + * @return The time. + */ + @java.lang.Override + public int getTime() { + return time_; + } + + public static final int PAYLOAD_TYPE_FIELD_NUMBER = 3; + private volatile java.lang.Object payloadType_; + /** + *
+     * The payload type of the transaction.
+     * 
+ * + * string payload_type = 3 [json_name = "payloadType"]; + * @return The payloadType. + */ + @java.lang.Override + public java.lang.String getPayloadType() { + java.lang.Object ref = payloadType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadType_ = s; + return s; + } + } + /** + *
+     * The payload type of the transaction.
+     * 
+ * + * string payload_type = 3 [json_name = "payloadType"]; + * @return The bytes for payloadType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPayloadTypeBytes() { + java.lang.Object ref = payloadType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 4; + private volatile java.lang.Object description_; + /** + *
+     * A description of the transaction.
+     * 
+ * + * string description = 4 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + *
+     * A description of the transaction.
+     * 
+ * + * string description = 4 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AMOUNT_FIELD_NUMBER = 5; + private long amount_; + /** + *
+     * The amount involved in the transaction.
+     * 
+ * + * int64 amount = 5 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, transactionId_); + } + if (time_ != 0) { + output.writeUInt32(2, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, payloadType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_); + } + if (amount_ != 0L) { + output.writeInt64(5, amount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, transactionId_); + } + if (time_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, payloadType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_); + } + if (amount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, amount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.HistoryInfo)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.HistoryInfo other = (pactus.wallet.WalletOuterClass.HistoryInfo) obj; + + if (!getTransactionId() + .equals(other.getTransactionId())) return false; + if (getTime() + != other.getTime()) return false; + if (!getPayloadType() + .equals(other.getPayloadType())) return false; + if (!getDescription() + .equals(other.getDescription())) return false; + if (getAmount() + != other.getAmount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getTransactionId().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + getTime(); + hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPayloadType().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAmount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.HistoryInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.HistoryInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Message containing transaction history information for an address.
+     * 
+ * + * Protobuf type {@code pactus.HistoryInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.HistoryInfo) + pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_HistoryInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_HistoryInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.HistoryInfo.class, pactus.wallet.WalletOuterClass.HistoryInfo.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.HistoryInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + transactionId_ = ""; + + time_ = 0; + + payloadType_ = ""; + + description_ = ""; + + amount_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_HistoryInfo_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.HistoryInfo getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.HistoryInfo.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.HistoryInfo build() { + pactus.wallet.WalletOuterClass.HistoryInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.HistoryInfo buildPartial() { + pactus.wallet.WalletOuterClass.HistoryInfo result = new pactus.wallet.WalletOuterClass.HistoryInfo(this); + result.transactionId_ = transactionId_; + result.time_ = time_; + result.payloadType_ = payloadType_; + result.description_ = description_; + result.amount_ = amount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.HistoryInfo) { + return mergeFrom((pactus.wallet.WalletOuterClass.HistoryInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.HistoryInfo other) { + if (other == pactus.wallet.WalletOuterClass.HistoryInfo.getDefaultInstance()) return this; + if (!other.getTransactionId().isEmpty()) { + transactionId_ = other.transactionId_; + onChanged(); + } + if (other.getTime() != 0) { + setTime(other.getTime()); + } + if (!other.getPayloadType().isEmpty()) { + payloadType_ = other.payloadType_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.getAmount() != 0L) { + setAmount(other.getAmount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + transactionId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + time_ = input.readUInt32(); + + break; + } // case 16 + case 26: { + payloadType_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + description_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: { + amount_ = input.readInt64(); + + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object transactionId_ = ""; + /** + *
+       * The transaction ID hash.
+       * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The transactionId. + */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The transaction ID hash.
+       * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The bytes for transactionId. + */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The transaction ID hash.
+       * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @param value The transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + transactionId_ = value; + onChanged(); + return this; + } + /** + *
+       * The transaction ID hash.
+       * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return This builder for chaining. + */ + public Builder clearTransactionId() { + + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + /** + *
+       * The transaction ID hash.
+       * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @param value The bytes for transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + transactionId_ = value; + onChanged(); + return this; + } + + private int time_ ; + /** + *
+       * The timestamp of the transaction.
+       * 
+ * + * uint32 time = 2 [json_name = "time"]; + * @return The time. + */ + @java.lang.Override + public int getTime() { + return time_; + } + /** + *
+       * The timestamp of the transaction.
+       * 
+ * + * uint32 time = 2 [json_name = "time"]; + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(int value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
+       * The timestamp of the transaction.
+       * 
+ * + * uint32 time = 2 [json_name = "time"]; + * @return This builder for chaining. + */ + public Builder clearTime() { + + time_ = 0; + onChanged(); + return this; + } + + private java.lang.Object payloadType_ = ""; + /** + *
+       * The payload type of the transaction.
+       * 
+ * + * string payload_type = 3 [json_name = "payloadType"]; + * @return The payloadType. + */ + public java.lang.String getPayloadType() { + java.lang.Object ref = payloadType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The payload type of the transaction.
+       * 
+ * + * string payload_type = 3 [json_name = "payloadType"]; + * @return The bytes for payloadType. + */ + public com.google.protobuf.ByteString + getPayloadTypeBytes() { + java.lang.Object ref = payloadType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The payload type of the transaction.
+       * 
+ * + * string payload_type = 3 [json_name = "payloadType"]; + * @param value The payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + payloadType_ = value; + onChanged(); + return this; + } + /** + *
+       * The payload type of the transaction.
+       * 
+ * + * string payload_type = 3 [json_name = "payloadType"]; + * @return This builder for chaining. + */ + public Builder clearPayloadType() { + + payloadType_ = getDefaultInstance().getPayloadType(); + onChanged(); + return this; + } + /** + *
+       * The payload type of the transaction.
+       * 
+ * + * string payload_type = 3 [json_name = "payloadType"]; + * @param value The bytes for payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + payloadType_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + *
+       * A description of the transaction.
+       * 
+ * + * string description = 4 [json_name = "description"]; + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A description of the transaction.
+       * 
+ * + * string description = 4 [json_name = "description"]; + * @return The bytes for description. + */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A description of the transaction.
+       * 
+ * + * string description = 4 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * A description of the transaction.
+       * 
+ * + * string description = 4 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * A description of the transaction.
+       * 
+ * + * string description = 4 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private long amount_ ; + /** + *
+       * The amount involved in the transaction.
+       * 
+ * + * int64 amount = 5 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + /** + *
+       * The amount involved in the transaction.
+       * 
+ * + * int64 amount = 5 [json_name = "amount"]; + * @param value The amount to set. + * @return This builder for chaining. + */ + public Builder setAmount(long value) { + + amount_ = value; + onChanged(); + return this; + } + /** + *
+       * The amount involved in the transaction.
+       * 
+ * + * int64 amount = 5 [json_name = "amount"]; + * @return This builder for chaining. + */ + public Builder clearAmount() { + + amount_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.HistoryInfo) + } + + // @@protoc_insertion_point(class_scope:pactus.HistoryInfo) + private static final pactus.wallet.WalletOuterClass.HistoryInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.HistoryInfo(); + } + + public static pactus.wallet.WalletOuterClass.HistoryInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HistoryInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.HistoryInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetAddressHistoryRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetAddressHistoryRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + + /** + *
+     * The address to retrieve the transaction history for.
+     * 
+ * + * string address = 2 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The address to retrieve the transaction history for.
+     * 
+ * + * string address = 2 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + } + /** + *
+   * Request message to get an address transaction history.
+   * 
+ * + * Protobuf type {@code pactus.GetAddressHistoryRequest} + */ + public static final class GetAddressHistoryRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetAddressHistoryRequest) + GetAddressHistoryRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAddressHistoryRequest.newBuilder() to construct. + private GetAddressHistoryRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAddressHistoryRequest() { + walletName_ = ""; + address_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAddressHistoryRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.class, pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_FIELD_NUMBER = 2; + private volatile java.lang.Object address_; + /** + *
+     * The address to retrieve the transaction history for.
+     * 
+ * + * string address = 2 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The address to retrieve the transaction history for.
+     * 
+ * + * string address = 2 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, address_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, address_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.GetAddressHistoryRequest)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.GetAddressHistoryRequest other = (pactus.wallet.WalletOuterClass.GetAddressHistoryRequest) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetAddressHistoryRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message to get an address transaction history.
+     * 
+ * + * Protobuf type {@code pactus.GetAddressHistoryRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetAddressHistoryRequest) + pactus.wallet.WalletOuterClass.GetAddressHistoryRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.class, pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + address_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryRequest_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetAddressHistoryRequest getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetAddressHistoryRequest build() { + pactus.wallet.WalletOuterClass.GetAddressHistoryRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetAddressHistoryRequest buildPartial() { + pactus.wallet.WalletOuterClass.GetAddressHistoryRequest result = new pactus.wallet.WalletOuterClass.GetAddressHistoryRequest(this); + result.walletName_ = walletName_; + result.address_ = address_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.GetAddressHistoryRequest) { + return mergeFrom((pactus.wallet.WalletOuterClass.GetAddressHistoryRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetAddressHistoryRequest other) { + if (other == pactus.wallet.WalletOuterClass.GetAddressHistoryRequest.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * The address to retrieve the transaction history for.
+       * 
+ * + * string address = 2 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The address to retrieve the transaction history for.
+       * 
+ * + * string address = 2 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The address to retrieve the transaction history for.
+       * 
+ * + * string address = 2 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The address to retrieve the transaction history for.
+       * 
+ * + * string address = 2 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The address to retrieve the transaction history for.
+       * 
+ * + * string address = 2 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetAddressHistoryRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetAddressHistoryRequest) + private static final pactus.wallet.WalletOuterClass.GetAddressHistoryRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetAddressHistoryRequest(); + } + + public static pactus.wallet.WalletOuterClass.GetAddressHistoryRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAddressHistoryRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetAddressHistoryRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetAddressHistoryResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetAddressHistoryResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Array of history information for the address.
+     * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + java.util.List + getHistoryInfoList(); + /** + *
+     * Array of history information for the address.
+     * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + pactus.wallet.WalletOuterClass.HistoryInfo getHistoryInfo(int index); + /** + *
+     * Array of history information for the address.
+     * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + int getHistoryInfoCount(); + /** + *
+     * Array of history information for the address.
+     * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + java.util.List + getHistoryInfoOrBuilderList(); + /** + *
+     * Array of history information for the address.
+     * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder getHistoryInfoOrBuilder( + int index); + } + /** + *
+   * Response message containing the address transaction history.
+   * 
+ * + * Protobuf type {@code pactus.GetAddressHistoryResponse} + */ + public static final class GetAddressHistoryResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetAddressHistoryResponse) + GetAddressHistoryResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAddressHistoryResponse.newBuilder() to construct. + private GetAddressHistoryResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAddressHistoryResponse() { + historyInfo_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAddressHistoryResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.class, pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.Builder.class); + } + + public static final int HISTORY_INFO_FIELD_NUMBER = 1; + private java.util.List historyInfo_; + /** + *
+     * Array of history information for the address.
+     * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + @java.lang.Override + public java.util.List getHistoryInfoList() { + return historyInfo_; + } + /** + *
+     * Array of history information for the address.
+     * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + @java.lang.Override + public java.util.List + getHistoryInfoOrBuilderList() { + return historyInfo_; + } + /** + *
+     * Array of history information for the address.
+     * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + @java.lang.Override + public int getHistoryInfoCount() { + return historyInfo_.size(); + } + /** + *
+     * Array of history information for the address.
+     * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + @java.lang.Override + public pactus.wallet.WalletOuterClass.HistoryInfo getHistoryInfo(int index) { + return historyInfo_.get(index); + } + /** + *
+     * Array of history information for the address.
+     * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + @java.lang.Override + public pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder getHistoryInfoOrBuilder( + int index) { + return historyInfo_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < historyInfo_.size(); i++) { + output.writeMessage(1, historyInfo_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < historyInfo_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, historyInfo_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.GetAddressHistoryResponse)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.GetAddressHistoryResponse other = (pactus.wallet.WalletOuterClass.GetAddressHistoryResponse) obj; + + if (!getHistoryInfoList() + .equals(other.getHistoryInfoList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getHistoryInfoCount() > 0) { + hash = (37 * hash) + HISTORY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getHistoryInfoList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetAddressHistoryResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the address transaction history.
+     * 
+ * + * Protobuf type {@code pactus.GetAddressHistoryResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetAddressHistoryResponse) + pactus.wallet.WalletOuterClass.GetAddressHistoryResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.class, pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (historyInfoBuilder_ == null) { + historyInfo_ = java.util.Collections.emptyList(); + } else { + historyInfo_ = null; + historyInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetAddressHistoryResponse_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetAddressHistoryResponse getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetAddressHistoryResponse build() { + pactus.wallet.WalletOuterClass.GetAddressHistoryResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetAddressHistoryResponse buildPartial() { + pactus.wallet.WalletOuterClass.GetAddressHistoryResponse result = new pactus.wallet.WalletOuterClass.GetAddressHistoryResponse(this); + int from_bitField0_ = bitField0_; + if (historyInfoBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + historyInfo_ = java.util.Collections.unmodifiableList(historyInfo_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.historyInfo_ = historyInfo_; + } else { + result.historyInfo_ = historyInfoBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.GetAddressHistoryResponse) { + return mergeFrom((pactus.wallet.WalletOuterClass.GetAddressHistoryResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetAddressHistoryResponse other) { + if (other == pactus.wallet.WalletOuterClass.GetAddressHistoryResponse.getDefaultInstance()) return this; + if (historyInfoBuilder_ == null) { + if (!other.historyInfo_.isEmpty()) { + if (historyInfo_.isEmpty()) { + historyInfo_ = other.historyInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureHistoryInfoIsMutable(); + historyInfo_.addAll(other.historyInfo_); + } + onChanged(); + } + } else { + if (!other.historyInfo_.isEmpty()) { + if (historyInfoBuilder_.isEmpty()) { + historyInfoBuilder_.dispose(); + historyInfoBuilder_ = null; + historyInfo_ = other.historyInfo_; + bitField0_ = (bitField0_ & ~0x00000001); + historyInfoBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getHistoryInfoFieldBuilder() : null; + } else { + historyInfoBuilder_.addAllMessages(other.historyInfo_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + pactus.wallet.WalletOuterClass.HistoryInfo m = + input.readMessage( + pactus.wallet.WalletOuterClass.HistoryInfo.parser(), + extensionRegistry); + if (historyInfoBuilder_ == null) { + ensureHistoryInfoIsMutable(); + historyInfo_.add(m); + } else { + historyInfoBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List historyInfo_ = + java.util.Collections.emptyList(); + private void ensureHistoryInfoIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + historyInfo_ = new java.util.ArrayList(historyInfo_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.wallet.WalletOuterClass.HistoryInfo, pactus.wallet.WalletOuterClass.HistoryInfo.Builder, pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder> historyInfoBuilder_; + + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public java.util.List getHistoryInfoList() { + if (historyInfoBuilder_ == null) { + return java.util.Collections.unmodifiableList(historyInfo_); + } else { + return historyInfoBuilder_.getMessageList(); + } + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public int getHistoryInfoCount() { + if (historyInfoBuilder_ == null) { + return historyInfo_.size(); + } else { + return historyInfoBuilder_.getCount(); + } + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public pactus.wallet.WalletOuterClass.HistoryInfo getHistoryInfo(int index) { + if (historyInfoBuilder_ == null) { + return historyInfo_.get(index); + } else { + return historyInfoBuilder_.getMessage(index); + } + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public Builder setHistoryInfo( + int index, pactus.wallet.WalletOuterClass.HistoryInfo value) { + if (historyInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHistoryInfoIsMutable(); + historyInfo_.set(index, value); + onChanged(); + } else { + historyInfoBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public Builder setHistoryInfo( + int index, pactus.wallet.WalletOuterClass.HistoryInfo.Builder builderForValue) { + if (historyInfoBuilder_ == null) { + ensureHistoryInfoIsMutable(); + historyInfo_.set(index, builderForValue.build()); + onChanged(); + } else { + historyInfoBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public Builder addHistoryInfo(pactus.wallet.WalletOuterClass.HistoryInfo value) { + if (historyInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHistoryInfoIsMutable(); + historyInfo_.add(value); + onChanged(); + } else { + historyInfoBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public Builder addHistoryInfo( + int index, pactus.wallet.WalletOuterClass.HistoryInfo value) { + if (historyInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHistoryInfoIsMutable(); + historyInfo_.add(index, value); + onChanged(); + } else { + historyInfoBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public Builder addHistoryInfo( + pactus.wallet.WalletOuterClass.HistoryInfo.Builder builderForValue) { + if (historyInfoBuilder_ == null) { + ensureHistoryInfoIsMutable(); + historyInfo_.add(builderForValue.build()); + onChanged(); + } else { + historyInfoBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public Builder addHistoryInfo( + int index, pactus.wallet.WalletOuterClass.HistoryInfo.Builder builderForValue) { + if (historyInfoBuilder_ == null) { + ensureHistoryInfoIsMutable(); + historyInfo_.add(index, builderForValue.build()); + onChanged(); + } else { + historyInfoBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public Builder addAllHistoryInfo( + java.lang.Iterable values) { + if (historyInfoBuilder_ == null) { + ensureHistoryInfoIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, historyInfo_); + onChanged(); + } else { + historyInfoBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public Builder clearHistoryInfo() { + if (historyInfoBuilder_ == null) { + historyInfo_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + historyInfoBuilder_.clear(); + } + return this; + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public Builder removeHistoryInfo(int index) { + if (historyInfoBuilder_ == null) { + ensureHistoryInfoIsMutable(); + historyInfo_.remove(index); + onChanged(); + } else { + historyInfoBuilder_.remove(index); + } + return this; + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public pactus.wallet.WalletOuterClass.HistoryInfo.Builder getHistoryInfoBuilder( + int index) { + return getHistoryInfoFieldBuilder().getBuilder(index); + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder getHistoryInfoOrBuilder( + int index) { + if (historyInfoBuilder_ == null) { + return historyInfo_.get(index); } else { + return historyInfoBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public java.util.List + getHistoryInfoOrBuilderList() { + if (historyInfoBuilder_ != null) { + return historyInfoBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(historyInfo_); + } + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public pactus.wallet.WalletOuterClass.HistoryInfo.Builder addHistoryInfoBuilder() { + return getHistoryInfoFieldBuilder().addBuilder( + pactus.wallet.WalletOuterClass.HistoryInfo.getDefaultInstance()); + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public pactus.wallet.WalletOuterClass.HistoryInfo.Builder addHistoryInfoBuilder( + int index) { + return getHistoryInfoFieldBuilder().addBuilder( + index, pactus.wallet.WalletOuterClass.HistoryInfo.getDefaultInstance()); + } + /** + *
+       * Array of history information for the address.
+       * 
+ * + * repeated .pactus.HistoryInfo history_info = 1 [json_name = "historyInfo"]; + */ + public java.util.List + getHistoryInfoBuilderList() { + return getHistoryInfoFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + pactus.wallet.WalletOuterClass.HistoryInfo, pactus.wallet.WalletOuterClass.HistoryInfo.Builder, pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder> + getHistoryInfoFieldBuilder() { + if (historyInfoBuilder_ == null) { + historyInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + pactus.wallet.WalletOuterClass.HistoryInfo, pactus.wallet.WalletOuterClass.HistoryInfo.Builder, pactus.wallet.WalletOuterClass.HistoryInfoOrBuilder>( + historyInfo_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + historyInfo_ = null; + } + return historyInfoBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetAddressHistoryResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetAddressHistoryResponse) + private static final pactus.wallet.WalletOuterClass.GetAddressHistoryResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetAddressHistoryResponse(); + } + + public static pactus.wallet.WalletOuterClass.GetAddressHistoryResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAddressHistoryResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetAddressHistoryResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetNewAddressRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetNewAddressRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the wallet to generate a new address.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the wallet to generate a new address.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + + /** + *
+     * The type of address to generate.
+     * 
+ * + * .pactus.AddressType address_type = 2 [json_name = "addressType"]; + * @return The enum numeric value on the wire for addressType. + */ + int getAddressTypeValue(); + /** + *
+     * The type of address to generate.
+     * 
+ * + * .pactus.AddressType address_type = 2 [json_name = "addressType"]; + * @return The addressType. + */ + pactus.wallet.WalletOuterClass.AddressType getAddressType(); + + /** + *
+     * A label for the new address.
+     * 
+ * + * string label = 3 [json_name = "label"]; + * @return The label. + */ + java.lang.String getLabel(); + /** + *
+     * A label for the new address.
+     * 
+ * + * string label = 3 [json_name = "label"]; + * @return The bytes for label. + */ + com.google.protobuf.ByteString + getLabelBytes(); + + /** + *
+     * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
+     * 
+ * + * string password = 4 [json_name = "password"]; + * @return The password. + */ + java.lang.String getPassword(); + /** + *
+     * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
+     * 
+ * + * string password = 4 [json_name = "password"]; + * @return The bytes for password. + */ + com.google.protobuf.ByteString + getPasswordBytes(); + } + /** + *
+   * Request message for generating a new address.
+   * 
+ * + * Protobuf type {@code pactus.GetNewAddressRequest} + */ + public static final class GetNewAddressRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetNewAddressRequest) + GetNewAddressRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNewAddressRequest.newBuilder() to construct. + private GetNewAddressRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNewAddressRequest() { + walletName_ = ""; + addressType_ = 0; + label_ = ""; + password_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNewAddressRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetNewAddressRequest.class, pactus.wallet.WalletOuterClass.GetNewAddressRequest.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the wallet to generate a new address.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the wallet to generate a new address.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_TYPE_FIELD_NUMBER = 2; + private int addressType_; + /** + *
+     * The type of address to generate.
+     * 
+ * + * .pactus.AddressType address_type = 2 [json_name = "addressType"]; + * @return The enum numeric value on the wire for addressType. + */ + @java.lang.Override public int getAddressTypeValue() { + return addressType_; + } + /** + *
+     * The type of address to generate.
+     * 
+ * + * .pactus.AddressType address_type = 2 [json_name = "addressType"]; + * @return The addressType. + */ + @java.lang.Override public pactus.wallet.WalletOuterClass.AddressType getAddressType() { + @SuppressWarnings("deprecation") + pactus.wallet.WalletOuterClass.AddressType result = pactus.wallet.WalletOuterClass.AddressType.valueOf(addressType_); + return result == null ? pactus.wallet.WalletOuterClass.AddressType.UNRECOGNIZED : result; + } + + public static final int LABEL_FIELD_NUMBER = 3; + private volatile java.lang.Object label_; + /** + *
+     * A label for the new address.
+     * 
+ * + * string label = 3 [json_name = "label"]; + * @return The label. + */ + @java.lang.Override + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } + } + /** + *
+     * A label for the new address.
+     * 
+ * + * string label = 3 [json_name = "label"]; + * @return The bytes for label. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_FIELD_NUMBER = 4; + private volatile java.lang.Object password_; + /** + *
+     * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
+     * 
+ * + * string password = 4 [json_name = "password"]; + * @return The password. + */ + @java.lang.Override + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } + } + /** + *
+     * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
+     * 
+ * + * string password = 4 [json_name = "password"]; + * @return The bytes for password. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + if (addressType_ != pactus.wallet.WalletOuterClass.AddressType.ADDRESS_TYPE_TREASURY.getNumber()) { + output.writeEnum(2, addressType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, password_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + if (addressType_ != pactus.wallet.WalletOuterClass.AddressType.ADDRESS_TYPE_TREASURY.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, addressType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(label_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, label_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, password_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.GetNewAddressRequest)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.GetNewAddressRequest other = (pactus.wallet.WalletOuterClass.GetNewAddressRequest) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (addressType_ != other.addressType_) return false; + if (!getLabel() + .equals(other.getLabel())) return false; + if (!getPassword() + .equals(other.getPassword())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (37 * hash) + ADDRESS_TYPE_FIELD_NUMBER; + hash = (53 * hash) + addressType_; + hash = (37 * hash) + LABEL_FIELD_NUMBER; + hash = (53 * hash) + getLabel().hashCode(); + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetNewAddressRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for generating a new address.
+     * 
+ * + * Protobuf type {@code pactus.GetNewAddressRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetNewAddressRequest) + pactus.wallet.WalletOuterClass.GetNewAddressRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetNewAddressRequest.class, pactus.wallet.WalletOuterClass.GetNewAddressRequest.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.GetNewAddressRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + addressType_ = 0; + + label_ = ""; + + password_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressRequest_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetNewAddressRequest getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.GetNewAddressRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetNewAddressRequest build() { + pactus.wallet.WalletOuterClass.GetNewAddressRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetNewAddressRequest buildPartial() { + pactus.wallet.WalletOuterClass.GetNewAddressRequest result = new pactus.wallet.WalletOuterClass.GetNewAddressRequest(this); + result.walletName_ = walletName_; + result.addressType_ = addressType_; + result.label_ = label_; + result.password_ = password_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.GetNewAddressRequest) { + return mergeFrom((pactus.wallet.WalletOuterClass.GetNewAddressRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetNewAddressRequest other) { + if (other == pactus.wallet.WalletOuterClass.GetNewAddressRequest.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + if (other.addressType_ != 0) { + setAddressTypeValue(other.getAddressTypeValue()); + } + if (!other.getLabel().isEmpty()) { + label_ = other.label_; + onChanged(); + } + if (!other.getPassword().isEmpty()) { + password_ = other.password_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + addressType_ = input.readEnum(); + + break; + } // case 16 + case 26: { + label_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + password_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the wallet to generate a new address.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the wallet to generate a new address.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the wallet to generate a new address.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the wallet to generate a new address.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the wallet to generate a new address.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + + private int addressType_ = 0; + /** + *
+       * The type of address to generate.
+       * 
+ * + * .pactus.AddressType address_type = 2 [json_name = "addressType"]; + * @return The enum numeric value on the wire for addressType. + */ + @java.lang.Override public int getAddressTypeValue() { + return addressType_; + } + /** + *
+       * The type of address to generate.
+       * 
+ * + * .pactus.AddressType address_type = 2 [json_name = "addressType"]; + * @param value The enum numeric value on the wire for addressType to set. + * @return This builder for chaining. + */ + public Builder setAddressTypeValue(int value) { + + addressType_ = value; + onChanged(); + return this; + } + /** + *
+       * The type of address to generate.
+       * 
+ * + * .pactus.AddressType address_type = 2 [json_name = "addressType"]; + * @return The addressType. + */ + @java.lang.Override + public pactus.wallet.WalletOuterClass.AddressType getAddressType() { + @SuppressWarnings("deprecation") + pactus.wallet.WalletOuterClass.AddressType result = pactus.wallet.WalletOuterClass.AddressType.valueOf(addressType_); + return result == null ? pactus.wallet.WalletOuterClass.AddressType.UNRECOGNIZED : result; + } + /** + *
+       * The type of address to generate.
+       * 
+ * + * .pactus.AddressType address_type = 2 [json_name = "addressType"]; + * @param value The addressType to set. + * @return This builder for chaining. + */ + public Builder setAddressType(pactus.wallet.WalletOuterClass.AddressType value) { + if (value == null) { + throw new NullPointerException(); + } + + addressType_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The type of address to generate.
+       * 
+ * + * .pactus.AddressType address_type = 2 [json_name = "addressType"]; + * @return This builder for chaining. + */ + public Builder clearAddressType() { + + addressType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object label_ = ""; + /** + *
+       * A label for the new address.
+       * 
+ * + * string label = 3 [json_name = "label"]; + * @return The label. + */ + public java.lang.String getLabel() { + java.lang.Object ref = label_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + label_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A label for the new address.
+       * 
+ * + * string label = 3 [json_name = "label"]; + * @return The bytes for label. + */ + public com.google.protobuf.ByteString + getLabelBytes() { + java.lang.Object ref = label_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + label_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A label for the new address.
+       * 
+ * + * string label = 3 [json_name = "label"]; + * @param value The label to set. + * @return This builder for chaining. + */ + public Builder setLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + label_ = value; + onChanged(); + return this; + } + /** + *
+       * A label for the new address.
+       * 
+ * + * string label = 3 [json_name = "label"]; + * @return This builder for chaining. + */ + public Builder clearLabel() { + + label_ = getDefaultInstance().getLabel(); + onChanged(); + return this; + } + /** + *
+       * A label for the new address.
+       * 
+ * + * string label = 3 [json_name = "label"]; + * @param value The bytes for label to set. + * @return This builder for chaining. + */ + public Builder setLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + label_ = value; + onChanged(); + return this; + } + + private java.lang.Object password_ = ""; + /** + *
+       * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
+       * 
+ * + * string password = 4 [json_name = "password"]; + * @return The password. + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
+       * 
+ * + * string password = 4 [json_name = "password"]; + * @return The bytes for password. + */ + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
+       * 
+ * + * string password = 4 [json_name = "password"]; + * @param value The password to set. + * @return This builder for chaining. + */ + public Builder setPassword( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + password_ = value; + onChanged(); + return this; + } + /** + *
+       * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
+       * 
+ * + * string password = 4 [json_name = "password"]; + * @return This builder for chaining. + */ + public Builder clearPassword() { + + password_ = getDefaultInstance().getPassword(); + onChanged(); + return this; + } + /** + *
+       * Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT.
+       * 
+ * + * string password = 4 [json_name = "password"]; + * @param value The bytes for password to set. + * @return This builder for chaining. + */ + public Builder setPasswordBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + password_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetNewAddressRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetNewAddressRequest) + private static final pactus.wallet.WalletOuterClass.GetNewAddressRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetNewAddressRequest(); + } + + public static pactus.wallet.WalletOuterClass.GetNewAddressRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNewAddressRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetNewAddressRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetNewAddressResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetNewAddressResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the wallet from which the address is generated.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the wallet from which the address is generated.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + + /** + *
+     * Information about the newly generated address.
+     * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + * @return Whether the addressInfo field is set. + */ + boolean hasAddressInfo(); + /** + *
+     * Information about the newly generated address.
+     * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + * @return The addressInfo. + */ + pactus.wallet.WalletOuterClass.AddressInfo getAddressInfo(); + /** + *
+     * Information about the newly generated address.
+     * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + */ + pactus.wallet.WalletOuterClass.AddressInfoOrBuilder getAddressInfoOrBuilder(); + } + /** + *
+   * Response message containing the newly generated address.
+   * 
+ * + * Protobuf type {@code pactus.GetNewAddressResponse} + */ + public static final class GetNewAddressResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetNewAddressResponse) + GetNewAddressResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNewAddressResponse.newBuilder() to construct. + private GetNewAddressResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetNewAddressResponse() { + walletName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetNewAddressResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetNewAddressResponse.class, pactus.wallet.WalletOuterClass.GetNewAddressResponse.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the wallet from which the address is generated.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the wallet from which the address is generated.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_INFO_FIELD_NUMBER = 2; + private pactus.wallet.WalletOuterClass.AddressInfo addressInfo_; + /** + *
+     * Information about the newly generated address.
+     * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + * @return Whether the addressInfo field is set. + */ + @java.lang.Override + public boolean hasAddressInfo() { + return addressInfo_ != null; + } + /** + *
+     * Information about the newly generated address.
+     * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + * @return The addressInfo. + */ + @java.lang.Override + public pactus.wallet.WalletOuterClass.AddressInfo getAddressInfo() { + return addressInfo_ == null ? pactus.wallet.WalletOuterClass.AddressInfo.getDefaultInstance() : addressInfo_; + } + /** + *
+     * Information about the newly generated address.
+     * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + */ + @java.lang.Override + public pactus.wallet.WalletOuterClass.AddressInfoOrBuilder getAddressInfoOrBuilder() { + return getAddressInfo(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + if (addressInfo_ != null) { + output.writeMessage(2, getAddressInfo()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + if (addressInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAddressInfo()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.GetNewAddressResponse)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.GetNewAddressResponse other = (pactus.wallet.WalletOuterClass.GetNewAddressResponse) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (hasAddressInfo() != other.hasAddressInfo()) return false; + if (hasAddressInfo()) { + if (!getAddressInfo() + .equals(other.getAddressInfo())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + if (hasAddressInfo()) { + hash = (37 * hash) + ADDRESS_INFO_FIELD_NUMBER; + hash = (53 * hash) + getAddressInfo().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetNewAddressResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the newly generated address.
+     * 
+ * + * Protobuf type {@code pactus.GetNewAddressResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetNewAddressResponse) + pactus.wallet.WalletOuterClass.GetNewAddressResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetNewAddressResponse.class, pactus.wallet.WalletOuterClass.GetNewAddressResponse.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.GetNewAddressResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + if (addressInfoBuilder_ == null) { + addressInfo_ = null; + } else { + addressInfo_ = null; + addressInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetNewAddressResponse_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetNewAddressResponse getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.GetNewAddressResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetNewAddressResponse build() { + pactus.wallet.WalletOuterClass.GetNewAddressResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetNewAddressResponse buildPartial() { + pactus.wallet.WalletOuterClass.GetNewAddressResponse result = new pactus.wallet.WalletOuterClass.GetNewAddressResponse(this); + result.walletName_ = walletName_; + if (addressInfoBuilder_ == null) { + result.addressInfo_ = addressInfo_; + } else { + result.addressInfo_ = addressInfoBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.GetNewAddressResponse) { + return mergeFrom((pactus.wallet.WalletOuterClass.GetNewAddressResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetNewAddressResponse other) { + if (other == pactus.wallet.WalletOuterClass.GetNewAddressResponse.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + if (other.hasAddressInfo()) { + mergeAddressInfo(other.getAddressInfo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + input.readMessage( + getAddressInfoFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the wallet from which the address is generated.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the wallet from which the address is generated.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the wallet from which the address is generated.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the wallet from which the address is generated.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the wallet from which the address is generated.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + + private pactus.wallet.WalletOuterClass.AddressInfo addressInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + pactus.wallet.WalletOuterClass.AddressInfo, pactus.wallet.WalletOuterClass.AddressInfo.Builder, pactus.wallet.WalletOuterClass.AddressInfoOrBuilder> addressInfoBuilder_; + /** + *
+       * Information about the newly generated address.
+       * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + * @return Whether the addressInfo field is set. + */ + public boolean hasAddressInfo() { + return addressInfoBuilder_ != null || addressInfo_ != null; + } + /** + *
+       * Information about the newly generated address.
+       * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + * @return The addressInfo. + */ + public pactus.wallet.WalletOuterClass.AddressInfo getAddressInfo() { + if (addressInfoBuilder_ == null) { + return addressInfo_ == null ? pactus.wallet.WalletOuterClass.AddressInfo.getDefaultInstance() : addressInfo_; + } else { + return addressInfoBuilder_.getMessage(); + } + } + /** + *
+       * Information about the newly generated address.
+       * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + */ + public Builder setAddressInfo(pactus.wallet.WalletOuterClass.AddressInfo value) { + if (addressInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + addressInfo_ = value; + onChanged(); + } else { + addressInfoBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Information about the newly generated address.
+       * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + */ + public Builder setAddressInfo( + pactus.wallet.WalletOuterClass.AddressInfo.Builder builderForValue) { + if (addressInfoBuilder_ == null) { + addressInfo_ = builderForValue.build(); + onChanged(); + } else { + addressInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Information about the newly generated address.
+       * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + */ + public Builder mergeAddressInfo(pactus.wallet.WalletOuterClass.AddressInfo value) { + if (addressInfoBuilder_ == null) { + if (addressInfo_ != null) { + addressInfo_ = + pactus.wallet.WalletOuterClass.AddressInfo.newBuilder(addressInfo_).mergeFrom(value).buildPartial(); + } else { + addressInfo_ = value; + } + onChanged(); + } else { + addressInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Information about the newly generated address.
+       * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + */ + public Builder clearAddressInfo() { + if (addressInfoBuilder_ == null) { + addressInfo_ = null; + onChanged(); + } else { + addressInfo_ = null; + addressInfoBuilder_ = null; + } + + return this; + } + /** + *
+       * Information about the newly generated address.
+       * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + */ + public pactus.wallet.WalletOuterClass.AddressInfo.Builder getAddressInfoBuilder() { + + onChanged(); + return getAddressInfoFieldBuilder().getBuilder(); + } + /** + *
+       * Information about the newly generated address.
+       * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + */ + public pactus.wallet.WalletOuterClass.AddressInfoOrBuilder getAddressInfoOrBuilder() { + if (addressInfoBuilder_ != null) { + return addressInfoBuilder_.getMessageOrBuilder(); + } else { + return addressInfo_ == null ? + pactus.wallet.WalletOuterClass.AddressInfo.getDefaultInstance() : addressInfo_; + } + } + /** + *
+       * Information about the newly generated address.
+       * 
+ * + * .pactus.AddressInfo address_info = 2 [json_name = "addressInfo"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pactus.wallet.WalletOuterClass.AddressInfo, pactus.wallet.WalletOuterClass.AddressInfo.Builder, pactus.wallet.WalletOuterClass.AddressInfoOrBuilder> + getAddressInfoFieldBuilder() { + if (addressInfoBuilder_ == null) { + addressInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pactus.wallet.WalletOuterClass.AddressInfo, pactus.wallet.WalletOuterClass.AddressInfo.Builder, pactus.wallet.WalletOuterClass.AddressInfoOrBuilder>( + getAddressInfo(), + getParentForChildren(), + isClean()); + addressInfo_ = null; + } + return addressInfoBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetNewAddressResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetNewAddressResponse) + private static final pactus.wallet.WalletOuterClass.GetNewAddressResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetNewAddressResponse(); + } + + public static pactus.wallet.WalletOuterClass.GetNewAddressResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNewAddressResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetNewAddressResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RestoreWalletRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.RestoreWalletRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the wallet to restore.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the wallet to restore.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + + /** + *
+     * The mnemonic for wallet recovery.
+     * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The mnemonic. + */ + java.lang.String getMnemonic(); + /** + *
+     * The mnemonic for wallet recovery.
+     * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The bytes for mnemonic. + */ + com.google.protobuf.ByteString + getMnemonicBytes(); + + /** + *
+     * The password for securing the wallet.
+     * 
+ * + * string password = 3 [json_name = "password"]; + * @return The password. + */ + java.lang.String getPassword(); + /** + *
+     * The password for securing the wallet.
+     * 
+ * + * string password = 3 [json_name = "password"]; + * @return The bytes for password. + */ + com.google.protobuf.ByteString + getPasswordBytes(); + } + /** + *
+   * Request message for restoring an existing wallet.
+   * 
+ * + * Protobuf type {@code pactus.RestoreWalletRequest} + */ + public static final class RestoreWalletRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.RestoreWalletRequest) + RestoreWalletRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RestoreWalletRequest.newBuilder() to construct. + private RestoreWalletRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RestoreWalletRequest() { + walletName_ = ""; + mnemonic_ = ""; + password_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RestoreWalletRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.RestoreWalletRequest.class, pactus.wallet.WalletOuterClass.RestoreWalletRequest.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the wallet to restore.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the wallet to restore.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MNEMONIC_FIELD_NUMBER = 2; + private volatile java.lang.Object mnemonic_; + /** + *
+     * The mnemonic for wallet recovery.
+     * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The mnemonic. + */ + @java.lang.Override + public java.lang.String getMnemonic() { + java.lang.Object ref = mnemonic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mnemonic_ = s; + return s; + } + } + /** + *
+     * The mnemonic for wallet recovery.
+     * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The bytes for mnemonic. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMnemonicBytes() { + java.lang.Object ref = mnemonic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mnemonic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_FIELD_NUMBER = 3; + private volatile java.lang.Object password_; + /** + *
+     * The password for securing the wallet.
+     * 
+ * + * string password = 3 [json_name = "password"]; + * @return The password. + */ + @java.lang.Override + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } + } + /** + *
+     * The password for securing the wallet.
+     * 
+ * + * string password = 3 [json_name = "password"]; + * @return The bytes for password. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mnemonic_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mnemonic_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, password_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mnemonic_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mnemonic_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, password_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.RestoreWalletRequest)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.RestoreWalletRequest other = (pactus.wallet.WalletOuterClass.RestoreWalletRequest) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getMnemonic() + .equals(other.getMnemonic())) return false; + if (!getPassword() + .equals(other.getPassword())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (37 * hash) + MNEMONIC_FIELD_NUMBER; + hash = (53 * hash) + getMnemonic().hashCode(); + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.RestoreWalletRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for restoring an existing wallet.
+     * 
+ * + * Protobuf type {@code pactus.RestoreWalletRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.RestoreWalletRequest) + pactus.wallet.WalletOuterClass.RestoreWalletRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.RestoreWalletRequest.class, pactus.wallet.WalletOuterClass.RestoreWalletRequest.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.RestoreWalletRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + mnemonic_ = ""; + + password_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletRequest_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.RestoreWalletRequest getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.RestoreWalletRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.RestoreWalletRequest build() { + pactus.wallet.WalletOuterClass.RestoreWalletRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.RestoreWalletRequest buildPartial() { + pactus.wallet.WalletOuterClass.RestoreWalletRequest result = new pactus.wallet.WalletOuterClass.RestoreWalletRequest(this); + result.walletName_ = walletName_; + result.mnemonic_ = mnemonic_; + result.password_ = password_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.RestoreWalletRequest) { + return mergeFrom((pactus.wallet.WalletOuterClass.RestoreWalletRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.RestoreWalletRequest other) { + if (other == pactus.wallet.WalletOuterClass.RestoreWalletRequest.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + if (!other.getMnemonic().isEmpty()) { + mnemonic_ = other.mnemonic_; + onChanged(); + } + if (!other.getPassword().isEmpty()) { + password_ = other.password_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + mnemonic_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + password_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the wallet to restore.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the wallet to restore.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the wallet to restore.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the wallet to restore.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the wallet to restore.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + + private java.lang.Object mnemonic_ = ""; + /** + *
+       * The mnemonic for wallet recovery.
+       * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The mnemonic. + */ + public java.lang.String getMnemonic() { + java.lang.Object ref = mnemonic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mnemonic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The mnemonic for wallet recovery.
+       * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The bytes for mnemonic. + */ + public com.google.protobuf.ByteString + getMnemonicBytes() { + java.lang.Object ref = mnemonic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mnemonic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The mnemonic for wallet recovery.
+       * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @param value The mnemonic to set. + * @return This builder for chaining. + */ + public Builder setMnemonic( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mnemonic_ = value; + onChanged(); + return this; + } + /** + *
+       * The mnemonic for wallet recovery.
+       * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return This builder for chaining. + */ + public Builder clearMnemonic() { + + mnemonic_ = getDefaultInstance().getMnemonic(); + onChanged(); + return this; + } + /** + *
+       * The mnemonic for wallet recovery.
+       * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @param value The bytes for mnemonic to set. + * @return This builder for chaining. + */ + public Builder setMnemonicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mnemonic_ = value; + onChanged(); + return this; + } + + private java.lang.Object password_ = ""; + /** + *
+       * The password for securing the wallet.
+       * 
+ * + * string password = 3 [json_name = "password"]; + * @return The password. + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The password for securing the wallet.
+       * 
+ * + * string password = 3 [json_name = "password"]; + * @return The bytes for password. + */ + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The password for securing the wallet.
+       * 
+ * + * string password = 3 [json_name = "password"]; + * @param value The password to set. + * @return This builder for chaining. + */ + public Builder setPassword( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + password_ = value; + onChanged(); + return this; + } + /** + *
+       * The password for securing the wallet.
+       * 
+ * + * string password = 3 [json_name = "password"]; + * @return This builder for chaining. + */ + public Builder clearPassword() { + + password_ = getDefaultInstance().getPassword(); + onChanged(); + return this; + } + /** + *
+       * The password for securing the wallet.
+       * 
+ * + * string password = 3 [json_name = "password"]; + * @param value The bytes for password to set. + * @return This builder for chaining. + */ + public Builder setPasswordBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + password_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.RestoreWalletRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.RestoreWalletRequest) + private static final pactus.wallet.WalletOuterClass.RestoreWalletRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.RestoreWalletRequest(); + } + + public static pactus.wallet.WalletOuterClass.RestoreWalletRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreWalletRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.RestoreWalletRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RestoreWalletResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.RestoreWalletResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the restored wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the restored wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + } + /** + *
+   * Response message containing the name of the restored wallet.
+   * 
+ * + * Protobuf type {@code pactus.RestoreWalletResponse} + */ + public static final class RestoreWalletResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.RestoreWalletResponse) + RestoreWalletResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use RestoreWalletResponse.newBuilder() to construct. + private RestoreWalletResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RestoreWalletResponse() { + walletName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RestoreWalletResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.RestoreWalletResponse.class, pactus.wallet.WalletOuterClass.RestoreWalletResponse.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the restored wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the restored wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.RestoreWalletResponse)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.RestoreWalletResponse other = (pactus.wallet.WalletOuterClass.RestoreWalletResponse) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.RestoreWalletResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the name of the restored wallet.
+     * 
+ * + * Protobuf type {@code pactus.RestoreWalletResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.RestoreWalletResponse) + pactus.wallet.WalletOuterClass.RestoreWalletResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.RestoreWalletResponse.class, pactus.wallet.WalletOuterClass.RestoreWalletResponse.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.RestoreWalletResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_RestoreWalletResponse_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.RestoreWalletResponse getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.RestoreWalletResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.RestoreWalletResponse build() { + pactus.wallet.WalletOuterClass.RestoreWalletResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.RestoreWalletResponse buildPartial() { + pactus.wallet.WalletOuterClass.RestoreWalletResponse result = new pactus.wallet.WalletOuterClass.RestoreWalletResponse(this); + result.walletName_ = walletName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.RestoreWalletResponse) { + return mergeFrom((pactus.wallet.WalletOuterClass.RestoreWalletResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.RestoreWalletResponse other) { + if (other == pactus.wallet.WalletOuterClass.RestoreWalletResponse.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the restored wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the restored wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the restored wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the restored wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the restored wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.RestoreWalletResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.RestoreWalletResponse) + private static final pactus.wallet.WalletOuterClass.RestoreWalletResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.RestoreWalletResponse(); + } + + public static pactus.wallet.WalletOuterClass.RestoreWalletResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestoreWalletResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.RestoreWalletResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CreateWalletRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.CreateWalletRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the new wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the new wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + + /** + *
+     * The password for securing the wallet.
+     * 
+ * + * string password = 4 [json_name = "password"]; + * @return The password. + */ + java.lang.String getPassword(); + /** + *
+     * The password for securing the wallet.
+     * 
+ * + * string password = 4 [json_name = "password"]; + * @return The bytes for password. + */ + com.google.protobuf.ByteString + getPasswordBytes(); + } + /** + *
+   * Request message for creating a new wallet.
+   * 
+ * + * Protobuf type {@code pactus.CreateWalletRequest} + */ + public static final class CreateWalletRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.CreateWalletRequest) + CreateWalletRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateWalletRequest.newBuilder() to construct. + private CreateWalletRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateWalletRequest() { + walletName_ = ""; + password_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateWalletRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.CreateWalletRequest.class, pactus.wallet.WalletOuterClass.CreateWalletRequest.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the new wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the new wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_FIELD_NUMBER = 4; + private volatile java.lang.Object password_; + /** + *
+     * The password for securing the wallet.
+     * 
+ * + * string password = 4 [json_name = "password"]; + * @return The password. + */ + @java.lang.Override + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } + } + /** + *
+     * The password for securing the wallet.
+     * 
+ * + * string password = 4 [json_name = "password"]; + * @return The bytes for password. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, password_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, password_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.CreateWalletRequest)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.CreateWalletRequest other = (pactus.wallet.WalletOuterClass.CreateWalletRequest) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getPassword() + .equals(other.getPassword())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.CreateWalletRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.CreateWalletRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for creating a new wallet.
+     * 
+ * + * Protobuf type {@code pactus.CreateWalletRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.CreateWalletRequest) + pactus.wallet.WalletOuterClass.CreateWalletRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.CreateWalletRequest.class, pactus.wallet.WalletOuterClass.CreateWalletRequest.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.CreateWalletRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + password_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletRequest_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.CreateWalletRequest getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.CreateWalletRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.CreateWalletRequest build() { + pactus.wallet.WalletOuterClass.CreateWalletRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.CreateWalletRequest buildPartial() { + pactus.wallet.WalletOuterClass.CreateWalletRequest result = new pactus.wallet.WalletOuterClass.CreateWalletRequest(this); + result.walletName_ = walletName_; + result.password_ = password_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.CreateWalletRequest) { + return mergeFrom((pactus.wallet.WalletOuterClass.CreateWalletRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.CreateWalletRequest other) { + if (other == pactus.wallet.WalletOuterClass.CreateWalletRequest.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + if (!other.getPassword().isEmpty()) { + password_ = other.password_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 34: { + password_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the new wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the new wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the new wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the new wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the new wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + + private java.lang.Object password_ = ""; + /** + *
+       * The password for securing the wallet.
+       * 
+ * + * string password = 4 [json_name = "password"]; + * @return The password. + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The password for securing the wallet.
+       * 
+ * + * string password = 4 [json_name = "password"]; + * @return The bytes for password. + */ + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The password for securing the wallet.
+       * 
+ * + * string password = 4 [json_name = "password"]; + * @param value The password to set. + * @return This builder for chaining. + */ + public Builder setPassword( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + password_ = value; + onChanged(); + return this; + } + /** + *
+       * The password for securing the wallet.
+       * 
+ * + * string password = 4 [json_name = "password"]; + * @return This builder for chaining. + */ + public Builder clearPassword() { + + password_ = getDefaultInstance().getPassword(); + onChanged(); + return this; + } + /** + *
+       * The password for securing the wallet.
+       * 
+ * + * string password = 4 [json_name = "password"]; + * @param value The bytes for password to set. + * @return This builder for chaining. + */ + public Builder setPasswordBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + password_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.CreateWalletRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.CreateWalletRequest) + private static final pactus.wallet.WalletOuterClass.CreateWalletRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.CreateWalletRequest(); + } + + public static pactus.wallet.WalletOuterClass.CreateWalletRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateWalletRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.CreateWalletRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CreateWalletResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.CreateWalletResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The mnemonic for wallet recovery.
+     * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The mnemonic. + */ + java.lang.String getMnemonic(); + /** + *
+     * The mnemonic for wallet recovery.
+     * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The bytes for mnemonic. + */ + com.google.protobuf.ByteString + getMnemonicBytes(); + } + /** + *
+   * Response message containing the mnemonic for wallet recovery.
+   * 
+ * + * Protobuf type {@code pactus.CreateWalletResponse} + */ + public static final class CreateWalletResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.CreateWalletResponse) + CreateWalletResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateWalletResponse.newBuilder() to construct. + private CreateWalletResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateWalletResponse() { + mnemonic_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateWalletResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.CreateWalletResponse.class, pactus.wallet.WalletOuterClass.CreateWalletResponse.Builder.class); + } + + public static final int MNEMONIC_FIELD_NUMBER = 2; + private volatile java.lang.Object mnemonic_; + /** + *
+     * The mnemonic for wallet recovery.
+     * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The mnemonic. + */ + @java.lang.Override + public java.lang.String getMnemonic() { + java.lang.Object ref = mnemonic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mnemonic_ = s; + return s; + } + } + /** + *
+     * The mnemonic for wallet recovery.
+     * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The bytes for mnemonic. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMnemonicBytes() { + java.lang.Object ref = mnemonic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mnemonic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mnemonic_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mnemonic_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mnemonic_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mnemonic_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.CreateWalletResponse)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.CreateWalletResponse other = (pactus.wallet.WalletOuterClass.CreateWalletResponse) obj; + + if (!getMnemonic() + .equals(other.getMnemonic())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MNEMONIC_FIELD_NUMBER; + hash = (53 * hash) + getMnemonic().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.CreateWalletResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.CreateWalletResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the mnemonic for wallet recovery.
+     * 
+ * + * Protobuf type {@code pactus.CreateWalletResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.CreateWalletResponse) + pactus.wallet.WalletOuterClass.CreateWalletResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.CreateWalletResponse.class, pactus.wallet.WalletOuterClass.CreateWalletResponse.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.CreateWalletResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + mnemonic_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_CreateWalletResponse_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.CreateWalletResponse getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.CreateWalletResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.CreateWalletResponse build() { + pactus.wallet.WalletOuterClass.CreateWalletResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.CreateWalletResponse buildPartial() { + pactus.wallet.WalletOuterClass.CreateWalletResponse result = new pactus.wallet.WalletOuterClass.CreateWalletResponse(this); + result.mnemonic_ = mnemonic_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.CreateWalletResponse) { + return mergeFrom((pactus.wallet.WalletOuterClass.CreateWalletResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.CreateWalletResponse other) { + if (other == pactus.wallet.WalletOuterClass.CreateWalletResponse.getDefaultInstance()) return this; + if (!other.getMnemonic().isEmpty()) { + mnemonic_ = other.mnemonic_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: { + mnemonic_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object mnemonic_ = ""; + /** + *
+       * The mnemonic for wallet recovery.
+       * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The mnemonic. + */ + public java.lang.String getMnemonic() { + java.lang.Object ref = mnemonic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mnemonic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The mnemonic for wallet recovery.
+       * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return The bytes for mnemonic. + */ + public com.google.protobuf.ByteString + getMnemonicBytes() { + java.lang.Object ref = mnemonic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mnemonic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The mnemonic for wallet recovery.
+       * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @param value The mnemonic to set. + * @return This builder for chaining. + */ + public Builder setMnemonic( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mnemonic_ = value; + onChanged(); + return this; + } + /** + *
+       * The mnemonic for wallet recovery.
+       * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @return This builder for chaining. + */ + public Builder clearMnemonic() { + + mnemonic_ = getDefaultInstance().getMnemonic(); + onChanged(); + return this; + } + /** + *
+       * The mnemonic for wallet recovery.
+       * 
+ * + * string mnemonic = 2 [json_name = "mnemonic"]; + * @param value The bytes for mnemonic to set. + * @return This builder for chaining. + */ + public Builder setMnemonicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mnemonic_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.CreateWalletResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.CreateWalletResponse) + private static final pactus.wallet.WalletOuterClass.CreateWalletResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.CreateWalletResponse(); + } + + public static pactus.wallet.WalletOuterClass.CreateWalletResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateWalletResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.CreateWalletResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LoadWalletRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.LoadWalletRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the wallet to load.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the wallet to load.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + } + /** + *
+   * Request message for loading an existing wallet.
+   * 
+ * + * Protobuf type {@code pactus.LoadWalletRequest} + */ + public static final class LoadWalletRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.LoadWalletRequest) + LoadWalletRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoadWalletRequest.newBuilder() to construct. + private LoadWalletRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LoadWalletRequest() { + walletName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LoadWalletRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.LoadWalletRequest.class, pactus.wallet.WalletOuterClass.LoadWalletRequest.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the wallet to load.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the wallet to load.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.LoadWalletRequest)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.LoadWalletRequest other = (pactus.wallet.WalletOuterClass.LoadWalletRequest) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.LoadWalletRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.LoadWalletRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for loading an existing wallet.
+     * 
+ * + * Protobuf type {@code pactus.LoadWalletRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.LoadWalletRequest) + pactus.wallet.WalletOuterClass.LoadWalletRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.LoadWalletRequest.class, pactus.wallet.WalletOuterClass.LoadWalletRequest.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.LoadWalletRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletRequest_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.LoadWalletRequest getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.LoadWalletRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.LoadWalletRequest build() { + pactus.wallet.WalletOuterClass.LoadWalletRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.LoadWalletRequest buildPartial() { + pactus.wallet.WalletOuterClass.LoadWalletRequest result = new pactus.wallet.WalletOuterClass.LoadWalletRequest(this); + result.walletName_ = walletName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.LoadWalletRequest) { + return mergeFrom((pactus.wallet.WalletOuterClass.LoadWalletRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.LoadWalletRequest other) { + if (other == pactus.wallet.WalletOuterClass.LoadWalletRequest.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the wallet to load.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the wallet to load.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the wallet to load.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the wallet to load.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the wallet to load.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.LoadWalletRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.LoadWalletRequest) + private static final pactus.wallet.WalletOuterClass.LoadWalletRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.LoadWalletRequest(); + } + + public static pactus.wallet.WalletOuterClass.LoadWalletRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoadWalletRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.LoadWalletRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LoadWalletResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.LoadWalletResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the loaded wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the loaded wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + } + /** + *
+   * Response message containing the name of the loaded wallet.
+   * 
+ * + * Protobuf type {@code pactus.LoadWalletResponse} + */ + public static final class LoadWalletResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.LoadWalletResponse) + LoadWalletResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use LoadWalletResponse.newBuilder() to construct. + private LoadWalletResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LoadWalletResponse() { + walletName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LoadWalletResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.LoadWalletResponse.class, pactus.wallet.WalletOuterClass.LoadWalletResponse.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the loaded wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the loaded wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.LoadWalletResponse)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.LoadWalletResponse other = (pactus.wallet.WalletOuterClass.LoadWalletResponse) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.LoadWalletResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.LoadWalletResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the name of the loaded wallet.
+     * 
+ * + * Protobuf type {@code pactus.LoadWalletResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.LoadWalletResponse) + pactus.wallet.WalletOuterClass.LoadWalletResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.LoadWalletResponse.class, pactus.wallet.WalletOuterClass.LoadWalletResponse.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.LoadWalletResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_LoadWalletResponse_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.LoadWalletResponse getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.LoadWalletResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.LoadWalletResponse build() { + pactus.wallet.WalletOuterClass.LoadWalletResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.LoadWalletResponse buildPartial() { + pactus.wallet.WalletOuterClass.LoadWalletResponse result = new pactus.wallet.WalletOuterClass.LoadWalletResponse(this); + result.walletName_ = walletName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.LoadWalletResponse) { + return mergeFrom((pactus.wallet.WalletOuterClass.LoadWalletResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.LoadWalletResponse other) { + if (other == pactus.wallet.WalletOuterClass.LoadWalletResponse.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the loaded wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the loaded wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the loaded wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the loaded wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the loaded wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.LoadWalletResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.LoadWalletResponse) + private static final pactus.wallet.WalletOuterClass.LoadWalletResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.LoadWalletResponse(); + } + + public static pactus.wallet.WalletOuterClass.LoadWalletResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LoadWalletResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.LoadWalletResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UnloadWalletRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.UnloadWalletRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the wallet to unload.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the wallet to unload.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + } + /** + *
+   * Request message for unloading a currently loaded wallet.
+   * 
+ * + * Protobuf type {@code pactus.UnloadWalletRequest} + */ + public static final class UnloadWalletRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.UnloadWalletRequest) + UnloadWalletRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UnloadWalletRequest.newBuilder() to construct. + private UnloadWalletRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UnloadWalletRequest() { + walletName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UnloadWalletRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.UnloadWalletRequest.class, pactus.wallet.WalletOuterClass.UnloadWalletRequest.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the wallet to unload.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the wallet to unload.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.UnloadWalletRequest)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.UnloadWalletRequest other = (pactus.wallet.WalletOuterClass.UnloadWalletRequest) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.UnloadWalletRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for unloading a currently loaded wallet.
+     * 
+ * + * Protobuf type {@code pactus.UnloadWalletRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.UnloadWalletRequest) + pactus.wallet.WalletOuterClass.UnloadWalletRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.UnloadWalletRequest.class, pactus.wallet.WalletOuterClass.UnloadWalletRequest.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.UnloadWalletRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletRequest_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.UnloadWalletRequest getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.UnloadWalletRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.UnloadWalletRequest build() { + pactus.wallet.WalletOuterClass.UnloadWalletRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.UnloadWalletRequest buildPartial() { + pactus.wallet.WalletOuterClass.UnloadWalletRequest result = new pactus.wallet.WalletOuterClass.UnloadWalletRequest(this); + result.walletName_ = walletName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.UnloadWalletRequest) { + return mergeFrom((pactus.wallet.WalletOuterClass.UnloadWalletRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.UnloadWalletRequest other) { + if (other == pactus.wallet.WalletOuterClass.UnloadWalletRequest.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the wallet to unload.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the wallet to unload.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the wallet to unload.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the wallet to unload.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the wallet to unload.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.UnloadWalletRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.UnloadWalletRequest) + private static final pactus.wallet.WalletOuterClass.UnloadWalletRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.UnloadWalletRequest(); + } + + public static pactus.wallet.WalletOuterClass.UnloadWalletRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UnloadWalletRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.UnloadWalletRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UnloadWalletResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.UnloadWalletResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the unloaded wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the unloaded wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + } + /** + *
+   * Response message containing the name of the unloaded wallet.
+   * 
+ * + * Protobuf type {@code pactus.UnloadWalletResponse} + */ + public static final class UnloadWalletResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.UnloadWalletResponse) + UnloadWalletResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UnloadWalletResponse.newBuilder() to construct. + private UnloadWalletResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UnloadWalletResponse() { + walletName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UnloadWalletResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.UnloadWalletResponse.class, pactus.wallet.WalletOuterClass.UnloadWalletResponse.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the unloaded wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the unloaded wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.UnloadWalletResponse)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.UnloadWalletResponse other = (pactus.wallet.WalletOuterClass.UnloadWalletResponse) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.UnloadWalletResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the name of the unloaded wallet.
+     * 
+ * + * Protobuf type {@code pactus.UnloadWalletResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.UnloadWalletResponse) + pactus.wallet.WalletOuterClass.UnloadWalletResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.UnloadWalletResponse.class, pactus.wallet.WalletOuterClass.UnloadWalletResponse.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.UnloadWalletResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_UnloadWalletResponse_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.UnloadWalletResponse getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.UnloadWalletResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.UnloadWalletResponse build() { + pactus.wallet.WalletOuterClass.UnloadWalletResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.UnloadWalletResponse buildPartial() { + pactus.wallet.WalletOuterClass.UnloadWalletResponse result = new pactus.wallet.WalletOuterClass.UnloadWalletResponse(this); + result.walletName_ = walletName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.UnloadWalletResponse) { + return mergeFrom((pactus.wallet.WalletOuterClass.UnloadWalletResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.UnloadWalletResponse other) { + if (other == pactus.wallet.WalletOuterClass.UnloadWalletResponse.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the unloaded wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the unloaded wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the unloaded wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the unloaded wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the unloaded wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.UnloadWalletResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.UnloadWalletResponse) + private static final pactus.wallet.WalletOuterClass.UnloadWalletResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.UnloadWalletResponse(); + } + + public static pactus.wallet.WalletOuterClass.UnloadWalletResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UnloadWalletResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.UnloadWalletResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetValidatorAddressRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The public key for which the validator address is requested.
+     * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + *
+     * The public key for which the validator address is requested.
+     * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString + getPublicKeyBytes(); + } + /** + *
+   * Request message for obtaining the validator address associated with a public
+   * key.
+   * 
+ * + * Protobuf type {@code pactus.GetValidatorAddressRequest} + */ + public static final class GetValidatorAddressRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressRequest) + GetValidatorAddressRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetValidatorAddressRequest.newBuilder() to construct. + private GetValidatorAddressRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetValidatorAddressRequest() { + publicKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetValidatorAddressRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.class, pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.Builder.class); + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object publicKey_; + /** + *
+     * The public key for which the validator address is requested.
+     * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + *
+     * The public key for which the validator address is requested.
+     * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.GetValidatorAddressRequest)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.GetValidatorAddressRequest other = (pactus.wallet.WalletOuterClass.GetValidatorAddressRequest) obj; + + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetValidatorAddressRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for obtaining the validator address associated with a public
+     * key.
+     * 
+ * + * Protobuf type {@code pactus.GetValidatorAddressRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressRequest) + pactus.wallet.WalletOuterClass.GetValidatorAddressRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.class, pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + publicKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressRequest_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetValidatorAddressRequest getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetValidatorAddressRequest build() { + pactus.wallet.WalletOuterClass.GetValidatorAddressRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetValidatorAddressRequest buildPartial() { + pactus.wallet.WalletOuterClass.GetValidatorAddressRequest result = new pactus.wallet.WalletOuterClass.GetValidatorAddressRequest(this); + result.publicKey_ = publicKey_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.GetValidatorAddressRequest) { + return mergeFrom((pactus.wallet.WalletOuterClass.GetValidatorAddressRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetValidatorAddressRequest other) { + if (other == pactus.wallet.WalletOuterClass.GetValidatorAddressRequest.getDefaultInstance()) return this; + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + publicKey_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object publicKey_ = ""; + /** + *
+       * The public key for which the validator address is requested.
+       * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The public key for which the validator address is requested.
+       * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The public key for which the validator address is requested.
+       * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + *
+       * The public key for which the validator address is requested.
+       * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + /** + *
+       * The public key for which the validator address is requested.
+       * 
+ * + * string public_key = 1 [json_name = "publicKey"]; + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKey_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressRequest) + private static final pactus.wallet.WalletOuterClass.GetValidatorAddressRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetValidatorAddressRequest(); + } + + public static pactus.wallet.WalletOuterClass.GetValidatorAddressRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetValidatorAddressRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetValidatorAddressRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetValidatorAddressResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetValidatorAddressResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The validator address associated with the public key.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The validator address associated with the public key.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + } + /** + *
+   * Response message containing the validator address corresponding to a public
+   * key.
+   * 
+ * + * Protobuf type {@code pactus.GetValidatorAddressResponse} + */ + public static final class GetValidatorAddressResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetValidatorAddressResponse) + GetValidatorAddressResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetValidatorAddressResponse.newBuilder() to construct. + private GetValidatorAddressResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetValidatorAddressResponse() { + address_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetValidatorAddressResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.class, pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object address_; + /** + *
+     * The validator address associated with the public key.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The validator address associated with the public key.
+     * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.GetValidatorAddressResponse)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.GetValidatorAddressResponse other = (pactus.wallet.WalletOuterClass.GetValidatorAddressResponse) obj; + + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetValidatorAddressResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the validator address corresponding to a public
+     * key.
+     * 
+ * + * Protobuf type {@code pactus.GetValidatorAddressResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetValidatorAddressResponse) + pactus.wallet.WalletOuterClass.GetValidatorAddressResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.class, pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + address_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetValidatorAddressResponse_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetValidatorAddressResponse getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetValidatorAddressResponse build() { + pactus.wallet.WalletOuterClass.GetValidatorAddressResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetValidatorAddressResponse buildPartial() { + pactus.wallet.WalletOuterClass.GetValidatorAddressResponse result = new pactus.wallet.WalletOuterClass.GetValidatorAddressResponse(this); + result.address_ = address_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.GetValidatorAddressResponse) { + return mergeFrom((pactus.wallet.WalletOuterClass.GetValidatorAddressResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetValidatorAddressResponse other) { + if (other == pactus.wallet.WalletOuterClass.GetValidatorAddressResponse.getDefaultInstance()) return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * The validator address associated with the public key.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The validator address associated with the public key.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The validator address associated with the public key.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The validator address associated with the public key.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The validator address associated with the public key.
+       * 
+ * + * string address = 1 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetValidatorAddressResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetValidatorAddressResponse) + private static final pactus.wallet.WalletOuterClass.GetValidatorAddressResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetValidatorAddressResponse(); + } + + public static pactus.wallet.WalletOuterClass.GetValidatorAddressResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetValidatorAddressResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetValidatorAddressResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SignRawTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.SignRawTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the wallet used for signing.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the wallet used for signing.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + + /** + *
+     * The raw transaction data to be signed.
+     * 
+ * + * string raw_transaction = 2 [json_name = "rawTransaction"]; + * @return The rawTransaction. + */ + java.lang.String getRawTransaction(); + /** + *
+     * The raw transaction data to be signed.
+     * 
+ * + * string raw_transaction = 2 [json_name = "rawTransaction"]; + * @return The bytes for rawTransaction. + */ + com.google.protobuf.ByteString + getRawTransactionBytes(); + + /** + *
+     * The password for unlocking the wallet for signing.
+     * 
+ * + * string password = 3 [json_name = "password"]; + * @return The password. + */ + java.lang.String getPassword(); + /** + *
+     * The password for unlocking the wallet for signing.
+     * 
+ * + * string password = 3 [json_name = "password"]; + * @return The bytes for password. + */ + com.google.protobuf.ByteString + getPasswordBytes(); + } + /** + *
+   * Request message for signing a raw transaction.
+   * 
+ * + * Protobuf type {@code pactus.SignRawTransactionRequest} + */ + public static final class SignRawTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.SignRawTransactionRequest) + SignRawTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SignRawTransactionRequest.newBuilder() to construct. + private SignRawTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SignRawTransactionRequest() { + walletName_ = ""; + rawTransaction_ = ""; + password_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SignRawTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.SignRawTransactionRequest.class, pactus.wallet.WalletOuterClass.SignRawTransactionRequest.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the wallet used for signing.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the wallet used for signing.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RAW_TRANSACTION_FIELD_NUMBER = 2; + private volatile java.lang.Object rawTransaction_; + /** + *
+     * The raw transaction data to be signed.
+     * 
+ * + * string raw_transaction = 2 [json_name = "rawTransaction"]; + * @return The rawTransaction. + */ + @java.lang.Override + public java.lang.String getRawTransaction() { + java.lang.Object ref = rawTransaction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rawTransaction_ = s; + return s; + } + } + /** + *
+     * The raw transaction data to be signed.
+     * 
+ * + * string raw_transaction = 2 [json_name = "rawTransaction"]; + * @return The bytes for rawTransaction. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRawTransactionBytes() { + java.lang.Object ref = rawTransaction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rawTransaction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_FIELD_NUMBER = 3; + private volatile java.lang.Object password_; + /** + *
+     * The password for unlocking the wallet for signing.
+     * 
+ * + * string password = 3 [json_name = "password"]; + * @return The password. + */ + @java.lang.Override + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } + } + /** + *
+     * The password for unlocking the wallet for signing.
+     * 
+ * + * string password = 3 [json_name = "password"]; + * @return The bytes for password. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rawTransaction_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, password_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rawTransaction_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, password_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.SignRawTransactionRequest)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.SignRawTransactionRequest other = (pactus.wallet.WalletOuterClass.SignRawTransactionRequest) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getRawTransaction() + .equals(other.getRawTransaction())) return false; + if (!getPassword() + .equals(other.getPassword())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (37 * hash) + RAW_TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getRawTransaction().hashCode(); + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.SignRawTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for signing a raw transaction.
+     * 
+ * + * Protobuf type {@code pactus.SignRawTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.SignRawTransactionRequest) + pactus.wallet.WalletOuterClass.SignRawTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.SignRawTransactionRequest.class, pactus.wallet.WalletOuterClass.SignRawTransactionRequest.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.SignRawTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + rawTransaction_ = ""; + + password_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignRawTransactionRequest getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.SignRawTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignRawTransactionRequest build() { + pactus.wallet.WalletOuterClass.SignRawTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignRawTransactionRequest buildPartial() { + pactus.wallet.WalletOuterClass.SignRawTransactionRequest result = new pactus.wallet.WalletOuterClass.SignRawTransactionRequest(this); + result.walletName_ = walletName_; + result.rawTransaction_ = rawTransaction_; + result.password_ = password_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.SignRawTransactionRequest) { + return mergeFrom((pactus.wallet.WalletOuterClass.SignRawTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.SignRawTransactionRequest other) { + if (other == pactus.wallet.WalletOuterClass.SignRawTransactionRequest.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + if (!other.getRawTransaction().isEmpty()) { + rawTransaction_ = other.rawTransaction_; + onChanged(); + } + if (!other.getPassword().isEmpty()) { + password_ = other.password_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + rawTransaction_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + password_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the wallet used for signing.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the wallet used for signing.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the wallet used for signing.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the wallet used for signing.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the wallet used for signing.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + + private java.lang.Object rawTransaction_ = ""; + /** + *
+       * The raw transaction data to be signed.
+       * 
+ * + * string raw_transaction = 2 [json_name = "rawTransaction"]; + * @return The rawTransaction. + */ + public java.lang.String getRawTransaction() { + java.lang.Object ref = rawTransaction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rawTransaction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The raw transaction data to be signed.
+       * 
+ * + * string raw_transaction = 2 [json_name = "rawTransaction"]; + * @return The bytes for rawTransaction. + */ + public com.google.protobuf.ByteString + getRawTransactionBytes() { + java.lang.Object ref = rawTransaction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rawTransaction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The raw transaction data to be signed.
+       * 
+ * + * string raw_transaction = 2 [json_name = "rawTransaction"]; + * @param value The rawTransaction to set. + * @return This builder for chaining. + */ + public Builder setRawTransaction( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rawTransaction_ = value; + onChanged(); + return this; + } + /** + *
+       * The raw transaction data to be signed.
+       * 
+ * + * string raw_transaction = 2 [json_name = "rawTransaction"]; + * @return This builder for chaining. + */ + public Builder clearRawTransaction() { + + rawTransaction_ = getDefaultInstance().getRawTransaction(); + onChanged(); + return this; + } + /** + *
+       * The raw transaction data to be signed.
+       * 
+ * + * string raw_transaction = 2 [json_name = "rawTransaction"]; + * @param value The bytes for rawTransaction to set. + * @return This builder for chaining. + */ + public Builder setRawTransactionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rawTransaction_ = value; + onChanged(); + return this; + } + + private java.lang.Object password_ = ""; + /** + *
+       * The password for unlocking the wallet for signing.
+       * 
+ * + * string password = 3 [json_name = "password"]; + * @return The password. + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The password for unlocking the wallet for signing.
+       * 
+ * + * string password = 3 [json_name = "password"]; + * @return The bytes for password. + */ + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The password for unlocking the wallet for signing.
+       * 
+ * + * string password = 3 [json_name = "password"]; + * @param value The password to set. + * @return This builder for chaining. + */ + public Builder setPassword( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + password_ = value; + onChanged(); + return this; + } + /** + *
+       * The password for unlocking the wallet for signing.
+       * 
+ * + * string password = 3 [json_name = "password"]; + * @return This builder for chaining. + */ + public Builder clearPassword() { + + password_ = getDefaultInstance().getPassword(); + onChanged(); + return this; + } + /** + *
+       * The password for unlocking the wallet for signing.
+       * 
+ * + * string password = 3 [json_name = "password"]; + * @param value The bytes for password to set. + * @return This builder for chaining. + */ + public Builder setPasswordBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + password_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.SignRawTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.SignRawTransactionRequest) + private static final pactus.wallet.WalletOuterClass.SignRawTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.SignRawTransactionRequest(); + } + + public static pactus.wallet.WalletOuterClass.SignRawTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SignRawTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignRawTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SignRawTransactionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.SignRawTransactionResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The ID of the signed transaction.
+     * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The transactionId. + */ + java.lang.String getTransactionId(); + /** + *
+     * The ID of the signed transaction.
+     * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The bytes for transactionId. + */ + com.google.protobuf.ByteString + getTransactionIdBytes(); + + /** + *
+     * The signed raw transaction data.
+     * 
+ * + * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; + * @return The signedRawTransaction. + */ + java.lang.String getSignedRawTransaction(); + /** + *
+     * The signed raw transaction data.
+     * 
+ * + * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; + * @return The bytes for signedRawTransaction. + */ + com.google.protobuf.ByteString + getSignedRawTransactionBytes(); + } + /** + *
+   * Response message containing the transaction ID and signed raw transaction.
+   * 
+ * + * Protobuf type {@code pactus.SignRawTransactionResponse} + */ + public static final class SignRawTransactionResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.SignRawTransactionResponse) + SignRawTransactionResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SignRawTransactionResponse.newBuilder() to construct. + private SignRawTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SignRawTransactionResponse() { + transactionId_ = ""; + signedRawTransaction_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SignRawTransactionResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.SignRawTransactionResponse.class, pactus.wallet.WalletOuterClass.SignRawTransactionResponse.Builder.class); + } + + public static final int TRANSACTION_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object transactionId_; + /** + *
+     * The ID of the signed transaction.
+     * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The transactionId. + */ + @java.lang.Override + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } + } + /** + *
+     * The ID of the signed transaction.
+     * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The bytes for transactionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNED_RAW_TRANSACTION_FIELD_NUMBER = 2; + private volatile java.lang.Object signedRawTransaction_; + /** + *
+     * The signed raw transaction data.
+     * 
+ * + * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; + * @return The signedRawTransaction. + */ + @java.lang.Override + public java.lang.String getSignedRawTransaction() { + java.lang.Object ref = signedRawTransaction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedRawTransaction_ = s; + return s; + } + } + /** + *
+     * The signed raw transaction data.
+     * 
+ * + * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; + * @return The bytes for signedRawTransaction. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignedRawTransactionBytes() { + java.lang.Object ref = signedRawTransaction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signedRawTransaction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, transactionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRawTransaction_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, signedRawTransaction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, transactionId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signedRawTransaction_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, signedRawTransaction_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.SignRawTransactionResponse)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.SignRawTransactionResponse other = (pactus.wallet.WalletOuterClass.SignRawTransactionResponse) obj; + + if (!getTransactionId() + .equals(other.getTransactionId())) return false; + if (!getSignedRawTransaction() + .equals(other.getSignedRawTransaction())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getTransactionId().hashCode(); + hash = (37 * hash) + SIGNED_RAW_TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getSignedRawTransaction().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.SignRawTransactionResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the transaction ID and signed raw transaction.
+     * 
+ * + * Protobuf type {@code pactus.SignRawTransactionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.SignRawTransactionResponse) + pactus.wallet.WalletOuterClass.SignRawTransactionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.SignRawTransactionResponse.class, pactus.wallet.WalletOuterClass.SignRawTransactionResponse.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.SignRawTransactionResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + transactionId_ = ""; + + signedRawTransaction_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignRawTransactionResponse_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignRawTransactionResponse getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.SignRawTransactionResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignRawTransactionResponse build() { + pactus.wallet.WalletOuterClass.SignRawTransactionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignRawTransactionResponse buildPartial() { + pactus.wallet.WalletOuterClass.SignRawTransactionResponse result = new pactus.wallet.WalletOuterClass.SignRawTransactionResponse(this); + result.transactionId_ = transactionId_; + result.signedRawTransaction_ = signedRawTransaction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.SignRawTransactionResponse) { + return mergeFrom((pactus.wallet.WalletOuterClass.SignRawTransactionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.SignRawTransactionResponse other) { + if (other == pactus.wallet.WalletOuterClass.SignRawTransactionResponse.getDefaultInstance()) return this; + if (!other.getTransactionId().isEmpty()) { + transactionId_ = other.transactionId_; + onChanged(); + } + if (!other.getSignedRawTransaction().isEmpty()) { + signedRawTransaction_ = other.signedRawTransaction_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + transactionId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + signedRawTransaction_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object transactionId_ = ""; + /** + *
+       * The ID of the signed transaction.
+       * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The transactionId. + */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The ID of the signed transaction.
+       * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return The bytes for transactionId. + */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The ID of the signed transaction.
+       * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @param value The transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + transactionId_ = value; + onChanged(); + return this; + } + /** + *
+       * The ID of the signed transaction.
+       * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @return This builder for chaining. + */ + public Builder clearTransactionId() { + + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + /** + *
+       * The ID of the signed transaction.
+       * 
+ * + * string transaction_id = 1 [json_name = "transactionId"]; + * @param value The bytes for transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + transactionId_ = value; + onChanged(); + return this; + } + + private java.lang.Object signedRawTransaction_ = ""; + /** + *
+       * The signed raw transaction data.
+       * 
+ * + * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; + * @return The signedRawTransaction. + */ + public java.lang.String getSignedRawTransaction() { + java.lang.Object ref = signedRawTransaction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signedRawTransaction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The signed raw transaction data.
+       * 
+ * + * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; + * @return The bytes for signedRawTransaction. + */ + public com.google.protobuf.ByteString + getSignedRawTransactionBytes() { + java.lang.Object ref = signedRawTransaction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signedRawTransaction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The signed raw transaction data.
+       * 
+ * + * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; + * @param value The signedRawTransaction to set. + * @return This builder for chaining. + */ + public Builder setSignedRawTransaction( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + signedRawTransaction_ = value; + onChanged(); + return this; + } + /** + *
+       * The signed raw transaction data.
+       * 
+ * + * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; + * @return This builder for chaining. + */ + public Builder clearSignedRawTransaction() { + + signedRawTransaction_ = getDefaultInstance().getSignedRawTransaction(); + onChanged(); + return this; + } + /** + *
+       * The signed raw transaction data.
+       * 
+ * + * string signed_raw_transaction = 2 [json_name = "signedRawTransaction"]; + * @param value The bytes for signedRawTransaction to set. + * @return This builder for chaining. + */ + public Builder setSignedRawTransactionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + signedRawTransaction_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.SignRawTransactionResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.SignRawTransactionResponse) + private static final pactus.wallet.WalletOuterClass.SignRawTransactionResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.SignRawTransactionResponse(); + } + + public static pactus.wallet.WalletOuterClass.SignRawTransactionResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SignRawTransactionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignRawTransactionResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetTotalBalanceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetTotalBalanceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the wallet to get the total balance.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the wallet to get the total balance.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + } + /** + *
+   * Request message for obtaining the available balance of a wallet.
+   * 
+ * + * Protobuf type {@code pactus.GetTotalBalanceRequest} + */ + public static final class GetTotalBalanceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetTotalBalanceRequest) + GetTotalBalanceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTotalBalanceRequest.newBuilder() to construct. + private GetTotalBalanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetTotalBalanceRequest() { + walletName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetTotalBalanceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.class, pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the wallet to get the total balance.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the wallet to get the total balance.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.GetTotalBalanceRequest)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.GetTotalBalanceRequest other = (pactus.wallet.WalletOuterClass.GetTotalBalanceRequest) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetTotalBalanceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message for obtaining the available balance of a wallet.
+     * 
+ * + * Protobuf type {@code pactus.GetTotalBalanceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetTotalBalanceRequest) + pactus.wallet.WalletOuterClass.GetTotalBalanceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.class, pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceRequest_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetTotalBalanceRequest getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetTotalBalanceRequest build() { + pactus.wallet.WalletOuterClass.GetTotalBalanceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetTotalBalanceRequest buildPartial() { + pactus.wallet.WalletOuterClass.GetTotalBalanceRequest result = new pactus.wallet.WalletOuterClass.GetTotalBalanceRequest(this); + result.walletName_ = walletName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.GetTotalBalanceRequest) { + return mergeFrom((pactus.wallet.WalletOuterClass.GetTotalBalanceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetTotalBalanceRequest other) { + if (other == pactus.wallet.WalletOuterClass.GetTotalBalanceRequest.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the wallet to get the total balance.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the wallet to get the total balance.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the wallet to get the total balance.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the wallet to get the total balance.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the wallet to get the total balance.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetTotalBalanceRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetTotalBalanceRequest) + private static final pactus.wallet.WalletOuterClass.GetTotalBalanceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetTotalBalanceRequest(); + } + + public static pactus.wallet.WalletOuterClass.GetTotalBalanceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTotalBalanceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetTotalBalanceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetTotalBalanceResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetTotalBalanceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + + /** + *
+     * The total balance of the wallet in NanoPAC.
+     * 
+ * + * int64 total_balance = 2 [json_name = "totalBalance"]; + * @return The totalBalance. + */ + long getTotalBalance(); + } + /** + *
+   * Response message containing the available balance of the wallet.
+   * 
+ * + * Protobuf type {@code pactus.GetTotalBalanceResponse} + */ + public static final class GetTotalBalanceResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetTotalBalanceResponse) + GetTotalBalanceResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTotalBalanceResponse.newBuilder() to construct. + private GetTotalBalanceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetTotalBalanceResponse() { + walletName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetTotalBalanceResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.class, pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_BALANCE_FIELD_NUMBER = 2; + private long totalBalance_; + /** + *
+     * The total balance of the wallet in NanoPAC.
+     * 
+ * + * int64 total_balance = 2 [json_name = "totalBalance"]; + * @return The totalBalance. + */ + @java.lang.Override + public long getTotalBalance() { + return totalBalance_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + if (totalBalance_ != 0L) { + output.writeInt64(2, totalBalance_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + if (totalBalance_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, totalBalance_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.GetTotalBalanceResponse)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.GetTotalBalanceResponse other = (pactus.wallet.WalletOuterClass.GetTotalBalanceResponse) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (getTotalBalance() + != other.getTotalBalance()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (37 * hash) + TOTAL_BALANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalBalance()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.GetTotalBalanceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the available balance of the wallet.
+     * 
+ * + * Protobuf type {@code pactus.GetTotalBalanceResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetTotalBalanceResponse) + pactus.wallet.WalletOuterClass.GetTotalBalanceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.class, pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + totalBalance_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_GetTotalBalanceResponse_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetTotalBalanceResponse getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetTotalBalanceResponse build() { + pactus.wallet.WalletOuterClass.GetTotalBalanceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetTotalBalanceResponse buildPartial() { + pactus.wallet.WalletOuterClass.GetTotalBalanceResponse result = new pactus.wallet.WalletOuterClass.GetTotalBalanceResponse(this); + result.walletName_ = walletName_; + result.totalBalance_ = totalBalance_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.GetTotalBalanceResponse) { + return mergeFrom((pactus.wallet.WalletOuterClass.GetTotalBalanceResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.GetTotalBalanceResponse other) { + if (other == pactus.wallet.WalletOuterClass.GetTotalBalanceResponse.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + if (other.getTotalBalance() != 0L) { + setTotalBalance(other.getTotalBalance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + totalBalance_ = input.readInt64(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + + private long totalBalance_ ; + /** + *
+       * The total balance of the wallet in NanoPAC.
+       * 
+ * + * int64 total_balance = 2 [json_name = "totalBalance"]; + * @return The totalBalance. + */ + @java.lang.Override + public long getTotalBalance() { + return totalBalance_; + } + /** + *
+       * The total balance of the wallet in NanoPAC.
+       * 
+ * + * int64 total_balance = 2 [json_name = "totalBalance"]; + * @param value The totalBalance to set. + * @return This builder for chaining. + */ + public Builder setTotalBalance(long value) { + + totalBalance_ = value; + onChanged(); + return this; + } + /** + *
+       * The total balance of the wallet in NanoPAC.
+       * 
+ * + * int64 total_balance = 2 [json_name = "totalBalance"]; + * @return This builder for chaining. + */ + public Builder clearTotalBalance() { + + totalBalance_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetTotalBalanceResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.GetTotalBalanceResponse) + private static final pactus.wallet.WalletOuterClass.GetTotalBalanceResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.GetTotalBalanceResponse(); + } + + public static pactus.wallet.WalletOuterClass.GetTotalBalanceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTotalBalanceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.GetTotalBalanceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SignMessageRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.SignMessageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + java.lang.String getWalletName(); + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + com.google.protobuf.ByteString + getWalletNameBytes(); + + /** + *
+     * The password for unlocking the wallet for signing.
+     * 
+ * + * string password = 2 [json_name = "password"]; + * @return The password. + */ + java.lang.String getPassword(); + /** + *
+     * The password for unlocking the wallet for signing.
+     * 
+ * + * string password = 2 [json_name = "password"]; + * @return The bytes for password. + */ + com.google.protobuf.ByteString + getPasswordBytes(); + + /** + *
+     * The account address associated with the private key.
+     * 
+ * + * string address = 3 [json_name = "address"]; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * The account address associated with the private key.
+     * 
+ * + * string address = 3 [json_name = "address"]; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + + /** + *
+     * The arbitrary message to be signed.
+     * 
+ * + * string message = 4 [json_name = "message"]; + * @return The message. + */ + java.lang.String getMessage(); + /** + *
+     * The arbitrary message to be signed.
+     * 
+ * + * string message = 4 [json_name = "message"]; + * @return The bytes for message. + */ + com.google.protobuf.ByteString + getMessageBytes(); + } + /** + *
+   * Request message to sign an arbitrary message.
+   * 
+ * + * Protobuf type {@code pactus.SignMessageRequest} + */ + public static final class SignMessageRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.SignMessageRequest) + SignMessageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SignMessageRequest.newBuilder() to construct. + private SignMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SignMessageRequest() { + walletName_ = ""; + password_ = ""; + address_ = ""; + message_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SignMessageRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.SignMessageRequest.class, pactus.wallet.WalletOuterClass.SignMessageRequest.Builder.class); + } + + public static final int WALLET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object walletName_; + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + @java.lang.Override + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } + } + /** + *
+     * The name of the wallet.
+     * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PASSWORD_FIELD_NUMBER = 2; + private volatile java.lang.Object password_; + /** + *
+     * The password for unlocking the wallet for signing.
+     * 
+ * + * string password = 2 [json_name = "password"]; + * @return The password. + */ + @java.lang.Override + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } + } + /** + *
+     * The password for unlocking the wallet for signing.
+     * 
+ * + * string password = 2 [json_name = "password"]; + * @return The bytes for password. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADDRESS_FIELD_NUMBER = 3; + private volatile java.lang.Object address_; + /** + *
+     * The account address associated with the private key.
+     * 
+ * + * string address = 3 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } + } + /** + *
+     * The account address associated with the private key.
+     * 
+ * + * string address = 3 [json_name = "address"]; + * @return The bytes for address. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MESSAGE_FIELD_NUMBER = 4; + private volatile java.lang.Object message_; + /** + *
+     * The arbitrary message to be signed.
+     * 
+ * + * string message = 4 [json_name = "message"]; + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + *
+     * The arbitrary message to be signed.
+     * 
+ * + * string message = 4 [json_name = "message"]; + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, walletName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, password_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, message_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(walletName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, walletName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, password_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, address_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, message_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.SignMessageRequest)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.SignMessageRequest other = (pactus.wallet.WalletOuterClass.SignMessageRequest) obj; + + if (!getWalletName() + .equals(other.getWalletName())) return false; + if (!getPassword() + .equals(other.getPassword())) return false; + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getMessage() + .equals(other.getMessage())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + WALLET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getWalletName().hashCode(); + hash = (37 * hash) + PASSWORD_FIELD_NUMBER; + hash = (53 * hash) + getPassword().hashCode(); + hash = (37 * hash) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignMessageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.SignMessageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Request message to sign an arbitrary message.
+     * 
+ * + * Protobuf type {@code pactus.SignMessageRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.SignMessageRequest) + pactus.wallet.WalletOuterClass.SignMessageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.SignMessageRequest.class, pactus.wallet.WalletOuterClass.SignMessageRequest.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.SignMessageRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + walletName_ = ""; + + password_ = ""; + + address_ = ""; + + message_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageRequest_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignMessageRequest getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.SignMessageRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignMessageRequest build() { + pactus.wallet.WalletOuterClass.SignMessageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignMessageRequest buildPartial() { + pactus.wallet.WalletOuterClass.SignMessageRequest result = new pactus.wallet.WalletOuterClass.SignMessageRequest(this); + result.walletName_ = walletName_; + result.password_ = password_; + result.address_ = address_; + result.message_ = message_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.SignMessageRequest) { + return mergeFrom((pactus.wallet.WalletOuterClass.SignMessageRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.SignMessageRequest other) { + if (other == pactus.wallet.WalletOuterClass.SignMessageRequest.getDefaultInstance()) return this; + if (!other.getWalletName().isEmpty()) { + walletName_ = other.walletName_; + onChanged(); + } + if (!other.getPassword().isEmpty()) { + password_ = other.password_; + onChanged(); + } + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + walletName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + password_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + address_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + message_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object walletName_ = ""; + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The walletName. + */ + public java.lang.String getWalletName() { + java.lang.Object ref = walletName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + walletName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return The bytes for walletName. + */ + public com.google.protobuf.ByteString + getWalletNameBytes() { + java.lang.Object ref = walletName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + walletName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + walletName_ = value; + onChanged(); + return this; + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @return This builder for chaining. + */ + public Builder clearWalletName() { + + walletName_ = getDefaultInstance().getWalletName(); + onChanged(); + return this; + } + /** + *
+       * The name of the wallet.
+       * 
+ * + * string wallet_name = 1 [json_name = "walletName"]; + * @param value The bytes for walletName to set. + * @return This builder for chaining. + */ + public Builder setWalletNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + walletName_ = value; + onChanged(); + return this; + } + + private java.lang.Object password_ = ""; + /** + *
+       * The password for unlocking the wallet for signing.
+       * 
+ * + * string password = 2 [json_name = "password"]; + * @return The password. + */ + public java.lang.String getPassword() { + java.lang.Object ref = password_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + password_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The password for unlocking the wallet for signing.
+       * 
+ * + * string password = 2 [json_name = "password"]; + * @return The bytes for password. + */ + public com.google.protobuf.ByteString + getPasswordBytes() { + java.lang.Object ref = password_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + password_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The password for unlocking the wallet for signing.
+       * 
+ * + * string password = 2 [json_name = "password"]; + * @param value The password to set. + * @return This builder for chaining. + */ + public Builder setPassword( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + password_ = value; + onChanged(); + return this; + } + /** + *
+       * The password for unlocking the wallet for signing.
+       * 
+ * + * string password = 2 [json_name = "password"]; + * @return This builder for chaining. + */ + public Builder clearPassword() { + + password_ = getDefaultInstance().getPassword(); + onChanged(); + return this; + } + /** + *
+       * The password for unlocking the wallet for signing.
+       * 
+ * + * string password = 2 [json_name = "password"]; + * @param value The bytes for password to set. + * @return This builder for chaining. + */ + public Builder setPasswordBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + password_ = value; + onChanged(); + return this; + } + + private java.lang.Object address_ = ""; + /** + *
+       * The account address associated with the private key.
+       * 
+ * + * string address = 3 [json_name = "address"]; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The account address associated with the private key.
+       * 
+ * + * string address = 3 [json_name = "address"]; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The account address associated with the private key.
+       * 
+ * + * string address = 3 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * The account address associated with the private key.
+       * 
+ * + * string address = 3 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * The account address associated with the private key.
+       * 
+ * + * string address = 3 [json_name = "address"]; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + *
+       * The arbitrary message to be signed.
+       * 
+ * + * string message = 4 [json_name = "message"]; + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The arbitrary message to be signed.
+       * 
+ * + * string message = 4 [json_name = "message"]; + * @return The bytes for message. + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The arbitrary message to be signed.
+       * 
+ * + * string message = 4 [json_name = "message"]; + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + *
+       * The arbitrary message to be signed.
+       * 
+ * + * string message = 4 [json_name = "message"]; + * @return This builder for chaining. + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + *
+       * The arbitrary message to be signed.
+       * 
+ * + * string message = 4 [json_name = "message"]; + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.SignMessageRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.SignMessageRequest) + private static final pactus.wallet.WalletOuterClass.SignMessageRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.SignMessageRequest(); + } + + public static pactus.wallet.WalletOuterClass.SignMessageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SignMessageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignMessageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SignMessageResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.SignMessageResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Signature of the message.
+     * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The signature. + */ + java.lang.String getSignature(); + /** + *
+     * Signature of the message.
+     * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The bytes for signature. + */ + com.google.protobuf.ByteString + getSignatureBytes(); + } + /** + *
+   * Response message containing the available balance of the wallet.
+   * 
+ * + * Protobuf type {@code pactus.SignMessageResponse} + */ + public static final class SignMessageResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.SignMessageResponse) + SignMessageResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SignMessageResponse.newBuilder() to construct. + private SignMessageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SignMessageResponse() { + signature_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SignMessageResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.SignMessageResponse.class, pactus.wallet.WalletOuterClass.SignMessageResponse.Builder.class); + } + + public static final int SIGNATURE_FIELD_NUMBER = 1; + private volatile java.lang.Object signature_; + /** + *
+     * Signature of the message.
+     * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } + } + /** + *
+     * Signature of the message.
+     * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The bytes for signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signature_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signature_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.wallet.WalletOuterClass.SignMessageResponse)) { + return super.equals(obj); + } + pactus.wallet.WalletOuterClass.SignMessageResponse other = (pactus.wallet.WalletOuterClass.SignMessageResponse) obj; + + if (!getSignature() + .equals(other.getSignature())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.wallet.WalletOuterClass.SignMessageResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.wallet.WalletOuterClass.SignMessageResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Response message containing the available balance of the wallet.
+     * 
+ * + * Protobuf type {@code pactus.SignMessageResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.SignMessageResponse) + pactus.wallet.WalletOuterClass.SignMessageResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.wallet.WalletOuterClass.SignMessageResponse.class, pactus.wallet.WalletOuterClass.SignMessageResponse.Builder.class); + } + + // Construct using pactus.wallet.WalletOuterClass.SignMessageResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + signature_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.wallet.WalletOuterClass.internal_static_pactus_SignMessageResponse_descriptor; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignMessageResponse getDefaultInstanceForType() { + return pactus.wallet.WalletOuterClass.SignMessageResponse.getDefaultInstance(); + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignMessageResponse build() { + pactus.wallet.WalletOuterClass.SignMessageResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignMessageResponse buildPartial() { + pactus.wallet.WalletOuterClass.SignMessageResponse result = new pactus.wallet.WalletOuterClass.SignMessageResponse(this); + result.signature_ = signature_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.wallet.WalletOuterClass.SignMessageResponse) { + return mergeFrom((pactus.wallet.WalletOuterClass.SignMessageResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.wallet.WalletOuterClass.SignMessageResponse other) { + if (other == pactus.wallet.WalletOuterClass.SignMessageResponse.getDefaultInstance()) return this; + if (!other.getSignature().isEmpty()) { + signature_ = other.signature_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + signature_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private java.lang.Object signature_ = ""; + /** + *
+       * Signature of the message.
+       * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The signature. + */ + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Signature of the message.
+       * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return The bytes for signature. + */ + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Signature of the message.
+       * 
+ * + * string signature = 1 [json_name = "signature"]; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + signature_ = value; + onChanged(); + return this; + } + /** + *
+       * Signature of the message.
+       * 
+ * + * string signature = 1 [json_name = "signature"]; + * @return This builder for chaining. + */ + public Builder clearSignature() { + + signature_ = getDefaultInstance().getSignature(); + onChanged(); + return this; + } + /** + *
+       * Signature of the message.
+       * 
+ * + * string signature = 1 [json_name = "signature"]; + * @param value The bytes for signature to set. + * @return This builder for chaining. + */ + public Builder setSignatureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + signature_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.SignMessageResponse) + } + + // @@protoc_insertion_point(class_scope:pactus.SignMessageResponse) + private static final pactus.wallet.WalletOuterClass.SignMessageResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.wallet.WalletOuterClass.SignMessageResponse(); + } + + public static pactus.wallet.WalletOuterClass.SignMessageResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SignMessageResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.wallet.WalletOuterClass.SignMessageResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_AddressInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_AddressInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_HistoryInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_HistoryInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetAddressHistoryRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetAddressHistoryRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetAddressHistoryResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetAddressHistoryResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetNewAddressRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetNewAddressRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetNewAddressResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetNewAddressResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_RestoreWalletRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_RestoreWalletRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_RestoreWalletResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_RestoreWalletResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_CreateWalletRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_CreateWalletRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_CreateWalletResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_CreateWalletResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_LoadWalletRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_LoadWalletRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_LoadWalletResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_LoadWalletResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_UnloadWalletRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_UnloadWalletRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_UnloadWalletResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_UnloadWalletResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorAddressRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetValidatorAddressResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_SignRawTransactionRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_SignRawTransactionResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetTotalBalanceRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_GetTotalBalanceResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_SignMessageRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_SignMessageRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_SignMessageResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_SignMessageResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\014wallet.proto\022\006pactus\032\021transaction.prot" + + "o\"p\n\013AddressInfo\022\030\n\007address\030\001 \001(\tR\007addre" + + "ss\022\035\n\npublic_key\030\002 \001(\tR\tpublicKey\022\024\n\005lab" + + "el\030\003 \001(\tR\005label\022\022\n\004path\030\004 \001(\tR\004path\"\245\001\n\013" + + "HistoryInfo\022%\n\016transaction_id\030\001 \001(\tR\rtra" + + "nsactionId\022\022\n\004time\030\002 \001(\rR\004time\022!\n\014payloa" + + "d_type\030\003 \001(\tR\013payloadType\022 \n\013description" + + "\030\004 \001(\tR\013description\022\026\n\006amount\030\005 \001(\003R\006amo" + + "unt\"U\n\030GetAddressHistoryRequest\022\037\n\013walle" + + "t_name\030\001 \001(\tR\nwalletName\022\030\n\007address\030\002 \001(" + + "\tR\007address\"S\n\031GetAddressHistoryResponse\022" + + "6\n\014history_info\030\001 \003(\0132\023.pactus.HistoryIn" + + "foR\013historyInfo\"\241\001\n\024GetNewAddressRequest" + + "\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\0226\n\014add" + + "ress_type\030\002 \001(\0162\023.pactus.AddressTypeR\013ad" + + "dressType\022\024\n\005label\030\003 \001(\tR\005label\022\032\n\010passw" + + "ord\030\004 \001(\tR\010password\"p\n\025GetNewAddressResp" + + "onse\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\0226\n" + + "\014address_info\030\002 \001(\0132\023.pactus.AddressInfo" + + "R\013addressInfo\"o\n\024RestoreWalletRequest\022\037\n" + + "\013wallet_name\030\001 \001(\tR\nwalletName\022\032\n\010mnemon" + + "ic\030\002 \001(\tR\010mnemonic\022\032\n\010password\030\003 \001(\tR\010pa" + + "ssword\"8\n\025RestoreWalletResponse\022\037\n\013walle" + + "t_name\030\001 \001(\tR\nwalletName\"R\n\023CreateWallet" + + "Request\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName" + + "\022\032\n\010password\030\004 \001(\tR\010password\"2\n\024CreateWa" + + "lletResponse\022\032\n\010mnemonic\030\002 \001(\tR\010mnemonic" + + "\"4\n\021LoadWalletRequest\022\037\n\013wallet_name\030\001 \001" + + "(\tR\nwalletName\"5\n\022LoadWalletResponse\022\037\n\013" + + "wallet_name\030\001 \001(\tR\nwalletName\"6\n\023UnloadW" + + "alletRequest\022\037\n\013wallet_name\030\001 \001(\tR\nwalle" + + "tName\"7\n\024UnloadWalletResponse\022\037\n\013wallet_" + + "name\030\001 \001(\tR\nwalletName\";\n\032GetValidatorAd" + + "dressRequest\022\035\n\npublic_key\030\001 \001(\tR\tpublic" + + "Key\"7\n\033GetValidatorAddressResponse\022\030\n\007ad" + + "dress\030\001 \001(\tR\007address\"\201\001\n\031SignRawTransact" + + "ionRequest\022\037\n\013wallet_name\030\001 \001(\tR\nwalletN" + + "ame\022\'\n\017raw_transaction\030\002 \001(\tR\016rawTransac" + + "tion\022\032\n\010password\030\003 \001(\tR\010password\"y\n\032Sign" + + "RawTransactionResponse\022%\n\016transaction_id" + + "\030\001 \001(\tR\rtransactionId\0224\n\026signed_raw_tran" + + "saction\030\002 \001(\tR\024signedRawTransaction\"9\n\026G" + + "etTotalBalanceRequest\022\037\n\013wallet_name\030\001 \001" + + "(\tR\nwalletName\"_\n\027GetTotalBalanceRespons" + + "e\022\037\n\013wallet_name\030\001 \001(\tR\nwalletName\022#\n\rto" + + "tal_balance\030\002 \001(\003R\014totalBalance\"\205\001\n\022Sign" + + "MessageRequest\022\037\n\013wallet_name\030\001 \001(\tR\nwal" + + "letName\022\032\n\010password\030\002 \001(\tR\010password\022\030\n\007a" + + "ddress\030\003 \001(\tR\007address\022\030\n\007message\030\004 \001(\tR\007" + + "message\"3\n\023SignMessageResponse\022\034\n\tsignat" + + "ure\030\001 \001(\tR\tsignature*\204\001\n\013AddressType\022\031\n\025" + + "ADDRESS_TYPE_TREASURY\020\000\022\032\n\026ADDRESS_TYPE_" + + "VALIDATOR\020\001\022\034\n\030ADDRESS_TYPE_BLS_ACCOUNT\020" + + "\002\022 \n\034ADDRESS_TYPE_ED25519_ACCOUNT\020\0032\262\006\n\006" + + "Wallet\022I\n\014CreateWallet\022\033.pactus.CreateWa" + + "lletRequest\032\034.pactus.CreateWalletRespons" + + "e\022L\n\rRestoreWallet\022\034.pactus.RestoreWalle" + + "tRequest\032\035.pactus.RestoreWalletResponse\022" + + "C\n\nLoadWallet\022\031.pactus.LoadWalletRequest" + + "\032\032.pactus.LoadWalletResponse\022I\n\014UnloadWa" + + "llet\022\033.pactus.UnloadWalletRequest\032\034.pact" + + "us.UnloadWalletResponse\022R\n\017GetTotalBalan" + + "ce\022\036.pactus.GetTotalBalanceRequest\032\037.pac" + + "tus.GetTotalBalanceResponse\022[\n\022SignRawTr" + + "ansaction\022!.pactus.SignRawTransactionReq" + + "uest\032\".pactus.SignRawTransactionResponse" + + "\022^\n\023GetValidatorAddress\022\".pactus.GetVali" + + "datorAddressRequest\032#.pactus.GetValidato" + + "rAddressResponse\022L\n\rGetNewAddress\022\034.pact" + + "us.GetNewAddressRequest\032\035.pactus.GetNewA" + + "ddressResponse\022X\n\021GetAddressHistory\022 .pa" + + "ctus.GetAddressHistoryRequest\032!.pactus.G" + + "etAddressHistoryResponse\022F\n\013SignMessage\022" + + "\032.pactus.SignMessageRequest\032\033.pactus.Sig" + + "nMessageResponseBA\n\rpactus.walletZ0githu" + + "b.com/pactus-project/pactus/www/grpc/pac" + + "tusb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + pactus.transaction.TransactionOuterClass.getDescriptor(), + }); + internal_static_pactus_AddressInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pactus_AddressInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_AddressInfo_descriptor, + new java.lang.String[] { "Address", "PublicKey", "Label", "Path", }); + internal_static_pactus_HistoryInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_pactus_HistoryInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_HistoryInfo_descriptor, + new java.lang.String[] { "TransactionId", "Time", "PayloadType", "Description", "Amount", }); + internal_static_pactus_GetAddressHistoryRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_pactus_GetAddressHistoryRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetAddressHistoryRequest_descriptor, + new java.lang.String[] { "WalletName", "Address", }); + internal_static_pactus_GetAddressHistoryResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_pactus_GetAddressHistoryResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetAddressHistoryResponse_descriptor, + new java.lang.String[] { "HistoryInfo", }); + internal_static_pactus_GetNewAddressRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_pactus_GetNewAddressRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetNewAddressRequest_descriptor, + new java.lang.String[] { "WalletName", "AddressType", "Label", "Password", }); + internal_static_pactus_GetNewAddressResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_pactus_GetNewAddressResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetNewAddressResponse_descriptor, + new java.lang.String[] { "WalletName", "AddressInfo", }); + internal_static_pactus_RestoreWalletRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_pactus_RestoreWalletRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_RestoreWalletRequest_descriptor, + new java.lang.String[] { "WalletName", "Mnemonic", "Password", }); + internal_static_pactus_RestoreWalletResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_pactus_RestoreWalletResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_RestoreWalletResponse_descriptor, + new java.lang.String[] { "WalletName", }); + internal_static_pactus_CreateWalletRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_pactus_CreateWalletRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_CreateWalletRequest_descriptor, + new java.lang.String[] { "WalletName", "Password", }); + internal_static_pactus_CreateWalletResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_pactus_CreateWalletResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_CreateWalletResponse_descriptor, + new java.lang.String[] { "Mnemonic", }); + internal_static_pactus_LoadWalletRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_pactus_LoadWalletRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_LoadWalletRequest_descriptor, + new java.lang.String[] { "WalletName", }); + internal_static_pactus_LoadWalletResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_pactus_LoadWalletResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_LoadWalletResponse_descriptor, + new java.lang.String[] { "WalletName", }); + internal_static_pactus_UnloadWalletRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_pactus_UnloadWalletRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_UnloadWalletRequest_descriptor, + new java.lang.String[] { "WalletName", }); + internal_static_pactus_UnloadWalletResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_pactus_UnloadWalletResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_UnloadWalletResponse_descriptor, + new java.lang.String[] { "WalletName", }); + internal_static_pactus_GetValidatorAddressRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_pactus_GetValidatorAddressRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetValidatorAddressRequest_descriptor, + new java.lang.String[] { "PublicKey", }); + internal_static_pactus_GetValidatorAddressResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_pactus_GetValidatorAddressResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetValidatorAddressResponse_descriptor, + new java.lang.String[] { "Address", }); + internal_static_pactus_SignRawTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_pactus_SignRawTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_SignRawTransactionRequest_descriptor, + new java.lang.String[] { "WalletName", "RawTransaction", "Password", }); + internal_static_pactus_SignRawTransactionResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_pactus_SignRawTransactionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_SignRawTransactionResponse_descriptor, + new java.lang.String[] { "TransactionId", "SignedRawTransaction", }); + internal_static_pactus_GetTotalBalanceRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_pactus_GetTotalBalanceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetTotalBalanceRequest_descriptor, + new java.lang.String[] { "WalletName", }); + internal_static_pactus_GetTotalBalanceResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_pactus_GetTotalBalanceResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_GetTotalBalanceResponse_descriptor, + new java.lang.String[] { "WalletName", "TotalBalance", }); + internal_static_pactus_SignMessageRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_pactus_SignMessageRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_SignMessageRequest_descriptor, + new java.lang.String[] { "WalletName", "Password", "Address", "Message", }); + internal_static_pactus_SignMessageResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_pactus_SignMessageResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_SignMessageResponse_descriptor, + new java.lang.String[] { "Signature", }); + pactus.transaction.TransactionOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/www/grpc/gen/js/blockchain_grpc_pb.js b/www/grpc/gen/js/blockchain_grpc_pb.js new file mode 100644 index 000000000..aea040786 --- /dev/null +++ b/www/grpc/gen/js/blockchain_grpc_pb.js @@ -0,0 +1,381 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var blockchain_pb = require('./blockchain_pb.js'); +var transaction_pb = require('./transaction_pb.js'); + +function serialize_pactus_GetAccountRequest(arg) { + if (!(arg instanceof blockchain_pb.GetAccountRequest)) { + throw new Error('Expected argument of type pactus.GetAccountRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetAccountRequest(buffer_arg) { + return blockchain_pb.GetAccountRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetAccountResponse(arg) { + if (!(arg instanceof blockchain_pb.GetAccountResponse)) { + throw new Error('Expected argument of type pactus.GetAccountResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetAccountResponse(buffer_arg) { + return blockchain_pb.GetAccountResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetBlockHashRequest(arg) { + if (!(arg instanceof blockchain_pb.GetBlockHashRequest)) { + throw new Error('Expected argument of type pactus.GetBlockHashRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetBlockHashRequest(buffer_arg) { + return blockchain_pb.GetBlockHashRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetBlockHashResponse(arg) { + if (!(arg instanceof blockchain_pb.GetBlockHashResponse)) { + throw new Error('Expected argument of type pactus.GetBlockHashResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetBlockHashResponse(buffer_arg) { + return blockchain_pb.GetBlockHashResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetBlockHeightRequest(arg) { + if (!(arg instanceof blockchain_pb.GetBlockHeightRequest)) { + throw new Error('Expected argument of type pactus.GetBlockHeightRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetBlockHeightRequest(buffer_arg) { + return blockchain_pb.GetBlockHeightRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetBlockHeightResponse(arg) { + if (!(arg instanceof blockchain_pb.GetBlockHeightResponse)) { + throw new Error('Expected argument of type pactus.GetBlockHeightResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetBlockHeightResponse(buffer_arg) { + return blockchain_pb.GetBlockHeightResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetBlockRequest(arg) { + if (!(arg instanceof blockchain_pb.GetBlockRequest)) { + throw new Error('Expected argument of type pactus.GetBlockRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetBlockRequest(buffer_arg) { + return blockchain_pb.GetBlockRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetBlockResponse(arg) { + if (!(arg instanceof blockchain_pb.GetBlockResponse)) { + throw new Error('Expected argument of type pactus.GetBlockResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetBlockResponse(buffer_arg) { + return blockchain_pb.GetBlockResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetBlockchainInfoRequest(arg) { + if (!(arg instanceof blockchain_pb.GetBlockchainInfoRequest)) { + throw new Error('Expected argument of type pactus.GetBlockchainInfoRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetBlockchainInfoRequest(buffer_arg) { + return blockchain_pb.GetBlockchainInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetBlockchainInfoResponse(arg) { + if (!(arg instanceof blockchain_pb.GetBlockchainInfoResponse)) { + throw new Error('Expected argument of type pactus.GetBlockchainInfoResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetBlockchainInfoResponse(buffer_arg) { + return blockchain_pb.GetBlockchainInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetConsensusInfoRequest(arg) { + if (!(arg instanceof blockchain_pb.GetConsensusInfoRequest)) { + throw new Error('Expected argument of type pactus.GetConsensusInfoRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetConsensusInfoRequest(buffer_arg) { + return blockchain_pb.GetConsensusInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetConsensusInfoResponse(arg) { + if (!(arg instanceof blockchain_pb.GetConsensusInfoResponse)) { + throw new Error('Expected argument of type pactus.GetConsensusInfoResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetConsensusInfoResponse(buffer_arg) { + return blockchain_pb.GetConsensusInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetPublicKeyRequest(arg) { + if (!(arg instanceof blockchain_pb.GetPublicKeyRequest)) { + throw new Error('Expected argument of type pactus.GetPublicKeyRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetPublicKeyRequest(buffer_arg) { + return blockchain_pb.GetPublicKeyRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetPublicKeyResponse(arg) { + if (!(arg instanceof blockchain_pb.GetPublicKeyResponse)) { + throw new Error('Expected argument of type pactus.GetPublicKeyResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetPublicKeyResponse(buffer_arg) { + return blockchain_pb.GetPublicKeyResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetTxPoolContentRequest(arg) { + if (!(arg instanceof blockchain_pb.GetTxPoolContentRequest)) { + throw new Error('Expected argument of type pactus.GetTxPoolContentRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetTxPoolContentRequest(buffer_arg) { + return blockchain_pb.GetTxPoolContentRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetTxPoolContentResponse(arg) { + if (!(arg instanceof blockchain_pb.GetTxPoolContentResponse)) { + throw new Error('Expected argument of type pactus.GetTxPoolContentResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetTxPoolContentResponse(buffer_arg) { + return blockchain_pb.GetTxPoolContentResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetValidatorAddressesRequest(arg) { + if (!(arg instanceof blockchain_pb.GetValidatorAddressesRequest)) { + throw new Error('Expected argument of type pactus.GetValidatorAddressesRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetValidatorAddressesRequest(buffer_arg) { + return blockchain_pb.GetValidatorAddressesRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetValidatorAddressesResponse(arg) { + if (!(arg instanceof blockchain_pb.GetValidatorAddressesResponse)) { + throw new Error('Expected argument of type pactus.GetValidatorAddressesResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetValidatorAddressesResponse(buffer_arg) { + return blockchain_pb.GetValidatorAddressesResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetValidatorByNumberRequest(arg) { + if (!(arg instanceof blockchain_pb.GetValidatorByNumberRequest)) { + throw new Error('Expected argument of type pactus.GetValidatorByNumberRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetValidatorByNumberRequest(buffer_arg) { + return blockchain_pb.GetValidatorByNumberRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetValidatorRequest(arg) { + if (!(arg instanceof blockchain_pb.GetValidatorRequest)) { + throw new Error('Expected argument of type pactus.GetValidatorRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetValidatorRequest(buffer_arg) { + return blockchain_pb.GetValidatorRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetValidatorResponse(arg) { + if (!(arg instanceof blockchain_pb.GetValidatorResponse)) { + throw new Error('Expected argument of type pactus.GetValidatorResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetValidatorResponse(buffer_arg) { + return blockchain_pb.GetValidatorResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// Blockchain service defines RPC methods for interacting with the blockchain. +var BlockchainService = exports.BlockchainService = { + // GetBlock retrieves information about a block based on the provided request +// parameters. +getBlock: { + path: '/pactus.Blockchain/GetBlock', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetBlockRequest, + responseType: blockchain_pb.GetBlockResponse, + requestSerialize: serialize_pactus_GetBlockRequest, + requestDeserialize: deserialize_pactus_GetBlockRequest, + responseSerialize: serialize_pactus_GetBlockResponse, + responseDeserialize: deserialize_pactus_GetBlockResponse, + }, + // GetBlockHash retrieves the hash of a block at the specified height. +getBlockHash: { + path: '/pactus.Blockchain/GetBlockHash', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetBlockHashRequest, + responseType: blockchain_pb.GetBlockHashResponse, + requestSerialize: serialize_pactus_GetBlockHashRequest, + requestDeserialize: deserialize_pactus_GetBlockHashRequest, + responseSerialize: serialize_pactus_GetBlockHashResponse, + responseDeserialize: deserialize_pactus_GetBlockHashResponse, + }, + // GetBlockHeight retrieves the height of a block with the specified hash. +getBlockHeight: { + path: '/pactus.Blockchain/GetBlockHeight', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetBlockHeightRequest, + responseType: blockchain_pb.GetBlockHeightResponse, + requestSerialize: serialize_pactus_GetBlockHeightRequest, + requestDeserialize: deserialize_pactus_GetBlockHeightRequest, + responseSerialize: serialize_pactus_GetBlockHeightResponse, + responseDeserialize: deserialize_pactus_GetBlockHeightResponse, + }, + // GetBlockchainInfo retrieves general information about the blockchain. +getBlockchainInfo: { + path: '/pactus.Blockchain/GetBlockchainInfo', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetBlockchainInfoRequest, + responseType: blockchain_pb.GetBlockchainInfoResponse, + requestSerialize: serialize_pactus_GetBlockchainInfoRequest, + requestDeserialize: deserialize_pactus_GetBlockchainInfoRequest, + responseSerialize: serialize_pactus_GetBlockchainInfoResponse, + responseDeserialize: deserialize_pactus_GetBlockchainInfoResponse, + }, + // GetConsensusInfo retrieves information about the consensus instances. +getConsensusInfo: { + path: '/pactus.Blockchain/GetConsensusInfo', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetConsensusInfoRequest, + responseType: blockchain_pb.GetConsensusInfoResponse, + requestSerialize: serialize_pactus_GetConsensusInfoRequest, + requestDeserialize: deserialize_pactus_GetConsensusInfoRequest, + responseSerialize: serialize_pactus_GetConsensusInfoResponse, + responseDeserialize: deserialize_pactus_GetConsensusInfoResponse, + }, + // GetAccount retrieves information about an account based on the provided +// address. +getAccount: { + path: '/pactus.Blockchain/GetAccount', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetAccountRequest, + responseType: blockchain_pb.GetAccountResponse, + requestSerialize: serialize_pactus_GetAccountRequest, + requestDeserialize: deserialize_pactus_GetAccountRequest, + responseSerialize: serialize_pactus_GetAccountResponse, + responseDeserialize: deserialize_pactus_GetAccountResponse, + }, + // GetValidator retrieves information about a validator based on the provided +// address. +getValidator: { + path: '/pactus.Blockchain/GetValidator', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetValidatorRequest, + responseType: blockchain_pb.GetValidatorResponse, + requestSerialize: serialize_pactus_GetValidatorRequest, + requestDeserialize: deserialize_pactus_GetValidatorRequest, + responseSerialize: serialize_pactus_GetValidatorResponse, + responseDeserialize: deserialize_pactus_GetValidatorResponse, + }, + // GetValidatorByNumber retrieves information about a validator based on the +// provided number. +getValidatorByNumber: { + path: '/pactus.Blockchain/GetValidatorByNumber', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetValidatorByNumberRequest, + responseType: blockchain_pb.GetValidatorResponse, + requestSerialize: serialize_pactus_GetValidatorByNumberRequest, + requestDeserialize: deserialize_pactus_GetValidatorByNumberRequest, + responseSerialize: serialize_pactus_GetValidatorResponse, + responseDeserialize: deserialize_pactus_GetValidatorResponse, + }, + // GetValidatorAddresses retrieves a list of all validator addresses. +getValidatorAddresses: { + path: '/pactus.Blockchain/GetValidatorAddresses', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetValidatorAddressesRequest, + responseType: blockchain_pb.GetValidatorAddressesResponse, + requestSerialize: serialize_pactus_GetValidatorAddressesRequest, + requestDeserialize: deserialize_pactus_GetValidatorAddressesRequest, + responseSerialize: serialize_pactus_GetValidatorAddressesResponse, + responseDeserialize: deserialize_pactus_GetValidatorAddressesResponse, + }, + // GetPublicKey retrieves the public key of an account based on the provided +// address. +getPublicKey: { + path: '/pactus.Blockchain/GetPublicKey', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetPublicKeyRequest, + responseType: blockchain_pb.GetPublicKeyResponse, + requestSerialize: serialize_pactus_GetPublicKeyRequest, + requestDeserialize: deserialize_pactus_GetPublicKeyRequest, + responseSerialize: serialize_pactus_GetPublicKeyResponse, + responseDeserialize: deserialize_pactus_GetPublicKeyResponse, + }, + // GetTxPoolContent retrieves current transactions in the transaction pool. +getTxPoolContent: { + path: '/pactus.Blockchain/GetTxPoolContent', + requestStream: false, + responseStream: false, + requestType: blockchain_pb.GetTxPoolContentRequest, + responseType: blockchain_pb.GetTxPoolContentResponse, + requestSerialize: serialize_pactus_GetTxPoolContentRequest, + requestDeserialize: deserialize_pactus_GetTxPoolContentRequest, + responseSerialize: serialize_pactus_GetTxPoolContentResponse, + responseDeserialize: deserialize_pactus_GetTxPoolContentResponse, + }, +}; + +exports.BlockchainClient = grpc.makeGenericClientConstructor(BlockchainService); diff --git a/www/grpc/gen/js/blockchain_pb.js b/www/grpc/gen/js/blockchain_pb.js new file mode 100644 index 000000000..4a3457f9b --- /dev/null +++ b/www/grpc/gen/js/blockchain_pb.js @@ -0,0 +1,6046 @@ +// source: blockchain.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var transaction_pb = require('./transaction_pb.js'); +goog.object.extend(proto, transaction_pb); +goog.exportSymbol('proto.pactus.AccountInfo', null, global); +goog.exportSymbol('proto.pactus.BlockHeaderInfo', null, global); +goog.exportSymbol('proto.pactus.BlockVerbosity', null, global); +goog.exportSymbol('proto.pactus.CertificateInfo', null, global); +goog.exportSymbol('proto.pactus.ConsensusInfo', null, global); +goog.exportSymbol('proto.pactus.GetAccountRequest', null, global); +goog.exportSymbol('proto.pactus.GetAccountResponse', null, global); +goog.exportSymbol('proto.pactus.GetBlockHashRequest', null, global); +goog.exportSymbol('proto.pactus.GetBlockHashResponse', null, global); +goog.exportSymbol('proto.pactus.GetBlockHeightRequest', null, global); +goog.exportSymbol('proto.pactus.GetBlockHeightResponse', null, global); +goog.exportSymbol('proto.pactus.GetBlockRequest', null, global); +goog.exportSymbol('proto.pactus.GetBlockResponse', null, global); +goog.exportSymbol('proto.pactus.GetBlockchainInfoRequest', null, global); +goog.exportSymbol('proto.pactus.GetBlockchainInfoResponse', null, global); +goog.exportSymbol('proto.pactus.GetConsensusInfoRequest', null, global); +goog.exportSymbol('proto.pactus.GetConsensusInfoResponse', null, global); +goog.exportSymbol('proto.pactus.GetPublicKeyRequest', null, global); +goog.exportSymbol('proto.pactus.GetPublicKeyResponse', null, global); +goog.exportSymbol('proto.pactus.GetTxPoolContentRequest', null, global); +goog.exportSymbol('proto.pactus.GetTxPoolContentResponse', null, global); +goog.exportSymbol('proto.pactus.GetValidatorAddressesRequest', null, global); +goog.exportSymbol('proto.pactus.GetValidatorAddressesResponse', null, global); +goog.exportSymbol('proto.pactus.GetValidatorByNumberRequest', null, global); +goog.exportSymbol('proto.pactus.GetValidatorRequest', null, global); +goog.exportSymbol('proto.pactus.GetValidatorResponse', null, global); +goog.exportSymbol('proto.pactus.Proposal', null, global); +goog.exportSymbol('proto.pactus.ValidatorInfo', null, global); +goog.exportSymbol('proto.pactus.VoteInfo', null, global); +goog.exportSymbol('proto.pactus.VoteType', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetAccountRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetAccountRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetAccountRequest.displayName = 'proto.pactus.GetAccountRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetAccountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetAccountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetAccountResponse.displayName = 'proto.pactus.GetAccountResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetValidatorAddressesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetValidatorAddressesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetValidatorAddressesRequest.displayName = 'proto.pactus.GetValidatorAddressesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetValidatorAddressesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetValidatorAddressesResponse.repeatedFields_, null); +}; +goog.inherits(proto.pactus.GetValidatorAddressesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetValidatorAddressesResponse.displayName = 'proto.pactus.GetValidatorAddressesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetValidatorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetValidatorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetValidatorRequest.displayName = 'proto.pactus.GetValidatorRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetValidatorByNumberRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetValidatorByNumberRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetValidatorByNumberRequest.displayName = 'proto.pactus.GetValidatorByNumberRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetValidatorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetValidatorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetValidatorResponse.displayName = 'proto.pactus.GetValidatorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetPublicKeyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetPublicKeyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetPublicKeyRequest.displayName = 'proto.pactus.GetPublicKeyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetPublicKeyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetPublicKeyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetPublicKeyResponse.displayName = 'proto.pactus.GetPublicKeyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetBlockRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetBlockRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetBlockRequest.displayName = 'proto.pactus.GetBlockRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetBlockResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetBlockResponse.repeatedFields_, null); +}; +goog.inherits(proto.pactus.GetBlockResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetBlockResponse.displayName = 'proto.pactus.GetBlockResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetBlockHashRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetBlockHashRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetBlockHashRequest.displayName = 'proto.pactus.GetBlockHashRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetBlockHashResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetBlockHashResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetBlockHashResponse.displayName = 'proto.pactus.GetBlockHashResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetBlockHeightRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetBlockHeightRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetBlockHeightRequest.displayName = 'proto.pactus.GetBlockHeightRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetBlockHeightResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetBlockHeightResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetBlockHeightResponse.displayName = 'proto.pactus.GetBlockHeightResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetBlockchainInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetBlockchainInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetBlockchainInfoRequest.displayName = 'proto.pactus.GetBlockchainInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetBlockchainInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetBlockchainInfoResponse.repeatedFields_, null); +}; +goog.inherits(proto.pactus.GetBlockchainInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetBlockchainInfoResponse.displayName = 'proto.pactus.GetBlockchainInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetConsensusInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetConsensusInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetConsensusInfoRequest.displayName = 'proto.pactus.GetConsensusInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetConsensusInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetConsensusInfoResponse.repeatedFields_, null); +}; +goog.inherits(proto.pactus.GetConsensusInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetConsensusInfoResponse.displayName = 'proto.pactus.GetConsensusInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetTxPoolContentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetTxPoolContentRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetTxPoolContentRequest.displayName = 'proto.pactus.GetTxPoolContentRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetTxPoolContentResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetTxPoolContentResponse.repeatedFields_, null); +}; +goog.inherits(proto.pactus.GetTxPoolContentResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetTxPoolContentResponse.displayName = 'proto.pactus.GetTxPoolContentResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.ValidatorInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.ValidatorInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.ValidatorInfo.displayName = 'proto.pactus.ValidatorInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.AccountInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.AccountInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.AccountInfo.displayName = 'proto.pactus.AccountInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.BlockHeaderInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.BlockHeaderInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.BlockHeaderInfo.displayName = 'proto.pactus.BlockHeaderInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.CertificateInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.CertificateInfo.repeatedFields_, null); +}; +goog.inherits(proto.pactus.CertificateInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.CertificateInfo.displayName = 'proto.pactus.CertificateInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.VoteInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.VoteInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.VoteInfo.displayName = 'proto.pactus.VoteInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.ConsensusInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.ConsensusInfo.repeatedFields_, null); +}; +goog.inherits(proto.pactus.ConsensusInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.ConsensusInfo.displayName = 'proto.pactus.ConsensusInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.Proposal.displayName = 'proto.pactus.Proposal'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetAccountRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetAccountRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetAccountRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetAccountRequest.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetAccountRequest} + */ +proto.pactus.GetAccountRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetAccountRequest; + return proto.pactus.GetAccountRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetAccountRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetAccountRequest} + */ +proto.pactus.GetAccountRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetAccountRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetAccountRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetAccountRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetAccountRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.pactus.GetAccountRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetAccountRequest} returns this + */ +proto.pactus.GetAccountRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetAccountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetAccountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetAccountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetAccountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + account: (f = msg.getAccount()) && proto.pactus.AccountInfo.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetAccountResponse} + */ +proto.pactus.GetAccountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetAccountResponse; + return proto.pactus.GetAccountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetAccountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetAccountResponse} + */ +proto.pactus.GetAccountResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pactus.AccountInfo; + reader.readMessage(value,proto.pactus.AccountInfo.deserializeBinaryFromReader); + msg.setAccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetAccountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetAccountResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetAccountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetAccountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.pactus.AccountInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional AccountInfo account = 1; + * @return {?proto.pactus.AccountInfo} + */ +proto.pactus.GetAccountResponse.prototype.getAccount = function() { + return /** @type{?proto.pactus.AccountInfo} */ ( + jspb.Message.getWrapperField(this, proto.pactus.AccountInfo, 1)); +}; + + +/** + * @param {?proto.pactus.AccountInfo|undefined} value + * @return {!proto.pactus.GetAccountResponse} returns this +*/ +proto.pactus.GetAccountResponse.prototype.setAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetAccountResponse} returns this + */ +proto.pactus.GetAccountResponse.prototype.clearAccount = function() { + return this.setAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetAccountResponse.prototype.hasAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetValidatorAddressesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetValidatorAddressesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetValidatorAddressesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorAddressesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetValidatorAddressesRequest} + */ +proto.pactus.GetValidatorAddressesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetValidatorAddressesRequest; + return proto.pactus.GetValidatorAddressesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetValidatorAddressesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetValidatorAddressesRequest} + */ +proto.pactus.GetValidatorAddressesRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetValidatorAddressesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetValidatorAddressesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetValidatorAddressesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorAddressesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.GetValidatorAddressesResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetValidatorAddressesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetValidatorAddressesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetValidatorAddressesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorAddressesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + addressesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetValidatorAddressesResponse} + */ +proto.pactus.GetValidatorAddressesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetValidatorAddressesResponse; + return proto.pactus.GetValidatorAddressesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetValidatorAddressesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetValidatorAddressesResponse} + */ +proto.pactus.GetValidatorAddressesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addAddresses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetValidatorAddressesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetValidatorAddressesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetValidatorAddressesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorAddressesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddressesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string addresses = 1; + * @return {!Array} + */ +proto.pactus.GetValidatorAddressesResponse.prototype.getAddressesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.GetValidatorAddressesResponse} returns this + */ +proto.pactus.GetValidatorAddressesResponse.prototype.setAddressesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.pactus.GetValidatorAddressesResponse} returns this + */ +proto.pactus.GetValidatorAddressesResponse.prototype.addAddresses = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetValidatorAddressesResponse} returns this + */ +proto.pactus.GetValidatorAddressesResponse.prototype.clearAddressesList = function() { + return this.setAddressesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetValidatorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetValidatorRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetValidatorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetValidatorRequest} + */ +proto.pactus.GetValidatorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetValidatorRequest; + return proto.pactus.GetValidatorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetValidatorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetValidatorRequest} + */ +proto.pactus.GetValidatorRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetValidatorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetValidatorRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetValidatorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.pactus.GetValidatorRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetValidatorRequest} returns this + */ +proto.pactus.GetValidatorRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetValidatorByNumberRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetValidatorByNumberRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetValidatorByNumberRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorByNumberRequest.toObject = function(includeInstance, msg) { + var f, obj = { + number: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetValidatorByNumberRequest} + */ +proto.pactus.GetValidatorByNumberRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetValidatorByNumberRequest; + return proto.pactus.GetValidatorByNumberRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetValidatorByNumberRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetValidatorByNumberRequest} + */ +proto.pactus.GetValidatorByNumberRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetValidatorByNumberRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetValidatorByNumberRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetValidatorByNumberRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorByNumberRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNumber(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } +}; + + +/** + * optional int32 number = 1; + * @return {number} + */ +proto.pactus.GetValidatorByNumberRequest.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetValidatorByNumberRequest} returns this + */ +proto.pactus.GetValidatorByNumberRequest.prototype.setNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetValidatorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetValidatorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validator: (f = msg.getValidator()) && proto.pactus.ValidatorInfo.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetValidatorResponse} + */ +proto.pactus.GetValidatorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetValidatorResponse; + return proto.pactus.GetValidatorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetValidatorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetValidatorResponse} + */ +proto.pactus.GetValidatorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pactus.ValidatorInfo; + reader.readMessage(value,proto.pactus.ValidatorInfo.deserializeBinaryFromReader); + msg.setValidator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetValidatorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetValidatorResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetValidatorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.pactus.ValidatorInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ValidatorInfo validator = 1; + * @return {?proto.pactus.ValidatorInfo} + */ +proto.pactus.GetValidatorResponse.prototype.getValidator = function() { + return /** @type{?proto.pactus.ValidatorInfo} */ ( + jspb.Message.getWrapperField(this, proto.pactus.ValidatorInfo, 1)); +}; + + +/** + * @param {?proto.pactus.ValidatorInfo|undefined} value + * @return {!proto.pactus.GetValidatorResponse} returns this +*/ +proto.pactus.GetValidatorResponse.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetValidatorResponse} returns this + */ +proto.pactus.GetValidatorResponse.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetValidatorResponse.prototype.hasValidator = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetPublicKeyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetPublicKeyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetPublicKeyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetPublicKeyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetPublicKeyRequest} + */ +proto.pactus.GetPublicKeyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetPublicKeyRequest; + return proto.pactus.GetPublicKeyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetPublicKeyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetPublicKeyRequest} + */ +proto.pactus.GetPublicKeyRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetPublicKeyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetPublicKeyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetPublicKeyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetPublicKeyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.pactus.GetPublicKeyRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetPublicKeyRequest} returns this + */ +proto.pactus.GetPublicKeyRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetPublicKeyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetPublicKeyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetPublicKeyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetPublicKeyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetPublicKeyResponse} + */ +proto.pactus.GetPublicKeyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetPublicKeyResponse; + return proto.pactus.GetPublicKeyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetPublicKeyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetPublicKeyResponse} + */ +proto.pactus.GetPublicKeyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetPublicKeyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetPublicKeyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetPublicKeyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetPublicKeyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string public_key = 1; + * @return {string} + */ +proto.pactus.GetPublicKeyResponse.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetPublicKeyResponse} returns this + */ +proto.pactus.GetPublicKeyResponse.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetBlockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetBlockRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetBlockRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + verbosity: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetBlockRequest} + */ +proto.pactus.GetBlockRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetBlockRequest; + return proto.pactus.GetBlockRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetBlockRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetBlockRequest} + */ +proto.pactus.GetBlockRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {!proto.pactus.BlockVerbosity} */ (reader.readEnum()); + msg.setVerbosity(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetBlockRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetBlockRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetBlockRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getVerbosity(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional uint32 height = 1; + * @return {number} + */ +proto.pactus.GetBlockRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockRequest} returns this + */ +proto.pactus.GetBlockRequest.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional BlockVerbosity verbosity = 2; + * @return {!proto.pactus.BlockVerbosity} + */ +proto.pactus.GetBlockRequest.prototype.getVerbosity = function() { + return /** @type {!proto.pactus.BlockVerbosity} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.pactus.BlockVerbosity} value + * @return {!proto.pactus.GetBlockRequest} returns this + */ +proto.pactus.GetBlockRequest.prototype.setVerbosity = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.GetBlockResponse.repeatedFields_ = [7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetBlockResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetBlockResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetBlockResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + hash: jspb.Message.getFieldWithDefault(msg, 2, ""), + data: jspb.Message.getFieldWithDefault(msg, 3, ""), + blockTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + header: (f = msg.getHeader()) && proto.pactus.BlockHeaderInfo.toObject(includeInstance, f), + prevCert: (f = msg.getPrevCert()) && proto.pactus.CertificateInfo.toObject(includeInstance, f), + txsList: jspb.Message.toObjectList(msg.getTxsList(), + transaction_pb.TransactionInfo.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetBlockResponse} + */ +proto.pactus.GetBlockResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetBlockResponse; + return proto.pactus.GetBlockResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetBlockResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetBlockResponse} + */ +proto.pactus.GetBlockResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setHash(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBlockTime(value); + break; + case 5: + var value = new proto.pactus.BlockHeaderInfo; + reader.readMessage(value,proto.pactus.BlockHeaderInfo.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 6: + var value = new proto.pactus.CertificateInfo; + reader.readMessage(value,proto.pactus.CertificateInfo.deserializeBinaryFromReader); + msg.setPrevCert(value); + break; + case 7: + var value = new transaction_pb.TransactionInfo; + reader.readMessage(value,transaction_pb.TransactionInfo.deserializeBinaryFromReader); + msg.addTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetBlockResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetBlockResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetBlockResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getHash(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBlockTime(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.pactus.BlockHeaderInfo.serializeBinaryToWriter + ); + } + f = message.getPrevCert(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.pactus.CertificateInfo.serializeBinaryToWriter + ); + } + f = message.getTxsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + transaction_pb.TransactionInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 height = 1; + * @return {number} + */ +proto.pactus.GetBlockResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockResponse} returns this + */ +proto.pactus.GetBlockResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string hash = 2; + * @return {string} + */ +proto.pactus.GetBlockResponse.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetBlockResponse} returns this + */ +proto.pactus.GetBlockResponse.prototype.setHash = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string data = 3; + * @return {string} + */ +proto.pactus.GetBlockResponse.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetBlockResponse} returns this + */ +proto.pactus.GetBlockResponse.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint32 block_time = 4; + * @return {number} + */ +proto.pactus.GetBlockResponse.prototype.getBlockTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockResponse} returns this + */ +proto.pactus.GetBlockResponse.prototype.setBlockTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional BlockHeaderInfo header = 5; + * @return {?proto.pactus.BlockHeaderInfo} + */ +proto.pactus.GetBlockResponse.prototype.getHeader = function() { + return /** @type{?proto.pactus.BlockHeaderInfo} */ ( + jspb.Message.getWrapperField(this, proto.pactus.BlockHeaderInfo, 5)); +}; + + +/** + * @param {?proto.pactus.BlockHeaderInfo|undefined} value + * @return {!proto.pactus.GetBlockResponse} returns this +*/ +proto.pactus.GetBlockResponse.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetBlockResponse} returns this + */ +proto.pactus.GetBlockResponse.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetBlockResponse.prototype.hasHeader = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional CertificateInfo prev_cert = 6; + * @return {?proto.pactus.CertificateInfo} + */ +proto.pactus.GetBlockResponse.prototype.getPrevCert = function() { + return /** @type{?proto.pactus.CertificateInfo} */ ( + jspb.Message.getWrapperField(this, proto.pactus.CertificateInfo, 6)); +}; + + +/** + * @param {?proto.pactus.CertificateInfo|undefined} value + * @return {!proto.pactus.GetBlockResponse} returns this +*/ +proto.pactus.GetBlockResponse.prototype.setPrevCert = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetBlockResponse} returns this + */ +proto.pactus.GetBlockResponse.prototype.clearPrevCert = function() { + return this.setPrevCert(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetBlockResponse.prototype.hasPrevCert = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * repeated TransactionInfo txs = 7; + * @return {!Array} + */ +proto.pactus.GetBlockResponse.prototype.getTxsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, transaction_pb.TransactionInfo, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.GetBlockResponse} returns this +*/ +proto.pactus.GetBlockResponse.prototype.setTxsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.pactus.TransactionInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.pactus.TransactionInfo} + */ +proto.pactus.GetBlockResponse.prototype.addTxs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.pactus.TransactionInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetBlockResponse} returns this + */ +proto.pactus.GetBlockResponse.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetBlockHashRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetBlockHashRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetBlockHashRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockHashRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetBlockHashRequest} + */ +proto.pactus.GetBlockHashRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetBlockHashRequest; + return proto.pactus.GetBlockHashRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetBlockHashRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetBlockHashRequest} + */ +proto.pactus.GetBlockHashRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetBlockHashRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetBlockHashRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetBlockHashRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockHashRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } +}; + + +/** + * optional uint32 height = 1; + * @return {number} + */ +proto.pactus.GetBlockHashRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockHashRequest} returns this + */ +proto.pactus.GetBlockHashRequest.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetBlockHashResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetBlockHashResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetBlockHashResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockHashResponse.toObject = function(includeInstance, msg) { + var f, obj = { + hash: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetBlockHashResponse} + */ +proto.pactus.GetBlockHashResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetBlockHashResponse; + return proto.pactus.GetBlockHashResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetBlockHashResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetBlockHashResponse} + */ +proto.pactus.GetBlockHashResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetBlockHashResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetBlockHashResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetBlockHashResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockHashResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string hash = 1; + * @return {string} + */ +proto.pactus.GetBlockHashResponse.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetBlockHashResponse} returns this + */ +proto.pactus.GetBlockHashResponse.prototype.setHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetBlockHeightRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetBlockHeightRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetBlockHeightRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockHeightRequest.toObject = function(includeInstance, msg) { + var f, obj = { + hash: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetBlockHeightRequest} + */ +proto.pactus.GetBlockHeightRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetBlockHeightRequest; + return proto.pactus.GetBlockHeightRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetBlockHeightRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetBlockHeightRequest} + */ +proto.pactus.GetBlockHeightRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetBlockHeightRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetBlockHeightRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetBlockHeightRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockHeightRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string hash = 1; + * @return {string} + */ +proto.pactus.GetBlockHeightRequest.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetBlockHeightRequest} returns this + */ +proto.pactus.GetBlockHeightRequest.prototype.setHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetBlockHeightResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetBlockHeightResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetBlockHeightResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockHeightResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetBlockHeightResponse} + */ +proto.pactus.GetBlockHeightResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetBlockHeightResponse; + return proto.pactus.GetBlockHeightResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetBlockHeightResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetBlockHeightResponse} + */ +proto.pactus.GetBlockHeightResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetBlockHeightResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetBlockHeightResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetBlockHeightResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockHeightResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } +}; + + +/** + * optional uint32 height = 1; + * @return {number} + */ +proto.pactus.GetBlockHeightResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockHeightResponse} returns this + */ +proto.pactus.GetBlockHeightResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetBlockchainInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetBlockchainInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetBlockchainInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockchainInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetBlockchainInfoRequest} + */ +proto.pactus.GetBlockchainInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetBlockchainInfoRequest; + return proto.pactus.GetBlockchainInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetBlockchainInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetBlockchainInfoRequest} + */ +proto.pactus.GetBlockchainInfoRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetBlockchainInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetBlockchainInfoRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetBlockchainInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockchainInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.GetBlockchainInfoResponse.repeatedFields_ = [7]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetBlockchainInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetBlockchainInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockchainInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + lastBlockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + lastBlockHash: jspb.Message.getFieldWithDefault(msg, 2, ""), + totalAccounts: jspb.Message.getFieldWithDefault(msg, 3, 0), + totalValidators: jspb.Message.getFieldWithDefault(msg, 4, 0), + totalPower: jspb.Message.getFieldWithDefault(msg, 5, 0), + committeePower: jspb.Message.getFieldWithDefault(msg, 6, 0), + committeeValidatorsList: jspb.Message.toObjectList(msg.getCommitteeValidatorsList(), + proto.pactus.ValidatorInfo.toObject, includeInstance), + isPruned: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + pruningHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), + lastBlockTime: jspb.Message.getFieldWithDefault(msg, 10, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetBlockchainInfoResponse} + */ +proto.pactus.GetBlockchainInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetBlockchainInfoResponse; + return proto.pactus.GetBlockchainInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetBlockchainInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetBlockchainInfoResponse} + */ +proto.pactus.GetBlockchainInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastBlockHeight(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLastBlockHash(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTotalAccounts(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTotalValidators(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalPower(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCommitteePower(value); + break; + case 7: + var value = new proto.pactus.ValidatorInfo; + reader.readMessage(value,proto.pactus.ValidatorInfo.deserializeBinaryFromReader); + msg.addCommitteeValidators(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsPruned(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPruningHeight(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastBlockTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetBlockchainInfoResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetBlockchainInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetBlockchainInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLastBlockHeight(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getLastBlockHash(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTotalAccounts(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getTotalValidators(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getTotalPower(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getCommitteePower(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getCommitteeValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.pactus.ValidatorInfo.serializeBinaryToWriter + ); + } + f = message.getIsPruned(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getPruningHeight(); + if (f !== 0) { + writer.writeUint32( + 9, + f + ); + } + f = message.getLastBlockTime(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } +}; + + +/** + * optional uint32 last_block_height = 1; + * @return {number} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.getLastBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this + */ +proto.pactus.GetBlockchainInfoResponse.prototype.setLastBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string last_block_hash = 2; + * @return {string} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.getLastBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this + */ +proto.pactus.GetBlockchainInfoResponse.prototype.setLastBlockHash = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int32 total_accounts = 3; + * @return {number} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.getTotalAccounts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this + */ +proto.pactus.GetBlockchainInfoResponse.prototype.setTotalAccounts = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 total_validators = 4; + * @return {number} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.getTotalValidators = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this + */ +proto.pactus.GetBlockchainInfoResponse.prototype.setTotalValidators = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 total_power = 5; + * @return {number} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.getTotalPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this + */ +proto.pactus.GetBlockchainInfoResponse.prototype.setTotalPower = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 committee_power = 6; + * @return {number} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.getCommitteePower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this + */ +proto.pactus.GetBlockchainInfoResponse.prototype.setCommitteePower = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated ValidatorInfo committee_validators = 7; + * @return {!Array} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.getCommitteeValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pactus.ValidatorInfo, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this +*/ +proto.pactus.GetBlockchainInfoResponse.prototype.setCommitteeValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.pactus.ValidatorInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.pactus.ValidatorInfo} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.addCommitteeValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.pactus.ValidatorInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this + */ +proto.pactus.GetBlockchainInfoResponse.prototype.clearCommitteeValidatorsList = function() { + return this.setCommitteeValidatorsList([]); +}; + + +/** + * optional bool is_pruned = 8; + * @return {boolean} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.getIsPruned = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this + */ +proto.pactus.GetBlockchainInfoResponse.prototype.setIsPruned = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional uint32 pruning_height = 9; + * @return {number} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.getPruningHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this + */ +proto.pactus.GetBlockchainInfoResponse.prototype.setPruningHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional int64 last_block_time = 10; + * @return {number} + */ +proto.pactus.GetBlockchainInfoResponse.prototype.getLastBlockTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetBlockchainInfoResponse} returns this + */ +proto.pactus.GetBlockchainInfoResponse.prototype.setLastBlockTime = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetConsensusInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetConsensusInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetConsensusInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetConsensusInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetConsensusInfoRequest} + */ +proto.pactus.GetConsensusInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetConsensusInfoRequest; + return proto.pactus.GetConsensusInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetConsensusInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetConsensusInfoRequest} + */ +proto.pactus.GetConsensusInfoRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetConsensusInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetConsensusInfoRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetConsensusInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetConsensusInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.GetConsensusInfoResponse.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetConsensusInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetConsensusInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetConsensusInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetConsensusInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + proposal: (f = msg.getProposal()) && proto.pactus.Proposal.toObject(includeInstance, f), + instancesList: jspb.Message.toObjectList(msg.getInstancesList(), + proto.pactus.ConsensusInfo.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetConsensusInfoResponse} + */ +proto.pactus.GetConsensusInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetConsensusInfoResponse; + return proto.pactus.GetConsensusInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetConsensusInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetConsensusInfoResponse} + */ +proto.pactus.GetConsensusInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pactus.Proposal; + reader.readMessage(value,proto.pactus.Proposal.deserializeBinaryFromReader); + msg.setProposal(value); + break; + case 2: + var value = new proto.pactus.ConsensusInfo; + reader.readMessage(value,proto.pactus.ConsensusInfo.deserializeBinaryFromReader); + msg.addInstances(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetConsensusInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetConsensusInfoResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetConsensusInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetConsensusInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposal(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.pactus.Proposal.serializeBinaryToWriter + ); + } + f = message.getInstancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.pactus.ConsensusInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Proposal proposal = 1; + * @return {?proto.pactus.Proposal} + */ +proto.pactus.GetConsensusInfoResponse.prototype.getProposal = function() { + return /** @type{?proto.pactus.Proposal} */ ( + jspb.Message.getWrapperField(this, proto.pactus.Proposal, 1)); +}; + + +/** + * @param {?proto.pactus.Proposal|undefined} value + * @return {!proto.pactus.GetConsensusInfoResponse} returns this +*/ +proto.pactus.GetConsensusInfoResponse.prototype.setProposal = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetConsensusInfoResponse} returns this + */ +proto.pactus.GetConsensusInfoResponse.prototype.clearProposal = function() { + return this.setProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetConsensusInfoResponse.prototype.hasProposal = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ConsensusInfo instances = 2; + * @return {!Array} + */ +proto.pactus.GetConsensusInfoResponse.prototype.getInstancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pactus.ConsensusInfo, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.GetConsensusInfoResponse} returns this +*/ +proto.pactus.GetConsensusInfoResponse.prototype.setInstancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.pactus.ConsensusInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.pactus.ConsensusInfo} + */ +proto.pactus.GetConsensusInfoResponse.prototype.addInstances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.pactus.ConsensusInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetConsensusInfoResponse} returns this + */ +proto.pactus.GetConsensusInfoResponse.prototype.clearInstancesList = function() { + return this.setInstancesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetTxPoolContentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetTxPoolContentRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetTxPoolContentRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTxPoolContentRequest.toObject = function(includeInstance, msg) { + var f, obj = { + payloadType: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetTxPoolContentRequest} + */ +proto.pactus.GetTxPoolContentRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetTxPoolContentRequest; + return proto.pactus.GetTxPoolContentRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetTxPoolContentRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetTxPoolContentRequest} + */ +proto.pactus.GetTxPoolContentRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.pactus.PayloadType} */ (reader.readEnum()); + msg.setPayloadType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetTxPoolContentRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetTxPoolContentRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetTxPoolContentRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTxPoolContentRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPayloadType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional PayloadType payload_type = 1; + * @return {!proto.pactus.PayloadType} + */ +proto.pactus.GetTxPoolContentRequest.prototype.getPayloadType = function() { + return /** @type {!proto.pactus.PayloadType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pactus.PayloadType} value + * @return {!proto.pactus.GetTxPoolContentRequest} returns this + */ +proto.pactus.GetTxPoolContentRequest.prototype.setPayloadType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.GetTxPoolContentResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetTxPoolContentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetTxPoolContentResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetTxPoolContentResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTxPoolContentResponse.toObject = function(includeInstance, msg) { + var f, obj = { + txsList: jspb.Message.toObjectList(msg.getTxsList(), + transaction_pb.TransactionInfo.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetTxPoolContentResponse} + */ +proto.pactus.GetTxPoolContentResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetTxPoolContentResponse; + return proto.pactus.GetTxPoolContentResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetTxPoolContentResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetTxPoolContentResponse} + */ +proto.pactus.GetTxPoolContentResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new transaction_pb.TransactionInfo; + reader.readMessage(value,transaction_pb.TransactionInfo.deserializeBinaryFromReader); + msg.addTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetTxPoolContentResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetTxPoolContentResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetTxPoolContentResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTxPoolContentResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + transaction_pb.TransactionInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TransactionInfo txs = 1; + * @return {!Array} + */ +proto.pactus.GetTxPoolContentResponse.prototype.getTxsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, transaction_pb.TransactionInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.GetTxPoolContentResponse} returns this +*/ +proto.pactus.GetTxPoolContentResponse.prototype.setTxsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.pactus.TransactionInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.pactus.TransactionInfo} + */ +proto.pactus.GetTxPoolContentResponse.prototype.addTxs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pactus.TransactionInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetTxPoolContentResponse} returns this + */ +proto.pactus.GetTxPoolContentResponse.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.ValidatorInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.ValidatorInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.ValidatorInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.ValidatorInfo.toObject = function(includeInstance, msg) { + var f, obj = { + hash: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: jspb.Message.getFieldWithDefault(msg, 2, ""), + publicKey: jspb.Message.getFieldWithDefault(msg, 3, ""), + number: jspb.Message.getFieldWithDefault(msg, 4, 0), + stake: jspb.Message.getFieldWithDefault(msg, 5, 0), + lastBondingHeight: jspb.Message.getFieldWithDefault(msg, 6, 0), + lastSortitionHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + unbondingHeight: jspb.Message.getFieldWithDefault(msg, 8, 0), + address: jspb.Message.getFieldWithDefault(msg, 9, ""), + availabilityScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.ValidatorInfo} + */ +proto.pactus.ValidatorInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.ValidatorInfo; + return proto.pactus.ValidatorInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.ValidatorInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.ValidatorInfo} + */ +proto.pactus.ValidatorInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHash(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStake(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastBondingHeight(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLastSortitionHeight(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setUnbondingHeight(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 10: + var value = /** @type {number} */ (reader.readDouble()); + msg.setAvailabilityScore(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.ValidatorInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.ValidatorInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.ValidatorInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.ValidatorInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getNumber(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getStake(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getLastBondingHeight(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } + f = message.getLastSortitionHeight(); + if (f !== 0) { + writer.writeUint32( + 7, + f + ); + } + f = message.getUnbondingHeight(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getAvailabilityScore(); + if (f !== 0.0) { + writer.writeDouble( + 10, + f + ); + } +}; + + +/** + * optional string hash = 1; + * @return {string} + */ +proto.pactus.ValidatorInfo.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.ValidatorInfo} returns this + */ +proto.pactus.ValidatorInfo.prototype.setHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string data = 2; + * @return {string} + */ +proto.pactus.ValidatorInfo.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.ValidatorInfo} returns this + */ +proto.pactus.ValidatorInfo.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string public_key = 3; + * @return {string} + */ +proto.pactus.ValidatorInfo.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.ValidatorInfo} returns this + */ +proto.pactus.ValidatorInfo.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 number = 4; + * @return {number} + */ +proto.pactus.ValidatorInfo.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ValidatorInfo} returns this + */ +proto.pactus.ValidatorInfo.prototype.setNumber = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 stake = 5; + * @return {number} + */ +proto.pactus.ValidatorInfo.prototype.getStake = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ValidatorInfo} returns this + */ +proto.pactus.ValidatorInfo.prototype.setStake = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint32 last_bonding_height = 6; + * @return {number} + */ +proto.pactus.ValidatorInfo.prototype.getLastBondingHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ValidatorInfo} returns this + */ +proto.pactus.ValidatorInfo.prototype.setLastBondingHeight = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint32 last_sortition_height = 7; + * @return {number} + */ +proto.pactus.ValidatorInfo.prototype.getLastSortitionHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ValidatorInfo} returns this + */ +proto.pactus.ValidatorInfo.prototype.setLastSortitionHeight = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint32 unbonding_height = 8; + * @return {number} + */ +proto.pactus.ValidatorInfo.prototype.getUnbondingHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ValidatorInfo} returns this + */ +proto.pactus.ValidatorInfo.prototype.setUnbondingHeight = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional string address = 9; + * @return {string} + */ +proto.pactus.ValidatorInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.ValidatorInfo} returns this + */ +proto.pactus.ValidatorInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional double availability_score = 10; + * @return {number} + */ +proto.pactus.ValidatorInfo.prototype.getAvailabilityScore = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 10, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ValidatorInfo} returns this + */ +proto.pactus.ValidatorInfo.prototype.setAvailabilityScore = function(value) { + return jspb.Message.setProto3FloatField(this, 10, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.AccountInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.AccountInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.AccountInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.AccountInfo.toObject = function(includeInstance, msg) { + var f, obj = { + hash: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: jspb.Message.getFieldWithDefault(msg, 2, ""), + number: jspb.Message.getFieldWithDefault(msg, 3, 0), + balance: jspb.Message.getFieldWithDefault(msg, 4, 0), + address: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.AccountInfo} + */ +proto.pactus.AccountInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.AccountInfo; + return proto.pactus.AccountInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.AccountInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.AccountInfo} + */ +proto.pactus.AccountInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHash(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setNumber(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBalance(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.AccountInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.AccountInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.AccountInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.AccountInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getNumber(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getBalance(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string hash = 1; + * @return {string} + */ +proto.pactus.AccountInfo.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.AccountInfo} returns this + */ +proto.pactus.AccountInfo.prototype.setHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string data = 2; + * @return {string} + */ +proto.pactus.AccountInfo.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.AccountInfo} returns this + */ +proto.pactus.AccountInfo.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int32 number = 3; + * @return {number} + */ +proto.pactus.AccountInfo.prototype.getNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.AccountInfo} returns this + */ +proto.pactus.AccountInfo.prototype.setNumber = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 balance = 4; + * @return {number} + */ +proto.pactus.AccountInfo.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.AccountInfo} returns this + */ +proto.pactus.AccountInfo.prototype.setBalance = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string address = 5; + * @return {string} + */ +proto.pactus.AccountInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.AccountInfo} returns this + */ +proto.pactus.AccountInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.BlockHeaderInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.BlockHeaderInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.BlockHeaderInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.BlockHeaderInfo.toObject = function(includeInstance, msg) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, 0), + prevBlockHash: jspb.Message.getFieldWithDefault(msg, 2, ""), + stateRoot: jspb.Message.getFieldWithDefault(msg, 3, ""), + sortitionSeed: jspb.Message.getFieldWithDefault(msg, 4, ""), + proposerAddress: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.BlockHeaderInfo} + */ +proto.pactus.BlockHeaderInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.BlockHeaderInfo; + return proto.pactus.BlockHeaderInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.BlockHeaderInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.BlockHeaderInfo} + */ +proto.pactus.BlockHeaderInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPrevBlockHash(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setStateRoot(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSortitionSeed(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setProposerAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.BlockHeaderInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.BlockHeaderInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.BlockHeaderInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.BlockHeaderInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getPrevBlockHash(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getStateRoot(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSortitionSeed(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getProposerAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional int32 version = 1; + * @return {number} + */ +proto.pactus.BlockHeaderInfo.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.BlockHeaderInfo} returns this + */ +proto.pactus.BlockHeaderInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string prev_block_hash = 2; + * @return {string} + */ +proto.pactus.BlockHeaderInfo.prototype.getPrevBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.BlockHeaderInfo} returns this + */ +proto.pactus.BlockHeaderInfo.prototype.setPrevBlockHash = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string state_root = 3; + * @return {string} + */ +proto.pactus.BlockHeaderInfo.prototype.getStateRoot = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.BlockHeaderInfo} returns this + */ +proto.pactus.BlockHeaderInfo.prototype.setStateRoot = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string sortition_seed = 4; + * @return {string} + */ +proto.pactus.BlockHeaderInfo.prototype.getSortitionSeed = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.BlockHeaderInfo} returns this + */ +proto.pactus.BlockHeaderInfo.prototype.setSortitionSeed = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string proposer_address = 5; + * @return {string} + */ +proto.pactus.BlockHeaderInfo.prototype.getProposerAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.BlockHeaderInfo} returns this + */ +proto.pactus.BlockHeaderInfo.prototype.setProposerAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.CertificateInfo.repeatedFields_ = [3,4]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.CertificateInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.CertificateInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.CertificateInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.CertificateInfo.toObject = function(includeInstance, msg) { + var f, obj = { + hash: jspb.Message.getFieldWithDefault(msg, 1, ""), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + committersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + absenteesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + signature: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.CertificateInfo} + */ +proto.pactus.CertificateInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.CertificateInfo; + return proto.pactus.CertificateInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.CertificateInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.CertificateInfo} + */ +proto.pactus.CertificateInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setHash(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addCommitters(values[i]); + } + break; + case 4: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); + for (var i = 0; i < values.length; i++) { + msg.addAbsentees(values[i]); + } + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.CertificateInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.CertificateInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.CertificateInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.CertificateInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getCommittersList(); + if (f.length > 0) { + writer.writePackedInt32( + 3, + f + ); + } + f = message.getAbsenteesList(); + if (f.length > 0) { + writer.writePackedInt32( + 4, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string hash = 1; + * @return {string} + */ +proto.pactus.CertificateInfo.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.CertificateInfo} returns this + */ +proto.pactus.CertificateInfo.prototype.setHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.pactus.CertificateInfo.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.CertificateInfo} returns this + */ +proto.pactus.CertificateInfo.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated int32 committers = 3; + * @return {!Array} + */ +proto.pactus.CertificateInfo.prototype.getCommittersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.CertificateInfo} returns this + */ +proto.pactus.CertificateInfo.prototype.setCommittersList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.pactus.CertificateInfo} returns this + */ +proto.pactus.CertificateInfo.prototype.addCommitters = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.CertificateInfo} returns this + */ +proto.pactus.CertificateInfo.prototype.clearCommittersList = function() { + return this.setCommittersList([]); +}; + + +/** + * repeated int32 absentees = 4; + * @return {!Array} + */ +proto.pactus.CertificateInfo.prototype.getAbsenteesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.CertificateInfo} returns this + */ +proto.pactus.CertificateInfo.prototype.setAbsenteesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.pactus.CertificateInfo} returns this + */ +proto.pactus.CertificateInfo.prototype.addAbsentees = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.CertificateInfo} returns this + */ +proto.pactus.CertificateInfo.prototype.clearAbsenteesList = function() { + return this.setAbsenteesList([]); +}; + + +/** + * optional string signature = 5; + * @return {string} + */ +proto.pactus.CertificateInfo.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.CertificateInfo} returns this + */ +proto.pactus.CertificateInfo.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.VoteInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.VoteInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.VoteInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.VoteInfo.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + voter: jspb.Message.getFieldWithDefault(msg, 2, ""), + blockHash: jspb.Message.getFieldWithDefault(msg, 3, ""), + round: jspb.Message.getFieldWithDefault(msg, 4, 0), + cpRound: jspb.Message.getFieldWithDefault(msg, 5, 0), + cpValue: jspb.Message.getFieldWithDefault(msg, 6, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.VoteInfo} + */ +proto.pactus.VoteInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.VoteInfo; + return proto.pactus.VoteInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.VoteInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.VoteInfo} + */ +proto.pactus.VoteInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.pactus.VoteType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVoter(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBlockHash(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCpRound(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCpValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.VoteInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.VoteInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.VoteInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.VoteInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getVoter(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getBlockHash(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getCpRound(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getCpValue(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } +}; + + +/** + * optional VoteType type = 1; + * @return {!proto.pactus.VoteType} + */ +proto.pactus.VoteInfo.prototype.getType = function() { + return /** @type {!proto.pactus.VoteType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pactus.VoteType} value + * @return {!proto.pactus.VoteInfo} returns this + */ +proto.pactus.VoteInfo.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.pactus.VoteInfo.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.VoteInfo} returns this + */ +proto.pactus.VoteInfo.prototype.setVoter = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string block_hash = 3; + * @return {string} + */ +proto.pactus.VoteInfo.prototype.getBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.VoteInfo} returns this + */ +proto.pactus.VoteInfo.prototype.setBlockHash = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 round = 4; + * @return {number} + */ +proto.pactus.VoteInfo.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.VoteInfo} returns this + */ +proto.pactus.VoteInfo.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int32 cp_round = 5; + * @return {number} + */ +proto.pactus.VoteInfo.prototype.getCpRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.VoteInfo} returns this + */ +proto.pactus.VoteInfo.prototype.setCpRound = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 cp_value = 6; + * @return {number} + */ +proto.pactus.VoteInfo.prototype.getCpValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.VoteInfo} returns this + */ +proto.pactus.VoteInfo.prototype.setCpValue = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.ConsensusInfo.repeatedFields_ = [5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.ConsensusInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.ConsensusInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.ConsensusInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.ConsensusInfo.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + active: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + round: jspb.Message.getFieldWithDefault(msg, 4, 0), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + proto.pactus.VoteInfo.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.ConsensusInfo} + */ +proto.pactus.ConsensusInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.ConsensusInfo; + return proto.pactus.ConsensusInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.ConsensusInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.ConsensusInfo} + */ +proto.pactus.ConsensusInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setActive(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHeight(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 5: + var value = new proto.pactus.VoteInfo; + reader.readMessage(value,proto.pactus.VoteInfo.deserializeBinaryFromReader); + msg.addVotes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.ConsensusInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.ConsensusInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.ConsensusInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.ConsensusInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getActive(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.pactus.VoteInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.pactus.ConsensusInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.ConsensusInfo} returns this + */ +proto.pactus.ConsensusInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool active = 2; + * @return {boolean} + */ +proto.pactus.ConsensusInfo.prototype.getActive = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.pactus.ConsensusInfo} returns this + */ +proto.pactus.ConsensusInfo.prototype.setActive = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional uint32 height = 3; + * @return {number} + */ +proto.pactus.ConsensusInfo.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ConsensusInfo} returns this + */ +proto.pactus.ConsensusInfo.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 round = 4; + * @return {number} + */ +proto.pactus.ConsensusInfo.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ConsensusInfo} returns this + */ +proto.pactus.ConsensusInfo.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * repeated VoteInfo votes = 5; + * @return {!Array} + */ +proto.pactus.ConsensusInfo.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pactus.VoteInfo, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.ConsensusInfo} returns this +*/ +proto.pactus.ConsensusInfo.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.pactus.VoteInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.pactus.VoteInfo} + */ +proto.pactus.ConsensusInfo.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.pactus.VoteInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.ConsensusInfo} returns this + */ +proto.pactus.ConsensusInfo.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.Proposal.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.Proposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.Proposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.Proposal.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + round: jspb.Message.getFieldWithDefault(msg, 2, 0), + blockData: jspb.Message.getFieldWithDefault(msg, 3, ""), + signatureData: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.Proposal} + */ +proto.pactus.Proposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.Proposal; + return proto.pactus.Proposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.Proposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.Proposal} + */ +proto.pactus.Proposal.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBlockData(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSignatureData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.Proposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.Proposal.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.Proposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.Proposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getBlockData(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSignatureData(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint32 height = 1; + * @return {number} + */ +proto.pactus.Proposal.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.Proposal} returns this + */ +proto.pactus.Proposal.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.pactus.Proposal.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.Proposal} returns this + */ +proto.pactus.Proposal.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string block_data = 3; + * @return {string} + */ +proto.pactus.Proposal.prototype.getBlockData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.Proposal} returns this + */ +proto.pactus.Proposal.prototype.setBlockData = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string signature_data = 4; + * @return {string} + */ +proto.pactus.Proposal.prototype.getSignatureData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.Proposal} returns this + */ +proto.pactus.Proposal.prototype.setSignatureData = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * @enum {number} + */ +proto.pactus.BlockVerbosity = { + BLOCK_DATA: 0, + BLOCK_INFO: 1, + BLOCK_TRANSACTIONS: 2 +}; + +/** + * @enum {number} + */ +proto.pactus.VoteType = { + VOTE_UNKNOWN: 0, + VOTE_PREPARE: 1, + VOTE_PRECOMMIT: 2, + VOTE_CHANGE_PROPOSER: 3 +}; + +goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/js/network_grpc_pb.js b/www/grpc/gen/js/network_grpc_pb.js new file mode 100644 index 000000000..79757a3cf --- /dev/null +++ b/www/grpc/gen/js/network_grpc_pb.js @@ -0,0 +1,80 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var network_pb = require('./network_pb.js'); + +function serialize_pactus_GetNetworkInfoRequest(arg) { + if (!(arg instanceof network_pb.GetNetworkInfoRequest)) { + throw new Error('Expected argument of type pactus.GetNetworkInfoRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetNetworkInfoRequest(buffer_arg) { + return network_pb.GetNetworkInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetNetworkInfoResponse(arg) { + if (!(arg instanceof network_pb.GetNetworkInfoResponse)) { + throw new Error('Expected argument of type pactus.GetNetworkInfoResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetNetworkInfoResponse(buffer_arg) { + return network_pb.GetNetworkInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetNodeInfoRequest(arg) { + if (!(arg instanceof network_pb.GetNodeInfoRequest)) { + throw new Error('Expected argument of type pactus.GetNodeInfoRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetNodeInfoRequest(buffer_arg) { + return network_pb.GetNodeInfoRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetNodeInfoResponse(arg) { + if (!(arg instanceof network_pb.GetNodeInfoResponse)) { + throw new Error('Expected argument of type pactus.GetNodeInfoResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetNodeInfoResponse(buffer_arg) { + return network_pb.GetNodeInfoResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// Network service provides RPCs for retrieving information about the network. +var NetworkService = exports.NetworkService = { + // GetNetworkInfo retrieves information about the overall network. +getNetworkInfo: { + path: '/pactus.Network/GetNetworkInfo', + requestStream: false, + responseStream: false, + requestType: network_pb.GetNetworkInfoRequest, + responseType: network_pb.GetNetworkInfoResponse, + requestSerialize: serialize_pactus_GetNetworkInfoRequest, + requestDeserialize: deserialize_pactus_GetNetworkInfoRequest, + responseSerialize: serialize_pactus_GetNetworkInfoResponse, + responseDeserialize: deserialize_pactus_GetNetworkInfoResponse, + }, + // GetNodeInfo retrieves information about a specific node in the network. +getNodeInfo: { + path: '/pactus.Network/GetNodeInfo', + requestStream: false, + responseStream: false, + requestType: network_pb.GetNodeInfoRequest, + responseType: network_pb.GetNodeInfoResponse, + requestSerialize: serialize_pactus_GetNodeInfoRequest, + requestDeserialize: deserialize_pactus_GetNodeInfoRequest, + responseSerialize: serialize_pactus_GetNodeInfoResponse, + responseDeserialize: deserialize_pactus_GetNodeInfoResponse, + }, +}; + +exports.NetworkClient = grpc.makeGenericClientConstructor(NetworkService); diff --git a/www/grpc/gen/js/network_pb.js b/www/grpc/gen/js/network_pb.js new file mode 100644 index 000000000..b761863d4 --- /dev/null +++ b/www/grpc/gen/js/network_pb.js @@ -0,0 +1,2193 @@ +// source: network.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +goog.exportSymbol('proto.pactus.ConnectionInfo', null, global); +goog.exportSymbol('proto.pactus.GetNetworkInfoRequest', null, global); +goog.exportSymbol('proto.pactus.GetNetworkInfoResponse', null, global); +goog.exportSymbol('proto.pactus.GetNodeInfoRequest', null, global); +goog.exportSymbol('proto.pactus.GetNodeInfoResponse', null, global); +goog.exportSymbol('proto.pactus.PeerInfo', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetNetworkInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetNetworkInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetNetworkInfoRequest.displayName = 'proto.pactus.GetNetworkInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetNetworkInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetNetworkInfoResponse.repeatedFields_, null); +}; +goog.inherits(proto.pactus.GetNetworkInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetNetworkInfoResponse.displayName = 'proto.pactus.GetNetworkInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetNodeInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetNodeInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetNodeInfoRequest.displayName = 'proto.pactus.GetNodeInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetNodeInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetNodeInfoResponse.repeatedFields_, null); +}; +goog.inherits(proto.pactus.GetNodeInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetNodeInfoResponse.displayName = 'proto.pactus.GetNodeInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.PeerInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.PeerInfo.repeatedFields_, null); +}; +goog.inherits(proto.pactus.PeerInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.PeerInfo.displayName = 'proto.pactus.PeerInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.ConnectionInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.ConnectionInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.ConnectionInfo.displayName = 'proto.pactus.ConnectionInfo'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetNetworkInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetNetworkInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetNetworkInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNetworkInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + onlyConnected: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetNetworkInfoRequest} + */ +proto.pactus.GetNetworkInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetNetworkInfoRequest; + return proto.pactus.GetNetworkInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetNetworkInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetNetworkInfoRequest} + */ +proto.pactus.GetNetworkInfoRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOnlyConnected(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetNetworkInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetNetworkInfoRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetNetworkInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNetworkInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOnlyConnected(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool only_connected = 1; + * @return {boolean} + */ +proto.pactus.GetNetworkInfoRequest.prototype.getOnlyConnected = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.pactus.GetNetworkInfoRequest} returns this + */ +proto.pactus.GetNetworkInfoRequest.prototype.setOnlyConnected = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.GetNetworkInfoResponse.repeatedFields_ = [5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetNetworkInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetNetworkInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetNetworkInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNetworkInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + networkName: jspb.Message.getFieldWithDefault(msg, 1, ""), + totalSentBytes: jspb.Message.getFieldWithDefault(msg, 2, 0), + totalReceivedBytes: jspb.Message.getFieldWithDefault(msg, 3, 0), + connectedPeersCount: jspb.Message.getFieldWithDefault(msg, 4, 0), + connectedPeersList: jspb.Message.toObjectList(msg.getConnectedPeersList(), + proto.pactus.PeerInfo.toObject, includeInstance), + sentBytesMap: (f = msg.getSentBytesMap()) ? f.toObject(includeInstance, undefined) : [], + receivedBytesMap: (f = msg.getReceivedBytesMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetNetworkInfoResponse} + */ +proto.pactus.GetNetworkInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetNetworkInfoResponse; + return proto.pactus.GetNetworkInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetNetworkInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetNetworkInfoResponse} + */ +proto.pactus.GetNetworkInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNetworkName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalSentBytes(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalReceivedBytes(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setConnectedPeersCount(value); + break; + case 5: + var value = new proto.pactus.PeerInfo; + reader.readMessage(value,proto.pactus.PeerInfo.deserializeBinaryFromReader); + msg.addConnectedPeers(value); + break; + case 6: + var value = msg.getSentBytesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readInt64, null, 0, 0); + }); + break; + case 7: + var value = msg.getReceivedBytesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readInt64, null, 0, 0); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetNetworkInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetNetworkInfoResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetNetworkInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNetworkInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNetworkName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTotalSentBytes(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTotalReceivedBytes(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getConnectedPeersCount(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getConnectedPeersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.pactus.PeerInfo.serializeBinaryToWriter + ); + } + f = message.getSentBytesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getReceivedBytesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeInt64); + } +}; + + +/** + * optional string network_name = 1; + * @return {string} + */ +proto.pactus.GetNetworkInfoResponse.prototype.getNetworkName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNetworkInfoResponse} returns this + */ +proto.pactus.GetNetworkInfoResponse.prototype.setNetworkName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 total_sent_bytes = 2; + * @return {number} + */ +proto.pactus.GetNetworkInfoResponse.prototype.getTotalSentBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetNetworkInfoResponse} returns this + */ +proto.pactus.GetNetworkInfoResponse.prototype.setTotalSentBytes = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 total_received_bytes = 3; + * @return {number} + */ +proto.pactus.GetNetworkInfoResponse.prototype.getTotalReceivedBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetNetworkInfoResponse} returns this + */ +proto.pactus.GetNetworkInfoResponse.prototype.setTotalReceivedBytes = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 connected_peers_count = 4; + * @return {number} + */ +proto.pactus.GetNetworkInfoResponse.prototype.getConnectedPeersCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetNetworkInfoResponse} returns this + */ +proto.pactus.GetNetworkInfoResponse.prototype.setConnectedPeersCount = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * repeated PeerInfo connected_peers = 5; + * @return {!Array} + */ +proto.pactus.GetNetworkInfoResponse.prototype.getConnectedPeersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pactus.PeerInfo, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.GetNetworkInfoResponse} returns this +*/ +proto.pactus.GetNetworkInfoResponse.prototype.setConnectedPeersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.pactus.PeerInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.pactus.PeerInfo} + */ +proto.pactus.GetNetworkInfoResponse.prototype.addConnectedPeers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.pactus.PeerInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetNetworkInfoResponse} returns this + */ +proto.pactus.GetNetworkInfoResponse.prototype.clearConnectedPeersList = function() { + return this.setConnectedPeersList([]); +}; + + +/** + * map sent_bytes = 6; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.pactus.GetNetworkInfoResponse.prototype.getSentBytesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 6, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.pactus.GetNetworkInfoResponse} returns this + */ +proto.pactus.GetNetworkInfoResponse.prototype.clearSentBytesMap = function() { + this.getSentBytesMap().clear(); + return this; +}; + + +/** + * map received_bytes = 7; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.pactus.GetNetworkInfoResponse.prototype.getReceivedBytesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 7, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.pactus.GetNetworkInfoResponse} returns this + */ +proto.pactus.GetNetworkInfoResponse.prototype.clearReceivedBytesMap = function() { + this.getReceivedBytesMap().clear(); + return this; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetNodeInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetNodeInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetNodeInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNodeInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetNodeInfoRequest} + */ +proto.pactus.GetNodeInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetNodeInfoRequest; + return proto.pactus.GetNodeInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetNodeInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetNodeInfoRequest} + */ +proto.pactus.GetNodeInfoRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetNodeInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetNodeInfoRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetNodeInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNodeInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.GetNodeInfoResponse.repeatedFields_ = [8,9]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetNodeInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetNodeInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetNodeInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNodeInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + moniker: jspb.Message.getFieldWithDefault(msg, 1, ""), + agent: jspb.Message.getFieldWithDefault(msg, 2, ""), + peerId: jspb.Message.getFieldWithDefault(msg, 3, ""), + startedAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + reachability: jspb.Message.getFieldWithDefault(msg, 5, ""), + services: jspb.Message.getFieldWithDefault(msg, 6, 0), + servicesNames: jspb.Message.getFieldWithDefault(msg, 7, ""), + localAddrsList: (f = jspb.Message.getRepeatedField(msg, 8)) == null ? undefined : f, + protocolsList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f, + clockOffset: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0), + connectionInfo: (f = msg.getConnectionInfo()) && proto.pactus.ConnectionInfo.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetNodeInfoResponse} + */ +proto.pactus.GetNodeInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetNodeInfoResponse; + return proto.pactus.GetNodeInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetNodeInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetNodeInfoResponse} + */ +proto.pactus.GetNodeInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMoniker(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAgent(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPeerId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartedAt(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setReachability(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setServices(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setServicesNames(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.addLocalAddrs(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.addProtocols(value); + break; + case 13: + var value = /** @type {number} */ (reader.readDouble()); + msg.setClockOffset(value); + break; + case 14: + var value = new proto.pactus.ConnectionInfo; + reader.readMessage(value,proto.pactus.ConnectionInfo.deserializeBinaryFromReader); + msg.setConnectionInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetNodeInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetNodeInfoResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetNodeInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNodeInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMoniker(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAgent(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPeerId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartedAt(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getReachability(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getServices(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getServicesNames(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getLocalAddrsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 8, + f + ); + } + f = message.getProtocolsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 9, + f + ); + } + f = message.getClockOffset(); + if (f !== 0.0) { + writer.writeDouble( + 13, + f + ); + } + f = message.getConnectionInfo(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.pactus.ConnectionInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string moniker = 1; + * @return {string} + */ +proto.pactus.GetNodeInfoResponse.prototype.getMoniker = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.setMoniker = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string agent = 2; + * @return {string} + */ +proto.pactus.GetNodeInfoResponse.prototype.getAgent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.setAgent = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string peer_id = 3; + * @return {string} + */ +proto.pactus.GetNodeInfoResponse.prototype.getPeerId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.setPeerId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 started_at = 4; + * @return {number} + */ +proto.pactus.GetNodeInfoResponse.prototype.getStartedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.setStartedAt = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string reachability = 5; + * @return {string} + */ +proto.pactus.GetNodeInfoResponse.prototype.getReachability = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.setReachability = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional int32 services = 6; + * @return {number} + */ +proto.pactus.GetNodeInfoResponse.prototype.getServices = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.setServices = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional string services_names = 7; + * @return {string} + */ +proto.pactus.GetNodeInfoResponse.prototype.getServicesNames = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.setServicesNames = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * repeated string local_addrs = 8; + * @return {!Array} + */ +proto.pactus.GetNodeInfoResponse.prototype.getLocalAddrsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.setLocalAddrsList = function(value) { + return jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.addLocalAddrs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.clearLocalAddrsList = function() { + return this.setLocalAddrsList([]); +}; + + +/** + * repeated string protocols = 9; + * @return {!Array} + */ +proto.pactus.GetNodeInfoResponse.prototype.getProtocolsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.setProtocolsList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.addProtocols = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.clearProtocolsList = function() { + return this.setProtocolsList([]); +}; + + +/** + * optional double clock_offset = 13; + * @return {number} + */ +proto.pactus.GetNodeInfoResponse.prototype.getClockOffset = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.setClockOffset = function(value) { + return jspb.Message.setProto3FloatField(this, 13, value); +}; + + +/** + * optional ConnectionInfo connection_info = 14; + * @return {?proto.pactus.ConnectionInfo} + */ +proto.pactus.GetNodeInfoResponse.prototype.getConnectionInfo = function() { + return /** @type{?proto.pactus.ConnectionInfo} */ ( + jspb.Message.getWrapperField(this, proto.pactus.ConnectionInfo, 14)); +}; + + +/** + * @param {?proto.pactus.ConnectionInfo|undefined} value + * @return {!proto.pactus.GetNodeInfoResponse} returns this +*/ +proto.pactus.GetNodeInfoResponse.prototype.setConnectionInfo = function(value) { + return jspb.Message.setWrapperField(this, 14, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetNodeInfoResponse} returns this + */ +proto.pactus.GetNodeInfoResponse.prototype.clearConnectionInfo = function() { + return this.setConnectionInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetNodeInfoResponse.prototype.hasConnectionInfo = function() { + return jspb.Message.getField(this, 14) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.PeerInfo.repeatedFields_ = [5,6,18]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.PeerInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.PeerInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.PeerInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PeerInfo.toObject = function(includeInstance, msg) { + var f, obj = { + status: jspb.Message.getFieldWithDefault(msg, 1, 0), + moniker: jspb.Message.getFieldWithDefault(msg, 2, ""), + agent: jspb.Message.getFieldWithDefault(msg, 3, ""), + peerId: jspb.Message.getFieldWithDefault(msg, 4, ""), + consensusKeysList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, + consensusAddressesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + services: jspb.Message.getFieldWithDefault(msg, 7, 0), + lastBlockHash: jspb.Message.getFieldWithDefault(msg, 8, ""), + height: jspb.Message.getFieldWithDefault(msg, 9, 0), + receivedBundles: jspb.Message.getFieldWithDefault(msg, 10, 0), + invalidBundles: jspb.Message.getFieldWithDefault(msg, 11, 0), + lastSent: jspb.Message.getFieldWithDefault(msg, 12, 0), + lastReceived: jspb.Message.getFieldWithDefault(msg, 13, 0), + sentBytesMap: (f = msg.getSentBytesMap()) ? f.toObject(includeInstance, undefined) : [], + receivedBytesMap: (f = msg.getReceivedBytesMap()) ? f.toObject(includeInstance, undefined) : [], + address: jspb.Message.getFieldWithDefault(msg, 16, ""), + direction: jspb.Message.getFieldWithDefault(msg, 17, ""), + protocolsList: (f = jspb.Message.getRepeatedField(msg, 18)) == null ? undefined : f, + totalSessions: jspb.Message.getFieldWithDefault(msg, 19, 0), + completedSessions: jspb.Message.getFieldWithDefault(msg, 20, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.PeerInfo} + */ +proto.pactus.PeerInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.PeerInfo; + return proto.pactus.PeerInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.PeerInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.PeerInfo} + */ +proto.pactus.PeerInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setStatus(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMoniker(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAgent(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPeerId(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addConsensusKeys(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addConsensusAddresses(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setServices(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setLastBlockHash(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHeight(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt32()); + msg.setReceivedBundles(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt32()); + msg.setInvalidBundles(value); + break; + case 12: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastSent(value); + break; + case 13: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastReceived(value); + break; + case 14: + var value = msg.getSentBytesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readInt64, null, 0, 0); + }); + break; + case 15: + var value = msg.getReceivedBytesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readInt64, null, 0, 0); + }); + break; + case 16: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 17: + var value = /** @type {string} */ (reader.readString()); + msg.setDirection(value); + break; + case 18: + var value = /** @type {string} */ (reader.readString()); + msg.addProtocols(value); + break; + case 19: + var value = /** @type {number} */ (reader.readInt32()); + msg.setTotalSessions(value); + break; + case 20: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCompletedSessions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.PeerInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.PeerInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.PeerInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PeerInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getMoniker(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAgent(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPeerId(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getConsensusKeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } + f = message.getConsensusAddressesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getServices(); + if (f !== 0) { + writer.writeUint32( + 7, + f + ); + } + f = message.getLastBlockHash(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint32( + 9, + f + ); + } + f = message.getReceivedBundles(); + if (f !== 0) { + writer.writeInt32( + 10, + f + ); + } + f = message.getInvalidBundles(); + if (f !== 0) { + writer.writeInt32( + 11, + f + ); + } + f = message.getLastSent(); + if (f !== 0) { + writer.writeInt64( + 12, + f + ); + } + f = message.getLastReceived(); + if (f !== 0) { + writer.writeInt64( + 13, + f + ); + } + f = message.getSentBytesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(14, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getReceivedBytesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(15, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeInt64); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 16, + f + ); + } + f = message.getDirection(); + if (f.length > 0) { + writer.writeString( + 17, + f + ); + } + f = message.getProtocolsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 18, + f + ); + } + f = message.getTotalSessions(); + if (f !== 0) { + writer.writeInt32( + 19, + f + ); + } + f = message.getCompletedSessions(); + if (f !== 0) { + writer.writeInt32( + 20, + f + ); + } +}; + + +/** + * optional int32 status = 1; + * @return {number} + */ +proto.pactus.PeerInfo.prototype.getStatus = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setStatus = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string moniker = 2; + * @return {string} + */ +proto.pactus.PeerInfo.prototype.getMoniker = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setMoniker = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string agent = 3; + * @return {string} + */ +proto.pactus.PeerInfo.prototype.getAgent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setAgent = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string peer_id = 4; + * @return {string} + */ +proto.pactus.PeerInfo.prototype.getPeerId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setPeerId = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated string consensus_keys = 5; + * @return {!Array} + */ +proto.pactus.PeerInfo.prototype.getConsensusKeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setConsensusKeysList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.addConsensusKeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.clearConsensusKeysList = function() { + return this.setConsensusKeysList([]); +}; + + +/** + * repeated string consensus_addresses = 6; + * @return {!Array} + */ +proto.pactus.PeerInfo.prototype.getConsensusAddressesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setConsensusAddressesList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.addConsensusAddresses = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.clearConsensusAddressesList = function() { + return this.setConsensusAddressesList([]); +}; + + +/** + * optional uint32 services = 7; + * @return {number} + */ +proto.pactus.PeerInfo.prototype.getServices = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setServices = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional string last_block_hash = 8; + * @return {string} + */ +proto.pactus.PeerInfo.prototype.getLastBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setLastBlockHash = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional uint32 height = 9; + * @return {number} + */ +proto.pactus.PeerInfo.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional int32 received_bundles = 10; + * @return {number} + */ +proto.pactus.PeerInfo.prototype.getReceivedBundles = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setReceivedBundles = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional int32 invalid_bundles = 11; + * @return {number} + */ +proto.pactus.PeerInfo.prototype.getInvalidBundles = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setInvalidBundles = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional int64 last_sent = 12; + * @return {number} + */ +proto.pactus.PeerInfo.prototype.getLastSent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setLastSent = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional int64 last_received = 13; + * @return {number} + */ +proto.pactus.PeerInfo.prototype.getLastReceived = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setLastReceived = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * map sent_bytes = 14; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.pactus.PeerInfo.prototype.getSentBytesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 14, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.clearSentBytesMap = function() { + this.getSentBytesMap().clear(); + return this; +}; + + +/** + * map received_bytes = 15; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.pactus.PeerInfo.prototype.getReceivedBytesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 15, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.clearReceivedBytesMap = function() { + this.getReceivedBytesMap().clear(); + return this; +}; + + +/** + * optional string address = 16; + * @return {string} + */ +proto.pactus.PeerInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 16, value); +}; + + +/** + * optional string direction = 17; + * @return {string} + */ +proto.pactus.PeerInfo.prototype.getDirection = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setDirection = function(value) { + return jspb.Message.setProto3StringField(this, 17, value); +}; + + +/** + * repeated string protocols = 18; + * @return {!Array} + */ +proto.pactus.PeerInfo.prototype.getProtocolsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 18)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setProtocolsList = function(value) { + return jspb.Message.setField(this, 18, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.addProtocols = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 18, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.clearProtocolsList = function() { + return this.setProtocolsList([]); +}; + + +/** + * optional int32 total_sessions = 19; + * @return {number} + */ +proto.pactus.PeerInfo.prototype.getTotalSessions = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 19, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setTotalSessions = function(value) { + return jspb.Message.setProto3IntField(this, 19, value); +}; + + +/** + * optional int32 completed_sessions = 20; + * @return {number} + */ +proto.pactus.PeerInfo.prototype.getCompletedSessions = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PeerInfo} returns this + */ +proto.pactus.PeerInfo.prototype.setCompletedSessions = function(value) { + return jspb.Message.setProto3IntField(this, 20, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.ConnectionInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.ConnectionInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.ConnectionInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.ConnectionInfo.toObject = function(includeInstance, msg) { + var f, obj = { + connections: jspb.Message.getFieldWithDefault(msg, 1, 0), + inboundConnections: jspb.Message.getFieldWithDefault(msg, 2, 0), + outboundConnections: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.ConnectionInfo} + */ +proto.pactus.ConnectionInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.ConnectionInfo; + return proto.pactus.ConnectionInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.ConnectionInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.ConnectionInfo} + */ +proto.pactus.ConnectionInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setConnections(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInboundConnections(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setOutboundConnections(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.ConnectionInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.ConnectionInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.ConnectionInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.ConnectionInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnections(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getInboundConnections(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getOutboundConnections(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional uint64 connections = 1; + * @return {number} + */ +proto.pactus.ConnectionInfo.prototype.getConnections = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ConnectionInfo} returns this + */ +proto.pactus.ConnectionInfo.prototype.setConnections = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 inbound_connections = 2; + * @return {number} + */ +proto.pactus.ConnectionInfo.prototype.getInboundConnections = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ConnectionInfo} returns this + */ +proto.pactus.ConnectionInfo.prototype.setInboundConnections = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 outbound_connections = 3; + * @return {number} + */ +proto.pactus.ConnectionInfo.prototype.getOutboundConnections = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.ConnectionInfo} returns this + */ +proto.pactus.ConnectionInfo.prototype.setOutboundConnections = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/js/transaction_grpc_pb.js b/www/grpc/gen/js/transaction_grpc_pb.js new file mode 100644 index 000000000..11a49b9b0 --- /dev/null +++ b/www/grpc/gen/js/transaction_grpc_pb.js @@ -0,0 +1,151 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var transaction_pb = require('./transaction_pb.js'); + +function serialize_pactus_BroadcastTransactionRequest(arg) { + if (!(arg instanceof transaction_pb.BroadcastTransactionRequest)) { + throw new Error('Expected argument of type pactus.BroadcastTransactionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_BroadcastTransactionRequest(buffer_arg) { + return transaction_pb.BroadcastTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_BroadcastTransactionResponse(arg) { + if (!(arg instanceof transaction_pb.BroadcastTransactionResponse)) { + throw new Error('Expected argument of type pactus.BroadcastTransactionResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_BroadcastTransactionResponse(buffer_arg) { + return transaction_pb.BroadcastTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_CalculateFeeRequest(arg) { + if (!(arg instanceof transaction_pb.CalculateFeeRequest)) { + throw new Error('Expected argument of type pactus.CalculateFeeRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_CalculateFeeRequest(buffer_arg) { + return transaction_pb.CalculateFeeRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_CalculateFeeResponse(arg) { + if (!(arg instanceof transaction_pb.CalculateFeeResponse)) { + throw new Error('Expected argument of type pactus.CalculateFeeResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_CalculateFeeResponse(buffer_arg) { + return transaction_pb.CalculateFeeResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetRawTransactionRequest(arg) { + if (!(arg instanceof transaction_pb.GetRawTransactionRequest)) { + throw new Error('Expected argument of type pactus.GetRawTransactionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetRawTransactionRequest(buffer_arg) { + return transaction_pb.GetRawTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetRawTransactionResponse(arg) { + if (!(arg instanceof transaction_pb.GetRawTransactionResponse)) { + throw new Error('Expected argument of type pactus.GetRawTransactionResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetRawTransactionResponse(buffer_arg) { + return transaction_pb.GetRawTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetTransactionRequest(arg) { + if (!(arg instanceof transaction_pb.GetTransactionRequest)) { + throw new Error('Expected argument of type pactus.GetTransactionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetTransactionRequest(buffer_arg) { + return transaction_pb.GetTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetTransactionResponse(arg) { + if (!(arg instanceof transaction_pb.GetTransactionResponse)) { + throw new Error('Expected argument of type pactus.GetTransactionResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetTransactionResponse(buffer_arg) { + return transaction_pb.GetTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// Transaction service defines various RPC methods for interacting with +// transactions. +var TransactionService = exports.TransactionService = { + // GetTransaction retrieves transaction details based on the provided request +// parameters. +getTransaction: { + path: '/pactus.Transaction/GetTransaction', + requestStream: false, + responseStream: false, + requestType: transaction_pb.GetTransactionRequest, + responseType: transaction_pb.GetTransactionResponse, + requestSerialize: serialize_pactus_GetTransactionRequest, + requestDeserialize: deserialize_pactus_GetTransactionRequest, + responseSerialize: serialize_pactus_GetTransactionResponse, + responseDeserialize: deserialize_pactus_GetTransactionResponse, + }, + // CalculateFee calculates the transaction fee based on the specified amount +// and payload type. +calculateFee: { + path: '/pactus.Transaction/CalculateFee', + requestStream: false, + responseStream: false, + requestType: transaction_pb.CalculateFeeRequest, + responseType: transaction_pb.CalculateFeeResponse, + requestSerialize: serialize_pactus_CalculateFeeRequest, + requestDeserialize: deserialize_pactus_CalculateFeeRequest, + responseSerialize: serialize_pactus_CalculateFeeResponse, + responseDeserialize: deserialize_pactus_CalculateFeeResponse, + }, + // BroadcastTransaction broadcasts a signed transaction to the network. +broadcastTransaction: { + path: '/pactus.Transaction/BroadcastTransaction', + requestStream: false, + responseStream: false, + requestType: transaction_pb.BroadcastTransactionRequest, + responseType: transaction_pb.BroadcastTransactionResponse, + requestSerialize: serialize_pactus_BroadcastTransactionRequest, + requestDeserialize: deserialize_pactus_BroadcastTransactionRequest, + responseSerialize: serialize_pactus_BroadcastTransactionResponse, + responseDeserialize: deserialize_pactus_BroadcastTransactionResponse, + }, + // GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. +getRawTransaction: { + path: '/pactus.Transaction/GetRawTransaction', + requestStream: false, + responseStream: false, + requestType: transaction_pb.GetRawTransactionRequest, + responseType: transaction_pb.GetRawTransactionResponse, + requestSerialize: serialize_pactus_GetRawTransactionRequest, + requestDeserialize: deserialize_pactus_GetRawTransactionRequest, + responseSerialize: serialize_pactus_GetRawTransactionResponse, + responseDeserialize: deserialize_pactus_GetRawTransactionResponse, + }, +}; + +exports.TransactionClient = grpc.makeGenericClientConstructor(TransactionService); diff --git a/www/grpc/gen/js/transaction_pb.js b/www/grpc/gen/js/transaction_pb.js new file mode 100644 index 000000000..e3d5bf8d8 --- /dev/null +++ b/www/grpc/gen/js/transaction_pb.js @@ -0,0 +1,4311 @@ +// source: transaction.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +goog.exportSymbol('proto.pactus.BroadcastTransactionRequest', null, global); +goog.exportSymbol('proto.pactus.BroadcastTransactionResponse', null, global); +goog.exportSymbol('proto.pactus.CalculateFeeRequest', null, global); +goog.exportSymbol('proto.pactus.CalculateFeeResponse', null, global); +goog.exportSymbol('proto.pactus.GetRawBondTransactionRequest', null, global); +goog.exportSymbol('proto.pactus.GetRawTransactionRequest', null, global); +goog.exportSymbol('proto.pactus.GetRawTransactionRequest.TransactionCase', null, global); +goog.exportSymbol('proto.pactus.GetRawTransactionResponse', null, global); +goog.exportSymbol('proto.pactus.GetRawTransferTransactionRequest', null, global); +goog.exportSymbol('proto.pactus.GetRawUnbondTransactionRequest', null, global); +goog.exportSymbol('proto.pactus.GetRawWithdrawTransactionRequest', null, global); +goog.exportSymbol('proto.pactus.GetTransactionRequest', null, global); +goog.exportSymbol('proto.pactus.GetTransactionResponse', null, global); +goog.exportSymbol('proto.pactus.PayloadBond', null, global); +goog.exportSymbol('proto.pactus.PayloadSortition', null, global); +goog.exportSymbol('proto.pactus.PayloadTransfer', null, global); +goog.exportSymbol('proto.pactus.PayloadType', null, global); +goog.exportSymbol('proto.pactus.PayloadUnbond', null, global); +goog.exportSymbol('proto.pactus.PayloadWithdraw', null, global); +goog.exportSymbol('proto.pactus.TransactionInfo', null, global); +goog.exportSymbol('proto.pactus.TransactionInfo.PayloadCase', null, global); +goog.exportSymbol('proto.pactus.TransactionVerbosity', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetTransactionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetTransactionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetTransactionRequest.displayName = 'proto.pactus.GetTransactionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetTransactionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetTransactionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetTransactionResponse.displayName = 'proto.pactus.GetTransactionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.CalculateFeeRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.CalculateFeeRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.CalculateFeeRequest.displayName = 'proto.pactus.CalculateFeeRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.CalculateFeeResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.CalculateFeeResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.CalculateFeeResponse.displayName = 'proto.pactus.CalculateFeeResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.BroadcastTransactionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.BroadcastTransactionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.BroadcastTransactionRequest.displayName = 'proto.pactus.BroadcastTransactionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.BroadcastTransactionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.BroadcastTransactionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.BroadcastTransactionResponse.displayName = 'proto.pactus.BroadcastTransactionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetRawTransactionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.pactus.GetRawTransactionRequest.oneofGroups_); +}; +goog.inherits(proto.pactus.GetRawTransactionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetRawTransactionRequest.displayName = 'proto.pactus.GetRawTransactionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetRawTransferTransactionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetRawTransferTransactionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetRawTransferTransactionRequest.displayName = 'proto.pactus.GetRawTransferTransactionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetRawBondTransactionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetRawBondTransactionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetRawBondTransactionRequest.displayName = 'proto.pactus.GetRawBondTransactionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetRawUnbondTransactionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetRawUnbondTransactionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetRawUnbondTransactionRequest.displayName = 'proto.pactus.GetRawUnbondTransactionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetRawWithdrawTransactionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetRawWithdrawTransactionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetRawWithdrawTransactionRequest.displayName = 'proto.pactus.GetRawWithdrawTransactionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetRawTransactionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetRawTransactionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetRawTransactionResponse.displayName = 'proto.pactus.GetRawTransactionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.PayloadTransfer = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.PayloadTransfer, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.PayloadTransfer.displayName = 'proto.pactus.PayloadTransfer'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.PayloadBond = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.PayloadBond, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.PayloadBond.displayName = 'proto.pactus.PayloadBond'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.PayloadSortition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.PayloadSortition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.PayloadSortition.displayName = 'proto.pactus.PayloadSortition'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.PayloadUnbond = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.PayloadUnbond, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.PayloadUnbond.displayName = 'proto.pactus.PayloadUnbond'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.PayloadWithdraw = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.PayloadWithdraw, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.PayloadWithdraw.displayName = 'proto.pactus.PayloadWithdraw'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.TransactionInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.pactus.TransactionInfo.oneofGroups_); +}; +goog.inherits(proto.pactus.TransactionInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.TransactionInfo.displayName = 'proto.pactus.TransactionInfo'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetTransactionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetTransactionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetTransactionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTransactionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + verbosity: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetTransactionRequest} + */ +proto.pactus.GetTransactionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetTransactionRequest; + return proto.pactus.GetTransactionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetTransactionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetTransactionRequest} + */ +proto.pactus.GetTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {!proto.pactus.TransactionVerbosity} */ (reader.readEnum()); + msg.setVerbosity(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetTransactionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetTransactionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetTransactionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTransactionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVerbosity(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.pactus.GetTransactionRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetTransactionRequest} returns this + */ +proto.pactus.GetTransactionRequest.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional TransactionVerbosity verbosity = 2; + * @return {!proto.pactus.TransactionVerbosity} + */ +proto.pactus.GetTransactionRequest.prototype.getVerbosity = function() { + return /** @type {!proto.pactus.TransactionVerbosity} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.pactus.TransactionVerbosity} value + * @return {!proto.pactus.GetTransactionRequest} returns this + */ +proto.pactus.GetTransactionRequest.prototype.setVerbosity = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetTransactionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetTransactionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetTransactionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTransactionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + blockTime: jspb.Message.getFieldWithDefault(msg, 2, 0), + transaction: (f = msg.getTransaction()) && proto.pactus.TransactionInfo.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetTransactionResponse} + */ +proto.pactus.GetTransactionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetTransactionResponse; + return proto.pactus.GetTransactionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetTransactionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetTransactionResponse} + */ +proto.pactus.GetTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBlockHeight(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBlockTime(value); + break; + case 3: + var value = new proto.pactus.TransactionInfo; + reader.readMessage(value,proto.pactus.TransactionInfo.deserializeBinaryFromReader); + msg.setTransaction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetTransactionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetTransactionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetTransactionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTransactionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockHeight(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getBlockTime(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getTransaction(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.pactus.TransactionInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 block_height = 1; + * @return {number} + */ +proto.pactus.GetTransactionResponse.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetTransactionResponse} returns this + */ +proto.pactus.GetTransactionResponse.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 block_time = 2; + * @return {number} + */ +proto.pactus.GetTransactionResponse.prototype.getBlockTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetTransactionResponse} returns this + */ +proto.pactus.GetTransactionResponse.prototype.setBlockTime = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional TransactionInfo transaction = 3; + * @return {?proto.pactus.TransactionInfo} + */ +proto.pactus.GetTransactionResponse.prototype.getTransaction = function() { + return /** @type{?proto.pactus.TransactionInfo} */ ( + jspb.Message.getWrapperField(this, proto.pactus.TransactionInfo, 3)); +}; + + +/** + * @param {?proto.pactus.TransactionInfo|undefined} value + * @return {!proto.pactus.GetTransactionResponse} returns this +*/ +proto.pactus.GetTransactionResponse.prototype.setTransaction = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetTransactionResponse} returns this + */ +proto.pactus.GetTransactionResponse.prototype.clearTransaction = function() { + return this.setTransaction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetTransactionResponse.prototype.hasTransaction = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.CalculateFeeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.CalculateFeeRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.CalculateFeeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.CalculateFeeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + amount: jspb.Message.getFieldWithDefault(msg, 1, 0), + payloadType: jspb.Message.getFieldWithDefault(msg, 2, 0), + fixedAmount: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.CalculateFeeRequest} + */ +proto.pactus.CalculateFeeRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.CalculateFeeRequest; + return proto.pactus.CalculateFeeRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.CalculateFeeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.CalculateFeeRequest} + */ +proto.pactus.CalculateFeeRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + case 2: + var value = /** @type {!proto.pactus.PayloadType} */ (reader.readEnum()); + msg.setPayloadType(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFixedAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.CalculateFeeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.CalculateFeeRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.CalculateFeeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.CalculateFeeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getPayloadType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getFixedAmount(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional int64 amount = 1; + * @return {number} + */ +proto.pactus.CalculateFeeRequest.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.CalculateFeeRequest} returns this + */ +proto.pactus.CalculateFeeRequest.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional PayloadType payload_type = 2; + * @return {!proto.pactus.PayloadType} + */ +proto.pactus.CalculateFeeRequest.prototype.getPayloadType = function() { + return /** @type {!proto.pactus.PayloadType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.pactus.PayloadType} value + * @return {!proto.pactus.CalculateFeeRequest} returns this + */ +proto.pactus.CalculateFeeRequest.prototype.setPayloadType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional bool fixed_amount = 3; + * @return {boolean} + */ +proto.pactus.CalculateFeeRequest.prototype.getFixedAmount = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.pactus.CalculateFeeRequest} returns this + */ +proto.pactus.CalculateFeeRequest.prototype.setFixedAmount = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.CalculateFeeResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.CalculateFeeResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.CalculateFeeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.CalculateFeeResponse.toObject = function(includeInstance, msg) { + var f, obj = { + amount: jspb.Message.getFieldWithDefault(msg, 1, 0), + fee: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.CalculateFeeResponse} + */ +proto.pactus.CalculateFeeResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.CalculateFeeResponse; + return proto.pactus.CalculateFeeResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.CalculateFeeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.CalculateFeeResponse} + */ +proto.pactus.CalculateFeeResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.CalculateFeeResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.CalculateFeeResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.CalculateFeeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.CalculateFeeResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 amount = 1; + * @return {number} + */ +proto.pactus.CalculateFeeResponse.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.CalculateFeeResponse} returns this + */ +proto.pactus.CalculateFeeResponse.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 fee = 2; + * @return {number} + */ +proto.pactus.CalculateFeeResponse.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.CalculateFeeResponse} returns this + */ +proto.pactus.CalculateFeeResponse.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.BroadcastTransactionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.BroadcastTransactionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.BroadcastTransactionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.BroadcastTransactionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + signedRawTransaction: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.BroadcastTransactionRequest} + */ +proto.pactus.BroadcastTransactionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.BroadcastTransactionRequest; + return proto.pactus.BroadcastTransactionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.BroadcastTransactionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.BroadcastTransactionRequest} + */ +proto.pactus.BroadcastTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSignedRawTransaction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.BroadcastTransactionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.BroadcastTransactionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.BroadcastTransactionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.BroadcastTransactionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedRawTransaction(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string signed_raw_transaction = 1; + * @return {string} + */ +proto.pactus.BroadcastTransactionRequest.prototype.getSignedRawTransaction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.BroadcastTransactionRequest} returns this + */ +proto.pactus.BroadcastTransactionRequest.prototype.setSignedRawTransaction = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.BroadcastTransactionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.BroadcastTransactionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.BroadcastTransactionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.BroadcastTransactionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.BroadcastTransactionResponse} + */ +proto.pactus.BroadcastTransactionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.BroadcastTransactionResponse; + return proto.pactus.BroadcastTransactionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.BroadcastTransactionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.BroadcastTransactionResponse} + */ +proto.pactus.BroadcastTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.BroadcastTransactionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.BroadcastTransactionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.BroadcastTransactionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.BroadcastTransactionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.pactus.BroadcastTransactionResponse.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.BroadcastTransactionResponse} returns this + */ +proto.pactus.BroadcastTransactionResponse.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.pactus.GetRawTransactionRequest.oneofGroups_ = [[3,4,5,6]]; + +/** + * @enum {number} + */ +proto.pactus.GetRawTransactionRequest.TransactionCase = { + TRANSACTION_NOT_SET: 0, + TRANSFER: 3, + BOND: 4, + UNBOND: 5, + WITHDRAW: 6 +}; + +/** + * @return {proto.pactus.GetRawTransactionRequest.TransactionCase} + */ +proto.pactus.GetRawTransactionRequest.prototype.getTransactionCase = function() { + return /** @type {proto.pactus.GetRawTransactionRequest.TransactionCase} */(jspb.Message.computeOneofCase(this, proto.pactus.GetRawTransactionRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetRawTransactionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetRawTransactionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetRawTransactionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawTransactionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), + memo: jspb.Message.getFieldWithDefault(msg, 2, ""), + transfer: (f = msg.getTransfer()) && proto.pactus.GetRawTransferTransactionRequest.toObject(includeInstance, f), + bond: (f = msg.getBond()) && proto.pactus.GetRawBondTransactionRequest.toObject(includeInstance, f), + unbond: (f = msg.getUnbond()) && proto.pactus.GetRawUnbondTransactionRequest.toObject(includeInstance, f), + withdraw: (f = msg.getWithdraw()) && proto.pactus.GetRawWithdrawTransactionRequest.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetRawTransactionRequest} + */ +proto.pactus.GetRawTransactionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetRawTransactionRequest; + return proto.pactus.GetRawTransactionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetRawTransactionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetRawTransactionRequest} + */ +proto.pactus.GetRawTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLockTime(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 3: + var value = new proto.pactus.GetRawTransferTransactionRequest; + reader.readMessage(value,proto.pactus.GetRawTransferTransactionRequest.deserializeBinaryFromReader); + msg.setTransfer(value); + break; + case 4: + var value = new proto.pactus.GetRawBondTransactionRequest; + reader.readMessage(value,proto.pactus.GetRawBondTransactionRequest.deserializeBinaryFromReader); + msg.setBond(value); + break; + case 5: + var value = new proto.pactus.GetRawUnbondTransactionRequest; + reader.readMessage(value,proto.pactus.GetRawUnbondTransactionRequest.deserializeBinaryFromReader); + msg.setUnbond(value); + break; + case 6: + var value = new proto.pactus.GetRawWithdrawTransactionRequest; + reader.readMessage(value,proto.pactus.GetRawWithdrawTransactionRequest.deserializeBinaryFromReader); + msg.setWithdraw(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetRawTransactionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetRawTransactionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLockTime(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTransfer(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.pactus.GetRawTransferTransactionRequest.serializeBinaryToWriter + ); + } + f = message.getBond(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.pactus.GetRawBondTransactionRequest.serializeBinaryToWriter + ); + } + f = message.getUnbond(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.pactus.GetRawUnbondTransactionRequest.serializeBinaryToWriter + ); + } + f = message.getWithdraw(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.pactus.GetRawWithdrawTransactionRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 lock_time = 1; + * @return {number} + */ +proto.pactus.GetRawTransactionRequest.prototype.getLockTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this + */ +proto.pactus.GetRawTransactionRequest.prototype.setLockTime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string memo = 2; + * @return {string} + */ +proto.pactus.GetRawTransactionRequest.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this + */ +proto.pactus.GetRawTransactionRequest.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional GetRawTransferTransactionRequest transfer = 3; + * @return {?proto.pactus.GetRawTransferTransactionRequest} + */ +proto.pactus.GetRawTransactionRequest.prototype.getTransfer = function() { + return /** @type{?proto.pactus.GetRawTransferTransactionRequest} */ ( + jspb.Message.getWrapperField(this, proto.pactus.GetRawTransferTransactionRequest, 3)); +}; + + +/** + * @param {?proto.pactus.GetRawTransferTransactionRequest|undefined} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this +*/ +proto.pactus.GetRawTransactionRequest.prototype.setTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetRawTransactionRequest} returns this + */ +proto.pactus.GetRawTransactionRequest.prototype.clearTransfer = function() { + return this.setTransfer(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetRawTransactionRequest.prototype.hasTransfer = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetRawBondTransactionRequest bond = 4; + * @return {?proto.pactus.GetRawBondTransactionRequest} + */ +proto.pactus.GetRawTransactionRequest.prototype.getBond = function() { + return /** @type{?proto.pactus.GetRawBondTransactionRequest} */ ( + jspb.Message.getWrapperField(this, proto.pactus.GetRawBondTransactionRequest, 4)); +}; + + +/** + * @param {?proto.pactus.GetRawBondTransactionRequest|undefined} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this +*/ +proto.pactus.GetRawTransactionRequest.prototype.setBond = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetRawTransactionRequest} returns this + */ +proto.pactus.GetRawTransactionRequest.prototype.clearBond = function() { + return this.setBond(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetRawTransactionRequest.prototype.hasBond = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional GetRawUnbondTransactionRequest unbond = 5; + * @return {?proto.pactus.GetRawUnbondTransactionRequest} + */ +proto.pactus.GetRawTransactionRequest.prototype.getUnbond = function() { + return /** @type{?proto.pactus.GetRawUnbondTransactionRequest} */ ( + jspb.Message.getWrapperField(this, proto.pactus.GetRawUnbondTransactionRequest, 5)); +}; + + +/** + * @param {?proto.pactus.GetRawUnbondTransactionRequest|undefined} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this +*/ +proto.pactus.GetRawTransactionRequest.prototype.setUnbond = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetRawTransactionRequest} returns this + */ +proto.pactus.GetRawTransactionRequest.prototype.clearUnbond = function() { + return this.setUnbond(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetRawTransactionRequest.prototype.hasUnbond = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional GetRawWithdrawTransactionRequest withdraw = 6; + * @return {?proto.pactus.GetRawWithdrawTransactionRequest} + */ +proto.pactus.GetRawTransactionRequest.prototype.getWithdraw = function() { + return /** @type{?proto.pactus.GetRawWithdrawTransactionRequest} */ ( + jspb.Message.getWrapperField(this, proto.pactus.GetRawWithdrawTransactionRequest, 6)); +}; + + +/** + * @param {?proto.pactus.GetRawWithdrawTransactionRequest|undefined} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this +*/ +proto.pactus.GetRawTransactionRequest.prototype.setWithdraw = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetRawTransactionRequest} returns this + */ +proto.pactus.GetRawTransactionRequest.prototype.clearWithdraw = function() { + return this.setWithdraw(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetRawTransactionRequest.prototype.hasWithdraw = function() { + return jspb.Message.getField(this, 6) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetRawTransferTransactionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetRawTransferTransactionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawTransferTransactionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + fee: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetRawTransferTransactionRequest} + */ +proto.pactus.GetRawTransferTransactionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetRawTransferTransactionRequest; + return proto.pactus.GetRawTransferTransactionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetRawTransferTransactionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetRawTransferTransactionRequest} + */ +proto.pactus.GetRawTransferTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiver(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetRawTransferTransactionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetRawTransferTransactionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawTransferTransactionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReceiver(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string receiver = 2; + * @return {string} + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.getReceiver = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.setReceiver = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 amount = 3; + * @return {number} + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 fee = 4; + * @return {number} + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetRawBondTransactionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetRawBondTransactionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetRawBondTransactionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawBondTransactionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), + stake: jspb.Message.getFieldWithDefault(msg, 3, 0), + publicKey: jspb.Message.getFieldWithDefault(msg, 4, ""), + fee: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetRawBondTransactionRequest} + */ +proto.pactus.GetRawBondTransactionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetRawBondTransactionRequest; + return proto.pactus.GetRawBondTransactionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetRawBondTransactionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetRawBondTransactionRequest} + */ +proto.pactus.GetRawBondTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiver(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStake(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetRawBondTransactionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetRawBondTransactionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetRawBondTransactionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawBondTransactionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReceiver(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getStake(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.pactus.GetRawBondTransactionRequest.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawBondTransactionRequest} returns this + */ +proto.pactus.GetRawBondTransactionRequest.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string receiver = 2; + * @return {string} + */ +proto.pactus.GetRawBondTransactionRequest.prototype.getReceiver = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawBondTransactionRequest} returns this + */ +proto.pactus.GetRawBondTransactionRequest.prototype.setReceiver = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 stake = 3; + * @return {number} + */ +proto.pactus.GetRawBondTransactionRequest.prototype.getStake = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawBondTransactionRequest} returns this + */ +proto.pactus.GetRawBondTransactionRequest.prototype.setStake = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string public_key = 4; + * @return {string} + */ +proto.pactus.GetRawBondTransactionRequest.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawBondTransactionRequest} returns this + */ +proto.pactus.GetRawBondTransactionRequest.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 fee = 5; + * @return {number} + */ +proto.pactus.GetRawBondTransactionRequest.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawBondTransactionRequest} returns this + */ +proto.pactus.GetRawBondTransactionRequest.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetRawUnbondTransactionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetRawUnbondTransactionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetRawUnbondTransactionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawUnbondTransactionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetRawUnbondTransactionRequest} + */ +proto.pactus.GetRawUnbondTransactionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetRawUnbondTransactionRequest; + return proto.pactus.GetRawUnbondTransactionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetRawUnbondTransactionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetRawUnbondTransactionRequest} + */ +proto.pactus.GetRawUnbondTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetRawUnbondTransactionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetRawUnbondTransactionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetRawUnbondTransactionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawUnbondTransactionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.pactus.GetRawUnbondTransactionRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this + */ +proto.pactus.GetRawUnbondTransactionRequest.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetRawWithdrawTransactionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetRawWithdrawTransactionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawWithdrawTransactionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + accountAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + fee: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetRawWithdrawTransactionRequest} + */ +proto.pactus.GetRawWithdrawTransactionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetRawWithdrawTransactionRequest; + return proto.pactus.GetRawWithdrawTransactionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetRawWithdrawTransactionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetRawWithdrawTransactionRequest} + */ +proto.pactus.GetRawWithdrawTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAccountAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetRawWithdrawTransactionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetRawWithdrawTransactionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawWithdrawTransactionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAccountAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string account_address = 2; + * @return {string} + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.getAccountAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.setAccountAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 amount = 3; + * @return {number} + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 fee = 4; + * @return {number} + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetRawTransactionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetRawTransactionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetRawTransactionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawTransactionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rawTransaction: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetRawTransactionResponse} + */ +proto.pactus.GetRawTransactionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetRawTransactionResponse; + return proto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetRawTransactionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetRawTransactionResponse} + */ +proto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setRawTransaction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetRawTransactionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetRawTransactionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRawTransaction(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string raw_transaction = 1; + * @return {string} + */ +proto.pactus.GetRawTransactionResponse.prototype.getRawTransaction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawTransactionResponse} returns this + */ +proto.pactus.GetRawTransactionResponse.prototype.setRawTransaction = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.PayloadTransfer.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.PayloadTransfer.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.PayloadTransfer} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PayloadTransfer.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.PayloadTransfer} + */ +proto.pactus.PayloadTransfer.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.PayloadTransfer; + return proto.pactus.PayloadTransfer.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.PayloadTransfer} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.PayloadTransfer} + */ +proto.pactus.PayloadTransfer.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiver(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.PayloadTransfer.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.PayloadTransfer.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.PayloadTransfer} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PayloadTransfer.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReceiver(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.pactus.PayloadTransfer.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PayloadTransfer} returns this + */ +proto.pactus.PayloadTransfer.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string receiver = 2; + * @return {string} + */ +proto.pactus.PayloadTransfer.prototype.getReceiver = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PayloadTransfer} returns this + */ +proto.pactus.PayloadTransfer.prototype.setReceiver = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 amount = 3; + * @return {number} + */ +proto.pactus.PayloadTransfer.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PayloadTransfer} returns this + */ +proto.pactus.PayloadTransfer.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.PayloadBond.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.PayloadBond.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.PayloadBond} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PayloadBond.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), + stake: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.PayloadBond} + */ +proto.pactus.PayloadBond.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.PayloadBond; + return proto.pactus.PayloadBond.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.PayloadBond} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.PayloadBond} + */ +proto.pactus.PayloadBond.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiver(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStake(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.PayloadBond.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.PayloadBond.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.PayloadBond} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PayloadBond.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReceiver(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getStake(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.pactus.PayloadBond.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PayloadBond} returns this + */ +proto.pactus.PayloadBond.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string receiver = 2; + * @return {string} + */ +proto.pactus.PayloadBond.prototype.getReceiver = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PayloadBond} returns this + */ +proto.pactus.PayloadBond.prototype.setReceiver = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 stake = 3; + * @return {number} + */ +proto.pactus.PayloadBond.prototype.getStake = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PayloadBond} returns this + */ +proto.pactus.PayloadBond.prototype.setStake = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.PayloadSortition.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.PayloadSortition.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.PayloadSortition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PayloadSortition.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + proof: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.PayloadSortition} + */ +proto.pactus.PayloadSortition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.PayloadSortition; + return proto.pactus.PayloadSortition.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.PayloadSortition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.PayloadSortition} + */ +proto.pactus.PayloadSortition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.PayloadSortition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.PayloadSortition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.PayloadSortition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PayloadSortition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProof(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.pactus.PayloadSortition.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PayloadSortition} returns this + */ +proto.pactus.PayloadSortition.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string proof = 2; + * @return {string} + */ +proto.pactus.PayloadSortition.prototype.getProof = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PayloadSortition} returns this + */ +proto.pactus.PayloadSortition.prototype.setProof = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.PayloadUnbond.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.PayloadUnbond.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.PayloadUnbond} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PayloadUnbond.toObject = function(includeInstance, msg) { + var f, obj = { + validator: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.PayloadUnbond} + */ +proto.pactus.PayloadUnbond.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.PayloadUnbond; + return proto.pactus.PayloadUnbond.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.PayloadUnbond} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.PayloadUnbond} + */ +proto.pactus.PayloadUnbond.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.PayloadUnbond.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.PayloadUnbond.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.PayloadUnbond} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PayloadUnbond.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator = 1; + * @return {string} + */ +proto.pactus.PayloadUnbond.prototype.getValidator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PayloadUnbond} returns this + */ +proto.pactus.PayloadUnbond.prototype.setValidator = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.PayloadWithdraw.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.PayloadWithdraw.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.PayloadWithdraw} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PayloadWithdraw.toObject = function(includeInstance, msg) { + var f, obj = { + from: jspb.Message.getFieldWithDefault(msg, 1, ""), + to: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.PayloadWithdraw} + */ +proto.pactus.PayloadWithdraw.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.PayloadWithdraw; + return proto.pactus.PayloadWithdraw.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.PayloadWithdraw} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.PayloadWithdraw} + */ +proto.pactus.PayloadWithdraw.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFrom(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTo(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.PayloadWithdraw.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.PayloadWithdraw.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.PayloadWithdraw} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.PayloadWithdraw.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFrom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional string from = 1; + * @return {string} + */ +proto.pactus.PayloadWithdraw.prototype.getFrom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PayloadWithdraw} returns this + */ +proto.pactus.PayloadWithdraw.prototype.setFrom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string to = 2; + * @return {string} + */ +proto.pactus.PayloadWithdraw.prototype.getTo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PayloadWithdraw} returns this + */ +proto.pactus.PayloadWithdraw.prototype.setTo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 amount = 3; + * @return {number} + */ +proto.pactus.PayloadWithdraw.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PayloadWithdraw} returns this + */ +proto.pactus.PayloadWithdraw.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.pactus.TransactionInfo.oneofGroups_ = [[30,31,32,33,34]]; + +/** + * @enum {number} + */ +proto.pactus.TransactionInfo.PayloadCase = { + PAYLOAD_NOT_SET: 0, + TRANSFER: 30, + BOND: 31, + SORTITION: 32, + UNBOND: 33, + WITHDRAW: 34 +}; + +/** + * @return {proto.pactus.TransactionInfo.PayloadCase} + */ +proto.pactus.TransactionInfo.prototype.getPayloadCase = function() { + return /** @type {proto.pactus.TransactionInfo.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.pactus.TransactionInfo.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.TransactionInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.TransactionInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.TransactionInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.TransactionInfo.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: jspb.Message.getFieldWithDefault(msg, 3, 0), + lockTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + value: jspb.Message.getFieldWithDefault(msg, 5, 0), + fee: jspb.Message.getFieldWithDefault(msg, 6, 0), + payloadType: jspb.Message.getFieldWithDefault(msg, 7, 0), + transfer: (f = msg.getTransfer()) && proto.pactus.PayloadTransfer.toObject(includeInstance, f), + bond: (f = msg.getBond()) && proto.pactus.PayloadBond.toObject(includeInstance, f), + sortition: (f = msg.getSortition()) && proto.pactus.PayloadSortition.toObject(includeInstance, f), + unbond: (f = msg.getUnbond()) && proto.pactus.PayloadUnbond.toObject(includeInstance, f), + withdraw: (f = msg.getWithdraw()) && proto.pactus.PayloadWithdraw.toObject(includeInstance, f), + memo: jspb.Message.getFieldWithDefault(msg, 8, ""), + publicKey: jspb.Message.getFieldWithDefault(msg, 9, ""), + signature: jspb.Message.getFieldWithDefault(msg, 10, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.TransactionInfo} + */ +proto.pactus.TransactionInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.TransactionInfo; + return proto.pactus.TransactionInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.TransactionInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.TransactionInfo} + */ +proto.pactus.TransactionInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVersion(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLockTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValue(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + case 7: + var value = /** @type {!proto.pactus.PayloadType} */ (reader.readEnum()); + msg.setPayloadType(value); + break; + case 30: + var value = new proto.pactus.PayloadTransfer; + reader.readMessage(value,proto.pactus.PayloadTransfer.deserializeBinaryFromReader); + msg.setTransfer(value); + break; + case 31: + var value = new proto.pactus.PayloadBond; + reader.readMessage(value,proto.pactus.PayloadBond.deserializeBinaryFromReader); + msg.setBond(value); + break; + case 32: + var value = new proto.pactus.PayloadSortition; + reader.readMessage(value,proto.pactus.PayloadSortition.deserializeBinaryFromReader); + msg.setSortition(value); + break; + case 33: + var value = new proto.pactus.PayloadUnbond; + reader.readMessage(value,proto.pactus.PayloadUnbond.deserializeBinaryFromReader); + msg.setUnbond(value); + break; + case 34: + var value = new proto.pactus.PayloadWithdraw; + reader.readMessage(value,proto.pactus.PayloadWithdraw.deserializeBinaryFromReader); + msg.setWithdraw(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.TransactionInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.TransactionInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.TransactionInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.TransactionInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getLockTime(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getValue(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getPayloadType(); + if (f !== 0.0) { + writer.writeEnum( + 7, + f + ); + } + f = message.getTransfer(); + if (f != null) { + writer.writeMessage( + 30, + f, + proto.pactus.PayloadTransfer.serializeBinaryToWriter + ); + } + f = message.getBond(); + if (f != null) { + writer.writeMessage( + 31, + f, + proto.pactus.PayloadBond.serializeBinaryToWriter + ); + } + f = message.getSortition(); + if (f != null) { + writer.writeMessage( + 32, + f, + proto.pactus.PayloadSortition.serializeBinaryToWriter + ); + } + f = message.getUnbond(); + if (f != null) { + writer.writeMessage( + 33, + f, + proto.pactus.PayloadUnbond.serializeBinaryToWriter + ); + } + f = message.getWithdraw(); + if (f != null) { + writer.writeMessage( + 34, + f, + proto.pactus.PayloadWithdraw.serializeBinaryToWriter + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.pactus.TransactionInfo.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string data = 2; + * @return {string} + */ +proto.pactus.TransactionInfo.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int32 version = 3; + * @return {number} + */ +proto.pactus.TransactionInfo.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 lock_time = 4; + * @return {number} + */ +proto.pactus.TransactionInfo.prototype.getLockTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.setLockTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 value = 5; + * @return {number} + */ +proto.pactus.TransactionInfo.prototype.getValue = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.setValue = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 fee = 6; + * @return {number} + */ +proto.pactus.TransactionInfo.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional PayloadType payload_type = 7; + * @return {!proto.pactus.PayloadType} + */ +proto.pactus.TransactionInfo.prototype.getPayloadType = function() { + return /** @type {!proto.pactus.PayloadType} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {!proto.pactus.PayloadType} value + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.setPayloadType = function(value) { + return jspb.Message.setProto3EnumField(this, 7, value); +}; + + +/** + * optional PayloadTransfer transfer = 30; + * @return {?proto.pactus.PayloadTransfer} + */ +proto.pactus.TransactionInfo.prototype.getTransfer = function() { + return /** @type{?proto.pactus.PayloadTransfer} */ ( + jspb.Message.getWrapperField(this, proto.pactus.PayloadTransfer, 30)); +}; + + +/** + * @param {?proto.pactus.PayloadTransfer|undefined} value + * @return {!proto.pactus.TransactionInfo} returns this +*/ +proto.pactus.TransactionInfo.prototype.setTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 30, proto.pactus.TransactionInfo.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.clearTransfer = function() { + return this.setTransfer(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.TransactionInfo.prototype.hasTransfer = function() { + return jspb.Message.getField(this, 30) != null; +}; + + +/** + * optional PayloadBond bond = 31; + * @return {?proto.pactus.PayloadBond} + */ +proto.pactus.TransactionInfo.prototype.getBond = function() { + return /** @type{?proto.pactus.PayloadBond} */ ( + jspb.Message.getWrapperField(this, proto.pactus.PayloadBond, 31)); +}; + + +/** + * @param {?proto.pactus.PayloadBond|undefined} value + * @return {!proto.pactus.TransactionInfo} returns this +*/ +proto.pactus.TransactionInfo.prototype.setBond = function(value) { + return jspb.Message.setOneofWrapperField(this, 31, proto.pactus.TransactionInfo.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.clearBond = function() { + return this.setBond(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.TransactionInfo.prototype.hasBond = function() { + return jspb.Message.getField(this, 31) != null; +}; + + +/** + * optional PayloadSortition sortition = 32; + * @return {?proto.pactus.PayloadSortition} + */ +proto.pactus.TransactionInfo.prototype.getSortition = function() { + return /** @type{?proto.pactus.PayloadSortition} */ ( + jspb.Message.getWrapperField(this, proto.pactus.PayloadSortition, 32)); +}; + + +/** + * @param {?proto.pactus.PayloadSortition|undefined} value + * @return {!proto.pactus.TransactionInfo} returns this +*/ +proto.pactus.TransactionInfo.prototype.setSortition = function(value) { + return jspb.Message.setOneofWrapperField(this, 32, proto.pactus.TransactionInfo.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.clearSortition = function() { + return this.setSortition(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.TransactionInfo.prototype.hasSortition = function() { + return jspb.Message.getField(this, 32) != null; +}; + + +/** + * optional PayloadUnbond unbond = 33; + * @return {?proto.pactus.PayloadUnbond} + */ +proto.pactus.TransactionInfo.prototype.getUnbond = function() { + return /** @type{?proto.pactus.PayloadUnbond} */ ( + jspb.Message.getWrapperField(this, proto.pactus.PayloadUnbond, 33)); +}; + + +/** + * @param {?proto.pactus.PayloadUnbond|undefined} value + * @return {!proto.pactus.TransactionInfo} returns this +*/ +proto.pactus.TransactionInfo.prototype.setUnbond = function(value) { + return jspb.Message.setOneofWrapperField(this, 33, proto.pactus.TransactionInfo.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.clearUnbond = function() { + return this.setUnbond(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.TransactionInfo.prototype.hasUnbond = function() { + return jspb.Message.getField(this, 33) != null; +}; + + +/** + * optional PayloadWithdraw withdraw = 34; + * @return {?proto.pactus.PayloadWithdraw} + */ +proto.pactus.TransactionInfo.prototype.getWithdraw = function() { + return /** @type{?proto.pactus.PayloadWithdraw} */ ( + jspb.Message.getWrapperField(this, proto.pactus.PayloadWithdraw, 34)); +}; + + +/** + * @param {?proto.pactus.PayloadWithdraw|undefined} value + * @return {!proto.pactus.TransactionInfo} returns this +*/ +proto.pactus.TransactionInfo.prototype.setWithdraw = function(value) { + return jspb.Message.setOneofWrapperField(this, 34, proto.pactus.TransactionInfo.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.clearWithdraw = function() { + return this.setWithdraw(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.TransactionInfo.prototype.hasWithdraw = function() { + return jspb.Message.getField(this, 34) != null; +}; + + +/** + * optional string memo = 8; + * @return {string} + */ +proto.pactus.TransactionInfo.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional string public_key = 9; + * @return {string} + */ +proto.pactus.TransactionInfo.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional string signature = 10; + * @return {string} + */ +proto.pactus.TransactionInfo.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.TransactionInfo} returns this + */ +proto.pactus.TransactionInfo.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * @enum {number} + */ +proto.pactus.PayloadType = { + UNKNOWN: 0, + TRANSFER_PAYLOAD: 1, + BOND_PAYLOAD: 2, + SORTITION_PAYLOAD: 3, + UNBOND_PAYLOAD: 4, + WITHDRAW_PAYLOAD: 5 +}; + +/** + * @enum {number} + */ +proto.pactus.TransactionVerbosity = { + TRANSACTION_DATA: 0, + TRANSACTION_INFO: 1 +}; + +goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/js/utils_grpc_pb.js b/www/grpc/gen/js/utils_grpc_pb.js new file mode 100644 index 000000000..e0b645230 --- /dev/null +++ b/www/grpc/gen/js/utils_grpc_pb.js @@ -0,0 +1,81 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var utils_pb = require('./utils_pb.js'); + +function serialize_pactus_SignMessageWithPrivateKeyRequest(arg) { + if (!(arg instanceof utils_pb.SignMessageWithPrivateKeyRequest)) { + throw new Error('Expected argument of type pactus.SignMessageWithPrivateKeyRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_SignMessageWithPrivateKeyRequest(buffer_arg) { + return utils_pb.SignMessageWithPrivateKeyRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_SignMessageWithPrivateKeyResponse(arg) { + if (!(arg instanceof utils_pb.SignMessageWithPrivateKeyResponse)) { + throw new Error('Expected argument of type pactus.SignMessageWithPrivateKeyResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_SignMessageWithPrivateKeyResponse(buffer_arg) { + return utils_pb.SignMessageWithPrivateKeyResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_VerifyMessageRequest(arg) { + if (!(arg instanceof utils_pb.VerifyMessageRequest)) { + throw new Error('Expected argument of type pactus.VerifyMessageRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_VerifyMessageRequest(buffer_arg) { + return utils_pb.VerifyMessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_VerifyMessageResponse(arg) { + if (!(arg instanceof utils_pb.VerifyMessageResponse)) { + throw new Error('Expected argument of type pactus.VerifyMessageResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_VerifyMessageResponse(buffer_arg) { + return utils_pb.VerifyMessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// Utils service defines RPC methods for utility functions such as message +// signing and verification. +var UtilsService = exports.UtilsService = { + // SignMessageWithPrivateKey sign message with provided private key. +signMessageWithPrivateKey: { + path: '/pactus.Utils/SignMessageWithPrivateKey', + requestStream: false, + responseStream: false, + requestType: utils_pb.SignMessageWithPrivateKeyRequest, + responseType: utils_pb.SignMessageWithPrivateKeyResponse, + requestSerialize: serialize_pactus_SignMessageWithPrivateKeyRequest, + requestDeserialize: deserialize_pactus_SignMessageWithPrivateKeyRequest, + responseSerialize: serialize_pactus_SignMessageWithPrivateKeyResponse, + responseDeserialize: deserialize_pactus_SignMessageWithPrivateKeyResponse, + }, + // VerifyMessage verify signature with public key and message +verifyMessage: { + path: '/pactus.Utils/VerifyMessage', + requestStream: false, + responseStream: false, + requestType: utils_pb.VerifyMessageRequest, + responseType: utils_pb.VerifyMessageResponse, + requestSerialize: serialize_pactus_VerifyMessageRequest, + requestDeserialize: deserialize_pactus_VerifyMessageRequest, + responseSerialize: serialize_pactus_VerifyMessageResponse, + responseDeserialize: deserialize_pactus_VerifyMessageResponse, + }, +}; + +exports.UtilsClient = grpc.makeGenericClientConstructor(UtilsService); diff --git a/www/grpc/gen/js/utils_pb.js b/www/grpc/gen/js/utils_pb.js new file mode 100644 index 000000000..6384f3614 --- /dev/null +++ b/www/grpc/gen/js/utils_pb.js @@ -0,0 +1,722 @@ +// source: utils.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +goog.exportSymbol('proto.pactus.SignMessageWithPrivateKeyRequest', null, global); +goog.exportSymbol('proto.pactus.SignMessageWithPrivateKeyResponse', null, global); +goog.exportSymbol('proto.pactus.VerifyMessageRequest', null, global); +goog.exportSymbol('proto.pactus.VerifyMessageResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.SignMessageWithPrivateKeyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.SignMessageWithPrivateKeyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.SignMessageWithPrivateKeyRequest.displayName = 'proto.pactus.SignMessageWithPrivateKeyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.SignMessageWithPrivateKeyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.SignMessageWithPrivateKeyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.SignMessageWithPrivateKeyResponse.displayName = 'proto.pactus.SignMessageWithPrivateKeyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.VerifyMessageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.VerifyMessageRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.VerifyMessageRequest.displayName = 'proto.pactus.VerifyMessageRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.VerifyMessageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.VerifyMessageResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.VerifyMessageResponse.displayName = 'proto.pactus.VerifyMessageResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.SignMessageWithPrivateKeyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.SignMessageWithPrivateKeyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignMessageWithPrivateKeyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + privateKey: jspb.Message.getFieldWithDefault(msg, 1, ""), + message: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.SignMessageWithPrivateKeyRequest} + */ +proto.pactus.SignMessageWithPrivateKeyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.SignMessageWithPrivateKeyRequest; + return proto.pactus.SignMessageWithPrivateKeyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.SignMessageWithPrivateKeyRequest} + */ +proto.pactus.SignMessageWithPrivateKeyRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPrivateKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.SignMessageWithPrivateKeyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.SignMessageWithPrivateKeyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.SignMessageWithPrivateKeyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignMessageWithPrivateKeyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPrivateKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string private_key = 1; + * @return {string} + */ +proto.pactus.SignMessageWithPrivateKeyRequest.prototype.getPrivateKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignMessageWithPrivateKeyRequest} returns this + */ +proto.pactus.SignMessageWithPrivateKeyRequest.prototype.setPrivateKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.pactus.SignMessageWithPrivateKeyRequest.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignMessageWithPrivateKeyRequest} returns this + */ +proto.pactus.SignMessageWithPrivateKeyRequest.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.SignMessageWithPrivateKeyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.SignMessageWithPrivateKeyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.SignMessageWithPrivateKeyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignMessageWithPrivateKeyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + signature: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.SignMessageWithPrivateKeyResponse} + */ +proto.pactus.SignMessageWithPrivateKeyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.SignMessageWithPrivateKeyResponse; + return proto.pactus.SignMessageWithPrivateKeyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.SignMessageWithPrivateKeyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.SignMessageWithPrivateKeyResponse} + */ +proto.pactus.SignMessageWithPrivateKeyResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.SignMessageWithPrivateKeyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.SignMessageWithPrivateKeyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.SignMessageWithPrivateKeyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignMessageWithPrivateKeyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string signature = 1; + * @return {string} + */ +proto.pactus.SignMessageWithPrivateKeyResponse.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignMessageWithPrivateKeyResponse} returns this + */ +proto.pactus.SignMessageWithPrivateKeyResponse.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.VerifyMessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.VerifyMessageRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.VerifyMessageRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.VerifyMessageRequest.toObject = function(includeInstance, msg) { + var f, obj = { + message: jspb.Message.getFieldWithDefault(msg, 1, ""), + signature: jspb.Message.getFieldWithDefault(msg, 2, ""), + publicKey: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.VerifyMessageRequest} + */ +proto.pactus.VerifyMessageRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.VerifyMessageRequest; + return proto.pactus.VerifyMessageRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.VerifyMessageRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.VerifyMessageRequest} + */ +proto.pactus.VerifyMessageRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.VerifyMessageRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.VerifyMessageRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.VerifyMessageRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.VerifyMessageRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.pactus.VerifyMessageRequest.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.VerifyMessageRequest} returns this + */ +proto.pactus.VerifyMessageRequest.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string signature = 2; + * @return {string} + */ +proto.pactus.VerifyMessageRequest.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.VerifyMessageRequest} returns this + */ +proto.pactus.VerifyMessageRequest.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string public_key = 3; + * @return {string} + */ +proto.pactus.VerifyMessageRequest.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.VerifyMessageRequest} returns this + */ +proto.pactus.VerifyMessageRequest.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.VerifyMessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.VerifyMessageResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.VerifyMessageResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.VerifyMessageResponse.toObject = function(includeInstance, msg) { + var f, obj = { + isValid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.VerifyMessageResponse} + */ +proto.pactus.VerifyMessageResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.VerifyMessageResponse; + return proto.pactus.VerifyMessageResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.VerifyMessageResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.VerifyMessageResponse} + */ +proto.pactus.VerifyMessageResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsValid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.VerifyMessageResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.VerifyMessageResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.VerifyMessageResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.VerifyMessageResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIsValid(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool is_valid = 1; + * @return {boolean} + */ +proto.pactus.VerifyMessageResponse.prototype.getIsValid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.pactus.VerifyMessageResponse} returns this + */ +proto.pactus.VerifyMessageResponse.prototype.setIsValid = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/js/wallet_grpc_pb.js b/www/grpc/gen/js/wallet_grpc_pb.js new file mode 100644 index 000000000..fc67ea02e --- /dev/null +++ b/www/grpc/gen/js/wallet_grpc_pb.js @@ -0,0 +1,354 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var wallet_pb = require('./wallet_pb.js'); +var transaction_pb = require('./transaction_pb.js'); + +function serialize_pactus_CreateWalletRequest(arg) { + if (!(arg instanceof wallet_pb.CreateWalletRequest)) { + throw new Error('Expected argument of type pactus.CreateWalletRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_CreateWalletRequest(buffer_arg) { + return wallet_pb.CreateWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_CreateWalletResponse(arg) { + if (!(arg instanceof wallet_pb.CreateWalletResponse)) { + throw new Error('Expected argument of type pactus.CreateWalletResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_CreateWalletResponse(buffer_arg) { + return wallet_pb.CreateWalletResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetAddressHistoryRequest(arg) { + if (!(arg instanceof wallet_pb.GetAddressHistoryRequest)) { + throw new Error('Expected argument of type pactus.GetAddressHistoryRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetAddressHistoryRequest(buffer_arg) { + return wallet_pb.GetAddressHistoryRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetAddressHistoryResponse(arg) { + if (!(arg instanceof wallet_pb.GetAddressHistoryResponse)) { + throw new Error('Expected argument of type pactus.GetAddressHistoryResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetAddressHistoryResponse(buffer_arg) { + return wallet_pb.GetAddressHistoryResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetNewAddressRequest(arg) { + if (!(arg instanceof wallet_pb.GetNewAddressRequest)) { + throw new Error('Expected argument of type pactus.GetNewAddressRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetNewAddressRequest(buffer_arg) { + return wallet_pb.GetNewAddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetNewAddressResponse(arg) { + if (!(arg instanceof wallet_pb.GetNewAddressResponse)) { + throw new Error('Expected argument of type pactus.GetNewAddressResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetNewAddressResponse(buffer_arg) { + return wallet_pb.GetNewAddressResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetTotalBalanceRequest(arg) { + if (!(arg instanceof wallet_pb.GetTotalBalanceRequest)) { + throw new Error('Expected argument of type pactus.GetTotalBalanceRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetTotalBalanceRequest(buffer_arg) { + return wallet_pb.GetTotalBalanceRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetTotalBalanceResponse(arg) { + if (!(arg instanceof wallet_pb.GetTotalBalanceResponse)) { + throw new Error('Expected argument of type pactus.GetTotalBalanceResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetTotalBalanceResponse(buffer_arg) { + return wallet_pb.GetTotalBalanceResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetValidatorAddressRequest(arg) { + if (!(arg instanceof wallet_pb.GetValidatorAddressRequest)) { + throw new Error('Expected argument of type pactus.GetValidatorAddressRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetValidatorAddressRequest(buffer_arg) { + return wallet_pb.GetValidatorAddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetValidatorAddressResponse(arg) { + if (!(arg instanceof wallet_pb.GetValidatorAddressResponse)) { + throw new Error('Expected argument of type pactus.GetValidatorAddressResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetValidatorAddressResponse(buffer_arg) { + return wallet_pb.GetValidatorAddressResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_LoadWalletRequest(arg) { + if (!(arg instanceof wallet_pb.LoadWalletRequest)) { + throw new Error('Expected argument of type pactus.LoadWalletRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_LoadWalletRequest(buffer_arg) { + return wallet_pb.LoadWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_LoadWalletResponse(arg) { + if (!(arg instanceof wallet_pb.LoadWalletResponse)) { + throw new Error('Expected argument of type pactus.LoadWalletResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_LoadWalletResponse(buffer_arg) { + return wallet_pb.LoadWalletResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_RestoreWalletRequest(arg) { + if (!(arg instanceof wallet_pb.RestoreWalletRequest)) { + throw new Error('Expected argument of type pactus.RestoreWalletRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_RestoreWalletRequest(buffer_arg) { + return wallet_pb.RestoreWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_RestoreWalletResponse(arg) { + if (!(arg instanceof wallet_pb.RestoreWalletResponse)) { + throw new Error('Expected argument of type pactus.RestoreWalletResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_RestoreWalletResponse(buffer_arg) { + return wallet_pb.RestoreWalletResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_SignMessageRequest(arg) { + if (!(arg instanceof wallet_pb.SignMessageRequest)) { + throw new Error('Expected argument of type pactus.SignMessageRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_SignMessageRequest(buffer_arg) { + return wallet_pb.SignMessageRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_SignMessageResponse(arg) { + if (!(arg instanceof wallet_pb.SignMessageResponse)) { + throw new Error('Expected argument of type pactus.SignMessageResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_SignMessageResponse(buffer_arg) { + return wallet_pb.SignMessageResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_SignRawTransactionRequest(arg) { + if (!(arg instanceof wallet_pb.SignRawTransactionRequest)) { + throw new Error('Expected argument of type pactus.SignRawTransactionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_SignRawTransactionRequest(buffer_arg) { + return wallet_pb.SignRawTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_SignRawTransactionResponse(arg) { + if (!(arg instanceof wallet_pb.SignRawTransactionResponse)) { + throw new Error('Expected argument of type pactus.SignRawTransactionResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_SignRawTransactionResponse(buffer_arg) { + return wallet_pb.SignRawTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_UnloadWalletRequest(arg) { + if (!(arg instanceof wallet_pb.UnloadWalletRequest)) { + throw new Error('Expected argument of type pactus.UnloadWalletRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_UnloadWalletRequest(buffer_arg) { + return wallet_pb.UnloadWalletRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_UnloadWalletResponse(arg) { + if (!(arg instanceof wallet_pb.UnloadWalletResponse)) { + throw new Error('Expected argument of type pactus.UnloadWalletResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_UnloadWalletResponse(buffer_arg) { + return wallet_pb.UnloadWalletResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// Define the Wallet service with various RPC methods for wallet management. +var WalletService = exports.WalletService = { + // CreateWallet creates a new wallet with the specified parameters. +createWallet: { + path: '/pactus.Wallet/CreateWallet', + requestStream: false, + responseStream: false, + requestType: wallet_pb.CreateWalletRequest, + responseType: wallet_pb.CreateWalletResponse, + requestSerialize: serialize_pactus_CreateWalletRequest, + requestDeserialize: deserialize_pactus_CreateWalletRequest, + responseSerialize: serialize_pactus_CreateWalletResponse, + responseDeserialize: deserialize_pactus_CreateWalletResponse, + }, + // RestoreWallet restores an existing wallet with the given mnemonic. +restoreWallet: { + path: '/pactus.Wallet/RestoreWallet', + requestStream: false, + responseStream: false, + requestType: wallet_pb.RestoreWalletRequest, + responseType: wallet_pb.RestoreWalletResponse, + requestSerialize: serialize_pactus_RestoreWalletRequest, + requestDeserialize: deserialize_pactus_RestoreWalletRequest, + responseSerialize: serialize_pactus_RestoreWalletResponse, + responseDeserialize: deserialize_pactus_RestoreWalletResponse, + }, + // LoadWallet loads an existing wallet with the given name. +loadWallet: { + path: '/pactus.Wallet/LoadWallet', + requestStream: false, + responseStream: false, + requestType: wallet_pb.LoadWalletRequest, + responseType: wallet_pb.LoadWalletResponse, + requestSerialize: serialize_pactus_LoadWalletRequest, + requestDeserialize: deserialize_pactus_LoadWalletRequest, + responseSerialize: serialize_pactus_LoadWalletResponse, + responseDeserialize: deserialize_pactus_LoadWalletResponse, + }, + // UnloadWallet unloads a currently loaded wallet with the specified name. +unloadWallet: { + path: '/pactus.Wallet/UnloadWallet', + requestStream: false, + responseStream: false, + requestType: wallet_pb.UnloadWalletRequest, + responseType: wallet_pb.UnloadWalletResponse, + requestSerialize: serialize_pactus_UnloadWalletRequest, + requestDeserialize: deserialize_pactus_UnloadWalletRequest, + responseSerialize: serialize_pactus_UnloadWalletResponse, + responseDeserialize: deserialize_pactus_UnloadWalletResponse, + }, + // GetTotalBalance returns the total available balance of the wallet. +getTotalBalance: { + path: '/pactus.Wallet/GetTotalBalance', + requestStream: false, + responseStream: false, + requestType: wallet_pb.GetTotalBalanceRequest, + responseType: wallet_pb.GetTotalBalanceResponse, + requestSerialize: serialize_pactus_GetTotalBalanceRequest, + requestDeserialize: deserialize_pactus_GetTotalBalanceRequest, + responseSerialize: serialize_pactus_GetTotalBalanceResponse, + responseDeserialize: deserialize_pactus_GetTotalBalanceResponse, + }, + // SignRawTransaction signs a raw transaction for a specified wallet. +signRawTransaction: { + path: '/pactus.Wallet/SignRawTransaction', + requestStream: false, + responseStream: false, + requestType: wallet_pb.SignRawTransactionRequest, + responseType: wallet_pb.SignRawTransactionResponse, + requestSerialize: serialize_pactus_SignRawTransactionRequest, + requestDeserialize: deserialize_pactus_SignRawTransactionRequest, + responseSerialize: serialize_pactus_SignRawTransactionResponse, + responseDeserialize: deserialize_pactus_SignRawTransactionResponse, + }, + // GetValidatorAddress retrieves the validator address associated with a +// public key. +getValidatorAddress: { + path: '/pactus.Wallet/GetValidatorAddress', + requestStream: false, + responseStream: false, + requestType: wallet_pb.GetValidatorAddressRequest, + responseType: wallet_pb.GetValidatorAddressResponse, + requestSerialize: serialize_pactus_GetValidatorAddressRequest, + requestDeserialize: deserialize_pactus_GetValidatorAddressRequest, + responseSerialize: serialize_pactus_GetValidatorAddressResponse, + responseDeserialize: deserialize_pactus_GetValidatorAddressResponse, + }, + // GetNewAddress generates a new address for the specified wallet. +getNewAddress: { + path: '/pactus.Wallet/GetNewAddress', + requestStream: false, + responseStream: false, + requestType: wallet_pb.GetNewAddressRequest, + responseType: wallet_pb.GetNewAddressResponse, + requestSerialize: serialize_pactus_GetNewAddressRequest, + requestDeserialize: deserialize_pactus_GetNewAddressRequest, + responseSerialize: serialize_pactus_GetNewAddressResponse, + responseDeserialize: deserialize_pactus_GetNewAddressResponse, + }, + // GetAddressHistory retrieves the transaction history of an address. +getAddressHistory: { + path: '/pactus.Wallet/GetAddressHistory', + requestStream: false, + responseStream: false, + requestType: wallet_pb.GetAddressHistoryRequest, + responseType: wallet_pb.GetAddressHistoryResponse, + requestSerialize: serialize_pactus_GetAddressHistoryRequest, + requestDeserialize: deserialize_pactus_GetAddressHistoryRequest, + responseSerialize: serialize_pactus_GetAddressHistoryResponse, + responseDeserialize: deserialize_pactus_GetAddressHistoryResponse, + }, + // SignMessage signs an arbitrary message. +signMessage: { + path: '/pactus.Wallet/SignMessage', + requestStream: false, + responseStream: false, + requestType: wallet_pb.SignMessageRequest, + responseType: wallet_pb.SignMessageResponse, + requestSerialize: serialize_pactus_SignMessageRequest, + requestDeserialize: deserialize_pactus_SignMessageRequest, + responseSerialize: serialize_pactus_SignMessageResponse, + responseDeserialize: deserialize_pactus_SignMessageResponse, + }, +}; + +exports.WalletClient = grpc.makeGenericClientConstructor(WalletService); diff --git a/www/grpc/gen/js/wallet_pb.js b/www/grpc/gen/js/wallet_pb.js new file mode 100644 index 000000000..af1e74bb4 --- /dev/null +++ b/www/grpc/gen/js/wallet_pb.js @@ -0,0 +1,4092 @@ +// source: wallet.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); + +var transaction_pb = require('./transaction_pb.js'); +goog.object.extend(proto, transaction_pb); +goog.exportSymbol('proto.pactus.AddressInfo', null, global); +goog.exportSymbol('proto.pactus.AddressType', null, global); +goog.exportSymbol('proto.pactus.CreateWalletRequest', null, global); +goog.exportSymbol('proto.pactus.CreateWalletResponse', null, global); +goog.exportSymbol('proto.pactus.GetAddressHistoryRequest', null, global); +goog.exportSymbol('proto.pactus.GetAddressHistoryResponse', null, global); +goog.exportSymbol('proto.pactus.GetNewAddressRequest', null, global); +goog.exportSymbol('proto.pactus.GetNewAddressResponse', null, global); +goog.exportSymbol('proto.pactus.GetTotalBalanceRequest', null, global); +goog.exportSymbol('proto.pactus.GetTotalBalanceResponse', null, global); +goog.exportSymbol('proto.pactus.GetValidatorAddressRequest', null, global); +goog.exportSymbol('proto.pactus.GetValidatorAddressResponse', null, global); +goog.exportSymbol('proto.pactus.HistoryInfo', null, global); +goog.exportSymbol('proto.pactus.LoadWalletRequest', null, global); +goog.exportSymbol('proto.pactus.LoadWalletResponse', null, global); +goog.exportSymbol('proto.pactus.RestoreWalletRequest', null, global); +goog.exportSymbol('proto.pactus.RestoreWalletResponse', null, global); +goog.exportSymbol('proto.pactus.SignMessageRequest', null, global); +goog.exportSymbol('proto.pactus.SignMessageResponse', null, global); +goog.exportSymbol('proto.pactus.SignRawTransactionRequest', null, global); +goog.exportSymbol('proto.pactus.SignRawTransactionResponse', null, global); +goog.exportSymbol('proto.pactus.UnloadWalletRequest', null, global); +goog.exportSymbol('proto.pactus.UnloadWalletResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.AddressInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.AddressInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.AddressInfo.displayName = 'proto.pactus.AddressInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.HistoryInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.HistoryInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.HistoryInfo.displayName = 'proto.pactus.HistoryInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetAddressHistoryRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetAddressHistoryRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetAddressHistoryRequest.displayName = 'proto.pactus.GetAddressHistoryRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetAddressHistoryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pactus.GetAddressHistoryResponse.repeatedFields_, null); +}; +goog.inherits(proto.pactus.GetAddressHistoryResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetAddressHistoryResponse.displayName = 'proto.pactus.GetAddressHistoryResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetNewAddressRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetNewAddressRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetNewAddressRequest.displayName = 'proto.pactus.GetNewAddressRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetNewAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetNewAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetNewAddressResponse.displayName = 'proto.pactus.GetNewAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.RestoreWalletRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.RestoreWalletRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.RestoreWalletRequest.displayName = 'proto.pactus.RestoreWalletRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.RestoreWalletResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.RestoreWalletResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.RestoreWalletResponse.displayName = 'proto.pactus.RestoreWalletResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.CreateWalletRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.CreateWalletRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.CreateWalletRequest.displayName = 'proto.pactus.CreateWalletRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.CreateWalletResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.CreateWalletResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.CreateWalletResponse.displayName = 'proto.pactus.CreateWalletResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.LoadWalletRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.LoadWalletRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.LoadWalletRequest.displayName = 'proto.pactus.LoadWalletRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.LoadWalletResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.LoadWalletResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.LoadWalletResponse.displayName = 'proto.pactus.LoadWalletResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.UnloadWalletRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.UnloadWalletRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.UnloadWalletRequest.displayName = 'proto.pactus.UnloadWalletRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.UnloadWalletResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.UnloadWalletResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.UnloadWalletResponse.displayName = 'proto.pactus.UnloadWalletResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetValidatorAddressRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetValidatorAddressRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetValidatorAddressRequest.displayName = 'proto.pactus.GetValidatorAddressRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetValidatorAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetValidatorAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetValidatorAddressResponse.displayName = 'proto.pactus.GetValidatorAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.SignRawTransactionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.SignRawTransactionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.SignRawTransactionRequest.displayName = 'proto.pactus.SignRawTransactionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.SignRawTransactionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.SignRawTransactionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.SignRawTransactionResponse.displayName = 'proto.pactus.SignRawTransactionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetTotalBalanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetTotalBalanceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetTotalBalanceRequest.displayName = 'proto.pactus.GetTotalBalanceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.GetTotalBalanceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.GetTotalBalanceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.GetTotalBalanceResponse.displayName = 'proto.pactus.GetTotalBalanceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.SignMessageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.SignMessageRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.SignMessageRequest.displayName = 'proto.pactus.SignMessageRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.SignMessageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.SignMessageResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.SignMessageResponse.displayName = 'proto.pactus.SignMessageResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.AddressInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.AddressInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.AddressInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.AddressInfo.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + publicKey: jspb.Message.getFieldWithDefault(msg, 2, ""), + label: jspb.Message.getFieldWithDefault(msg, 3, ""), + path: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.AddressInfo} + */ +proto.pactus.AddressInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.AddressInfo; + return proto.pactus.AddressInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.AddressInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.AddressInfo} + */ +proto.pactus.AddressInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.AddressInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.AddressInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.AddressInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.AddressInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.pactus.AddressInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.AddressInfo} returns this + */ +proto.pactus.AddressInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string public_key = 2; + * @return {string} + */ +proto.pactus.AddressInfo.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.AddressInfo} returns this + */ +proto.pactus.AddressInfo.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string label = 3; + * @return {string} + */ +proto.pactus.AddressInfo.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.AddressInfo} returns this + */ +proto.pactus.AddressInfo.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string path = 4; + * @return {string} + */ +proto.pactus.AddressInfo.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.AddressInfo} returns this + */ +proto.pactus.AddressInfo.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.HistoryInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.HistoryInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.HistoryInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.HistoryInfo.toObject = function(includeInstance, msg) { + var f, obj = { + transactionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + time: jspb.Message.getFieldWithDefault(msg, 2, 0), + payloadType: jspb.Message.getFieldWithDefault(msg, 3, ""), + description: jspb.Message.getFieldWithDefault(msg, 4, ""), + amount: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.HistoryInfo} + */ +proto.pactus.HistoryInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.HistoryInfo; + return proto.pactus.HistoryInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.HistoryInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.HistoryInfo} + */ +proto.pactus.HistoryInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTransactionId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setTime(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPayloadType(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.HistoryInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.HistoryInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.HistoryInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.HistoryInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTime(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getPayloadType(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional string transaction_id = 1; + * @return {string} + */ +proto.pactus.HistoryInfo.prototype.getTransactionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.HistoryInfo} returns this + */ +proto.pactus.HistoryInfo.prototype.setTransactionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint32 time = 2; + * @return {number} + */ +proto.pactus.HistoryInfo.prototype.getTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.HistoryInfo} returns this + */ +proto.pactus.HistoryInfo.prototype.setTime = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string payload_type = 3; + * @return {string} + */ +proto.pactus.HistoryInfo.prototype.getPayloadType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.HistoryInfo} returns this + */ +proto.pactus.HistoryInfo.prototype.setPayloadType = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string description = 4; + * @return {string} + */ +proto.pactus.HistoryInfo.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.HistoryInfo} returns this + */ +proto.pactus.HistoryInfo.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 amount = 5; + * @return {number} + */ +proto.pactus.HistoryInfo.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.HistoryInfo} returns this + */ +proto.pactus.HistoryInfo.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetAddressHistoryRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetAddressHistoryRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetAddressHistoryRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetAddressHistoryRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetAddressHistoryRequest} + */ +proto.pactus.GetAddressHistoryRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetAddressHistoryRequest; + return proto.pactus.GetAddressHistoryRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetAddressHistoryRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetAddressHistoryRequest} + */ +proto.pactus.GetAddressHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetAddressHistoryRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetAddressHistoryRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetAddressHistoryRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetAddressHistoryRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.GetAddressHistoryRequest.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetAddressHistoryRequest} returns this + */ +proto.pactus.GetAddressHistoryRequest.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string address = 2; + * @return {string} + */ +proto.pactus.GetAddressHistoryRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetAddressHistoryRequest} returns this + */ +proto.pactus.GetAddressHistoryRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pactus.GetAddressHistoryResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetAddressHistoryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetAddressHistoryResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetAddressHistoryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetAddressHistoryResponse.toObject = function(includeInstance, msg) { + var f, obj = { + historyInfoList: jspb.Message.toObjectList(msg.getHistoryInfoList(), + proto.pactus.HistoryInfo.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetAddressHistoryResponse} + */ +proto.pactus.GetAddressHistoryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetAddressHistoryResponse; + return proto.pactus.GetAddressHistoryResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetAddressHistoryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetAddressHistoryResponse} + */ +proto.pactus.GetAddressHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pactus.HistoryInfo; + reader.readMessage(value,proto.pactus.HistoryInfo.deserializeBinaryFromReader); + msg.addHistoryInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetAddressHistoryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetAddressHistoryResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetAddressHistoryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetAddressHistoryResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHistoryInfoList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.pactus.HistoryInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated HistoryInfo history_info = 1; + * @return {!Array} + */ +proto.pactus.GetAddressHistoryResponse.prototype.getHistoryInfoList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pactus.HistoryInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pactus.GetAddressHistoryResponse} returns this +*/ +proto.pactus.GetAddressHistoryResponse.prototype.setHistoryInfoList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.pactus.HistoryInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.pactus.HistoryInfo} + */ +proto.pactus.GetAddressHistoryResponse.prototype.addHistoryInfo = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pactus.HistoryInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pactus.GetAddressHistoryResponse} returns this + */ +proto.pactus.GetAddressHistoryResponse.prototype.clearHistoryInfoList = function() { + return this.setHistoryInfoList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetNewAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetNewAddressRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetNewAddressRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNewAddressRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), + addressType: jspb.Message.getFieldWithDefault(msg, 2, 0), + label: jspb.Message.getFieldWithDefault(msg, 3, ""), + password: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetNewAddressRequest} + */ +proto.pactus.GetNewAddressRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetNewAddressRequest; + return proto.pactus.GetNewAddressRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetNewAddressRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetNewAddressRequest} + */ +proto.pactus.GetNewAddressRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + case 2: + var value = /** @type {!proto.pactus.AddressType} */ (reader.readEnum()); + msg.setAddressType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLabel(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetNewAddressRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetNewAddressRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetNewAddressRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNewAddressRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddressType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getLabel(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.GetNewAddressRequest.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNewAddressRequest} returns this + */ +proto.pactus.GetNewAddressRequest.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional AddressType address_type = 2; + * @return {!proto.pactus.AddressType} + */ +proto.pactus.GetNewAddressRequest.prototype.getAddressType = function() { + return /** @type {!proto.pactus.AddressType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.pactus.AddressType} value + * @return {!proto.pactus.GetNewAddressRequest} returns this + */ +proto.pactus.GetNewAddressRequest.prototype.setAddressType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional string label = 3; + * @return {string} + */ +proto.pactus.GetNewAddressRequest.prototype.getLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNewAddressRequest} returns this + */ +proto.pactus.GetNewAddressRequest.prototype.setLabel = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string password = 4; + * @return {string} + */ +proto.pactus.GetNewAddressRequest.prototype.getPassword = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNewAddressRequest} returns this + */ +proto.pactus.GetNewAddressRequest.prototype.setPassword = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetNewAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetNewAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetNewAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNewAddressResponse.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), + addressInfo: (f = msg.getAddressInfo()) && proto.pactus.AddressInfo.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetNewAddressResponse} + */ +proto.pactus.GetNewAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetNewAddressResponse; + return proto.pactus.GetNewAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetNewAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetNewAddressResponse} + */ +proto.pactus.GetNewAddressResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + case 2: + var value = new proto.pactus.AddressInfo; + reader.readMessage(value,proto.pactus.AddressInfo.deserializeBinaryFromReader); + msg.setAddressInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetNewAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetNewAddressResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetNewAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetNewAddressResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddressInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.pactus.AddressInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.GetNewAddressResponse.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetNewAddressResponse} returns this + */ +proto.pactus.GetNewAddressResponse.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional AddressInfo address_info = 2; + * @return {?proto.pactus.AddressInfo} + */ +proto.pactus.GetNewAddressResponse.prototype.getAddressInfo = function() { + return /** @type{?proto.pactus.AddressInfo} */ ( + jspb.Message.getWrapperField(this, proto.pactus.AddressInfo, 2)); +}; + + +/** + * @param {?proto.pactus.AddressInfo|undefined} value + * @return {!proto.pactus.GetNewAddressResponse} returns this +*/ +proto.pactus.GetNewAddressResponse.prototype.setAddressInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pactus.GetNewAddressResponse} returns this + */ +proto.pactus.GetNewAddressResponse.prototype.clearAddressInfo = function() { + return this.setAddressInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pactus.GetNewAddressResponse.prototype.hasAddressInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.RestoreWalletRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.RestoreWalletRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.RestoreWalletRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RestoreWalletRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), + mnemonic: jspb.Message.getFieldWithDefault(msg, 2, ""), + password: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.RestoreWalletRequest} + */ +proto.pactus.RestoreWalletRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.RestoreWalletRequest; + return proto.pactus.RestoreWalletRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.RestoreWalletRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.RestoreWalletRequest} + */ +proto.pactus.RestoreWalletRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMnemonic(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.RestoreWalletRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.RestoreWalletRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.RestoreWalletRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RestoreWalletRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMnemonic(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.RestoreWalletRequest.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RestoreWalletRequest} returns this + */ +proto.pactus.RestoreWalletRequest.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string mnemonic = 2; + * @return {string} + */ +proto.pactus.RestoreWalletRequest.prototype.getMnemonic = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RestoreWalletRequest} returns this + */ +proto.pactus.RestoreWalletRequest.prototype.setMnemonic = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string password = 3; + * @return {string} + */ +proto.pactus.RestoreWalletRequest.prototype.getPassword = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RestoreWalletRequest} returns this + */ +proto.pactus.RestoreWalletRequest.prototype.setPassword = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.RestoreWalletResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.RestoreWalletResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.RestoreWalletResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RestoreWalletResponse.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.RestoreWalletResponse} + */ +proto.pactus.RestoreWalletResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.RestoreWalletResponse; + return proto.pactus.RestoreWalletResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.RestoreWalletResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.RestoreWalletResponse} + */ +proto.pactus.RestoreWalletResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.RestoreWalletResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.RestoreWalletResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.RestoreWalletResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RestoreWalletResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.RestoreWalletResponse.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RestoreWalletResponse} returns this + */ +proto.pactus.RestoreWalletResponse.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.CreateWalletRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.CreateWalletRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.CreateWalletRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.CreateWalletRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), + password: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.CreateWalletRequest} + */ +proto.pactus.CreateWalletRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.CreateWalletRequest; + return proto.pactus.CreateWalletRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.CreateWalletRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.CreateWalletRequest} + */ +proto.pactus.CreateWalletRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.CreateWalletRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.CreateWalletRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.CreateWalletRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.CreateWalletRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.CreateWalletRequest.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.CreateWalletRequest} returns this + */ +proto.pactus.CreateWalletRequest.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string password = 4; + * @return {string} + */ +proto.pactus.CreateWalletRequest.prototype.getPassword = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.CreateWalletRequest} returns this + */ +proto.pactus.CreateWalletRequest.prototype.setPassword = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.CreateWalletResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.CreateWalletResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.CreateWalletResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.CreateWalletResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mnemonic: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.CreateWalletResponse} + */ +proto.pactus.CreateWalletResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.CreateWalletResponse; + return proto.pactus.CreateWalletResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.CreateWalletResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.CreateWalletResponse} + */ +proto.pactus.CreateWalletResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMnemonic(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.CreateWalletResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.CreateWalletResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.CreateWalletResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.CreateWalletResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMnemonic(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string mnemonic = 2; + * @return {string} + */ +proto.pactus.CreateWalletResponse.prototype.getMnemonic = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.CreateWalletResponse} returns this + */ +proto.pactus.CreateWalletResponse.prototype.setMnemonic = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.LoadWalletRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.LoadWalletRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.LoadWalletRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.LoadWalletRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.LoadWalletRequest} + */ +proto.pactus.LoadWalletRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.LoadWalletRequest; + return proto.pactus.LoadWalletRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.LoadWalletRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.LoadWalletRequest} + */ +proto.pactus.LoadWalletRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.LoadWalletRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.LoadWalletRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.LoadWalletRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.LoadWalletRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.LoadWalletRequest.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.LoadWalletRequest} returns this + */ +proto.pactus.LoadWalletRequest.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.LoadWalletResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.LoadWalletResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.LoadWalletResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.LoadWalletResponse.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.LoadWalletResponse} + */ +proto.pactus.LoadWalletResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.LoadWalletResponse; + return proto.pactus.LoadWalletResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.LoadWalletResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.LoadWalletResponse} + */ +proto.pactus.LoadWalletResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.LoadWalletResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.LoadWalletResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.LoadWalletResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.LoadWalletResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.LoadWalletResponse.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.LoadWalletResponse} returns this + */ +proto.pactus.LoadWalletResponse.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.UnloadWalletRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.UnloadWalletRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.UnloadWalletRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.UnloadWalletRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.UnloadWalletRequest} + */ +proto.pactus.UnloadWalletRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.UnloadWalletRequest; + return proto.pactus.UnloadWalletRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.UnloadWalletRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.UnloadWalletRequest} + */ +proto.pactus.UnloadWalletRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.UnloadWalletRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.UnloadWalletRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.UnloadWalletRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.UnloadWalletRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.UnloadWalletRequest.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.UnloadWalletRequest} returns this + */ +proto.pactus.UnloadWalletRequest.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.UnloadWalletResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.UnloadWalletResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.UnloadWalletResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.UnloadWalletResponse.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.UnloadWalletResponse} + */ +proto.pactus.UnloadWalletResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.UnloadWalletResponse; + return proto.pactus.UnloadWalletResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.UnloadWalletResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.UnloadWalletResponse} + */ +proto.pactus.UnloadWalletResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.UnloadWalletResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.UnloadWalletResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.UnloadWalletResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.UnloadWalletResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.UnloadWalletResponse.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.UnloadWalletResponse} returns this + */ +proto.pactus.UnloadWalletResponse.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetValidatorAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetValidatorAddressRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetValidatorAddressRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorAddressRequest.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetValidatorAddressRequest} + */ +proto.pactus.GetValidatorAddressRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetValidatorAddressRequest; + return proto.pactus.GetValidatorAddressRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetValidatorAddressRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetValidatorAddressRequest} + */ +proto.pactus.GetValidatorAddressRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetValidatorAddressRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetValidatorAddressRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetValidatorAddressRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorAddressRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string public_key = 1; + * @return {string} + */ +proto.pactus.GetValidatorAddressRequest.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetValidatorAddressRequest} returns this + */ +proto.pactus.GetValidatorAddressRequest.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetValidatorAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetValidatorAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetValidatorAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorAddressResponse.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetValidatorAddressResponse} + */ +proto.pactus.GetValidatorAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetValidatorAddressResponse; + return proto.pactus.GetValidatorAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetValidatorAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetValidatorAddressResponse} + */ +proto.pactus.GetValidatorAddressResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetValidatorAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetValidatorAddressResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetValidatorAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetValidatorAddressResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.pactus.GetValidatorAddressResponse.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetValidatorAddressResponse} returns this + */ +proto.pactus.GetValidatorAddressResponse.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.SignRawTransactionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.SignRawTransactionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.SignRawTransactionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignRawTransactionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), + rawTransaction: jspb.Message.getFieldWithDefault(msg, 2, ""), + password: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.SignRawTransactionRequest} + */ +proto.pactus.SignRawTransactionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.SignRawTransactionRequest; + return proto.pactus.SignRawTransactionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.SignRawTransactionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.SignRawTransactionRequest} + */ +proto.pactus.SignRawTransactionRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRawTransaction(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.SignRawTransactionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.SignRawTransactionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.SignRawTransactionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignRawTransactionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRawTransaction(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.SignRawTransactionRequest.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignRawTransactionRequest} returns this + */ +proto.pactus.SignRawTransactionRequest.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string raw_transaction = 2; + * @return {string} + */ +proto.pactus.SignRawTransactionRequest.prototype.getRawTransaction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignRawTransactionRequest} returns this + */ +proto.pactus.SignRawTransactionRequest.prototype.setRawTransaction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string password = 3; + * @return {string} + */ +proto.pactus.SignRawTransactionRequest.prototype.getPassword = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignRawTransactionRequest} returns this + */ +proto.pactus.SignRawTransactionRequest.prototype.setPassword = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.SignRawTransactionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.SignRawTransactionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.SignRawTransactionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignRawTransactionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + transactionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + signedRawTransaction: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.SignRawTransactionResponse} + */ +proto.pactus.SignRawTransactionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.SignRawTransactionResponse; + return proto.pactus.SignRawTransactionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.SignRawTransactionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.SignRawTransactionResponse} + */ +proto.pactus.SignRawTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setTransactionId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSignedRawTransaction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.SignRawTransactionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.SignRawTransactionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.SignRawTransactionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignRawTransactionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTransactionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignedRawTransaction(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string transaction_id = 1; + * @return {string} + */ +proto.pactus.SignRawTransactionResponse.prototype.getTransactionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignRawTransactionResponse} returns this + */ +proto.pactus.SignRawTransactionResponse.prototype.setTransactionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string signed_raw_transaction = 2; + * @return {string} + */ +proto.pactus.SignRawTransactionResponse.prototype.getSignedRawTransaction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignRawTransactionResponse} returns this + */ +proto.pactus.SignRawTransactionResponse.prototype.setSignedRawTransaction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetTotalBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetTotalBalanceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetTotalBalanceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTotalBalanceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetTotalBalanceRequest} + */ +proto.pactus.GetTotalBalanceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetTotalBalanceRequest; + return proto.pactus.GetTotalBalanceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetTotalBalanceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetTotalBalanceRequest} + */ +proto.pactus.GetTotalBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetTotalBalanceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetTotalBalanceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetTotalBalanceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTotalBalanceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.GetTotalBalanceRequest.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetTotalBalanceRequest} returns this + */ +proto.pactus.GetTotalBalanceRequest.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.GetTotalBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetTotalBalanceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.GetTotalBalanceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTotalBalanceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), + totalBalance: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.GetTotalBalanceResponse} + */ +proto.pactus.GetTotalBalanceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.GetTotalBalanceResponse; + return proto.pactus.GetTotalBalanceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.GetTotalBalanceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.GetTotalBalanceResponse} + */ +proto.pactus.GetTotalBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalBalance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.GetTotalBalanceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.GetTotalBalanceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.GetTotalBalanceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.GetTotalBalanceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTotalBalance(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.GetTotalBalanceResponse.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetTotalBalanceResponse} returns this + */ +proto.pactus.GetTotalBalanceResponse.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 total_balance = 2; + * @return {number} + */ +proto.pactus.GetTotalBalanceResponse.prototype.getTotalBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetTotalBalanceResponse} returns this + */ +proto.pactus.GetTotalBalanceResponse.prototype.setTotalBalance = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.SignMessageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.SignMessageRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.SignMessageRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignMessageRequest.toObject = function(includeInstance, msg) { + var f, obj = { + walletName: jspb.Message.getFieldWithDefault(msg, 1, ""), + password: jspb.Message.getFieldWithDefault(msg, 2, ""), + address: jspb.Message.getFieldWithDefault(msg, 3, ""), + message: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.SignMessageRequest} + */ +proto.pactus.SignMessageRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.SignMessageRequest; + return proto.pactus.SignMessageRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.SignMessageRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.SignMessageRequest} + */ +proto.pactus.SignMessageRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.SignMessageRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.SignMessageRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.SignMessageRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignMessageRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string wallet_name = 1; + * @return {string} + */ +proto.pactus.SignMessageRequest.prototype.getWalletName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignMessageRequest} returns this + */ +proto.pactus.SignMessageRequest.prototype.setWalletName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string password = 2; + * @return {string} + */ +proto.pactus.SignMessageRequest.prototype.getPassword = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignMessageRequest} returns this + */ +proto.pactus.SignMessageRequest.prototype.setPassword = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string address = 3; + * @return {string} + */ +proto.pactus.SignMessageRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignMessageRequest} returns this + */ +proto.pactus.SignMessageRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string message = 4; + * @return {string} + */ +proto.pactus.SignMessageRequest.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignMessageRequest} returns this + */ +proto.pactus.SignMessageRequest.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.SignMessageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.SignMessageResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.SignMessageResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignMessageResponse.toObject = function(includeInstance, msg) { + var f, obj = { + signature: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.SignMessageResponse} + */ +proto.pactus.SignMessageResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.SignMessageResponse; + return proto.pactus.SignMessageResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.SignMessageResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.SignMessageResponse} + */ +proto.pactus.SignMessageResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.SignMessageResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.SignMessageResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.SignMessageResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.SignMessageResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string signature = 1; + * @return {string} + */ +proto.pactus.SignMessageResponse.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.SignMessageResponse} returns this + */ +proto.pactus.SignMessageResponse.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * @enum {number} + */ +proto.pactus.AddressType = { + ADDRESS_TYPE_TREASURY: 0, + ADDRESS_TYPE_VALIDATOR: 1, + ADDRESS_TYPE_BLS_ACCOUNT: 2, + ADDRESS_TYPE_ED25519_ACCOUNT: 3 +}; + +goog.object.extend(exports, proto.pactus); diff --git a/www/grpc/gen/python/blockchain_pb2.py b/www/grpc/gen/python/blockchain_pb2.py new file mode 100644 index 000000000..71699b150 --- /dev/null +++ b/www/grpc/gen/python/blockchain_pb2.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: blockchain.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import transaction_pb2 as transaction__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x62lockchain.proto\x12\x06pactus\x1a\x11transaction.proto\"-\n\x11GetAccountRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"C\n\x12GetAccountResponse\x12-\n\x07\x61\x63\x63ount\x18\x01 \x01(\x0b\x32\x13.pactus.AccountInfoR\x07\x61\x63\x63ount\"\x1e\n\x1cGetValidatorAddressesRequest\"=\n\x1dGetValidatorAddressesResponse\x12\x1c\n\taddresses\x18\x01 \x03(\tR\taddresses\"/\n\x13GetValidatorRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x1bGetValidatorByNumberRequest\x12\x16\n\x06number\x18\x01 \x01(\x05R\x06number\"K\n\x14GetValidatorResponse\x12\x33\n\tvalidator\x18\x01 \x01(\x0b\x32\x15.pactus.ValidatorInfoR\tvalidator\"/\n\x13GetPublicKeyRequest\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"5\n\x14GetPublicKeyResponse\x12\x1d\n\npublic_key\x18\x01 \x01(\tR\tpublicKey\"_\n\x0fGetBlockRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x34\n\tverbosity\x18\x02 \x01(\x0e\x32\x16.pactus.BlockVerbosityR\tverbosity\"\x83\x02\n\x10GetBlockResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x12\n\x04hash\x18\x02 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x03 \x01(\tR\x04\x64\x61ta\x12\x1d\n\nblock_time\x18\x04 \x01(\rR\tblockTime\x12/\n\x06header\x18\x05 \x01(\x0b\x32\x17.pactus.BlockHeaderInfoR\x06header\x12\x34\n\tprev_cert\x18\x06 \x01(\x0b\x32\x17.pactus.CertificateInfoR\x08prevCert\x12)\n\x03txs\x18\x07 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"-\n\x13GetBlockHashRequest\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"*\n\x14GetBlockHashResponse\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"+\n\x15GetBlockHeightRequest\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\"0\n\x16GetBlockHeightResponse\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\"\x1a\n\x18GetBlockchainInfoRequest\"\xc1\x03\n\x19GetBlockchainInfoResponse\x12*\n\x11last_block_height\x18\x01 \x01(\rR\x0flastBlockHeight\x12&\n\x0flast_block_hash\x18\x02 \x01(\tR\rlastBlockHash\x12%\n\x0etotal_accounts\x18\x03 \x01(\x05R\rtotalAccounts\x12)\n\x10total_validators\x18\x04 \x01(\x05R\x0ftotalValidators\x12\x1f\n\x0btotal_power\x18\x05 \x01(\x03R\ntotalPower\x12\'\n\x0f\x63ommittee_power\x18\x06 \x01(\x03R\x0e\x63ommitteePower\x12H\n\x14\x63ommittee_validators\x18\x07 \x03(\x0b\x32\x15.pactus.ValidatorInfoR\x13\x63ommitteeValidators\x12\x1b\n\tis_pruned\x18\x08 \x01(\x08R\x08isPruned\x12%\n\x0epruning_height\x18\t \x01(\rR\rpruningHeight\x12&\n\x0flast_block_time\x18\n \x01(\x03R\rlastBlockTime\"\x19\n\x17GetConsensusInfoRequest\"}\n\x18GetConsensusInfoResponse\x12,\n\x08proposal\x18\x01 \x01(\x0b\x32\x10.pactus.ProposalR\x08proposal\x12\x33\n\tinstances\x18\x02 \x03(\x0b\x32\x15.pactus.ConsensusInfoR\tinstances\"Q\n\x17GetTxPoolContentRequest\x12\x36\n\x0cpayload_type\x18\x01 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\"E\n\x18GetTxPoolContentResponse\x12)\n\x03txs\x18\x01 \x03(\x0b\x32\x17.pactus.TransactionInfoR\x03txs\"\xdc\x02\n\rValidatorInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x1d\n\npublic_key\x18\x03 \x01(\tR\tpublicKey\x12\x16\n\x06number\x18\x04 \x01(\x05R\x06number\x12\x14\n\x05stake\x18\x05 \x01(\x03R\x05stake\x12.\n\x13last_bonding_height\x18\x06 \x01(\rR\x11lastBondingHeight\x12\x32\n\x15last_sortition_height\x18\x07 \x01(\rR\x13lastSortitionHeight\x12)\n\x10unbonding_height\x18\x08 \x01(\rR\x0funbondingHeight\x12\x18\n\x07\x61\x64\x64ress\x18\t \x01(\tR\x07\x61\x64\x64ress\x12-\n\x12\x61vailability_score\x18\n \x01(\x01R\x11\x61vailabilityScore\"\x81\x01\n\x0b\x41\x63\x63ountInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x16\n\x06number\x18\x03 \x01(\x05R\x06number\x12\x18\n\x07\x62\x61lance\x18\x04 \x01(\x03R\x07\x62\x61lance\x12\x18\n\x07\x61\x64\x64ress\x18\x05 \x01(\tR\x07\x61\x64\x64ress\"\xc4\x01\n\x0f\x42lockHeaderInfo\x12\x18\n\x07version\x18\x01 \x01(\x05R\x07version\x12&\n\x0fprev_block_hash\x18\x02 \x01(\tR\rprevBlockHash\x12\x1d\n\nstate_root\x18\x03 \x01(\tR\tstateRoot\x12%\n\x0esortition_seed\x18\x04 \x01(\tR\rsortitionSeed\x12)\n\x10proposer_address\x18\x05 \x01(\tR\x0fproposerAddress\"\x97\x01\n\x0f\x43\x65rtificateInfo\x12\x12\n\x04hash\x18\x01 \x01(\tR\x04hash\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1e\n\ncommitters\x18\x03 \x03(\x05R\ncommitters\x12\x1c\n\tabsentees\x18\x04 \x03(\x05R\tabsentees\x12\x1c\n\tsignature\x18\x05 \x01(\tR\tsignature\"\xb1\x01\n\x08VoteInfo\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x10.pactus.VoteTypeR\x04type\x12\x14\n\x05voter\x18\x02 \x01(\tR\x05voter\x12\x1d\n\nblock_hash\x18\x03 \x01(\tR\tblockHash\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12\x19\n\x08\x63p_round\x18\x05 \x01(\x05R\x07\x63pRound\x12\x19\n\x08\x63p_value\x18\x06 \x01(\x05R\x07\x63pValue\"\x97\x01\n\rConsensusInfo\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x16\n\x06\x61\x63tive\x18\x02 \x01(\x08R\x06\x61\x63tive\x12\x16\n\x06height\x18\x03 \x01(\rR\x06height\x12\x14\n\x05round\x18\x04 \x01(\x05R\x05round\x12&\n\x05votes\x18\x05 \x03(\x0b\x32\x10.pactus.VoteInfoR\x05votes\"~\n\x08Proposal\x12\x16\n\x06height\x18\x01 \x01(\rR\x06height\x12\x14\n\x05round\x18\x02 \x01(\x05R\x05round\x12\x1d\n\nblock_data\x18\x03 \x01(\tR\tblockData\x12%\n\x0esignature_data\x18\x04 \x01(\tR\rsignatureData*H\n\x0e\x42lockVerbosity\x12\x0e\n\nBLOCK_DATA\x10\x00\x12\x0e\n\nBLOCK_INFO\x10\x01\x12\x16\n\x12\x42LOCK_TRANSACTIONS\x10\x02*\\\n\x08VoteType\x12\x10\n\x0cVOTE_UNKNOWN\x10\x00\x12\x10\n\x0cVOTE_PREPARE\x10\x01\x12\x12\n\x0eVOTE_PRECOMMIT\x10\x02\x12\x18\n\x14VOTE_CHANGE_PROPOSER\x10\x03\x32\x8b\x07\n\nBlockchain\x12=\n\x08GetBlock\x12\x17.pactus.GetBlockRequest\x1a\x18.pactus.GetBlockResponse\x12I\n\x0cGetBlockHash\x12\x1b.pactus.GetBlockHashRequest\x1a\x1c.pactus.GetBlockHashResponse\x12O\n\x0eGetBlockHeight\x12\x1d.pactus.GetBlockHeightRequest\x1a\x1e.pactus.GetBlockHeightResponse\x12X\n\x11GetBlockchainInfo\x12 .pactus.GetBlockchainInfoRequest\x1a!.pactus.GetBlockchainInfoResponse\x12U\n\x10GetConsensusInfo\x12\x1f.pactus.GetConsensusInfoRequest\x1a .pactus.GetConsensusInfoResponse\x12\x43\n\nGetAccount\x12\x19.pactus.GetAccountRequest\x1a\x1a.pactus.GetAccountResponse\x12I\n\x0cGetValidator\x12\x1b.pactus.GetValidatorRequest\x1a\x1c.pactus.GetValidatorResponse\x12Y\n\x14GetValidatorByNumber\x12#.pactus.GetValidatorByNumberRequest\x1a\x1c.pactus.GetValidatorResponse\x12\x64\n\x15GetValidatorAddresses\x12$.pactus.GetValidatorAddressesRequest\x1a%.pactus.GetValidatorAddressesResponse\x12I\n\x0cGetPublicKey\x12\x1b.pactus.GetPublicKeyRequest\x1a\x1c.pactus.GetPublicKeyResponse\x12U\n\x10GetTxPoolContent\x12\x1f.pactus.GetTxPoolContentRequest\x1a .pactus.GetTxPoolContentResponseBE\n\x11pactus.blockchainZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'blockchain_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\021pactus.blockchainZ0github.com/pactus-project/pactus/www/grpc/pactus' + _BLOCKVERBOSITY._serialized_start=3174 + _BLOCKVERBOSITY._serialized_end=3246 + _VOTETYPE._serialized_start=3248 + _VOTETYPE._serialized_end=3340 + _GETACCOUNTREQUEST._serialized_start=47 + _GETACCOUNTREQUEST._serialized_end=92 + _GETACCOUNTRESPONSE._serialized_start=94 + _GETACCOUNTRESPONSE._serialized_end=161 + _GETVALIDATORADDRESSESREQUEST._serialized_start=163 + _GETVALIDATORADDRESSESREQUEST._serialized_end=193 + _GETVALIDATORADDRESSESRESPONSE._serialized_start=195 + _GETVALIDATORADDRESSESRESPONSE._serialized_end=256 + _GETVALIDATORREQUEST._serialized_start=258 + _GETVALIDATORREQUEST._serialized_end=305 + _GETVALIDATORBYNUMBERREQUEST._serialized_start=307 + _GETVALIDATORBYNUMBERREQUEST._serialized_end=360 + _GETVALIDATORRESPONSE._serialized_start=362 + _GETVALIDATORRESPONSE._serialized_end=437 + _GETPUBLICKEYREQUEST._serialized_start=439 + _GETPUBLICKEYREQUEST._serialized_end=486 + _GETPUBLICKEYRESPONSE._serialized_start=488 + _GETPUBLICKEYRESPONSE._serialized_end=541 + _GETBLOCKREQUEST._serialized_start=543 + _GETBLOCKREQUEST._serialized_end=638 + _GETBLOCKRESPONSE._serialized_start=641 + _GETBLOCKRESPONSE._serialized_end=900 + _GETBLOCKHASHREQUEST._serialized_start=902 + _GETBLOCKHASHREQUEST._serialized_end=947 + _GETBLOCKHASHRESPONSE._serialized_start=949 + _GETBLOCKHASHRESPONSE._serialized_end=991 + _GETBLOCKHEIGHTREQUEST._serialized_start=993 + _GETBLOCKHEIGHTREQUEST._serialized_end=1036 + _GETBLOCKHEIGHTRESPONSE._serialized_start=1038 + _GETBLOCKHEIGHTRESPONSE._serialized_end=1086 + _GETBLOCKCHAININFOREQUEST._serialized_start=1088 + _GETBLOCKCHAININFOREQUEST._serialized_end=1114 + _GETBLOCKCHAININFORESPONSE._serialized_start=1117 + _GETBLOCKCHAININFORESPONSE._serialized_end=1566 + _GETCONSENSUSINFOREQUEST._serialized_start=1568 + _GETCONSENSUSINFOREQUEST._serialized_end=1593 + _GETCONSENSUSINFORESPONSE._serialized_start=1595 + _GETCONSENSUSINFORESPONSE._serialized_end=1720 + _GETTXPOOLCONTENTREQUEST._serialized_start=1722 + _GETTXPOOLCONTENTREQUEST._serialized_end=1803 + _GETTXPOOLCONTENTRESPONSE._serialized_start=1805 + _GETTXPOOLCONTENTRESPONSE._serialized_end=1874 + _VALIDATORINFO._serialized_start=1877 + _VALIDATORINFO._serialized_end=2225 + _ACCOUNTINFO._serialized_start=2228 + _ACCOUNTINFO._serialized_end=2357 + _BLOCKHEADERINFO._serialized_start=2360 + _BLOCKHEADERINFO._serialized_end=2556 + _CERTIFICATEINFO._serialized_start=2559 + _CERTIFICATEINFO._serialized_end=2710 + _VOTEINFO._serialized_start=2713 + _VOTEINFO._serialized_end=2890 + _CONSENSUSINFO._serialized_start=2893 + _CONSENSUSINFO._serialized_end=3044 + _PROPOSAL._serialized_start=3046 + _PROPOSAL._serialized_end=3172 + _BLOCKCHAIN._serialized_start=3343 + _BLOCKCHAIN._serialized_end=4250 +# @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/blockchain_pb2.pyi b/www/grpc/gen/python/blockchain_pb2.pyi new file mode 100644 index 000000000..27b2a9848 --- /dev/null +++ b/www/grpc/gen/python/blockchain_pb2.pyi @@ -0,0 +1,290 @@ +import transaction_pb2 as _transaction_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class BlockVerbosity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + BLOCK_DATA: _ClassVar[BlockVerbosity] + BLOCK_INFO: _ClassVar[BlockVerbosity] + BLOCK_TRANSACTIONS: _ClassVar[BlockVerbosity] + +class VoteType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + VOTE_UNKNOWN: _ClassVar[VoteType] + VOTE_PREPARE: _ClassVar[VoteType] + VOTE_PRECOMMIT: _ClassVar[VoteType] + VOTE_CHANGE_PROPOSER: _ClassVar[VoteType] +BLOCK_DATA: BlockVerbosity +BLOCK_INFO: BlockVerbosity +BLOCK_TRANSACTIONS: BlockVerbosity +VOTE_UNKNOWN: VoteType +VOTE_PREPARE: VoteType +VOTE_PRECOMMIT: VoteType +VOTE_CHANGE_PROPOSER: VoteType + +class GetAccountRequest(_message.Message): + __slots__ = ("address",) + ADDRESS_FIELD_NUMBER: _ClassVar[int] + address: str + def __init__(self, address: _Optional[str] = ...) -> None: ... + +class GetAccountResponse(_message.Message): + __slots__ = ("account",) + ACCOUNT_FIELD_NUMBER: _ClassVar[int] + account: AccountInfo + def __init__(self, account: _Optional[_Union[AccountInfo, _Mapping]] = ...) -> None: ... + +class GetValidatorAddressesRequest(_message.Message): + __slots__ = () + def __init__(self) -> None: ... + +class GetValidatorAddressesResponse(_message.Message): + __slots__ = ("addresses",) + ADDRESSES_FIELD_NUMBER: _ClassVar[int] + addresses: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, addresses: _Optional[_Iterable[str]] = ...) -> None: ... + +class GetValidatorRequest(_message.Message): + __slots__ = ("address",) + ADDRESS_FIELD_NUMBER: _ClassVar[int] + address: str + def __init__(self, address: _Optional[str] = ...) -> None: ... + +class GetValidatorByNumberRequest(_message.Message): + __slots__ = ("number",) + NUMBER_FIELD_NUMBER: _ClassVar[int] + number: int + def __init__(self, number: _Optional[int] = ...) -> None: ... + +class GetValidatorResponse(_message.Message): + __slots__ = ("validator",) + VALIDATOR_FIELD_NUMBER: _ClassVar[int] + validator: ValidatorInfo + def __init__(self, validator: _Optional[_Union[ValidatorInfo, _Mapping]] = ...) -> None: ... + +class GetPublicKeyRequest(_message.Message): + __slots__ = ("address",) + ADDRESS_FIELD_NUMBER: _ClassVar[int] + address: str + def __init__(self, address: _Optional[str] = ...) -> None: ... + +class GetPublicKeyResponse(_message.Message): + __slots__ = ("public_key",) + PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] + public_key: str + def __init__(self, public_key: _Optional[str] = ...) -> None: ... + +class GetBlockRequest(_message.Message): + __slots__ = ("height", "verbosity") + HEIGHT_FIELD_NUMBER: _ClassVar[int] + VERBOSITY_FIELD_NUMBER: _ClassVar[int] + height: int + verbosity: BlockVerbosity + def __init__(self, height: _Optional[int] = ..., verbosity: _Optional[_Union[BlockVerbosity, str]] = ...) -> None: ... + +class GetBlockResponse(_message.Message): + __slots__ = ("height", "hash", "data", "block_time", "header", "prev_cert", "txs") + HEIGHT_FIELD_NUMBER: _ClassVar[int] + HASH_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + BLOCK_TIME_FIELD_NUMBER: _ClassVar[int] + HEADER_FIELD_NUMBER: _ClassVar[int] + PREV_CERT_FIELD_NUMBER: _ClassVar[int] + TXS_FIELD_NUMBER: _ClassVar[int] + height: int + hash: str + data: str + block_time: int + header: BlockHeaderInfo + prev_cert: CertificateInfo + txs: _containers.RepeatedCompositeFieldContainer[_transaction_pb2.TransactionInfo] + def __init__(self, height: _Optional[int] = ..., hash: _Optional[str] = ..., data: _Optional[str] = ..., block_time: _Optional[int] = ..., header: _Optional[_Union[BlockHeaderInfo, _Mapping]] = ..., prev_cert: _Optional[_Union[CertificateInfo, _Mapping]] = ..., txs: _Optional[_Iterable[_Union[_transaction_pb2.TransactionInfo, _Mapping]]] = ...) -> None: ... + +class GetBlockHashRequest(_message.Message): + __slots__ = ("height",) + HEIGHT_FIELD_NUMBER: _ClassVar[int] + height: int + def __init__(self, height: _Optional[int] = ...) -> None: ... + +class GetBlockHashResponse(_message.Message): + __slots__ = ("hash",) + HASH_FIELD_NUMBER: _ClassVar[int] + hash: str + def __init__(self, hash: _Optional[str] = ...) -> None: ... + +class GetBlockHeightRequest(_message.Message): + __slots__ = ("hash",) + HASH_FIELD_NUMBER: _ClassVar[int] + hash: str + def __init__(self, hash: _Optional[str] = ...) -> None: ... + +class GetBlockHeightResponse(_message.Message): + __slots__ = ("height",) + HEIGHT_FIELD_NUMBER: _ClassVar[int] + height: int + def __init__(self, height: _Optional[int] = ...) -> None: ... + +class GetBlockchainInfoRequest(_message.Message): + __slots__ = () + def __init__(self) -> None: ... + +class GetBlockchainInfoResponse(_message.Message): + __slots__ = ("last_block_height", "last_block_hash", "total_accounts", "total_validators", "total_power", "committee_power", "committee_validators", "is_pruned", "pruning_height", "last_block_time") + LAST_BLOCK_HEIGHT_FIELD_NUMBER: _ClassVar[int] + LAST_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int] + TOTAL_ACCOUNTS_FIELD_NUMBER: _ClassVar[int] + TOTAL_VALIDATORS_FIELD_NUMBER: _ClassVar[int] + TOTAL_POWER_FIELD_NUMBER: _ClassVar[int] + COMMITTEE_POWER_FIELD_NUMBER: _ClassVar[int] + COMMITTEE_VALIDATORS_FIELD_NUMBER: _ClassVar[int] + IS_PRUNED_FIELD_NUMBER: _ClassVar[int] + PRUNING_HEIGHT_FIELD_NUMBER: _ClassVar[int] + LAST_BLOCK_TIME_FIELD_NUMBER: _ClassVar[int] + last_block_height: int + last_block_hash: str + total_accounts: int + total_validators: int + total_power: int + committee_power: int + committee_validators: _containers.RepeatedCompositeFieldContainer[ValidatorInfo] + is_pruned: bool + pruning_height: int + last_block_time: int + def __init__(self, last_block_height: _Optional[int] = ..., last_block_hash: _Optional[str] = ..., total_accounts: _Optional[int] = ..., total_validators: _Optional[int] = ..., total_power: _Optional[int] = ..., committee_power: _Optional[int] = ..., committee_validators: _Optional[_Iterable[_Union[ValidatorInfo, _Mapping]]] = ..., is_pruned: bool = ..., pruning_height: _Optional[int] = ..., last_block_time: _Optional[int] = ...) -> None: ... + +class GetConsensusInfoRequest(_message.Message): + __slots__ = () + def __init__(self) -> None: ... + +class GetConsensusInfoResponse(_message.Message): + __slots__ = ("proposal", "instances") + PROPOSAL_FIELD_NUMBER: _ClassVar[int] + INSTANCES_FIELD_NUMBER: _ClassVar[int] + proposal: Proposal + instances: _containers.RepeatedCompositeFieldContainer[ConsensusInfo] + def __init__(self, proposal: _Optional[_Union[Proposal, _Mapping]] = ..., instances: _Optional[_Iterable[_Union[ConsensusInfo, _Mapping]]] = ...) -> None: ... + +class GetTxPoolContentRequest(_message.Message): + __slots__ = ("payload_type",) + PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int] + payload_type: _transaction_pb2.PayloadType + def __init__(self, payload_type: _Optional[_Union[_transaction_pb2.PayloadType, str]] = ...) -> None: ... + +class GetTxPoolContentResponse(_message.Message): + __slots__ = ("txs",) + TXS_FIELD_NUMBER: _ClassVar[int] + txs: _containers.RepeatedCompositeFieldContainer[_transaction_pb2.TransactionInfo] + def __init__(self, txs: _Optional[_Iterable[_Union[_transaction_pb2.TransactionInfo, _Mapping]]] = ...) -> None: ... + +class ValidatorInfo(_message.Message): + __slots__ = ("hash", "data", "public_key", "number", "stake", "last_bonding_height", "last_sortition_height", "unbonding_height", "address", "availability_score") + HASH_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] + NUMBER_FIELD_NUMBER: _ClassVar[int] + STAKE_FIELD_NUMBER: _ClassVar[int] + LAST_BONDING_HEIGHT_FIELD_NUMBER: _ClassVar[int] + LAST_SORTITION_HEIGHT_FIELD_NUMBER: _ClassVar[int] + UNBONDING_HEIGHT_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] + AVAILABILITY_SCORE_FIELD_NUMBER: _ClassVar[int] + hash: str + data: str + public_key: str + number: int + stake: int + last_bonding_height: int + last_sortition_height: int + unbonding_height: int + address: str + availability_score: float + def __init__(self, hash: _Optional[str] = ..., data: _Optional[str] = ..., public_key: _Optional[str] = ..., number: _Optional[int] = ..., stake: _Optional[int] = ..., last_bonding_height: _Optional[int] = ..., last_sortition_height: _Optional[int] = ..., unbonding_height: _Optional[int] = ..., address: _Optional[str] = ..., availability_score: _Optional[float] = ...) -> None: ... + +class AccountInfo(_message.Message): + __slots__ = ("hash", "data", "number", "balance", "address") + HASH_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + NUMBER_FIELD_NUMBER: _ClassVar[int] + BALANCE_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] + hash: str + data: str + number: int + balance: int + address: str + def __init__(self, hash: _Optional[str] = ..., data: _Optional[str] = ..., number: _Optional[int] = ..., balance: _Optional[int] = ..., address: _Optional[str] = ...) -> None: ... + +class BlockHeaderInfo(_message.Message): + __slots__ = ("version", "prev_block_hash", "state_root", "sortition_seed", "proposer_address") + VERSION_FIELD_NUMBER: _ClassVar[int] + PREV_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int] + STATE_ROOT_FIELD_NUMBER: _ClassVar[int] + SORTITION_SEED_FIELD_NUMBER: _ClassVar[int] + PROPOSER_ADDRESS_FIELD_NUMBER: _ClassVar[int] + version: int + prev_block_hash: str + state_root: str + sortition_seed: str + proposer_address: str + def __init__(self, version: _Optional[int] = ..., prev_block_hash: _Optional[str] = ..., state_root: _Optional[str] = ..., sortition_seed: _Optional[str] = ..., proposer_address: _Optional[str] = ...) -> None: ... + +class CertificateInfo(_message.Message): + __slots__ = ("hash", "round", "committers", "absentees", "signature") + HASH_FIELD_NUMBER: _ClassVar[int] + ROUND_FIELD_NUMBER: _ClassVar[int] + COMMITTERS_FIELD_NUMBER: _ClassVar[int] + ABSENTEES_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + hash: str + round: int + committers: _containers.RepeatedScalarFieldContainer[int] + absentees: _containers.RepeatedScalarFieldContainer[int] + signature: str + def __init__(self, hash: _Optional[str] = ..., round: _Optional[int] = ..., committers: _Optional[_Iterable[int]] = ..., absentees: _Optional[_Iterable[int]] = ..., signature: _Optional[str] = ...) -> None: ... + +class VoteInfo(_message.Message): + __slots__ = ("type", "voter", "block_hash", "round", "cp_round", "cp_value") + TYPE_FIELD_NUMBER: _ClassVar[int] + VOTER_FIELD_NUMBER: _ClassVar[int] + BLOCK_HASH_FIELD_NUMBER: _ClassVar[int] + ROUND_FIELD_NUMBER: _ClassVar[int] + CP_ROUND_FIELD_NUMBER: _ClassVar[int] + CP_VALUE_FIELD_NUMBER: _ClassVar[int] + type: VoteType + voter: str + block_hash: str + round: int + cp_round: int + cp_value: int + def __init__(self, type: _Optional[_Union[VoteType, str]] = ..., voter: _Optional[str] = ..., block_hash: _Optional[str] = ..., round: _Optional[int] = ..., cp_round: _Optional[int] = ..., cp_value: _Optional[int] = ...) -> None: ... + +class ConsensusInfo(_message.Message): + __slots__ = ("address", "active", "height", "round", "votes") + ADDRESS_FIELD_NUMBER: _ClassVar[int] + ACTIVE_FIELD_NUMBER: _ClassVar[int] + HEIGHT_FIELD_NUMBER: _ClassVar[int] + ROUND_FIELD_NUMBER: _ClassVar[int] + VOTES_FIELD_NUMBER: _ClassVar[int] + address: str + active: bool + height: int + round: int + votes: _containers.RepeatedCompositeFieldContainer[VoteInfo] + def __init__(self, address: _Optional[str] = ..., active: bool = ..., height: _Optional[int] = ..., round: _Optional[int] = ..., votes: _Optional[_Iterable[_Union[VoteInfo, _Mapping]]] = ...) -> None: ... + +class Proposal(_message.Message): + __slots__ = ("height", "round", "block_data", "signature_data") + HEIGHT_FIELD_NUMBER: _ClassVar[int] + ROUND_FIELD_NUMBER: _ClassVar[int] + BLOCK_DATA_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_DATA_FIELD_NUMBER: _ClassVar[int] + height: int + round: int + block_data: str + signature_data: str + def __init__(self, height: _Optional[int] = ..., round: _Optional[int] = ..., block_data: _Optional[str] = ..., signature_data: _Optional[str] = ...) -> None: ... diff --git a/www/grpc/gen/python/blockchain_pb2_grpc.py b/www/grpc/gen/python/blockchain_pb2_grpc.py new file mode 100644 index 000000000..3db19551b --- /dev/null +++ b/www/grpc/gen/python/blockchain_pb2_grpc.py @@ -0,0 +1,415 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import blockchain_pb2 as blockchain__pb2 + + +class BlockchainStub(object): + """Blockchain service defines RPC methods for interacting with the blockchain. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetBlock = channel.unary_unary( + '/pactus.Blockchain/GetBlock', + request_serializer=blockchain__pb2.GetBlockRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetBlockResponse.FromString, + ) + self.GetBlockHash = channel.unary_unary( + '/pactus.Blockchain/GetBlockHash', + request_serializer=blockchain__pb2.GetBlockHashRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetBlockHashResponse.FromString, + ) + self.GetBlockHeight = channel.unary_unary( + '/pactus.Blockchain/GetBlockHeight', + request_serializer=blockchain__pb2.GetBlockHeightRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetBlockHeightResponse.FromString, + ) + self.GetBlockchainInfo = channel.unary_unary( + '/pactus.Blockchain/GetBlockchainInfo', + request_serializer=blockchain__pb2.GetBlockchainInfoRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetBlockchainInfoResponse.FromString, + ) + self.GetConsensusInfo = channel.unary_unary( + '/pactus.Blockchain/GetConsensusInfo', + request_serializer=blockchain__pb2.GetConsensusInfoRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetConsensusInfoResponse.FromString, + ) + self.GetAccount = channel.unary_unary( + '/pactus.Blockchain/GetAccount', + request_serializer=blockchain__pb2.GetAccountRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetAccountResponse.FromString, + ) + self.GetValidator = channel.unary_unary( + '/pactus.Blockchain/GetValidator', + request_serializer=blockchain__pb2.GetValidatorRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetValidatorResponse.FromString, + ) + self.GetValidatorByNumber = channel.unary_unary( + '/pactus.Blockchain/GetValidatorByNumber', + request_serializer=blockchain__pb2.GetValidatorByNumberRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetValidatorResponse.FromString, + ) + self.GetValidatorAddresses = channel.unary_unary( + '/pactus.Blockchain/GetValidatorAddresses', + request_serializer=blockchain__pb2.GetValidatorAddressesRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetValidatorAddressesResponse.FromString, + ) + self.GetPublicKey = channel.unary_unary( + '/pactus.Blockchain/GetPublicKey', + request_serializer=blockchain__pb2.GetPublicKeyRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetPublicKeyResponse.FromString, + ) + self.GetTxPoolContent = channel.unary_unary( + '/pactus.Blockchain/GetTxPoolContent', + request_serializer=blockchain__pb2.GetTxPoolContentRequest.SerializeToString, + response_deserializer=blockchain__pb2.GetTxPoolContentResponse.FromString, + ) + + +class BlockchainServicer(object): + """Blockchain service defines RPC methods for interacting with the blockchain. + """ + + def GetBlock(self, request, context): + """GetBlock retrieves information about a block based on the provided request + parameters. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetBlockHash(self, request, context): + """GetBlockHash retrieves the hash of a block at the specified height. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetBlockHeight(self, request, context): + """GetBlockHeight retrieves the height of a block with the specified hash. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetBlockchainInfo(self, request, context): + """GetBlockchainInfo retrieves general information about the blockchain. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetConsensusInfo(self, request, context): + """GetConsensusInfo retrieves information about the consensus instances. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAccount(self, request, context): + """GetAccount retrieves information about an account based on the provided + address. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetValidator(self, request, context): + """GetValidator retrieves information about a validator based on the provided + address. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetValidatorByNumber(self, request, context): + """GetValidatorByNumber retrieves information about a validator based on the + provided number. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetValidatorAddresses(self, request, context): + """GetValidatorAddresses retrieves a list of all validator addresses. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetPublicKey(self, request, context): + """GetPublicKey retrieves the public key of an account based on the provided + address. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetTxPoolContent(self, request, context): + """GetTxPoolContent retrieves current transactions in the transaction pool. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_BlockchainServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetBlock': grpc.unary_unary_rpc_method_handler( + servicer.GetBlock, + request_deserializer=blockchain__pb2.GetBlockRequest.FromString, + response_serializer=blockchain__pb2.GetBlockResponse.SerializeToString, + ), + 'GetBlockHash': grpc.unary_unary_rpc_method_handler( + servicer.GetBlockHash, + request_deserializer=blockchain__pb2.GetBlockHashRequest.FromString, + response_serializer=blockchain__pb2.GetBlockHashResponse.SerializeToString, + ), + 'GetBlockHeight': grpc.unary_unary_rpc_method_handler( + servicer.GetBlockHeight, + request_deserializer=blockchain__pb2.GetBlockHeightRequest.FromString, + response_serializer=blockchain__pb2.GetBlockHeightResponse.SerializeToString, + ), + 'GetBlockchainInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetBlockchainInfo, + request_deserializer=blockchain__pb2.GetBlockchainInfoRequest.FromString, + response_serializer=blockchain__pb2.GetBlockchainInfoResponse.SerializeToString, + ), + 'GetConsensusInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetConsensusInfo, + request_deserializer=blockchain__pb2.GetConsensusInfoRequest.FromString, + response_serializer=blockchain__pb2.GetConsensusInfoResponse.SerializeToString, + ), + 'GetAccount': grpc.unary_unary_rpc_method_handler( + servicer.GetAccount, + request_deserializer=blockchain__pb2.GetAccountRequest.FromString, + response_serializer=blockchain__pb2.GetAccountResponse.SerializeToString, + ), + 'GetValidator': grpc.unary_unary_rpc_method_handler( + servicer.GetValidator, + request_deserializer=blockchain__pb2.GetValidatorRequest.FromString, + response_serializer=blockchain__pb2.GetValidatorResponse.SerializeToString, + ), + 'GetValidatorByNumber': grpc.unary_unary_rpc_method_handler( + servicer.GetValidatorByNumber, + request_deserializer=blockchain__pb2.GetValidatorByNumberRequest.FromString, + response_serializer=blockchain__pb2.GetValidatorResponse.SerializeToString, + ), + 'GetValidatorAddresses': grpc.unary_unary_rpc_method_handler( + servicer.GetValidatorAddresses, + request_deserializer=blockchain__pb2.GetValidatorAddressesRequest.FromString, + response_serializer=blockchain__pb2.GetValidatorAddressesResponse.SerializeToString, + ), + 'GetPublicKey': grpc.unary_unary_rpc_method_handler( + servicer.GetPublicKey, + request_deserializer=blockchain__pb2.GetPublicKeyRequest.FromString, + response_serializer=blockchain__pb2.GetPublicKeyResponse.SerializeToString, + ), + 'GetTxPoolContent': grpc.unary_unary_rpc_method_handler( + servicer.GetTxPoolContent, + request_deserializer=blockchain__pb2.GetTxPoolContentRequest.FromString, + response_serializer=blockchain__pb2.GetTxPoolContentResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'pactus.Blockchain', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Blockchain(object): + """Blockchain service defines RPC methods for interacting with the blockchain. + """ + + @staticmethod + def GetBlock(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetBlock', + blockchain__pb2.GetBlockRequest.SerializeToString, + blockchain__pb2.GetBlockResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetBlockHash(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetBlockHash', + blockchain__pb2.GetBlockHashRequest.SerializeToString, + blockchain__pb2.GetBlockHashResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetBlockHeight(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetBlockHeight', + blockchain__pb2.GetBlockHeightRequest.SerializeToString, + blockchain__pb2.GetBlockHeightResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetBlockchainInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetBlockchainInfo', + blockchain__pb2.GetBlockchainInfoRequest.SerializeToString, + blockchain__pb2.GetBlockchainInfoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetConsensusInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetConsensusInfo', + blockchain__pb2.GetConsensusInfoRequest.SerializeToString, + blockchain__pb2.GetConsensusInfoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAccount(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetAccount', + blockchain__pb2.GetAccountRequest.SerializeToString, + blockchain__pb2.GetAccountResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetValidator(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetValidator', + blockchain__pb2.GetValidatorRequest.SerializeToString, + blockchain__pb2.GetValidatorResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetValidatorByNumber(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetValidatorByNumber', + blockchain__pb2.GetValidatorByNumberRequest.SerializeToString, + blockchain__pb2.GetValidatorResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetValidatorAddresses(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetValidatorAddresses', + blockchain__pb2.GetValidatorAddressesRequest.SerializeToString, + blockchain__pb2.GetValidatorAddressesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetPublicKey(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetPublicKey', + blockchain__pb2.GetPublicKeyRequest.SerializeToString, + blockchain__pb2.GetPublicKeyResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetTxPoolContent(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Blockchain/GetTxPoolContent', + blockchain__pb2.GetTxPoolContentRequest.SerializeToString, + blockchain__pb2.GetTxPoolContentResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/python/network_pb2.py b/www/grpc/gen/python/network_pb2.py new file mode 100644 index 000000000..3c67a0b93 --- /dev/null +++ b/www/grpc/gen/python/network_pb2.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: network.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rnetwork.proto\x12\x06pactus\">\n\x15GetNetworkInfoRequest\x12%\n\x0eonly_connected\x18\x01 \x01(\x08R\ronlyConnected\"\xae\x04\n\x16GetNetworkInfoResponse\x12!\n\x0cnetwork_name\x18\x01 \x01(\tR\x0bnetworkName\x12(\n\x10total_sent_bytes\x18\x02 \x01(\x03R\x0etotalSentBytes\x12\x30\n\x14total_received_bytes\x18\x03 \x01(\x03R\x12totalReceivedBytes\x12\x32\n\x15\x63onnected_peers_count\x18\x04 \x01(\rR\x13\x63onnectedPeersCount\x12\x39\n\x0f\x63onnected_peers\x18\x05 \x03(\x0b\x32\x10.pactus.PeerInfoR\x0e\x63onnectedPeers\x12L\n\nsent_bytes\x18\x06 \x03(\x0b\x32-.pactus.GetNetworkInfoResponse.SentBytesEntryR\tsentBytes\x12X\n\x0ereceived_bytes\x18\x07 \x03(\x0b\x32\x31.pactus.GetNetworkInfoResponse.ReceivedBytesEntryR\rreceivedBytes\x1a<\n\x0eSentBytesEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\x1a@\n\x12ReceivedBytesEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\"\x14\n\x12GetNodeInfoRequest\"\x87\x03\n\x13GetNodeInfoResponse\x12\x18\n\x07moniker\x18\x01 \x01(\tR\x07moniker\x12\x14\n\x05\x61gent\x18\x02 \x01(\tR\x05\x61gent\x12\x17\n\x07peer_id\x18\x03 \x01(\tR\x06peerId\x12\x1d\n\nstarted_at\x18\x04 \x01(\x04R\tstartedAt\x12\"\n\x0creachability\x18\x05 \x01(\tR\x0creachability\x12\x1a\n\x08services\x18\x06 \x01(\x05R\x08services\x12%\n\x0eservices_names\x18\x07 \x01(\tR\rservicesNames\x12\x1f\n\x0blocal_addrs\x18\x08 \x03(\tR\nlocalAddrs\x12\x1c\n\tprotocols\x18\t \x03(\tR\tprotocols\x12!\n\x0c\x63lock_offset\x18\r \x01(\x01R\x0b\x63lockOffset\x12?\n\x0f\x63onnection_info\x18\x0e \x01(\x0b\x32\x16.pactus.ConnectionInfoR\x0e\x63onnectionInfo\"\xed\x06\n\x08PeerInfo\x12\x16\n\x06status\x18\x01 \x01(\x05R\x06status\x12\x18\n\x07moniker\x18\x02 \x01(\tR\x07moniker\x12\x14\n\x05\x61gent\x18\x03 \x01(\tR\x05\x61gent\x12\x17\n\x07peer_id\x18\x04 \x01(\tR\x06peerId\x12%\n\x0e\x63onsensus_keys\x18\x05 \x03(\tR\rconsensusKeys\x12/\n\x13\x63onsensus_addresses\x18\x06 \x03(\tR\x12\x63onsensusAddresses\x12\x1a\n\x08services\x18\x07 \x01(\rR\x08services\x12&\n\x0flast_block_hash\x18\x08 \x01(\tR\rlastBlockHash\x12\x16\n\x06height\x18\t \x01(\rR\x06height\x12)\n\x10received_bundles\x18\n \x01(\x05R\x0freceivedBundles\x12\'\n\x0finvalid_bundles\x18\x0b \x01(\x05R\x0einvalidBundles\x12\x1b\n\tlast_sent\x18\x0c \x01(\x03R\x08lastSent\x12#\n\rlast_received\x18\r \x01(\x03R\x0clastReceived\x12>\n\nsent_bytes\x18\x0e \x03(\x0b\x32\x1f.pactus.PeerInfo.SentBytesEntryR\tsentBytes\x12J\n\x0ereceived_bytes\x18\x0f \x03(\x0b\x32#.pactus.PeerInfo.ReceivedBytesEntryR\rreceivedBytes\x12\x18\n\x07\x61\x64\x64ress\x18\x10 \x01(\tR\x07\x61\x64\x64ress\x12\x1c\n\tdirection\x18\x11 \x01(\tR\tdirection\x12\x1c\n\tprotocols\x18\x12 \x03(\tR\tprotocols\x12%\n\x0etotal_sessions\x18\x13 \x01(\x05R\rtotalSessions\x12-\n\x12\x63ompleted_sessions\x18\x14 \x01(\x05R\x11\x63ompletedSessions\x1a<\n\x0eSentBytesEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\x1a@\n\x12ReceivedBytesEntry\x12\x10\n\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n\x05value\x18\x02 \x01(\x03R\x05value:\x02\x38\x01\"\x96\x01\n\x0e\x43onnectionInfo\x12 \n\x0b\x63onnections\x18\x01 \x01(\x04R\x0b\x63onnections\x12/\n\x13inbound_connections\x18\x02 \x01(\x04R\x12inboundConnections\x12\x31\n\x14outbound_connections\x18\x03 \x01(\x04R\x13outboundConnections2\xa2\x01\n\x07Network\x12O\n\x0eGetNetworkInfo\x12\x1d.pactus.GetNetworkInfoRequest\x1a\x1e.pactus.GetNetworkInfoResponse\x12\x46\n\x0bGetNodeInfo\x12\x1a.pactus.GetNodeInfoRequest\x1a\x1b.pactus.GetNodeInfoResponseBB\n\x0epactus.networkZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'network_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\016pactus.networkZ0github.com/pactus-project/pactus/www/grpc/pactus' + _GETNETWORKINFORESPONSE_SENTBYTESENTRY._options = None + _GETNETWORKINFORESPONSE_SENTBYTESENTRY._serialized_options = b'8\001' + _GETNETWORKINFORESPONSE_RECEIVEDBYTESENTRY._options = None + _GETNETWORKINFORESPONSE_RECEIVEDBYTESENTRY._serialized_options = b'8\001' + _PEERINFO_SENTBYTESENTRY._options = None + _PEERINFO_SENTBYTESENTRY._serialized_options = b'8\001' + _PEERINFO_RECEIVEDBYTESENTRY._options = None + _PEERINFO_RECEIVEDBYTESENTRY._serialized_options = b'8\001' + _GETNETWORKINFOREQUEST._serialized_start=25 + _GETNETWORKINFOREQUEST._serialized_end=87 + _GETNETWORKINFORESPONSE._serialized_start=90 + _GETNETWORKINFORESPONSE._serialized_end=648 + _GETNETWORKINFORESPONSE_SENTBYTESENTRY._serialized_start=522 + _GETNETWORKINFORESPONSE_SENTBYTESENTRY._serialized_end=582 + _GETNETWORKINFORESPONSE_RECEIVEDBYTESENTRY._serialized_start=584 + _GETNETWORKINFORESPONSE_RECEIVEDBYTESENTRY._serialized_end=648 + _GETNODEINFOREQUEST._serialized_start=650 + _GETNODEINFOREQUEST._serialized_end=670 + _GETNODEINFORESPONSE._serialized_start=673 + _GETNODEINFORESPONSE._serialized_end=1064 + _PEERINFO._serialized_start=1067 + _PEERINFO._serialized_end=1944 + _PEERINFO_SENTBYTESENTRY._serialized_start=522 + _PEERINFO_SENTBYTESENTRY._serialized_end=582 + _PEERINFO_RECEIVEDBYTESENTRY._serialized_start=584 + _PEERINFO_RECEIVEDBYTESENTRY._serialized_end=648 + _CONNECTIONINFO._serialized_start=1947 + _CONNECTIONINFO._serialized_end=2097 + _NETWORK._serialized_start=2100 + _NETWORK._serialized_end=2262 +# @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/network_pb2.pyi b/www/grpc/gen/python/network_pb2.pyi new file mode 100644 index 000000000..c0145a42f --- /dev/null +++ b/www/grpc/gen/python/network_pb2.pyi @@ -0,0 +1,142 @@ +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class GetNetworkInfoRequest(_message.Message): + __slots__ = ("only_connected",) + ONLY_CONNECTED_FIELD_NUMBER: _ClassVar[int] + only_connected: bool + def __init__(self, only_connected: bool = ...) -> None: ... + +class GetNetworkInfoResponse(_message.Message): + __slots__ = ("network_name", "total_sent_bytes", "total_received_bytes", "connected_peers_count", "connected_peers", "sent_bytes", "received_bytes") + class SentBytesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: int + value: int + def __init__(self, key: _Optional[int] = ..., value: _Optional[int] = ...) -> None: ... + class ReceivedBytesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: int + value: int + def __init__(self, key: _Optional[int] = ..., value: _Optional[int] = ...) -> None: ... + NETWORK_NAME_FIELD_NUMBER: _ClassVar[int] + TOTAL_SENT_BYTES_FIELD_NUMBER: _ClassVar[int] + TOTAL_RECEIVED_BYTES_FIELD_NUMBER: _ClassVar[int] + CONNECTED_PEERS_COUNT_FIELD_NUMBER: _ClassVar[int] + CONNECTED_PEERS_FIELD_NUMBER: _ClassVar[int] + SENT_BYTES_FIELD_NUMBER: _ClassVar[int] + RECEIVED_BYTES_FIELD_NUMBER: _ClassVar[int] + network_name: str + total_sent_bytes: int + total_received_bytes: int + connected_peers_count: int + connected_peers: _containers.RepeatedCompositeFieldContainer[PeerInfo] + sent_bytes: _containers.ScalarMap[int, int] + received_bytes: _containers.ScalarMap[int, int] + def __init__(self, network_name: _Optional[str] = ..., total_sent_bytes: _Optional[int] = ..., total_received_bytes: _Optional[int] = ..., connected_peers_count: _Optional[int] = ..., connected_peers: _Optional[_Iterable[_Union[PeerInfo, _Mapping]]] = ..., sent_bytes: _Optional[_Mapping[int, int]] = ..., received_bytes: _Optional[_Mapping[int, int]] = ...) -> None: ... + +class GetNodeInfoRequest(_message.Message): + __slots__ = () + def __init__(self) -> None: ... + +class GetNodeInfoResponse(_message.Message): + __slots__ = ("moniker", "agent", "peer_id", "started_at", "reachability", "services", "services_names", "local_addrs", "protocols", "clock_offset", "connection_info") + MONIKER_FIELD_NUMBER: _ClassVar[int] + AGENT_FIELD_NUMBER: _ClassVar[int] + PEER_ID_FIELD_NUMBER: _ClassVar[int] + STARTED_AT_FIELD_NUMBER: _ClassVar[int] + REACHABILITY_FIELD_NUMBER: _ClassVar[int] + SERVICES_FIELD_NUMBER: _ClassVar[int] + SERVICES_NAMES_FIELD_NUMBER: _ClassVar[int] + LOCAL_ADDRS_FIELD_NUMBER: _ClassVar[int] + PROTOCOLS_FIELD_NUMBER: _ClassVar[int] + CLOCK_OFFSET_FIELD_NUMBER: _ClassVar[int] + CONNECTION_INFO_FIELD_NUMBER: _ClassVar[int] + moniker: str + agent: str + peer_id: str + started_at: int + reachability: str + services: int + services_names: str + local_addrs: _containers.RepeatedScalarFieldContainer[str] + protocols: _containers.RepeatedScalarFieldContainer[str] + clock_offset: float + connection_info: ConnectionInfo + def __init__(self, moniker: _Optional[str] = ..., agent: _Optional[str] = ..., peer_id: _Optional[str] = ..., started_at: _Optional[int] = ..., reachability: _Optional[str] = ..., services: _Optional[int] = ..., services_names: _Optional[str] = ..., local_addrs: _Optional[_Iterable[str]] = ..., protocols: _Optional[_Iterable[str]] = ..., clock_offset: _Optional[float] = ..., connection_info: _Optional[_Union[ConnectionInfo, _Mapping]] = ...) -> None: ... + +class PeerInfo(_message.Message): + __slots__ = ("status", "moniker", "agent", "peer_id", "consensus_keys", "consensus_addresses", "services", "last_block_hash", "height", "received_bundles", "invalid_bundles", "last_sent", "last_received", "sent_bytes", "received_bytes", "address", "direction", "protocols", "total_sessions", "completed_sessions") + class SentBytesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: int + value: int + def __init__(self, key: _Optional[int] = ..., value: _Optional[int] = ...) -> None: ... + class ReceivedBytesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: int + value: int + def __init__(self, key: _Optional[int] = ..., value: _Optional[int] = ...) -> None: ... + STATUS_FIELD_NUMBER: _ClassVar[int] + MONIKER_FIELD_NUMBER: _ClassVar[int] + AGENT_FIELD_NUMBER: _ClassVar[int] + PEER_ID_FIELD_NUMBER: _ClassVar[int] + CONSENSUS_KEYS_FIELD_NUMBER: _ClassVar[int] + CONSENSUS_ADDRESSES_FIELD_NUMBER: _ClassVar[int] + SERVICES_FIELD_NUMBER: _ClassVar[int] + LAST_BLOCK_HASH_FIELD_NUMBER: _ClassVar[int] + HEIGHT_FIELD_NUMBER: _ClassVar[int] + RECEIVED_BUNDLES_FIELD_NUMBER: _ClassVar[int] + INVALID_BUNDLES_FIELD_NUMBER: _ClassVar[int] + LAST_SENT_FIELD_NUMBER: _ClassVar[int] + LAST_RECEIVED_FIELD_NUMBER: _ClassVar[int] + SENT_BYTES_FIELD_NUMBER: _ClassVar[int] + RECEIVED_BYTES_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] + DIRECTION_FIELD_NUMBER: _ClassVar[int] + PROTOCOLS_FIELD_NUMBER: _ClassVar[int] + TOTAL_SESSIONS_FIELD_NUMBER: _ClassVar[int] + COMPLETED_SESSIONS_FIELD_NUMBER: _ClassVar[int] + status: int + moniker: str + agent: str + peer_id: str + consensus_keys: _containers.RepeatedScalarFieldContainer[str] + consensus_addresses: _containers.RepeatedScalarFieldContainer[str] + services: int + last_block_hash: str + height: int + received_bundles: int + invalid_bundles: int + last_sent: int + last_received: int + sent_bytes: _containers.ScalarMap[int, int] + received_bytes: _containers.ScalarMap[int, int] + address: str + direction: str + protocols: _containers.RepeatedScalarFieldContainer[str] + total_sessions: int + completed_sessions: int + def __init__(self, status: _Optional[int] = ..., moniker: _Optional[str] = ..., agent: _Optional[str] = ..., peer_id: _Optional[str] = ..., consensus_keys: _Optional[_Iterable[str]] = ..., consensus_addresses: _Optional[_Iterable[str]] = ..., services: _Optional[int] = ..., last_block_hash: _Optional[str] = ..., height: _Optional[int] = ..., received_bundles: _Optional[int] = ..., invalid_bundles: _Optional[int] = ..., last_sent: _Optional[int] = ..., last_received: _Optional[int] = ..., sent_bytes: _Optional[_Mapping[int, int]] = ..., received_bytes: _Optional[_Mapping[int, int]] = ..., address: _Optional[str] = ..., direction: _Optional[str] = ..., protocols: _Optional[_Iterable[str]] = ..., total_sessions: _Optional[int] = ..., completed_sessions: _Optional[int] = ...) -> None: ... + +class ConnectionInfo(_message.Message): + __slots__ = ("connections", "inbound_connections", "outbound_connections") + CONNECTIONS_FIELD_NUMBER: _ClassVar[int] + INBOUND_CONNECTIONS_FIELD_NUMBER: _ClassVar[int] + OUTBOUND_CONNECTIONS_FIELD_NUMBER: _ClassVar[int] + connections: int + inbound_connections: int + outbound_connections: int + def __init__(self, connections: _Optional[int] = ..., inbound_connections: _Optional[int] = ..., outbound_connections: _Optional[int] = ...) -> None: ... diff --git a/www/grpc/gen/python/network_pb2_grpc.py b/www/grpc/gen/python/network_pb2_grpc.py new file mode 100644 index 000000000..3caacf583 --- /dev/null +++ b/www/grpc/gen/python/network_pb2_grpc.py @@ -0,0 +1,104 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import network_pb2 as network__pb2 + + +class NetworkStub(object): + """Network service provides RPCs for retrieving information about the network. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetNetworkInfo = channel.unary_unary( + '/pactus.Network/GetNetworkInfo', + request_serializer=network__pb2.GetNetworkInfoRequest.SerializeToString, + response_deserializer=network__pb2.GetNetworkInfoResponse.FromString, + ) + self.GetNodeInfo = channel.unary_unary( + '/pactus.Network/GetNodeInfo', + request_serializer=network__pb2.GetNodeInfoRequest.SerializeToString, + response_deserializer=network__pb2.GetNodeInfoResponse.FromString, + ) + + +class NetworkServicer(object): + """Network service provides RPCs for retrieving information about the network. + """ + + def GetNetworkInfo(self, request, context): + """GetNetworkInfo retrieves information about the overall network. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetNodeInfo(self, request, context): + """GetNodeInfo retrieves information about a specific node in the network. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_NetworkServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetNetworkInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetNetworkInfo, + request_deserializer=network__pb2.GetNetworkInfoRequest.FromString, + response_serializer=network__pb2.GetNetworkInfoResponse.SerializeToString, + ), + 'GetNodeInfo': grpc.unary_unary_rpc_method_handler( + servicer.GetNodeInfo, + request_deserializer=network__pb2.GetNodeInfoRequest.FromString, + response_serializer=network__pb2.GetNodeInfoResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'pactus.Network', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Network(object): + """Network service provides RPCs for retrieving information about the network. + """ + + @staticmethod + def GetNetworkInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Network/GetNetworkInfo', + network__pb2.GetNetworkInfoRequest.SerializeToString, + network__pb2.GetNetworkInfoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetNodeInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Network/GetNodeInfo', + network__pb2.GetNodeInfoRequest.SerializeToString, + network__pb2.GetNodeInfoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/python/transaction_pb2.py b/www/grpc/gen/python/transaction_pb2.py new file mode 100644 index 000000000..a1963296a --- /dev/null +++ b/www/grpc/gen/python/transaction_pb2.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: transaction.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11transaction.proto\x12\x06pactus\"c\n\x15GetTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tverbosity\x18\x02 \x01(\x0e\x32\x1c.pactus.TransactionVerbosityR\tverbosity\"\x95\x01\n\x16GetTransactionResponse\x12!\n\x0c\x62lock_height\x18\x01 \x01(\rR\x0b\x62lockHeight\x12\x1d\n\nblock_time\x18\x02 \x01(\rR\tblockTime\x12\x39\n\x0btransaction\x18\x03 \x01(\x0b\x32\x17.pactus.TransactionInfoR\x0btransaction\"\x88\x01\n\x13\x43\x61lculateFeeRequest\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x36\n\x0cpayload_type\x18\x02 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12!\n\x0c\x66ixed_amount\x18\x03 \x01(\x08R\x0b\x66ixedAmount\"@\n\x14\x43\x61lculateFeeResponse\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x02 \x01(\x03R\x03\x66\x65\x65\"S\n\x1b\x42roadcastTransactionRequest\x12\x34\n\x16signed_raw_transaction\x18\x01 \x01(\tR\x14signedRawTransaction\".\n\x1c\x42roadcastTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xe8\x02\n\x18GetRawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x12\n\x04memo\x18\x02 \x01(\tR\x04memo\x12\x46\n\x08transfer\x18\x03 \x01(\x0b\x32(.pactus.GetRawTransferTransactionRequestH\x00R\x08transfer\x12:\n\x04\x62ond\x18\x04 \x01(\x0b\x32$.pactus.GetRawBondTransactionRequestH\x00R\x04\x62ond\x12@\n\x06unbond\x18\x05 \x01(\x0b\x32&.pactus.GetRawUnbondTransactionRequestH\x00R\x06unbond\x12\x46\n\x08withdraw\x18\x06 \x01(\x0b\x32(.pactus.GetRawWithdrawTransactionRequestH\x00R\x08withdrawB\r\n\x0btransaction\"\x80\x01\n GetRawTransferTransactionRequest\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"\x99\x01\n\x1cGetRawBondTransactionRequest\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x04 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\"M\n\x1eGetRawUnbondTransactionRequest\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\"\xa2\x01\n GetRawWithdrawTransactionRequest\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x02 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"D\n\x19GetRawTransactionResponse\x12\'\n\x0fraw_transaction\x18\x01 \x01(\tR\x0erawTransaction\"]\n\x0fPayloadTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"W\n\x0bPayloadBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\"B\n\x10PayloadSortition\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x14\n\x05proof\x18\x02 \x01(\tR\x05proof\"-\n\rPayloadUnbond\x12\x1c\n\tvalidator\x18\x01 \x01(\tR\tvalidator\"M\n\x0fPayloadWithdraw\x12\x12\n\x04\x66rom\x18\x01 \x01(\tR\x04\x66rom\x12\x0e\n\x02to\x18\x02 \x01(\tR\x02to\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"\xac\x04\n\x0fTransactionInfo\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x18\n\x07version\x18\x03 \x01(\x05R\x07version\x12\x1b\n\tlock_time\x18\x04 \x01(\rR\x08lockTime\x12\x14\n\x05value\x18\x05 \x01(\x03R\x05value\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x36\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12\x35\n\x08transfer\x18\x1e \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x1f \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12\x38\n\tsortition\x18 \x01(\x0b\x32\x18.pactus.PayloadSortitionH\x00R\tsortition\x12/\n\x06unbond\x18! \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\" \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdraw\x12\x12\n\x04memo\x18\x08 \x01(\tR\x04memo\x12\x1d\n\npublic_key\x18\t \x01(\tR\tpublicKey\x12\x1c\n\tsignature\x18\n \x01(\tR\tsignatureB\t\n\x07payload*\x83\x01\n\x0bPayloadType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10TRANSFER_PAYLOAD\x10\x01\x12\x10\n\x0c\x42OND_PAYLOAD\x10\x02\x12\x15\n\x11SORTITION_PAYLOAD\x10\x03\x12\x12\n\x0eUNBOND_PAYLOAD\x10\x04\x12\x14\n\x10WITHDRAW_PAYLOAD\x10\x05*B\n\x14TransactionVerbosity\x12\x14\n\x10TRANSACTION_DATA\x10\x00\x12\x14\n\x10TRANSACTION_INFO\x10\x01\x32\xe6\x02\n\x0bTransaction\x12O\n\x0eGetTransaction\x12\x1d.pactus.GetTransactionRequest\x1a\x1e.pactus.GetTransactionResponse\x12I\n\x0c\x43\x61lculateFee\x12\x1b.pactus.CalculateFeeRequest\x1a\x1c.pactus.CalculateFeeResponse\x12\x61\n\x14\x42roadcastTransaction\x12#.pactus.BroadcastTransactionRequest\x1a$.pactus.BroadcastTransactionResponse\x12X\n\x11GetRawTransaction\x12 .pactus.GetRawTransactionRequest\x1a!.pactus.GetRawTransactionResponseBF\n\x12pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'transaction_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\022pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactus' + _PAYLOADTYPE._serialized_start=2522 + _PAYLOADTYPE._serialized_end=2653 + _TRANSACTIONVERBOSITY._serialized_start=2655 + _TRANSACTIONVERBOSITY._serialized_end=2721 + _GETTRANSACTIONREQUEST._serialized_start=29 + _GETTRANSACTIONREQUEST._serialized_end=128 + _GETTRANSACTIONRESPONSE._serialized_start=131 + _GETTRANSACTIONRESPONSE._serialized_end=280 + _CALCULATEFEEREQUEST._serialized_start=283 + _CALCULATEFEEREQUEST._serialized_end=419 + _CALCULATEFEERESPONSE._serialized_start=421 + _CALCULATEFEERESPONSE._serialized_end=485 + _BROADCASTTRANSACTIONREQUEST._serialized_start=487 + _BROADCASTTRANSACTIONREQUEST._serialized_end=570 + _BROADCASTTRANSACTIONRESPONSE._serialized_start=572 + _BROADCASTTRANSACTIONRESPONSE._serialized_end=618 + _GETRAWTRANSACTIONREQUEST._serialized_start=621 + _GETRAWTRANSACTIONREQUEST._serialized_end=981 + _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_start=984 + _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_end=1112 + _GETRAWBONDTRANSACTIONREQUEST._serialized_start=1115 + _GETRAWBONDTRANSACTIONREQUEST._serialized_end=1268 + _GETRAWUNBONDTRANSACTIONREQUEST._serialized_start=1270 + _GETRAWUNBONDTRANSACTIONREQUEST._serialized_end=1347 + _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_start=1350 + _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_end=1512 + _GETRAWTRANSACTIONRESPONSE._serialized_start=1514 + _GETRAWTRANSACTIONRESPONSE._serialized_end=1582 + _PAYLOADTRANSFER._serialized_start=1584 + _PAYLOADTRANSFER._serialized_end=1677 + _PAYLOADBOND._serialized_start=1679 + _PAYLOADBOND._serialized_end=1766 + _PAYLOADSORTITION._serialized_start=1768 + _PAYLOADSORTITION._serialized_end=1834 + _PAYLOADUNBOND._serialized_start=1836 + _PAYLOADUNBOND._serialized_end=1881 + _PAYLOADWITHDRAW._serialized_start=1883 + _PAYLOADWITHDRAW._serialized_end=1960 + _TRANSACTIONINFO._serialized_start=1963 + _TRANSACTIONINFO._serialized_end=2519 + _TRANSACTION._serialized_start=2724 + _TRANSACTION._serialized_end=3082 +# @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/transaction_pb2.pyi b/www/grpc/gen/python/transaction_pb2.pyi new file mode 100644 index 000000000..530252213 --- /dev/null +++ b/www/grpc/gen/python/transaction_pb2.pyi @@ -0,0 +1,219 @@ +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class PayloadType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + UNKNOWN: _ClassVar[PayloadType] + TRANSFER_PAYLOAD: _ClassVar[PayloadType] + BOND_PAYLOAD: _ClassVar[PayloadType] + SORTITION_PAYLOAD: _ClassVar[PayloadType] + UNBOND_PAYLOAD: _ClassVar[PayloadType] + WITHDRAW_PAYLOAD: _ClassVar[PayloadType] + +class TransactionVerbosity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + TRANSACTION_DATA: _ClassVar[TransactionVerbosity] + TRANSACTION_INFO: _ClassVar[TransactionVerbosity] +UNKNOWN: PayloadType +TRANSFER_PAYLOAD: PayloadType +BOND_PAYLOAD: PayloadType +SORTITION_PAYLOAD: PayloadType +UNBOND_PAYLOAD: PayloadType +WITHDRAW_PAYLOAD: PayloadType +TRANSACTION_DATA: TransactionVerbosity +TRANSACTION_INFO: TransactionVerbosity + +class GetTransactionRequest(_message.Message): + __slots__ = ("id", "verbosity") + ID_FIELD_NUMBER: _ClassVar[int] + VERBOSITY_FIELD_NUMBER: _ClassVar[int] + id: str + verbosity: TransactionVerbosity + def __init__(self, id: _Optional[str] = ..., verbosity: _Optional[_Union[TransactionVerbosity, str]] = ...) -> None: ... + +class GetTransactionResponse(_message.Message): + __slots__ = ("block_height", "block_time", "transaction") + BLOCK_HEIGHT_FIELD_NUMBER: _ClassVar[int] + BLOCK_TIME_FIELD_NUMBER: _ClassVar[int] + TRANSACTION_FIELD_NUMBER: _ClassVar[int] + block_height: int + block_time: int + transaction: TransactionInfo + def __init__(self, block_height: _Optional[int] = ..., block_time: _Optional[int] = ..., transaction: _Optional[_Union[TransactionInfo, _Mapping]] = ...) -> None: ... + +class CalculateFeeRequest(_message.Message): + __slots__ = ("amount", "payload_type", "fixed_amount") + AMOUNT_FIELD_NUMBER: _ClassVar[int] + PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int] + FIXED_AMOUNT_FIELD_NUMBER: _ClassVar[int] + amount: int + payload_type: PayloadType + fixed_amount: bool + def __init__(self, amount: _Optional[int] = ..., payload_type: _Optional[_Union[PayloadType, str]] = ..., fixed_amount: bool = ...) -> None: ... + +class CalculateFeeResponse(_message.Message): + __slots__ = ("amount", "fee") + AMOUNT_FIELD_NUMBER: _ClassVar[int] + FEE_FIELD_NUMBER: _ClassVar[int] + amount: int + fee: int + def __init__(self, amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... + +class BroadcastTransactionRequest(_message.Message): + __slots__ = ("signed_raw_transaction",) + SIGNED_RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] + signed_raw_transaction: str + def __init__(self, signed_raw_transaction: _Optional[str] = ...) -> None: ... + +class BroadcastTransactionResponse(_message.Message): + __slots__ = ("id",) + ID_FIELD_NUMBER: _ClassVar[int] + id: str + def __init__(self, id: _Optional[str] = ...) -> None: ... + +class GetRawTransactionRequest(_message.Message): + __slots__ = ("lock_time", "memo", "transfer", "bond", "unbond", "withdraw") + LOCK_TIME_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + TRANSFER_FIELD_NUMBER: _ClassVar[int] + BOND_FIELD_NUMBER: _ClassVar[int] + UNBOND_FIELD_NUMBER: _ClassVar[int] + WITHDRAW_FIELD_NUMBER: _ClassVar[int] + lock_time: int + memo: str + transfer: GetRawTransferTransactionRequest + bond: GetRawBondTransactionRequest + unbond: GetRawUnbondTransactionRequest + withdraw: GetRawWithdrawTransactionRequest + def __init__(self, lock_time: _Optional[int] = ..., memo: _Optional[str] = ..., transfer: _Optional[_Union[GetRawTransferTransactionRequest, _Mapping]] = ..., bond: _Optional[_Union[GetRawBondTransactionRequest, _Mapping]] = ..., unbond: _Optional[_Union[GetRawUnbondTransactionRequest, _Mapping]] = ..., withdraw: _Optional[_Union[GetRawWithdrawTransactionRequest, _Mapping]] = ...) -> None: ... + +class GetRawTransferTransactionRequest(_message.Message): + __slots__ = ("sender", "receiver", "amount", "fee") + SENDER_FIELD_NUMBER: _ClassVar[int] + RECEIVER_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + FEE_FIELD_NUMBER: _ClassVar[int] + sender: str + receiver: str + amount: int + fee: int + def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... + +class GetRawBondTransactionRequest(_message.Message): + __slots__ = ("sender", "receiver", "stake", "public_key", "fee") + SENDER_FIELD_NUMBER: _ClassVar[int] + RECEIVER_FIELD_NUMBER: _ClassVar[int] + STAKE_FIELD_NUMBER: _ClassVar[int] + PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] + FEE_FIELD_NUMBER: _ClassVar[int] + sender: str + receiver: str + stake: int + public_key: str + fee: int + def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ..., fee: _Optional[int] = ...) -> None: ... + +class GetRawUnbondTransactionRequest(_message.Message): + __slots__ = ("validator_address",) + VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] + validator_address: str + def __init__(self, validator_address: _Optional[str] = ...) -> None: ... + +class GetRawWithdrawTransactionRequest(_message.Message): + __slots__ = ("validator_address", "account_address", "amount", "fee") + VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + FEE_FIELD_NUMBER: _ClassVar[int] + validator_address: str + account_address: str + amount: int + fee: int + def __init__(self, validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... + +class GetRawTransactionResponse(_message.Message): + __slots__ = ("raw_transaction",) + RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] + raw_transaction: str + def __init__(self, raw_transaction: _Optional[str] = ...) -> None: ... + +class PayloadTransfer(_message.Message): + __slots__ = ("sender", "receiver", "amount") + SENDER_FIELD_NUMBER: _ClassVar[int] + RECEIVER_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + sender: str + receiver: str + amount: int + def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ... + +class PayloadBond(_message.Message): + __slots__ = ("sender", "receiver", "stake") + SENDER_FIELD_NUMBER: _ClassVar[int] + RECEIVER_FIELD_NUMBER: _ClassVar[int] + STAKE_FIELD_NUMBER: _ClassVar[int] + sender: str + receiver: str + stake: int + def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ...) -> None: ... + +class PayloadSortition(_message.Message): + __slots__ = ("address", "proof") + ADDRESS_FIELD_NUMBER: _ClassVar[int] + PROOF_FIELD_NUMBER: _ClassVar[int] + address: str + proof: str + def __init__(self, address: _Optional[str] = ..., proof: _Optional[str] = ...) -> None: ... + +class PayloadUnbond(_message.Message): + __slots__ = ("validator",) + VALIDATOR_FIELD_NUMBER: _ClassVar[int] + validator: str + def __init__(self, validator: _Optional[str] = ...) -> None: ... + +class PayloadWithdraw(_message.Message): + __slots__ = ("to", "amount") + FROM_FIELD_NUMBER: _ClassVar[int] + TO_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + to: str + amount: int + def __init__(self, to: _Optional[str] = ..., amount: _Optional[int] = ..., **kwargs) -> None: ... + +class TransactionInfo(_message.Message): + __slots__ = ("id", "data", "version", "lock_time", "value", "fee", "payload_type", "transfer", "bond", "sortition", "unbond", "withdraw", "memo", "public_key", "signature") + ID_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + LOCK_TIME_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + FEE_FIELD_NUMBER: _ClassVar[int] + PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int] + TRANSFER_FIELD_NUMBER: _ClassVar[int] + BOND_FIELD_NUMBER: _ClassVar[int] + SORTITION_FIELD_NUMBER: _ClassVar[int] + UNBOND_FIELD_NUMBER: _ClassVar[int] + WITHDRAW_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + id: str + data: str + version: int + lock_time: int + value: int + fee: int + payload_type: PayloadType + transfer: PayloadTransfer + bond: PayloadBond + sortition: PayloadSortition + unbond: PayloadUnbond + withdraw: PayloadWithdraw + memo: str + public_key: str + signature: str + def __init__(self, id: _Optional[str] = ..., data: _Optional[str] = ..., version: _Optional[int] = ..., lock_time: _Optional[int] = ..., value: _Optional[int] = ..., fee: _Optional[int] = ..., payload_type: _Optional[_Union[PayloadType, str]] = ..., transfer: _Optional[_Union[PayloadTransfer, _Mapping]] = ..., bond: _Optional[_Union[PayloadBond, _Mapping]] = ..., sortition: _Optional[_Union[PayloadSortition, _Mapping]] = ..., unbond: _Optional[_Union[PayloadUnbond, _Mapping]] = ..., withdraw: _Optional[_Union[PayloadWithdraw, _Mapping]] = ..., memo: _Optional[str] = ..., public_key: _Optional[str] = ..., signature: _Optional[str] = ...) -> None: ... diff --git a/www/grpc/gen/python/transaction_pb2_grpc.py b/www/grpc/gen/python/transaction_pb2_grpc.py new file mode 100644 index 000000000..d4e37cb64 --- /dev/null +++ b/www/grpc/gen/python/transaction_pb2_grpc.py @@ -0,0 +1,177 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import transaction_pb2 as transaction__pb2 + + +class TransactionStub(object): + """Transaction service defines various RPC methods for interacting with + transactions. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetTransaction = channel.unary_unary( + '/pactus.Transaction/GetTransaction', + request_serializer=transaction__pb2.GetTransactionRequest.SerializeToString, + response_deserializer=transaction__pb2.GetTransactionResponse.FromString, + ) + self.CalculateFee = channel.unary_unary( + '/pactus.Transaction/CalculateFee', + request_serializer=transaction__pb2.CalculateFeeRequest.SerializeToString, + response_deserializer=transaction__pb2.CalculateFeeResponse.FromString, + ) + self.BroadcastTransaction = channel.unary_unary( + '/pactus.Transaction/BroadcastTransaction', + request_serializer=transaction__pb2.BroadcastTransactionRequest.SerializeToString, + response_deserializer=transaction__pb2.BroadcastTransactionResponse.FromString, + ) + self.GetRawTransaction = channel.unary_unary( + '/pactus.Transaction/GetRawTransaction', + request_serializer=transaction__pb2.GetRawTransactionRequest.SerializeToString, + response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString, + ) + + +class TransactionServicer(object): + """Transaction service defines various RPC methods for interacting with + transactions. + """ + + def GetTransaction(self, request, context): + """GetTransaction retrieves transaction details based on the provided request + parameters. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CalculateFee(self, request, context): + """CalculateFee calculates the transaction fee based on the specified amount + and payload type. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def BroadcastTransaction(self, request, context): + """BroadcastTransaction broadcasts a signed transaction to the network. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetRawTransaction(self, request, context): + """GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_TransactionServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetTransaction': grpc.unary_unary_rpc_method_handler( + servicer.GetTransaction, + request_deserializer=transaction__pb2.GetTransactionRequest.FromString, + response_serializer=transaction__pb2.GetTransactionResponse.SerializeToString, + ), + 'CalculateFee': grpc.unary_unary_rpc_method_handler( + servicer.CalculateFee, + request_deserializer=transaction__pb2.CalculateFeeRequest.FromString, + response_serializer=transaction__pb2.CalculateFeeResponse.SerializeToString, + ), + 'BroadcastTransaction': grpc.unary_unary_rpc_method_handler( + servicer.BroadcastTransaction, + request_deserializer=transaction__pb2.BroadcastTransactionRequest.FromString, + response_serializer=transaction__pb2.BroadcastTransactionResponse.SerializeToString, + ), + 'GetRawTransaction': grpc.unary_unary_rpc_method_handler( + servicer.GetRawTransaction, + request_deserializer=transaction__pb2.GetRawTransactionRequest.FromString, + response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'pactus.Transaction', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Transaction(object): + """Transaction service defines various RPC methods for interacting with + transactions. + """ + + @staticmethod + def GetTransaction(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetTransaction', + transaction__pb2.GetTransactionRequest.SerializeToString, + transaction__pb2.GetTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CalculateFee(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/CalculateFee', + transaction__pb2.CalculateFeeRequest.SerializeToString, + transaction__pb2.CalculateFeeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def BroadcastTransaction(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/BroadcastTransaction', + transaction__pb2.BroadcastTransactionRequest.SerializeToString, + transaction__pb2.BroadcastTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetRawTransaction(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetRawTransaction', + transaction__pb2.GetRawTransactionRequest.SerializeToString, + transaction__pb2.GetRawTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/python/utils_pb2.py b/www/grpc/gen/python/utils_pb2.py new file mode 100644 index 000000000..7861e87ad --- /dev/null +++ b/www/grpc/gen/python/utils_pb2.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: utils.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0butils.proto\x12\x06pactus\"]\n SignMessageWithPrivateKeyRequest\x12\x1f\n\x0bprivate_key\x18\x01 \x01(\tR\nprivateKey\x12\x18\n\x07message\x18\x02 \x01(\tR\x07message\"A\n!SignMessageWithPrivateKeyResponse\x12\x1c\n\tsignature\x18\x01 \x01(\tR\tsignature\"m\n\x14VerifyMessageRequest\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\x12\x1c\n\tsignature\x18\x02 \x01(\tR\tsignature\x12\x1d\n\npublic_key\x18\x03 \x01(\tR\tpublicKey\"2\n\x15VerifyMessageResponse\x12\x19\n\x08is_valid\x18\x01 \x01(\x08R\x07isValid2\xc7\x01\n\x05Utils\x12p\n\x19SignMessageWithPrivateKey\x12(.pactus.SignMessageWithPrivateKeyRequest\x1a).pactus.SignMessageWithPrivateKeyResponse\x12L\n\rVerifyMessage\x12\x1c.pactus.VerifyMessageRequest\x1a\x1d.pactus.VerifyMessageResponseB@\n\x0cpactus.utilsZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'utils_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\014pactus.utilsZ0github.com/pactus-project/pactus/www/grpc/pactus' + _SIGNMESSAGEWITHPRIVATEKEYREQUEST._serialized_start=23 + _SIGNMESSAGEWITHPRIVATEKEYREQUEST._serialized_end=116 + _SIGNMESSAGEWITHPRIVATEKEYRESPONSE._serialized_start=118 + _SIGNMESSAGEWITHPRIVATEKEYRESPONSE._serialized_end=183 + _VERIFYMESSAGEREQUEST._serialized_start=185 + _VERIFYMESSAGEREQUEST._serialized_end=294 + _VERIFYMESSAGERESPONSE._serialized_start=296 + _VERIFYMESSAGERESPONSE._serialized_end=346 + _UTILS._serialized_start=349 + _UTILS._serialized_end=548 +# @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/utils_pb2.pyi b/www/grpc/gen/python/utils_pb2.pyi new file mode 100644 index 000000000..0bfaf6e53 --- /dev/null +++ b/www/grpc/gen/python/utils_pb2.pyi @@ -0,0 +1,35 @@ +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Optional as _Optional + +DESCRIPTOR: _descriptor.FileDescriptor + +class SignMessageWithPrivateKeyRequest(_message.Message): + __slots__ = ("private_key", "message") + PRIVATE_KEY_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + private_key: str + message: str + def __init__(self, private_key: _Optional[str] = ..., message: _Optional[str] = ...) -> None: ... + +class SignMessageWithPrivateKeyResponse(_message.Message): + __slots__ = ("signature",) + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + signature: str + def __init__(self, signature: _Optional[str] = ...) -> None: ... + +class VerifyMessageRequest(_message.Message): + __slots__ = ("message", "signature", "public_key") + MESSAGE_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] + message: str + signature: str + public_key: str + def __init__(self, message: _Optional[str] = ..., signature: _Optional[str] = ..., public_key: _Optional[str] = ...) -> None: ... + +class VerifyMessageResponse(_message.Message): + __slots__ = ("is_valid",) + IS_VALID_FIELD_NUMBER: _ClassVar[int] + is_valid: bool + def __init__(self, is_valid: bool = ...) -> None: ... diff --git a/www/grpc/gen/python/utils_pb2_grpc.py b/www/grpc/gen/python/utils_pb2_grpc.py new file mode 100644 index 000000000..90e02e1c8 --- /dev/null +++ b/www/grpc/gen/python/utils_pb2_grpc.py @@ -0,0 +1,107 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import utils_pb2 as utils__pb2 + + +class UtilsStub(object): + """Utils service defines RPC methods for utility functions such as message + signing and verification. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.SignMessageWithPrivateKey = channel.unary_unary( + '/pactus.Utils/SignMessageWithPrivateKey', + request_serializer=utils__pb2.SignMessageWithPrivateKeyRequest.SerializeToString, + response_deserializer=utils__pb2.SignMessageWithPrivateKeyResponse.FromString, + ) + self.VerifyMessage = channel.unary_unary( + '/pactus.Utils/VerifyMessage', + request_serializer=utils__pb2.VerifyMessageRequest.SerializeToString, + response_deserializer=utils__pb2.VerifyMessageResponse.FromString, + ) + + +class UtilsServicer(object): + """Utils service defines RPC methods for utility functions such as message + signing and verification. + """ + + def SignMessageWithPrivateKey(self, request, context): + """SignMessageWithPrivateKey sign message with provided private key. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VerifyMessage(self, request, context): + """VerifyMessage verify signature with public key and message + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_UtilsServicer_to_server(servicer, server): + rpc_method_handlers = { + 'SignMessageWithPrivateKey': grpc.unary_unary_rpc_method_handler( + servicer.SignMessageWithPrivateKey, + request_deserializer=utils__pb2.SignMessageWithPrivateKeyRequest.FromString, + response_serializer=utils__pb2.SignMessageWithPrivateKeyResponse.SerializeToString, + ), + 'VerifyMessage': grpc.unary_unary_rpc_method_handler( + servicer.VerifyMessage, + request_deserializer=utils__pb2.VerifyMessageRequest.FromString, + response_serializer=utils__pb2.VerifyMessageResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'pactus.Utils', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Utils(object): + """Utils service defines RPC methods for utility functions such as message + signing and verification. + """ + + @staticmethod + def SignMessageWithPrivateKey(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Utils/SignMessageWithPrivateKey', + utils__pb2.SignMessageWithPrivateKeyRequest.SerializeToString, + utils__pb2.SignMessageWithPrivateKeyResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def VerifyMessage(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Utils/VerifyMessage', + utils__pb2.VerifyMessageRequest.SerializeToString, + utils__pb2.VerifyMessageResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/python/wallet_pb2.py b/www/grpc/gen/python/wallet_pb2.py new file mode 100644 index 000000000..2f2b028d4 --- /dev/null +++ b/www/grpc/gen/python/wallet_pb2.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: wallet.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import builder as _builder +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import transaction_pb2 as transaction__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cwallet.proto\x12\x06pactus\x1a\x11transaction.proto\"p\n\x0b\x41\x64\x64ressInfo\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x1d\n\npublic_key\x18\x02 \x01(\tR\tpublicKey\x12\x14\n\x05label\x18\x03 \x01(\tR\x05label\x12\x12\n\x04path\x18\x04 \x01(\tR\x04path\"\xa5\x01\n\x0bHistoryInfo\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\x12\x12\n\x04time\x18\x02 \x01(\rR\x04time\x12!\n\x0cpayload_type\x18\x03 \x01(\tR\x0bpayloadType\x12 \n\x0b\x64\x65scription\x18\x04 \x01(\tR\x0b\x64\x65scription\x12\x16\n\x06\x61mount\x18\x05 \x01(\x03R\x06\x61mount\"U\n\x18GetAddressHistoryRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x01(\tR\x07\x61\x64\x64ress\"S\n\x19GetAddressHistoryResponse\x12\x36\n\x0chistory_info\x18\x01 \x03(\x0b\x32\x13.pactus.HistoryInfoR\x0bhistoryInfo\"\xa1\x01\n\x14GetNewAddressRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x36\n\x0c\x61\x64\x64ress_type\x18\x02 \x01(\x0e\x32\x13.pactus.AddressTypeR\x0b\x61\x64\x64ressType\x12\x14\n\x05label\x18\x03 \x01(\tR\x05label\x12\x1a\n\x08password\x18\x04 \x01(\tR\x08password\"p\n\x15GetNewAddressResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x36\n\x0c\x61\x64\x64ress_info\x18\x02 \x01(\x0b\x32\x13.pactus.AddressInfoR\x0b\x61\x64\x64ressInfo\"o\n\x14RestoreWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08mnemonic\x18\x02 \x01(\tR\x08mnemonic\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\"8\n\x15RestoreWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"R\n\x13\x43reateWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08password\x18\x04 \x01(\tR\x08password\"2\n\x14\x43reateWalletResponse\x12\x1a\n\x08mnemonic\x18\x02 \x01(\tR\x08mnemonic\"4\n\x11LoadWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"5\n\x12LoadWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"6\n\x13UnloadWalletRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"7\n\x14UnloadWalletResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\";\n\x1aGetValidatorAddressRequest\x12\x1d\n\npublic_key\x18\x01 \x01(\tR\tpublicKey\"7\n\x1bGetValidatorAddressResponse\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\"\x81\x01\n\x19SignRawTransactionRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\'\n\x0fraw_transaction\x18\x02 \x01(\tR\x0erawTransaction\x12\x1a\n\x08password\x18\x03 \x01(\tR\x08password\"y\n\x1aSignRawTransactionResponse\x12%\n\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\x12\x34\n\x16signed_raw_transaction\x18\x02 \x01(\tR\x14signedRawTransaction\"9\n\x16GetTotalBalanceRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\"_\n\x17GetTotalBalanceResponse\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12#\n\rtotal_balance\x18\x02 \x01(\x03R\x0ctotalBalance\"\x85\x01\n\x12SignMessageRequest\x12\x1f\n\x0bwallet_name\x18\x01 \x01(\tR\nwalletName\x12\x1a\n\x08password\x18\x02 \x01(\tR\x08password\x12\x18\n\x07\x61\x64\x64ress\x18\x03 \x01(\tR\x07\x61\x64\x64ress\x12\x18\n\x07message\x18\x04 \x01(\tR\x07message\"3\n\x13SignMessageResponse\x12\x1c\n\tsignature\x18\x01 \x01(\tR\tsignature*\x84\x01\n\x0b\x41\x64\x64ressType\x12\x19\n\x15\x41\x44\x44RESS_TYPE_TREASURY\x10\x00\x12\x1a\n\x16\x41\x44\x44RESS_TYPE_VALIDATOR\x10\x01\x12\x1c\n\x18\x41\x44\x44RESS_TYPE_BLS_ACCOUNT\x10\x02\x12 \n\x1c\x41\x44\x44RESS_TYPE_ED25519_ACCOUNT\x10\x03\x32\xb2\x06\n\x06Wallet\x12I\n\x0c\x43reateWallet\x12\x1b.pactus.CreateWalletRequest\x1a\x1c.pactus.CreateWalletResponse\x12L\n\rRestoreWallet\x12\x1c.pactus.RestoreWalletRequest\x1a\x1d.pactus.RestoreWalletResponse\x12\x43\n\nLoadWallet\x12\x19.pactus.LoadWalletRequest\x1a\x1a.pactus.LoadWalletResponse\x12I\n\x0cUnloadWallet\x12\x1b.pactus.UnloadWalletRequest\x1a\x1c.pactus.UnloadWalletResponse\x12R\n\x0fGetTotalBalance\x12\x1e.pactus.GetTotalBalanceRequest\x1a\x1f.pactus.GetTotalBalanceResponse\x12[\n\x12SignRawTransaction\x12!.pactus.SignRawTransactionRequest\x1a\".pactus.SignRawTransactionResponse\x12^\n\x13GetValidatorAddress\x12\".pactus.GetValidatorAddressRequest\x1a#.pactus.GetValidatorAddressResponse\x12L\n\rGetNewAddress\x12\x1c.pactus.GetNewAddressRequest\x1a\x1d.pactus.GetNewAddressResponse\x12X\n\x11GetAddressHistory\x12 .pactus.GetAddressHistoryRequest\x1a!.pactus.GetAddressHistoryResponse\x12\x46\n\x0bSignMessage\x12\x1a.pactus.SignMessageRequest\x1a\x1b.pactus.SignMessageResponseBA\n\rpactus.walletZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') + +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'wallet_pb2', globals()) +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'\n\rpactus.walletZ0github.com/pactus-project/pactus/www/grpc/pactus' + _ADDRESSTYPE._serialized_start=2023 + _ADDRESSTYPE._serialized_end=2155 + _ADDRESSINFO._serialized_start=43 + _ADDRESSINFO._serialized_end=155 + _HISTORYINFO._serialized_start=158 + _HISTORYINFO._serialized_end=323 + _GETADDRESSHISTORYREQUEST._serialized_start=325 + _GETADDRESSHISTORYREQUEST._serialized_end=410 + _GETADDRESSHISTORYRESPONSE._serialized_start=412 + _GETADDRESSHISTORYRESPONSE._serialized_end=495 + _GETNEWADDRESSREQUEST._serialized_start=498 + _GETNEWADDRESSREQUEST._serialized_end=659 + _GETNEWADDRESSRESPONSE._serialized_start=661 + _GETNEWADDRESSRESPONSE._serialized_end=773 + _RESTOREWALLETREQUEST._serialized_start=775 + _RESTOREWALLETREQUEST._serialized_end=886 + _RESTOREWALLETRESPONSE._serialized_start=888 + _RESTOREWALLETRESPONSE._serialized_end=944 + _CREATEWALLETREQUEST._serialized_start=946 + _CREATEWALLETREQUEST._serialized_end=1028 + _CREATEWALLETRESPONSE._serialized_start=1030 + _CREATEWALLETRESPONSE._serialized_end=1080 + _LOADWALLETREQUEST._serialized_start=1082 + _LOADWALLETREQUEST._serialized_end=1134 + _LOADWALLETRESPONSE._serialized_start=1136 + _LOADWALLETRESPONSE._serialized_end=1189 + _UNLOADWALLETREQUEST._serialized_start=1191 + _UNLOADWALLETREQUEST._serialized_end=1245 + _UNLOADWALLETRESPONSE._serialized_start=1247 + _UNLOADWALLETRESPONSE._serialized_end=1302 + _GETVALIDATORADDRESSREQUEST._serialized_start=1304 + _GETVALIDATORADDRESSREQUEST._serialized_end=1363 + _GETVALIDATORADDRESSRESPONSE._serialized_start=1365 + _GETVALIDATORADDRESSRESPONSE._serialized_end=1420 + _SIGNRAWTRANSACTIONREQUEST._serialized_start=1423 + _SIGNRAWTRANSACTIONREQUEST._serialized_end=1552 + _SIGNRAWTRANSACTIONRESPONSE._serialized_start=1554 + _SIGNRAWTRANSACTIONRESPONSE._serialized_end=1675 + _GETTOTALBALANCEREQUEST._serialized_start=1677 + _GETTOTALBALANCEREQUEST._serialized_end=1734 + _GETTOTALBALANCERESPONSE._serialized_start=1736 + _GETTOTALBALANCERESPONSE._serialized_end=1831 + _SIGNMESSAGEREQUEST._serialized_start=1834 + _SIGNMESSAGEREQUEST._serialized_end=1967 + _SIGNMESSAGERESPONSE._serialized_start=1969 + _SIGNMESSAGERESPONSE._serialized_end=2020 + _WALLET._serialized_start=2158 + _WALLET._serialized_end=2976 +# @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/wallet_pb2.pyi b/www/grpc/gen/python/wallet_pb2.pyi new file mode 100644 index 000000000..7cb1ab386 --- /dev/null +++ b/www/grpc/gen/python/wallet_pb2.pyi @@ -0,0 +1,195 @@ +import transaction_pb2 as _transaction_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class AddressType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + ADDRESS_TYPE_TREASURY: _ClassVar[AddressType] + ADDRESS_TYPE_VALIDATOR: _ClassVar[AddressType] + ADDRESS_TYPE_BLS_ACCOUNT: _ClassVar[AddressType] + ADDRESS_TYPE_ED25519_ACCOUNT: _ClassVar[AddressType] +ADDRESS_TYPE_TREASURY: AddressType +ADDRESS_TYPE_VALIDATOR: AddressType +ADDRESS_TYPE_BLS_ACCOUNT: AddressType +ADDRESS_TYPE_ED25519_ACCOUNT: AddressType + +class AddressInfo(_message.Message): + __slots__ = ("address", "public_key", "label", "path") + ADDRESS_FIELD_NUMBER: _ClassVar[int] + PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] + LABEL_FIELD_NUMBER: _ClassVar[int] + PATH_FIELD_NUMBER: _ClassVar[int] + address: str + public_key: str + label: str + path: str + def __init__(self, address: _Optional[str] = ..., public_key: _Optional[str] = ..., label: _Optional[str] = ..., path: _Optional[str] = ...) -> None: ... + +class HistoryInfo(_message.Message): + __slots__ = ("transaction_id", "time", "payload_type", "description", "amount") + TRANSACTION_ID_FIELD_NUMBER: _ClassVar[int] + TIME_FIELD_NUMBER: _ClassVar[int] + PAYLOAD_TYPE_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + transaction_id: str + time: int + payload_type: str + description: str + amount: int + def __init__(self, transaction_id: _Optional[str] = ..., time: _Optional[int] = ..., payload_type: _Optional[str] = ..., description: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ... + +class GetAddressHistoryRequest(_message.Message): + __slots__ = ("wallet_name", "address") + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + address: str + def __init__(self, wallet_name: _Optional[str] = ..., address: _Optional[str] = ...) -> None: ... + +class GetAddressHistoryResponse(_message.Message): + __slots__ = ("history_info",) + HISTORY_INFO_FIELD_NUMBER: _ClassVar[int] + history_info: _containers.RepeatedCompositeFieldContainer[HistoryInfo] + def __init__(self, history_info: _Optional[_Iterable[_Union[HistoryInfo, _Mapping]]] = ...) -> None: ... + +class GetNewAddressRequest(_message.Message): + __slots__ = ("wallet_name", "address_type", "label", "password") + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + ADDRESS_TYPE_FIELD_NUMBER: _ClassVar[int] + LABEL_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + address_type: AddressType + label: str + password: str + def __init__(self, wallet_name: _Optional[str] = ..., address_type: _Optional[_Union[AddressType, str]] = ..., label: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... + +class GetNewAddressResponse(_message.Message): + __slots__ = ("wallet_name", "address_info") + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + ADDRESS_INFO_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + address_info: AddressInfo + def __init__(self, wallet_name: _Optional[str] = ..., address_info: _Optional[_Union[AddressInfo, _Mapping]] = ...) -> None: ... + +class RestoreWalletRequest(_message.Message): + __slots__ = ("wallet_name", "mnemonic", "password") + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + MNEMONIC_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + mnemonic: str + password: str + def __init__(self, wallet_name: _Optional[str] = ..., mnemonic: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... + +class RestoreWalletResponse(_message.Message): + __slots__ = ("wallet_name",) + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... + +class CreateWalletRequest(_message.Message): + __slots__ = ("wallet_name", "password") + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + password: str + def __init__(self, wallet_name: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... + +class CreateWalletResponse(_message.Message): + __slots__ = ("mnemonic",) + MNEMONIC_FIELD_NUMBER: _ClassVar[int] + mnemonic: str + def __init__(self, mnemonic: _Optional[str] = ...) -> None: ... + +class LoadWalletRequest(_message.Message): + __slots__ = ("wallet_name",) + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... + +class LoadWalletResponse(_message.Message): + __slots__ = ("wallet_name",) + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... + +class UnloadWalletRequest(_message.Message): + __slots__ = ("wallet_name",) + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... + +class UnloadWalletResponse(_message.Message): + __slots__ = ("wallet_name",) + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... + +class GetValidatorAddressRequest(_message.Message): + __slots__ = ("public_key",) + PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] + public_key: str + def __init__(self, public_key: _Optional[str] = ...) -> None: ... + +class GetValidatorAddressResponse(_message.Message): + __slots__ = ("address",) + ADDRESS_FIELD_NUMBER: _ClassVar[int] + address: str + def __init__(self, address: _Optional[str] = ...) -> None: ... + +class SignRawTransactionRequest(_message.Message): + __slots__ = ("wallet_name", "raw_transaction", "password") + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + raw_transaction: str + password: str + def __init__(self, wallet_name: _Optional[str] = ..., raw_transaction: _Optional[str] = ..., password: _Optional[str] = ...) -> None: ... + +class SignRawTransactionResponse(_message.Message): + __slots__ = ("transaction_id", "signed_raw_transaction") + TRANSACTION_ID_FIELD_NUMBER: _ClassVar[int] + SIGNED_RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] + transaction_id: str + signed_raw_transaction: str + def __init__(self, transaction_id: _Optional[str] = ..., signed_raw_transaction: _Optional[str] = ...) -> None: ... + +class GetTotalBalanceRequest(_message.Message): + __slots__ = ("wallet_name",) + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + def __init__(self, wallet_name: _Optional[str] = ...) -> None: ... + +class GetTotalBalanceResponse(_message.Message): + __slots__ = ("wallet_name", "total_balance") + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + TOTAL_BALANCE_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + total_balance: int + def __init__(self, wallet_name: _Optional[str] = ..., total_balance: _Optional[int] = ...) -> None: ... + +class SignMessageRequest(_message.Message): + __slots__ = ("wallet_name", "password", "address", "message") + WALLET_NAME_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + ADDRESS_FIELD_NUMBER: _ClassVar[int] + MESSAGE_FIELD_NUMBER: _ClassVar[int] + wallet_name: str + password: str + address: str + message: str + def __init__(self, wallet_name: _Optional[str] = ..., password: _Optional[str] = ..., address: _Optional[str] = ..., message: _Optional[str] = ...) -> None: ... + +class SignMessageResponse(_message.Message): + __slots__ = ("signature",) + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + signature: str + def __init__(self, signature: _Optional[str] = ...) -> None: ... diff --git a/www/grpc/gen/python/wallet_pb2_grpc.py b/www/grpc/gen/python/wallet_pb2_grpc.py new file mode 100644 index 000000000..0bdf5636e --- /dev/null +++ b/www/grpc/gen/python/wallet_pb2_grpc.py @@ -0,0 +1,377 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import wallet_pb2 as wallet__pb2 + + +class WalletStub(object): + """Define the Wallet service with various RPC methods for wallet management. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.CreateWallet = channel.unary_unary( + '/pactus.Wallet/CreateWallet', + request_serializer=wallet__pb2.CreateWalletRequest.SerializeToString, + response_deserializer=wallet__pb2.CreateWalletResponse.FromString, + ) + self.RestoreWallet = channel.unary_unary( + '/pactus.Wallet/RestoreWallet', + request_serializer=wallet__pb2.RestoreWalletRequest.SerializeToString, + response_deserializer=wallet__pb2.RestoreWalletResponse.FromString, + ) + self.LoadWallet = channel.unary_unary( + '/pactus.Wallet/LoadWallet', + request_serializer=wallet__pb2.LoadWalletRequest.SerializeToString, + response_deserializer=wallet__pb2.LoadWalletResponse.FromString, + ) + self.UnloadWallet = channel.unary_unary( + '/pactus.Wallet/UnloadWallet', + request_serializer=wallet__pb2.UnloadWalletRequest.SerializeToString, + response_deserializer=wallet__pb2.UnloadWalletResponse.FromString, + ) + self.GetTotalBalance = channel.unary_unary( + '/pactus.Wallet/GetTotalBalance', + request_serializer=wallet__pb2.GetTotalBalanceRequest.SerializeToString, + response_deserializer=wallet__pb2.GetTotalBalanceResponse.FromString, + ) + self.SignRawTransaction = channel.unary_unary( + '/pactus.Wallet/SignRawTransaction', + request_serializer=wallet__pb2.SignRawTransactionRequest.SerializeToString, + response_deserializer=wallet__pb2.SignRawTransactionResponse.FromString, + ) + self.GetValidatorAddress = channel.unary_unary( + '/pactus.Wallet/GetValidatorAddress', + request_serializer=wallet__pb2.GetValidatorAddressRequest.SerializeToString, + response_deserializer=wallet__pb2.GetValidatorAddressResponse.FromString, + ) + self.GetNewAddress = channel.unary_unary( + '/pactus.Wallet/GetNewAddress', + request_serializer=wallet__pb2.GetNewAddressRequest.SerializeToString, + response_deserializer=wallet__pb2.GetNewAddressResponse.FromString, + ) + self.GetAddressHistory = channel.unary_unary( + '/pactus.Wallet/GetAddressHistory', + request_serializer=wallet__pb2.GetAddressHistoryRequest.SerializeToString, + response_deserializer=wallet__pb2.GetAddressHistoryResponse.FromString, + ) + self.SignMessage = channel.unary_unary( + '/pactus.Wallet/SignMessage', + request_serializer=wallet__pb2.SignMessageRequest.SerializeToString, + response_deserializer=wallet__pb2.SignMessageResponse.FromString, + ) + + +class WalletServicer(object): + """Define the Wallet service with various RPC methods for wallet management. + """ + + def CreateWallet(self, request, context): + """CreateWallet creates a new wallet with the specified parameters. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RestoreWallet(self, request, context): + """RestoreWallet restores an existing wallet with the given mnemonic. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LoadWallet(self, request, context): + """LoadWallet loads an existing wallet with the given name. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UnloadWallet(self, request, context): + """UnloadWallet unloads a currently loaded wallet with the specified name. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetTotalBalance(self, request, context): + """GetTotalBalance returns the total available balance of the wallet. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SignRawTransaction(self, request, context): + """SignRawTransaction signs a raw transaction for a specified wallet. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetValidatorAddress(self, request, context): + """GetValidatorAddress retrieves the validator address associated with a + public key. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetNewAddress(self, request, context): + """GetNewAddress generates a new address for the specified wallet. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAddressHistory(self, request, context): + """GetAddressHistory retrieves the transaction history of an address. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SignMessage(self, request, context): + """SignMessage signs an arbitrary message. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_WalletServicer_to_server(servicer, server): + rpc_method_handlers = { + 'CreateWallet': grpc.unary_unary_rpc_method_handler( + servicer.CreateWallet, + request_deserializer=wallet__pb2.CreateWalletRequest.FromString, + response_serializer=wallet__pb2.CreateWalletResponse.SerializeToString, + ), + 'RestoreWallet': grpc.unary_unary_rpc_method_handler( + servicer.RestoreWallet, + request_deserializer=wallet__pb2.RestoreWalletRequest.FromString, + response_serializer=wallet__pb2.RestoreWalletResponse.SerializeToString, + ), + 'LoadWallet': grpc.unary_unary_rpc_method_handler( + servicer.LoadWallet, + request_deserializer=wallet__pb2.LoadWalletRequest.FromString, + response_serializer=wallet__pb2.LoadWalletResponse.SerializeToString, + ), + 'UnloadWallet': grpc.unary_unary_rpc_method_handler( + servicer.UnloadWallet, + request_deserializer=wallet__pb2.UnloadWalletRequest.FromString, + response_serializer=wallet__pb2.UnloadWalletResponse.SerializeToString, + ), + 'GetTotalBalance': grpc.unary_unary_rpc_method_handler( + servicer.GetTotalBalance, + request_deserializer=wallet__pb2.GetTotalBalanceRequest.FromString, + response_serializer=wallet__pb2.GetTotalBalanceResponse.SerializeToString, + ), + 'SignRawTransaction': grpc.unary_unary_rpc_method_handler( + servicer.SignRawTransaction, + request_deserializer=wallet__pb2.SignRawTransactionRequest.FromString, + response_serializer=wallet__pb2.SignRawTransactionResponse.SerializeToString, + ), + 'GetValidatorAddress': grpc.unary_unary_rpc_method_handler( + servicer.GetValidatorAddress, + request_deserializer=wallet__pb2.GetValidatorAddressRequest.FromString, + response_serializer=wallet__pb2.GetValidatorAddressResponse.SerializeToString, + ), + 'GetNewAddress': grpc.unary_unary_rpc_method_handler( + servicer.GetNewAddress, + request_deserializer=wallet__pb2.GetNewAddressRequest.FromString, + response_serializer=wallet__pb2.GetNewAddressResponse.SerializeToString, + ), + 'GetAddressHistory': grpc.unary_unary_rpc_method_handler( + servicer.GetAddressHistory, + request_deserializer=wallet__pb2.GetAddressHistoryRequest.FromString, + response_serializer=wallet__pb2.GetAddressHistoryResponse.SerializeToString, + ), + 'SignMessage': grpc.unary_unary_rpc_method_handler( + servicer.SignMessage, + request_deserializer=wallet__pb2.SignMessageRequest.FromString, + response_serializer=wallet__pb2.SignMessageResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'pactus.Wallet', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class Wallet(object): + """Define the Wallet service with various RPC methods for wallet management. + """ + + @staticmethod + def CreateWallet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/CreateWallet', + wallet__pb2.CreateWalletRequest.SerializeToString, + wallet__pb2.CreateWalletResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def RestoreWallet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/RestoreWallet', + wallet__pb2.RestoreWalletRequest.SerializeToString, + wallet__pb2.RestoreWalletResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def LoadWallet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/LoadWallet', + wallet__pb2.LoadWalletRequest.SerializeToString, + wallet__pb2.LoadWalletResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UnloadWallet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/UnloadWallet', + wallet__pb2.UnloadWalletRequest.SerializeToString, + wallet__pb2.UnloadWalletResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetTotalBalance(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/GetTotalBalance', + wallet__pb2.GetTotalBalanceRequest.SerializeToString, + wallet__pb2.GetTotalBalanceResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SignRawTransaction(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/SignRawTransaction', + wallet__pb2.SignRawTransactionRequest.SerializeToString, + wallet__pb2.SignRawTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetValidatorAddress(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/GetValidatorAddress', + wallet__pb2.GetValidatorAddressRequest.SerializeToString, + wallet__pb2.GetValidatorAddressResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetNewAddress(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/GetNewAddress', + wallet__pb2.GetNewAddressRequest.SerializeToString, + wallet__pb2.GetNewAddressResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAddressHistory(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/GetAddressHistory', + wallet__pb2.GetAddressHistoryRequest.SerializeToString, + wallet__pb2.GetAddressHistoryResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SignMessage(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Wallet/SignMessage', + wallet__pb2.SignMessageRequest.SerializeToString, + wallet__pb2.SignMessageResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/rust/pactus.rs b/www/grpc/gen/rust/pactus.rs new file mode 100644 index 000000000..b04af3399 --- /dev/null +++ b/www/grpc/gen/rust/pactus.rs @@ -0,0 +1,1282 @@ +// @generated +/// Request message for retrieving transaction details. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTransactionRequest { + /// The unique ID of the transaction to retrieve. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// The verbosity level for transaction details. + #[prost(enumeration="TransactionVerbosity", tag="2")] + pub verbosity: i32, +} +/// Response message containing details of a transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTransactionResponse { + /// The height of the block containing the transaction. + #[prost(uint32, tag="1")] + pub block_height: u32, + /// The UNIX timestamp of the block containing the transaction. + #[prost(uint32, tag="2")] + pub block_time: u32, + /// Detailed information about the transaction. + #[prost(message, optional, tag="3")] + pub transaction: ::core::option::Option, +} +/// Request message for calculating transaction fee. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CalculateFeeRequest { + /// The amount involved in the transaction, specified in NanoPAC. + #[prost(int64, tag="1")] + pub amount: i64, + /// The type of transaction payload. + #[prost(enumeration="PayloadType", tag="2")] + pub payload_type: i32, + /// Indicates if the amount should be fixed and include the fee. + #[prost(bool, tag="3")] + pub fixed_amount: bool, +} +/// Response message containing the calculated transaction fee. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CalculateFeeResponse { + /// The calculated amount in NanoPAC. + #[prost(int64, tag="1")] + pub amount: i64, + /// The calculated transaction fee in NanoPAC. + #[prost(int64, tag="2")] + pub fee: i64, +} +/// Request message for broadcasting a signed transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BroadcastTransactionRequest { + /// The signed raw transaction data to be broadcasted. + #[prost(string, tag="1")] + pub signed_raw_transaction: ::prost::alloc::string::String, +} +/// Response message containing the ID of the broadcasted transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BroadcastTransactionResponse { + /// The unique ID of the broadcasted transaction. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, +} +/// Request message for retrieving raw details of transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRawTransactionRequest { + /// The lock time for the transaction. If not set, defaults to the last block + /// height. + #[prost(uint32, tag="1")] + pub lock_time: u32, + /// A memo string for the transaction. + #[prost(string, tag="2")] + pub memo: ::prost::alloc::string::String, + #[prost(oneof="get_raw_transaction_request::Transaction", tags="3, 4, 5, 6")] + pub transaction: ::core::option::Option, +} +/// Nested message and enum types in `GetRawTransactionRequest`. +pub mod get_raw_transaction_request { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Transaction { + #[prost(message, tag="3")] + Transfer(super::GetRawTransferTransactionRequest), + #[prost(message, tag="4")] + Bond(super::GetRawBondTransactionRequest), + #[prost(message, tag="5")] + Unbond(super::GetRawUnbondTransactionRequest), + #[prost(message, tag="6")] + Withdraw(super::GetRawWithdrawTransactionRequest), + } +} +/// Request message for retrieving raw details of a transfer transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRawTransferTransactionRequest { + /// The sender's account address. + #[prost(string, tag="1")] + pub sender: ::prost::alloc::string::String, + /// The receiver's account address. + #[prost(string, tag="2")] + pub receiver: ::prost::alloc::string::String, + /// The amount to be transferred, specified in NanoPAC. Must be greater than 0. + #[prost(int64, tag="3")] + pub amount: i64, + /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + #[prost(int64, tag="4")] + pub fee: i64, +} +/// Request message for retrieving raw details of a bond transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRawBondTransactionRequest { + /// The sender's account address. + #[prost(string, tag="1")] + pub sender: ::prost::alloc::string::String, + /// The receiver's validator address. + #[prost(string, tag="2")] + pub receiver: ::prost::alloc::string::String, + /// The stake amount in NanoPAC. Must be greater than 0. + #[prost(int64, tag="3")] + pub stake: i64, + /// The public key of the validator. + #[prost(string, tag="4")] + pub public_key: ::prost::alloc::string::String, + /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + #[prost(int64, tag="5")] + pub fee: i64, +} +/// Request message for retrieving raw details of an unbond transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRawUnbondTransactionRequest { + /// The address of the validator to unbond from. + #[prost(string, tag="1")] + pub validator_address: ::prost::alloc::string::String, +} +/// Request message for retrieving raw details of a withdraw transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRawWithdrawTransactionRequest { + /// The address of the validator to withdraw from. + #[prost(string, tag="1")] + pub validator_address: ::prost::alloc::string::String, + /// The address of the account to withdraw to. + #[prost(string, tag="2")] + pub account_address: ::prost::alloc::string::String, + /// The withdrawal amount in NanoPAC. Must be greater than 0. + #[prost(int64, tag="3")] + pub amount: i64, + /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + #[prost(int64, tag="4")] + pub fee: i64, +} +/// Response message containing raw transaction data. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRawTransactionResponse { + /// The raw transaction data. + #[prost(string, tag="1")] + pub raw_transaction: ::prost::alloc::string::String, +} +/// Payload for a transfer transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PayloadTransfer { + /// The sender's address. + #[prost(string, tag="1")] + pub sender: ::prost::alloc::string::String, + /// The receiver's address. + #[prost(string, tag="2")] + pub receiver: ::prost::alloc::string::String, + /// The amount to be transferred in NanoPAC. + #[prost(int64, tag="3")] + pub amount: i64, +} +/// Payload for a bond transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PayloadBond { + /// The sender's address. + #[prost(string, tag="1")] + pub sender: ::prost::alloc::string::String, + /// The receiver's address. + #[prost(string, tag="2")] + pub receiver: ::prost::alloc::string::String, + /// The stake amount in NanoPAC. + #[prost(int64, tag="3")] + pub stake: i64, +} +/// Payload for a sortition transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PayloadSortition { + /// The validator address associated with the sortition proof. + #[prost(string, tag="1")] + pub address: ::prost::alloc::string::String, + /// The proof for the sortition. + #[prost(string, tag="2")] + pub proof: ::prost::alloc::string::String, +} +/// Payload for an unbond transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PayloadUnbond { + /// The address of the validator to unbond from. + #[prost(string, tag="1")] + pub validator: ::prost::alloc::string::String, +} +/// Payload for a withdraw transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PayloadWithdraw { + /// The address to withdraw from. + #[prost(string, tag="1")] + pub from: ::prost::alloc::string::String, + /// The address to withdraw to. + #[prost(string, tag="2")] + pub to: ::prost::alloc::string::String, + /// The withdrawal amount in NanoPAC. + #[prost(int64, tag="3")] + pub amount: i64, +} +/// Information about a transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct TransactionInfo { + /// The unique ID of the transaction. + #[prost(string, tag="1")] + pub id: ::prost::alloc::string::String, + /// The raw transaction data. + #[prost(string, tag="2")] + pub data: ::prost::alloc::string::String, + /// The version of the transaction. + #[prost(int32, tag="3")] + pub version: i32, + /// The lock time for the transaction. + #[prost(uint32, tag="4")] + pub lock_time: u32, + /// The value of the transaction in NanoPAC. + #[prost(int64, tag="5")] + pub value: i64, + /// The fee for the transaction in NanoPAC. + #[prost(int64, tag="6")] + pub fee: i64, + /// The type of transaction payload. + #[prost(enumeration="PayloadType", tag="7")] + pub payload_type: i32, + /// A memo string for the transaction. + #[prost(string, tag="8")] + pub memo: ::prost::alloc::string::String, + /// The public key associated with the transaction. + #[prost(string, tag="9")] + pub public_key: ::prost::alloc::string::String, + /// The signature for the transaction. + #[prost(string, tag="10")] + pub signature: ::prost::alloc::string::String, + #[prost(oneof="transaction_info::Payload", tags="30, 31, 32, 33, 34")] + pub payload: ::core::option::Option, +} +/// Nested message and enum types in `TransactionInfo`. +pub mod transaction_info { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Payload { + /// Transfer transaction payload. + #[prost(message, tag="30")] + Transfer(super::PayloadTransfer), + /// Bond transaction payload. + #[prost(message, tag="31")] + Bond(super::PayloadBond), + /// Sortition transaction payload. + #[prost(message, tag="32")] + Sortition(super::PayloadSortition), + /// Unbond transaction payload. + #[prost(message, tag="33")] + Unbond(super::PayloadUnbond), + /// Withdraw transaction payload. + #[prost(message, tag="34")] + Withdraw(super::PayloadWithdraw), + } +} +/// Enumeration for different types of transaction payloads. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum PayloadType { + /// Unknown payload type. + Unknown = 0, + /// Transfer payload type. + TransferPayload = 1, + /// Bond payload type. + BondPayload = 2, + /// Sortition payload type. + SortitionPayload = 3, + /// Unbond payload type. + UnbondPayload = 4, + /// Withdraw payload type. + WithdrawPayload = 5, +} +impl PayloadType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + PayloadType::Unknown => "UNKNOWN", + PayloadType::TransferPayload => "TRANSFER_PAYLOAD", + PayloadType::BondPayload => "BOND_PAYLOAD", + PayloadType::SortitionPayload => "SORTITION_PAYLOAD", + PayloadType::UnbondPayload => "UNBOND_PAYLOAD", + PayloadType::WithdrawPayload => "WITHDRAW_PAYLOAD", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "UNKNOWN" => Some(Self::Unknown), + "TRANSFER_PAYLOAD" => Some(Self::TransferPayload), + "BOND_PAYLOAD" => Some(Self::BondPayload), + "SORTITION_PAYLOAD" => Some(Self::SortitionPayload), + "UNBOND_PAYLOAD" => Some(Self::UnbondPayload), + "WITHDRAW_PAYLOAD" => Some(Self::WithdrawPayload), + _ => None, + } + } +} +/// Enumeration for verbosity levels when requesting transaction details. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum TransactionVerbosity { + /// Request transaction data only. + TransactionData = 0, + /// Request detailed transaction information. + TransactionInfo = 1, +} +impl TransactionVerbosity { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + TransactionVerbosity::TransactionData => "TRANSACTION_DATA", + TransactionVerbosity::TransactionInfo => "TRANSACTION_INFO", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "TRANSACTION_DATA" => Some(Self::TransactionData), + "TRANSACTION_INFO" => Some(Self::TransactionInfo), + _ => None, + } + } +} +/// Message to request account information based on an address. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAccountRequest { + /// The address of the account to retrieve information for. + #[prost(string, tag="1")] + pub address: ::prost::alloc::string::String, +} +/// Message containing the response with account information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAccountResponse { + /// Detailed information about the account. + #[prost(message, optional, tag="1")] + pub account: ::core::option::Option, +} +/// Message to request validator addresses. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetValidatorAddressesRequest { +} +/// Message containing the response with a list of validator addresses. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetValidatorAddressesResponse { + /// List of validator addresses. + #[prost(string, repeated, tag="1")] + pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// Message to request validator information based on an address. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetValidatorRequest { + /// The address of the validator to retrieve information for. + #[prost(string, tag="1")] + pub address: ::prost::alloc::string::String, +} +/// Message to request validator information based on a validator number. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetValidatorByNumberRequest { + /// The unique number of the validator to retrieve information for. + #[prost(int32, tag="1")] + pub number: i32, +} +/// Message containing the response with validator information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetValidatorResponse { + /// Detailed information about the validator. + #[prost(message, optional, tag="1")] + pub validator: ::core::option::Option, +} +/// Message to request public key based on an address. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPublicKeyRequest { + /// The address for which to retrieve the public key. + #[prost(string, tag="1")] + pub address: ::prost::alloc::string::String, +} +/// Message containing the response with the public key. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetPublicKeyResponse { + /// The public key associated with the provided address. + #[prost(string, tag="1")] + pub public_key: ::prost::alloc::string::String, +} +/// Message to request block information based on height and verbosity level. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBlockRequest { + /// The height of the block to retrieve. + #[prost(uint32, tag="1")] + pub height: u32, + /// The verbosity level for block information. + #[prost(enumeration="BlockVerbosity", tag="2")] + pub verbosity: i32, +} +/// Message containing the response with block information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBlockResponse { + /// The height of the block. + #[prost(uint32, tag="1")] + pub height: u32, + /// The hash of the block. + #[prost(string, tag="2")] + pub hash: ::prost::alloc::string::String, + /// Block data, available only if verbosity level is set to BLOCK_DATA. + #[prost(string, tag="3")] + pub data: ::prost::alloc::string::String, + /// The timestamp of the block. + #[prost(uint32, tag="4")] + pub block_time: u32, + /// Header information of the block. + #[prost(message, optional, tag="5")] + pub header: ::core::option::Option, + /// Certificate information of the previous block. + #[prost(message, optional, tag="6")] + pub prev_cert: ::core::option::Option, + /// List of transactions in the block, available when verbosity level is set to + /// BLOCK_TRANSACTIONS. + #[prost(message, repeated, tag="7")] + pub txs: ::prost::alloc::vec::Vec, +} +/// Message to request block hash based on height. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBlockHashRequest { + /// The height of the block to retrieve the hash for. + #[prost(uint32, tag="1")] + pub height: u32, +} +/// Message containing the response with the block hash. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBlockHashResponse { + /// The hash of the block. + #[prost(string, tag="1")] + pub hash: ::prost::alloc::string::String, +} +/// Message to request block height based on hash. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBlockHeightRequest { + /// The hash of the block to retrieve the height for. + #[prost(string, tag="1")] + pub hash: ::prost::alloc::string::String, +} +/// Message containing the response with the block height. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBlockHeightResponse { + /// The height of the block. + #[prost(uint32, tag="1")] + pub height: u32, +} +/// Message to request general information about the blockchain. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBlockchainInfoRequest { +} +/// Message containing the response with general blockchain information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetBlockchainInfoResponse { + /// The height of the last block in the blockchain. + #[prost(uint32, tag="1")] + pub last_block_height: u32, + /// The hash of the last block in the blockchain. + #[prost(string, tag="2")] + pub last_block_hash: ::prost::alloc::string::String, + /// The total number of accounts in the blockchain. + #[prost(int32, tag="3")] + pub total_accounts: i32, + /// The total number of validators in the blockchain. + #[prost(int32, tag="4")] + pub total_validators: i32, + /// The total power of the blockchain. + #[prost(int64, tag="5")] + pub total_power: i64, + /// The power of the committee. + #[prost(int64, tag="6")] + pub committee_power: i64, + /// List of committee validators. + #[prost(message, repeated, tag="7")] + pub committee_validators: ::prost::alloc::vec::Vec, + /// If the blocks are subject to pruning. + #[prost(bool, tag="8")] + pub is_pruned: bool, + /// Lowest-height block stored (only present if pruning is enabled) + #[prost(uint32, tag="9")] + pub pruning_height: u32, + /// Timestamp of the last block in Unix format + #[prost(int64, tag="10")] + pub last_block_time: i64, +} +/// Message to request consensus information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetConsensusInfoRequest { +} +/// Message containing the response with consensus information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetConsensusInfoResponse { + /// The proposal of the consensus info. + #[prost(message, optional, tag="1")] + pub proposal: ::core::option::Option, + /// List of consensus instances. + #[prost(message, repeated, tag="2")] + pub instances: ::prost::alloc::vec::Vec, +} +/// Request message to retrieve transactions in the transaction pool. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTxPoolContentRequest { + /// The type of transactions to retrieve from the transaction pool. 0 means all + /// types. + #[prost(enumeration="PayloadType", tag="1")] + pub payload_type: i32, +} +/// Response message containing transactions in the transaction pool. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTxPoolContentResponse { + /// List of transactions currently in the pool. + #[prost(message, repeated, tag="1")] + pub txs: ::prost::alloc::vec::Vec, +} +/// Message containing information about a validator. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ValidatorInfo { + /// The hash of the validator. + #[prost(string, tag="1")] + pub hash: ::prost::alloc::string::String, + /// The serialized data of the validator. + #[prost(string, tag="2")] + pub data: ::prost::alloc::string::String, + /// The public key of the validator. + #[prost(string, tag="3")] + pub public_key: ::prost::alloc::string::String, + /// The unique number assigned to the validator. + #[prost(int32, tag="4")] + pub number: i32, + /// The stake of the validator in NanoPAC. + #[prost(int64, tag="5")] + pub stake: i64, + /// The height at which the validator last bonded. + #[prost(uint32, tag="6")] + pub last_bonding_height: u32, + /// The height at which the validator last participated in sortition. + #[prost(uint32, tag="7")] + pub last_sortition_height: u32, + /// The height at which the validator will unbond. + #[prost(uint32, tag="8")] + pub unbonding_height: u32, + /// The address of the validator. + #[prost(string, tag="9")] + pub address: ::prost::alloc::string::String, + /// The availability score of the validator. + #[prost(double, tag="10")] + pub availability_score: f64, +} +/// Message containing information about an account. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AccountInfo { + /// The hash of the account. + #[prost(string, tag="1")] + pub hash: ::prost::alloc::string::String, + /// The serialized data of the account. + #[prost(string, tag="2")] + pub data: ::prost::alloc::string::String, + /// The unique number assigned to the account. + #[prost(int32, tag="3")] + pub number: i32, + /// The balance of the account in NanoPAC. + #[prost(int64, tag="4")] + pub balance: i64, + /// The address of the account. + #[prost(string, tag="5")] + pub address: ::prost::alloc::string::String, +} +/// Message containing information about the header of a block. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct BlockHeaderInfo { + /// The version of the block. + #[prost(int32, tag="1")] + pub version: i32, + /// The hash of the previous block. + #[prost(string, tag="2")] + pub prev_block_hash: ::prost::alloc::string::String, + /// The state root hash of the blockchain. + #[prost(string, tag="3")] + pub state_root: ::prost::alloc::string::String, + /// The sortition seed of the block. + #[prost(string, tag="4")] + pub sortition_seed: ::prost::alloc::string::String, + /// The address of the proposer of the block. + #[prost(string, tag="5")] + pub proposer_address: ::prost::alloc::string::String, +} +/// Message containing information about a certificate. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CertificateInfo { + /// The hash of the certificate. + #[prost(string, tag="1")] + pub hash: ::prost::alloc::string::String, + /// The round of the certificate. + #[prost(int32, tag="2")] + pub round: i32, + /// List of committers in the certificate. + #[prost(int32, repeated, tag="3")] + pub committers: ::prost::alloc::vec::Vec, + /// List of absentees in the certificate. + #[prost(int32, repeated, tag="4")] + pub absentees: ::prost::alloc::vec::Vec, + /// The signature of the certificate. + #[prost(string, tag="5")] + pub signature: ::prost::alloc::string::String, +} +/// Message containing information about a vote. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VoteInfo { + /// The type of the vote. + #[prost(enumeration="VoteType", tag="1")] + pub r#type: i32, + /// The address of the voter. + #[prost(string, tag="2")] + pub voter: ::prost::alloc::string::String, + /// The hash of the block being voted on. + #[prost(string, tag="3")] + pub block_hash: ::prost::alloc::string::String, + /// The consensus round of the vote. + #[prost(int32, tag="4")] + pub round: i32, + /// The change-proposer round of the vote. + #[prost(int32, tag="5")] + pub cp_round: i32, + /// The change-proposer value of the vote. + #[prost(int32, tag="6")] + pub cp_value: i32, +} +/// Message containing information about a consensus instance. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConsensusInfo { + /// The address of the consensus instance. + #[prost(string, tag="1")] + pub address: ::prost::alloc::string::String, + /// Indicates whether the consensus instance is active and part of the + /// committee. + #[prost(bool, tag="2")] + pub active: bool, + /// The height of the consensus instance. + #[prost(uint32, tag="3")] + pub height: u32, + /// The round of the consensus instance. + #[prost(int32, tag="4")] + pub round: i32, + /// List of votes in the consensus instance. + #[prost(message, repeated, tag="5")] + pub votes: ::prost::alloc::vec::Vec, +} +/// Message containing information about a proposal. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Proposal { + /// The height of the proposal. + #[prost(uint32, tag="1")] + pub height: u32, + /// The round of the proposal. + #[prost(int32, tag="2")] + pub round: i32, + /// The block data of the proposal. + #[prost(string, tag="3")] + pub block_data: ::prost::alloc::string::String, + /// The signature data of the proposal. + #[prost(string, tag="4")] + pub signature_data: ::prost::alloc::string::String, +} +/// Enumeration for verbosity levels when requesting block information. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum BlockVerbosity { + /// Request only block data. + BlockData = 0, + /// Request block information and transaction IDs. + BlockInfo = 1, + /// Request block information and detailed transaction data. + BlockTransactions = 2, +} +impl BlockVerbosity { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + BlockVerbosity::BlockData => "BLOCK_DATA", + BlockVerbosity::BlockInfo => "BLOCK_INFO", + BlockVerbosity::BlockTransactions => "BLOCK_TRANSACTIONS", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "BLOCK_DATA" => Some(Self::BlockData), + "BLOCK_INFO" => Some(Self::BlockInfo), + "BLOCK_TRANSACTIONS" => Some(Self::BlockTransactions), + _ => None, + } + } +} +/// Enumeration for types of votes. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum VoteType { + /// Unknown vote type. + VoteUnknown = 0, + /// Prepare vote type. + VotePrepare = 1, + /// Precommit vote type. + VotePrecommit = 2, + /// Change proposer vote type. + VoteChangeProposer = 3, +} +impl VoteType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + VoteType::VoteUnknown => "VOTE_UNKNOWN", + VoteType::VotePrepare => "VOTE_PREPARE", + VoteType::VotePrecommit => "VOTE_PRECOMMIT", + VoteType::VoteChangeProposer => "VOTE_CHANGE_PROPOSER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "VOTE_UNKNOWN" => Some(Self::VoteUnknown), + "VOTE_PREPARE" => Some(Self::VotePrepare), + "VOTE_PRECOMMIT" => Some(Self::VotePrecommit), + "VOTE_CHANGE_PROPOSER" => Some(Self::VoteChangeProposer), + _ => None, + } + } +} +/// Request message for retrieving overall network information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetNetworkInfoRequest { + /// If true, only returns peers with connected status. + #[prost(bool, tag="1")] + pub only_connected: bool, +} +/// Response message containing information about the overall network. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetNetworkInfoResponse { + /// Name of the network. + #[prost(string, tag="1")] + pub network_name: ::prost::alloc::string::String, + /// Total bytes sent across the network. + #[prost(int64, tag="2")] + pub total_sent_bytes: i64, + /// Total bytes received across the network. + #[prost(int64, tag="3")] + pub total_received_bytes: i64, + /// Number of connected peers. + #[prost(uint32, tag="4")] + pub connected_peers_count: u32, + /// List of connected peers. + #[prost(message, repeated, tag="5")] + pub connected_peers: ::prost::alloc::vec::Vec, + /// Bytes sent per peer ID. + #[prost(map="int32, int64", tag="6")] + pub sent_bytes: ::std::collections::HashMap, + /// Bytes received per peer ID. + #[prost(map="int32, int64", tag="7")] + pub received_bytes: ::std::collections::HashMap, +} +/// Request message for retrieving information about a specific node in the +/// network. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetNodeInfoRequest { +} +/// Response message containing information about a specific node in the network. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetNodeInfoResponse { + /// Moniker of the node. + #[prost(string, tag="1")] + pub moniker: ::prost::alloc::string::String, + /// Agent information of the node. + #[prost(string, tag="2")] + pub agent: ::prost::alloc::string::String, + /// Peer ID of the node. + #[prost(string, tag="3")] + pub peer_id: ::prost::alloc::string::String, + /// Timestamp when the node started. + #[prost(uint64, tag="4")] + pub started_at: u64, + /// Reachability status of the node. + #[prost(string, tag="5")] + pub reachability: ::prost::alloc::string::String, + /// A bitfield indicating the services provided by the node. + #[prost(int32, tag="6")] + pub services: i32, + /// Names of services provided by the node. + #[prost(string, tag="7")] + pub services_names: ::prost::alloc::string::String, + /// List of addresses associated with the node. + #[prost(string, repeated, tag="8")] + pub local_addrs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// List of protocols supported by the node. + #[prost(string, repeated, tag="9")] + pub protocols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Clock offset of the node. + #[prost(double, tag="13")] + pub clock_offset: f64, + /// Information about the node's connections. + #[prost(message, optional, tag="14")] + pub connection_info: ::core::option::Option, +} +/// Information about a peer in the network. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct PeerInfo { + /// Status of the peer. + #[prost(int32, tag="1")] + pub status: i32, + /// Moniker of the peer. + #[prost(string, tag="2")] + pub moniker: ::prost::alloc::string::String, + /// Agent information of the peer. + #[prost(string, tag="3")] + pub agent: ::prost::alloc::string::String, + /// Peer ID of the peer. + #[prost(string, tag="4")] + pub peer_id: ::prost::alloc::string::String, + /// Consensus keys used by the peer. + #[prost(string, repeated, tag="5")] + pub consensus_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Consensus addresses of the peer. + #[prost(string, repeated, tag="6")] + pub consensus_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Services provided by the peer. + #[prost(uint32, tag="7")] + pub services: u32, + /// Hash of the last block the peer knows. + #[prost(string, tag="8")] + pub last_block_hash: ::prost::alloc::string::String, + /// Blockchain height of the peer. + #[prost(uint32, tag="9")] + pub height: u32, + /// Number of received bundles. + #[prost(int32, tag="10")] + pub received_bundles: i32, + /// Number of invalid bundles received. + #[prost(int32, tag="11")] + pub invalid_bundles: i32, + /// Timestamp of the last sent bundle. + #[prost(int64, tag="12")] + pub last_sent: i64, + /// Timestamp of the last received bundle. + #[prost(int64, tag="13")] + pub last_received: i64, + /// Bytes sent per message type. + #[prost(map="int32, int64", tag="14")] + pub sent_bytes: ::std::collections::HashMap, + /// Bytes received per message type. + #[prost(map="int32, int64", tag="15")] + pub received_bytes: ::std::collections::HashMap, + /// Network address of the peer. + #[prost(string, tag="16")] + pub address: ::prost::alloc::string::String, + /// Direction of connection with the peer. + #[prost(string, tag="17")] + pub direction: ::prost::alloc::string::String, + /// List of protocols supported by the peer. + #[prost(string, repeated, tag="18")] + pub protocols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + /// Total download sessions with the peer. + #[prost(int32, tag="19")] + pub total_sessions: i32, + /// Completed download sessions with the peer. + #[prost(int32, tag="20")] + pub completed_sessions: i32, +} +/// ConnectionInfo contains information about the node's connections. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ConnectionInfo { + /// Total number of connections. + #[prost(uint64, tag="1")] + pub connections: u64, + /// Number of inbound connections. + #[prost(uint64, tag="2")] + pub inbound_connections: u64, + /// Number of outbound connections. + #[prost(uint64, tag="3")] + pub outbound_connections: u64, +} +/// Request message for sign message with private key. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignMessageWithPrivateKeyRequest { + /// The private key to sign the message. + #[prost(string, tag="1")] + pub private_key: ::prost::alloc::string::String, + /// The message to sign. + #[prost(string, tag="2")] + pub message: ::prost::alloc::string::String, +} +/// Response message containing the generated signature. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignMessageWithPrivateKeyResponse { + /// The signature of the message. + #[prost(string, tag="1")] + pub signature: ::prost::alloc::string::String, +} +/// Request message for verifying a message signature. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMessageRequest { + /// The signed message. + #[prost(string, tag="1")] + pub message: ::prost::alloc::string::String, + /// The signature of the message. + #[prost(string, tag="2")] + pub signature: ::prost::alloc::string::String, + /// The public key of the signer. + #[prost(string, tag="3")] + pub public_key: ::prost::alloc::string::String, +} +/// Response message containing the resualt of validation of signature and message. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct VerifyMessageResponse { + /// Indicates if the signature is valid (true) or not (false). + #[prost(bool, tag="1")] + pub is_valid: bool, +} +/// Message containing address information. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AddressInfo { + /// The address string. + #[prost(string, tag="1")] + pub address: ::prost::alloc::string::String, + /// The public key associated with the address. + #[prost(string, tag="2")] + pub public_key: ::prost::alloc::string::String, + /// A label associated with the address. + #[prost(string, tag="3")] + pub label: ::prost::alloc::string::String, + /// The Hierarchical Deterministic path of the address within the wallet. + #[prost(string, tag="4")] + pub path: ::prost::alloc::string::String, +} +/// Message containing transaction history information for an address. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct HistoryInfo { + /// The transaction ID hash. + #[prost(string, tag="1")] + pub transaction_id: ::prost::alloc::string::String, + /// The timestamp of the transaction. + #[prost(uint32, tag="2")] + pub time: u32, + /// The payload type of the transaction. + #[prost(string, tag="3")] + pub payload_type: ::prost::alloc::string::String, + /// A description of the transaction. + #[prost(string, tag="4")] + pub description: ::prost::alloc::string::String, + /// The amount involved in the transaction. + #[prost(int64, tag="5")] + pub amount: i64, +} +/// Request message to get an address transaction history. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAddressHistoryRequest { + /// The name of the wallet. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, + /// The address to retrieve the transaction history for. + #[prost(string, tag="2")] + pub address: ::prost::alloc::string::String, +} +/// Response message containing the address transaction history. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetAddressHistoryResponse { + /// Array of history information for the address. + #[prost(message, repeated, tag="1")] + pub history_info: ::prost::alloc::vec::Vec, +} +/// Request message for generating a new address. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetNewAddressRequest { + /// The name of the wallet to generate a new address. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, + /// The type of address to generate. + #[prost(enumeration="AddressType", tag="2")] + pub address_type: i32, + /// A label for the new address. + #[prost(string, tag="3")] + pub label: ::prost::alloc::string::String, + /// Password for the new address. It's required when address_type is ADDRESS_TYPE_ED25519_ACCOUNT. + #[prost(string, tag="4")] + pub password: ::prost::alloc::string::String, +} +/// Response message containing the newly generated address. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetNewAddressResponse { + /// The name of the wallet from which the address is generated. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, + /// Information about the newly generated address. + #[prost(message, optional, tag="2")] + pub address_info: ::core::option::Option, +} +/// Request message for restoring an existing wallet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RestoreWalletRequest { + /// The name of the wallet to restore. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, + /// The mnemonic for wallet recovery. + #[prost(string, tag="2")] + pub mnemonic: ::prost::alloc::string::String, + /// The password for securing the wallet. + #[prost(string, tag="3")] + pub password: ::prost::alloc::string::String, +} +/// Response message containing the name of the restored wallet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RestoreWalletResponse { + /// The name of the restored wallet. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, +} +/// Request message for creating a new wallet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateWalletRequest { + /// The name of the new wallet. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, + /// The password for securing the wallet. + #[prost(string, tag="4")] + pub password: ::prost::alloc::string::String, +} +/// Response message containing the mnemonic for wallet recovery. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateWalletResponse { + /// The mnemonic for wallet recovery. + #[prost(string, tag="2")] + pub mnemonic: ::prost::alloc::string::String, +} +/// Request message for loading an existing wallet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoadWalletRequest { + /// The name of the wallet to load. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, +} +/// Response message containing the name of the loaded wallet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct LoadWalletResponse { + /// The name of the loaded wallet. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, +} +/// Request message for unloading a currently loaded wallet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnloadWalletRequest { + /// The name of the wallet to unload. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, +} +/// Response message containing the name of the unloaded wallet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct UnloadWalletResponse { + /// The name of the unloaded wallet. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, +} +/// Request message for obtaining the validator address associated with a public +/// key. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetValidatorAddressRequest { + /// The public key for which the validator address is requested. + #[prost(string, tag="1")] + pub public_key: ::prost::alloc::string::String, +} +/// Response message containing the validator address corresponding to a public +/// key. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetValidatorAddressResponse { + /// The validator address associated with the public key. + #[prost(string, tag="1")] + pub address: ::prost::alloc::string::String, +} +/// Request message for signing a raw transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignRawTransactionRequest { + /// The name of the wallet used for signing. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, + /// The raw transaction data to be signed. + #[prost(string, tag="2")] + pub raw_transaction: ::prost::alloc::string::String, + /// The password for unlocking the wallet for signing. + #[prost(string, tag="3")] + pub password: ::prost::alloc::string::String, +} +/// Response message containing the transaction ID and signed raw transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignRawTransactionResponse { + /// The ID of the signed transaction. + #[prost(string, tag="1")] + pub transaction_id: ::prost::alloc::string::String, + /// The signed raw transaction data. + #[prost(string, tag="2")] + pub signed_raw_transaction: ::prost::alloc::string::String, +} +/// Request message for obtaining the available balance of a wallet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTotalBalanceRequest { + /// The name of the wallet to get the total balance. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, +} +/// Response message containing the available balance of the wallet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetTotalBalanceResponse { + /// The name of the wallet. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, + /// The total balance of the wallet in NanoPAC. + #[prost(int64, tag="2")] + pub total_balance: i64, +} +/// Request message to sign an arbitrary message. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignMessageRequest { + /// The name of the wallet. + #[prost(string, tag="1")] + pub wallet_name: ::prost::alloc::string::String, + /// The password for unlocking the wallet for signing. + #[prost(string, tag="2")] + pub password: ::prost::alloc::string::String, + /// The account address associated with the private key. + #[prost(string, tag="3")] + pub address: ::prost::alloc::string::String, + /// The arbitrary message to be signed. + #[prost(string, tag="4")] + pub message: ::prost::alloc::string::String, +} +/// Response message containing the available balance of the wallet. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SignMessageResponse { + /// Signature of the message. + #[prost(string, tag="1")] + pub signature: ::prost::alloc::string::String, +} +/// Enum for the address type. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum AddressType { + /// Treasury address type. + /// Should not be used to generate new addresses. + Treasury = 0, + /// Validator address type. + Validator = 1, + /// Account address type with BLS signature scheme. + BlsAccount = 2, + /// Account address type with Ed25519 signature scheme. + /// Note: Generating a new Ed25519 address requires the wallet password. + Ed25519Account = 3, +} +impl AddressType { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + AddressType::Treasury => "ADDRESS_TYPE_TREASURY", + AddressType::Validator => "ADDRESS_TYPE_VALIDATOR", + AddressType::BlsAccount => "ADDRESS_TYPE_BLS_ACCOUNT", + AddressType::Ed25519Account => "ADDRESS_TYPE_ED25519_ACCOUNT", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option { + match value { + "ADDRESS_TYPE_TREASURY" => Some(Self::Treasury), + "ADDRESS_TYPE_VALIDATOR" => Some(Self::Validator), + "ADDRESS_TYPE_BLS_ACCOUNT" => Some(Self::BlsAccount), + "ADDRESS_TYPE_ED25519_ACCOUNT" => Some(Self::Ed25519Account), + _ => None, + } + } +} +include!("pactus.serde.rs"); +include!("pactus.tonic.rs"); +// @@protoc_insertion_point(module) \ No newline at end of file diff --git a/www/grpc/gen/rust/pactus.serde.rs b/www/grpc/gen/rust/pactus.serde.rs new file mode 100644 index 000000000..6cbf81cad --- /dev/null +++ b/www/grpc/gen/rust/pactus.serde.rs @@ -0,0 +1,10289 @@ +// @generated +impl serde::Serialize for AccountInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.hash.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + if self.number != 0 { + len += 1; + } + if self.balance != 0 { + len += 1; + } + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.AccountInfo", len)?; + if !self.hash.is_empty() { + struct_ser.serialize_field("hash", &self.hash)?; + } + if !self.data.is_empty() { + struct_ser.serialize_field("data", &self.data)?; + } + if self.number != 0 { + struct_ser.serialize_field("number", &self.number)?; + } + if self.balance != 0 { + struct_ser.serialize_field("balance", ToString::to_string(&self.balance).as_str())?; + } + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AccountInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "hash", + "data", + "number", + "balance", + "address", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Hash, + Data, + Number, + Balance, + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "hash" => Ok(GeneratedField::Hash), + "data" => Ok(GeneratedField::Data), + "number" => Ok(GeneratedField::Number), + "balance" => Ok(GeneratedField::Balance), + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AccountInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.AccountInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut hash__ = None; + let mut data__ = None; + let mut number__ = None; + let mut balance__ = None; + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Hash => { + if hash__.is_some() { + return Err(serde::de::Error::duplicate_field("hash")); + } + hash__ = Some(map.next_value()?); + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some(map.next_value()?); + } + GeneratedField::Number => { + if number__.is_some() { + return Err(serde::de::Error::duplicate_field("number")); + } + number__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Balance => { + if balance__.is_some() { + return Err(serde::de::Error::duplicate_field("balance")); + } + balance__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(AccountInfo { + hash: hash__.unwrap_or_default(), + data: data__.unwrap_or_default(), + number: number__.unwrap_or_default(), + balance: balance__.unwrap_or_default(), + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.AccountInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for AddressInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.public_key.is_empty() { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.path.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.AddressInfo", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.public_key.is_empty() { + struct_ser.serialize_field("publicKey", &self.public_key)?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.path.is_empty() { + struct_ser.serialize_field("path", &self.path)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for AddressInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + "public_key", + "publicKey", + "label", + "path", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + PublicKey, + Label, + Path, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + "label" => Ok(GeneratedField::Label), + "path" => Ok(GeneratedField::Path), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AddressInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.AddressInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut public_key__ = None; + let mut label__ = None; + let mut path__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = Some(map.next_value()?); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map.next_value()?); + } + GeneratedField::Path => { + if path__.is_some() { + return Err(serde::de::Error::duplicate_field("path")); + } + path__ = Some(map.next_value()?); + } + } + } + Ok(AddressInfo { + address: address__.unwrap_or_default(), + public_key: public_key__.unwrap_or_default(), + label: label__.unwrap_or_default(), + path: path__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.AddressInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for AddressType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Treasury => "ADDRESS_TYPE_TREASURY", + Self::Validator => "ADDRESS_TYPE_VALIDATOR", + Self::BlsAccount => "ADDRESS_TYPE_BLS_ACCOUNT", + Self::Ed25519Account => "ADDRESS_TYPE_ED25519_ACCOUNT", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for AddressType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "ADDRESS_TYPE_TREASURY", + "ADDRESS_TYPE_VALIDATOR", + "ADDRESS_TYPE_BLS_ACCOUNT", + "ADDRESS_TYPE_ED25519_ACCOUNT", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = AddressType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(AddressType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(AddressType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "ADDRESS_TYPE_TREASURY" => Ok(AddressType::Treasury), + "ADDRESS_TYPE_VALIDATOR" => Ok(AddressType::Validator), + "ADDRESS_TYPE_BLS_ACCOUNT" => Ok(AddressType::BlsAccount), + "ADDRESS_TYPE_ED25519_ACCOUNT" => Ok(AddressType::Ed25519Account), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for BlockHeaderInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.version != 0 { + len += 1; + } + if !self.prev_block_hash.is_empty() { + len += 1; + } + if !self.state_root.is_empty() { + len += 1; + } + if !self.sortition_seed.is_empty() { + len += 1; + } + if !self.proposer_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.BlockHeaderInfo", len)?; + if self.version != 0 { + struct_ser.serialize_field("version", &self.version)?; + } + if !self.prev_block_hash.is_empty() { + struct_ser.serialize_field("prevBlockHash", &self.prev_block_hash)?; + } + if !self.state_root.is_empty() { + struct_ser.serialize_field("stateRoot", &self.state_root)?; + } + if !self.sortition_seed.is_empty() { + struct_ser.serialize_field("sortitionSeed", &self.sortition_seed)?; + } + if !self.proposer_address.is_empty() { + struct_ser.serialize_field("proposerAddress", &self.proposer_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for BlockHeaderInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "version", + "prev_block_hash", + "prevBlockHash", + "state_root", + "stateRoot", + "sortition_seed", + "sortitionSeed", + "proposer_address", + "proposerAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Version, + PrevBlockHash, + StateRoot, + SortitionSeed, + ProposerAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "version" => Ok(GeneratedField::Version), + "prevBlockHash" | "prev_block_hash" => Ok(GeneratedField::PrevBlockHash), + "stateRoot" | "state_root" => Ok(GeneratedField::StateRoot), + "sortitionSeed" | "sortition_seed" => Ok(GeneratedField::SortitionSeed), + "proposerAddress" | "proposer_address" => Ok(GeneratedField::ProposerAddress), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BlockHeaderInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.BlockHeaderInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut version__ = None; + let mut prev_block_hash__ = None; + let mut state_root__ = None; + let mut sortition_seed__ = None; + let mut proposer_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::PrevBlockHash => { + if prev_block_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("prevBlockHash")); + } + prev_block_hash__ = Some(map.next_value()?); + } + GeneratedField::StateRoot => { + if state_root__.is_some() { + return Err(serde::de::Error::duplicate_field("stateRoot")); + } + state_root__ = Some(map.next_value()?); + } + GeneratedField::SortitionSeed => { + if sortition_seed__.is_some() { + return Err(serde::de::Error::duplicate_field("sortitionSeed")); + } + sortition_seed__ = Some(map.next_value()?); + } + GeneratedField::ProposerAddress => { + if proposer_address__.is_some() { + return Err(serde::de::Error::duplicate_field("proposerAddress")); + } + proposer_address__ = Some(map.next_value()?); + } + } + } + Ok(BlockHeaderInfo { + version: version__.unwrap_or_default(), + prev_block_hash: prev_block_hash__.unwrap_or_default(), + state_root: state_root__.unwrap_or_default(), + sortition_seed: sortition_seed__.unwrap_or_default(), + proposer_address: proposer_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.BlockHeaderInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for BlockVerbosity { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::BlockData => "BLOCK_DATA", + Self::BlockInfo => "BLOCK_INFO", + Self::BlockTransactions => "BLOCK_TRANSACTIONS", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for BlockVerbosity { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "BLOCK_DATA", + "BLOCK_INFO", + "BLOCK_TRANSACTIONS", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BlockVerbosity; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(BlockVerbosity::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(BlockVerbosity::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "BLOCK_DATA" => Ok(BlockVerbosity::BlockData), + "BLOCK_INFO" => Ok(BlockVerbosity::BlockInfo), + "BLOCK_TRANSACTIONS" => Ok(BlockVerbosity::BlockTransactions), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for BroadcastTransactionRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.signed_raw_transaction.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.BroadcastTransactionRequest", len)?; + if !self.signed_raw_transaction.is_empty() { + struct_ser.serialize_field("signedRawTransaction", &self.signed_raw_transaction)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for BroadcastTransactionRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "signed_raw_transaction", + "signedRawTransaction", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + SignedRawTransaction, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "signedRawTransaction" | "signed_raw_transaction" => Ok(GeneratedField::SignedRawTransaction), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BroadcastTransactionRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.BroadcastTransactionRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut signed_raw_transaction__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::SignedRawTransaction => { + if signed_raw_transaction__.is_some() { + return Err(serde::de::Error::duplicate_field("signedRawTransaction")); + } + signed_raw_transaction__ = Some(map.next_value()?); + } + } + } + Ok(BroadcastTransactionRequest { + signed_raw_transaction: signed_raw_transaction__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.BroadcastTransactionRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for BroadcastTransactionResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.id.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.BroadcastTransactionResponse", len)?; + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for BroadcastTransactionResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BroadcastTransactionResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.BroadcastTransactionResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + } + } + Ok(BroadcastTransactionResponse { + id: id__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.BroadcastTransactionResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for CalculateFeeRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.amount != 0 { + len += 1; + } + if self.payload_type != 0 { + len += 1; + } + if self.fixed_amount { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.CalculateFeeRequest", len)?; + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + if self.payload_type != 0 { + let v = PayloadType::from_i32(self.payload_type) + .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.payload_type)))?; + struct_ser.serialize_field("payloadType", &v)?; + } + if self.fixed_amount { + struct_ser.serialize_field("fixedAmount", &self.fixed_amount)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CalculateFeeRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "amount", + "payload_type", + "payloadType", + "fixed_amount", + "fixedAmount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amount, + PayloadType, + FixedAmount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amount" => Ok(GeneratedField::Amount), + "payloadType" | "payload_type" => Ok(GeneratedField::PayloadType), + "fixedAmount" | "fixed_amount" => Ok(GeneratedField::FixedAmount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CalculateFeeRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.CalculateFeeRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amount__ = None; + let mut payload_type__ = None; + let mut fixed_amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::PayloadType => { + if payload_type__.is_some() { + return Err(serde::de::Error::duplicate_field("payloadType")); + } + payload_type__ = Some(map.next_value::()? as i32); + } + GeneratedField::FixedAmount => { + if fixed_amount__.is_some() { + return Err(serde::de::Error::duplicate_field("fixedAmount")); + } + fixed_amount__ = Some(map.next_value()?); + } + } + } + Ok(CalculateFeeRequest { + amount: amount__.unwrap_or_default(), + payload_type: payload_type__.unwrap_or_default(), + fixed_amount: fixed_amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.CalculateFeeRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for CalculateFeeResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.amount != 0 { + len += 1; + } + if self.fee != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.CalculateFeeResponse", len)?; + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CalculateFeeResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "amount", + "fee", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Amount, + Fee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "amount" => Ok(GeneratedField::Amount), + "fee" => Ok(GeneratedField::Fee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CalculateFeeResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.CalculateFeeResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut amount__ = None; + let mut fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(CalculateFeeResponse { + amount: amount__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.CalculateFeeResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for CertificateInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.hash.is_empty() { + len += 1; + } + if self.round != 0 { + len += 1; + } + if !self.committers.is_empty() { + len += 1; + } + if !self.absentees.is_empty() { + len += 1; + } + if !self.signature.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.CertificateInfo", len)?; + if !self.hash.is_empty() { + struct_ser.serialize_field("hash", &self.hash)?; + } + if self.round != 0 { + struct_ser.serialize_field("round", &self.round)?; + } + if !self.committers.is_empty() { + struct_ser.serialize_field("committers", &self.committers)?; + } + if !self.absentees.is_empty() { + struct_ser.serialize_field("absentees", &self.absentees)?; + } + if !self.signature.is_empty() { + struct_ser.serialize_field("signature", &self.signature)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CertificateInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "hash", + "round", + "committers", + "absentees", + "signature", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Hash, + Round, + Committers, + Absentees, + Signature, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "hash" => Ok(GeneratedField::Hash), + "round" => Ok(GeneratedField::Round), + "committers" => Ok(GeneratedField::Committers), + "absentees" => Ok(GeneratedField::Absentees), + "signature" => Ok(GeneratedField::Signature), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CertificateInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.CertificateInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut hash__ = None; + let mut round__ = None; + let mut committers__ = None; + let mut absentees__ = None; + let mut signature__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Hash => { + if hash__.is_some() { + return Err(serde::de::Error::duplicate_field("hash")); + } + hash__ = Some(map.next_value()?); + } + GeneratedField::Round => { + if round__.is_some() { + return Err(serde::de::Error::duplicate_field("round")); + } + round__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Committers => { + if committers__.is_some() { + return Err(serde::de::Error::duplicate_field("committers")); + } + committers__ = + Some(map.next_value::>>()? + .into_iter().map(|x| x.0).collect()) + ; + } + GeneratedField::Absentees => { + if absentees__.is_some() { + return Err(serde::de::Error::duplicate_field("absentees")); + } + absentees__ = + Some(map.next_value::>>()? + .into_iter().map(|x| x.0).collect()) + ; + } + GeneratedField::Signature => { + if signature__.is_some() { + return Err(serde::de::Error::duplicate_field("signature")); + } + signature__ = Some(map.next_value()?); + } + } + } + Ok(CertificateInfo { + hash: hash__.unwrap_or_default(), + round: round__.unwrap_or_default(), + committers: committers__.unwrap_or_default(), + absentees: absentees__.unwrap_or_default(), + signature: signature__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.CertificateInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ConnectionInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.connections != 0 { + len += 1; + } + if self.inbound_connections != 0 { + len += 1; + } + if self.outbound_connections != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.ConnectionInfo", len)?; + if self.connections != 0 { + struct_ser.serialize_field("connections", ToString::to_string(&self.connections).as_str())?; + } + if self.inbound_connections != 0 { + struct_ser.serialize_field("inboundConnections", ToString::to_string(&self.inbound_connections).as_str())?; + } + if self.outbound_connections != 0 { + struct_ser.serialize_field("outboundConnections", ToString::to_string(&self.outbound_connections).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ConnectionInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "connections", + "inbound_connections", + "inboundConnections", + "outbound_connections", + "outboundConnections", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Connections, + InboundConnections, + OutboundConnections, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "connections" => Ok(GeneratedField::Connections), + "inboundConnections" | "inbound_connections" => Ok(GeneratedField::InboundConnections), + "outboundConnections" | "outbound_connections" => Ok(GeneratedField::OutboundConnections), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ConnectionInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.ConnectionInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut connections__ = None; + let mut inbound_connections__ = None; + let mut outbound_connections__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Connections => { + if connections__.is_some() { + return Err(serde::de::Error::duplicate_field("connections")); + } + connections__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::InboundConnections => { + if inbound_connections__.is_some() { + return Err(serde::de::Error::duplicate_field("inboundConnections")); + } + inbound_connections__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::OutboundConnections => { + if outbound_connections__.is_some() { + return Err(serde::de::Error::duplicate_field("outboundConnections")); + } + outbound_connections__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(ConnectionInfo { + connections: connections__.unwrap_or_default(), + inbound_connections: inbound_connections__.unwrap_or_default(), + outbound_connections: outbound_connections__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.ConnectionInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ConsensusInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if self.active { + len += 1; + } + if self.height != 0 { + len += 1; + } + if self.round != 0 { + len += 1; + } + if !self.votes.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.ConsensusInfo", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if self.active { + struct_ser.serialize_field("active", &self.active)?; + } + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + if self.round != 0 { + struct_ser.serialize_field("round", &self.round)?; + } + if !self.votes.is_empty() { + struct_ser.serialize_field("votes", &self.votes)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ConsensusInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + "active", + "height", + "round", + "votes", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Active, + Height, + Round, + Votes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "active" => Ok(GeneratedField::Active), + "height" => Ok(GeneratedField::Height), + "round" => Ok(GeneratedField::Round), + "votes" => Ok(GeneratedField::Votes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ConsensusInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.ConsensusInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut active__ = None; + let mut height__ = None; + let mut round__ = None; + let mut votes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Active => { + if active__.is_some() { + return Err(serde::de::Error::duplicate_field("active")); + } + active__ = Some(map.next_value()?); + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Round => { + if round__.is_some() { + return Err(serde::de::Error::duplicate_field("round")); + } + round__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Votes => { + if votes__.is_some() { + return Err(serde::de::Error::duplicate_field("votes")); + } + votes__ = Some(map.next_value()?); + } + } + } + Ok(ConsensusInfo { + address: address__.unwrap_or_default(), + active: active__.unwrap_or_default(), + height: height__.unwrap_or_default(), + round: round__.unwrap_or_default(), + votes: votes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.ConsensusInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for CreateWalletRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + if !self.password.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.CreateWalletRequest", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + if !self.password.is_empty() { + struct_ser.serialize_field("password", &self.password)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CreateWalletRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + "password", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + Password, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + "password" => Ok(GeneratedField::Password), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CreateWalletRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.CreateWalletRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + let mut password__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + GeneratedField::Password => { + if password__.is_some() { + return Err(serde::de::Error::duplicate_field("password")); + } + password__ = Some(map.next_value()?); + } + } + } + Ok(CreateWalletRequest { + wallet_name: wallet_name__.unwrap_or_default(), + password: password__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.CreateWalletRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for CreateWalletResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.mnemonic.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.CreateWalletResponse", len)?; + if !self.mnemonic.is_empty() { + struct_ser.serialize_field("mnemonic", &self.mnemonic)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for CreateWalletResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "mnemonic", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Mnemonic, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "mnemonic" => Ok(GeneratedField::Mnemonic), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = CreateWalletResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.CreateWalletResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut mnemonic__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Mnemonic => { + if mnemonic__.is_some() { + return Err(serde::de::Error::duplicate_field("mnemonic")); + } + mnemonic__ = Some(map.next_value()?); + } + } + } + Ok(CreateWalletResponse { + mnemonic: mnemonic__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.CreateWalletResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetAccountRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetAccountRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetAccountRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetAccountRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetAccountRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(GetAccountRequest { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetAccountRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetAccountResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.account.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetAccountResponse", len)?; + if let Some(v) = self.account.as_ref() { + struct_ser.serialize_field("account", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetAccountResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "account", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Account, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "account" => Ok(GeneratedField::Account), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetAccountResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetAccountResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut account__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Account => { + if account__.is_some() { + return Err(serde::de::Error::duplicate_field("account")); + } + account__ = map.next_value()?; + } + } + } + Ok(GetAccountResponse { + account: account__, + }) + } + } + deserializer.deserialize_struct("pactus.GetAccountResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetAddressHistoryRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetAddressHistoryRequest", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetAddressHistoryRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + "address", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetAddressHistoryRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetAddressHistoryRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(GetAddressHistoryRequest { + wallet_name: wallet_name__.unwrap_or_default(), + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetAddressHistoryRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetAddressHistoryResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.history_info.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetAddressHistoryResponse", len)?; + if !self.history_info.is_empty() { + struct_ser.serialize_field("historyInfo", &self.history_info)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetAddressHistoryResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "history_info", + "historyInfo", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + HistoryInfo, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "historyInfo" | "history_info" => Ok(GeneratedField::HistoryInfo), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetAddressHistoryResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetAddressHistoryResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut history_info__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::HistoryInfo => { + if history_info__.is_some() { + return Err(serde::de::Error::duplicate_field("historyInfo")); + } + history_info__ = Some(map.next_value()?); + } + } + } + Ok(GetAddressHistoryResponse { + history_info: history_info__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetAddressHistoryResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetBlockHashRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetBlockHashRequest", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockHashRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "height", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockHashRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetBlockHashRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(GetBlockHashRequest { + height: height__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetBlockHashRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetBlockHashResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.hash.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetBlockHashResponse", len)?; + if !self.hash.is_empty() { + struct_ser.serialize_field("hash", &self.hash)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockHashResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "hash", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Hash, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "hash" => Ok(GeneratedField::Hash), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockHashResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetBlockHashResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut hash__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Hash => { + if hash__.is_some() { + return Err(serde::de::Error::duplicate_field("hash")); + } + hash__ = Some(map.next_value()?); + } + } + } + Ok(GetBlockHashResponse { + hash: hash__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetBlockHashResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetBlockHeightRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.hash.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetBlockHeightRequest", len)?; + if !self.hash.is_empty() { + struct_ser.serialize_field("hash", &self.hash)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockHeightRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "hash", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Hash, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "hash" => Ok(GeneratedField::Hash), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockHeightRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetBlockHeightRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut hash__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Hash => { + if hash__.is_some() { + return Err(serde::de::Error::duplicate_field("hash")); + } + hash__ = Some(map.next_value()?); + } + } + } + Ok(GetBlockHeightRequest { + hash: hash__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetBlockHeightRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetBlockHeightResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetBlockHeightResponse", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockHeightResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "height", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockHeightResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetBlockHeightResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(GetBlockHeightResponse { + height: height__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetBlockHeightResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetBlockRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + if self.verbosity != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetBlockRequest", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + if self.verbosity != 0 { + let v = BlockVerbosity::from_i32(self.verbosity) + .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.verbosity)))?; + struct_ser.serialize_field("verbosity", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "height", + "verbosity", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + Verbosity, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + "verbosity" => Ok(GeneratedField::Verbosity), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetBlockRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + let mut verbosity__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Verbosity => { + if verbosity__.is_some() { + return Err(serde::de::Error::duplicate_field("verbosity")); + } + verbosity__ = Some(map.next_value::()? as i32); + } + } + } + Ok(GetBlockRequest { + height: height__.unwrap_or_default(), + verbosity: verbosity__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetBlockRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetBlockResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + if !self.hash.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + if self.block_time != 0 { + len += 1; + } + if self.header.is_some() { + len += 1; + } + if self.prev_cert.is_some() { + len += 1; + } + if !self.txs.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetBlockResponse", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + if !self.hash.is_empty() { + struct_ser.serialize_field("hash", &self.hash)?; + } + if !self.data.is_empty() { + struct_ser.serialize_field("data", &self.data)?; + } + if self.block_time != 0 { + struct_ser.serialize_field("blockTime", &self.block_time)?; + } + if let Some(v) = self.header.as_ref() { + struct_ser.serialize_field("header", v)?; + } + if let Some(v) = self.prev_cert.as_ref() { + struct_ser.serialize_field("prevCert", v)?; + } + if !self.txs.is_empty() { + struct_ser.serialize_field("txs", &self.txs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "height", + "hash", + "data", + "block_time", + "blockTime", + "header", + "prev_cert", + "prevCert", + "txs", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + Hash, + Data, + BlockTime, + Header, + PrevCert, + Txs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + "hash" => Ok(GeneratedField::Hash), + "data" => Ok(GeneratedField::Data), + "blockTime" | "block_time" => Ok(GeneratedField::BlockTime), + "header" => Ok(GeneratedField::Header), + "prevCert" | "prev_cert" => Ok(GeneratedField::PrevCert), + "txs" => Ok(GeneratedField::Txs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetBlockResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + let mut hash__ = None; + let mut data__ = None; + let mut block_time__ = None; + let mut header__ = None; + let mut prev_cert__ = None; + let mut txs__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Hash => { + if hash__.is_some() { + return Err(serde::de::Error::duplicate_field("hash")); + } + hash__ = Some(map.next_value()?); + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some(map.next_value()?); + } + GeneratedField::BlockTime => { + if block_time__.is_some() { + return Err(serde::de::Error::duplicate_field("blockTime")); + } + block_time__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Header => { + if header__.is_some() { + return Err(serde::de::Error::duplicate_field("header")); + } + header__ = map.next_value()?; + } + GeneratedField::PrevCert => { + if prev_cert__.is_some() { + return Err(serde::de::Error::duplicate_field("prevCert")); + } + prev_cert__ = map.next_value()?; + } + GeneratedField::Txs => { + if txs__.is_some() { + return Err(serde::de::Error::duplicate_field("txs")); + } + txs__ = Some(map.next_value()?); + } + } + } + Ok(GetBlockResponse { + height: height__.unwrap_or_default(), + hash: hash__.unwrap_or_default(), + data: data__.unwrap_or_default(), + block_time: block_time__.unwrap_or_default(), + header: header__, + prev_cert: prev_cert__, + txs: txs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetBlockResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetBlockchainInfoRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("pactus.GetBlockchainInfoRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockchainInfoRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + Err(serde::de::Error::unknown_field(value, FIELDS)) + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockchainInfoRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetBlockchainInfoRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetBlockchainInfoRequest { + }) + } + } + deserializer.deserialize_struct("pactus.GetBlockchainInfoRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetBlockchainInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.last_block_height != 0 { + len += 1; + } + if !self.last_block_hash.is_empty() { + len += 1; + } + if self.total_accounts != 0 { + len += 1; + } + if self.total_validators != 0 { + len += 1; + } + if self.total_power != 0 { + len += 1; + } + if self.committee_power != 0 { + len += 1; + } + if !self.committee_validators.is_empty() { + len += 1; + } + if self.is_pruned { + len += 1; + } + if self.pruning_height != 0 { + len += 1; + } + if self.last_block_time != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetBlockchainInfoResponse", len)?; + if self.last_block_height != 0 { + struct_ser.serialize_field("lastBlockHeight", &self.last_block_height)?; + } + if !self.last_block_hash.is_empty() { + struct_ser.serialize_field("lastBlockHash", &self.last_block_hash)?; + } + if self.total_accounts != 0 { + struct_ser.serialize_field("totalAccounts", &self.total_accounts)?; + } + if self.total_validators != 0 { + struct_ser.serialize_field("totalValidators", &self.total_validators)?; + } + if self.total_power != 0 { + struct_ser.serialize_field("totalPower", ToString::to_string(&self.total_power).as_str())?; + } + if self.committee_power != 0 { + struct_ser.serialize_field("committeePower", ToString::to_string(&self.committee_power).as_str())?; + } + if !self.committee_validators.is_empty() { + struct_ser.serialize_field("committeeValidators", &self.committee_validators)?; + } + if self.is_pruned { + struct_ser.serialize_field("isPruned", &self.is_pruned)?; + } + if self.pruning_height != 0 { + struct_ser.serialize_field("pruningHeight", &self.pruning_height)?; + } + if self.last_block_time != 0 { + struct_ser.serialize_field("lastBlockTime", ToString::to_string(&self.last_block_time).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetBlockchainInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "last_block_height", + "lastBlockHeight", + "last_block_hash", + "lastBlockHash", + "total_accounts", + "totalAccounts", + "total_validators", + "totalValidators", + "total_power", + "totalPower", + "committee_power", + "committeePower", + "committee_validators", + "committeeValidators", + "is_pruned", + "isPruned", + "pruning_height", + "pruningHeight", + "last_block_time", + "lastBlockTime", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + LastBlockHeight, + LastBlockHash, + TotalAccounts, + TotalValidators, + TotalPower, + CommitteePower, + CommitteeValidators, + IsPruned, + PruningHeight, + LastBlockTime, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "lastBlockHeight" | "last_block_height" => Ok(GeneratedField::LastBlockHeight), + "lastBlockHash" | "last_block_hash" => Ok(GeneratedField::LastBlockHash), + "totalAccounts" | "total_accounts" => Ok(GeneratedField::TotalAccounts), + "totalValidators" | "total_validators" => Ok(GeneratedField::TotalValidators), + "totalPower" | "total_power" => Ok(GeneratedField::TotalPower), + "committeePower" | "committee_power" => Ok(GeneratedField::CommitteePower), + "committeeValidators" | "committee_validators" => Ok(GeneratedField::CommitteeValidators), + "isPruned" | "is_pruned" => Ok(GeneratedField::IsPruned), + "pruningHeight" | "pruning_height" => Ok(GeneratedField::PruningHeight), + "lastBlockTime" | "last_block_time" => Ok(GeneratedField::LastBlockTime), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetBlockchainInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetBlockchainInfoResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut last_block_height__ = None; + let mut last_block_hash__ = None; + let mut total_accounts__ = None; + let mut total_validators__ = None; + let mut total_power__ = None; + let mut committee_power__ = None; + let mut committee_validators__ = None; + let mut is_pruned__ = None; + let mut pruning_height__ = None; + let mut last_block_time__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::LastBlockHeight => { + if last_block_height__.is_some() { + return Err(serde::de::Error::duplicate_field("lastBlockHeight")); + } + last_block_height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::LastBlockHash => { + if last_block_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("lastBlockHash")); + } + last_block_hash__ = Some(map.next_value()?); + } + GeneratedField::TotalAccounts => { + if total_accounts__.is_some() { + return Err(serde::de::Error::duplicate_field("totalAccounts")); + } + total_accounts__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::TotalValidators => { + if total_validators__.is_some() { + return Err(serde::de::Error::duplicate_field("totalValidators")); + } + total_validators__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::TotalPower => { + if total_power__.is_some() { + return Err(serde::de::Error::duplicate_field("totalPower")); + } + total_power__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::CommitteePower => { + if committee_power__.is_some() { + return Err(serde::de::Error::duplicate_field("committeePower")); + } + committee_power__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::CommitteeValidators => { + if committee_validators__.is_some() { + return Err(serde::de::Error::duplicate_field("committeeValidators")); + } + committee_validators__ = Some(map.next_value()?); + } + GeneratedField::IsPruned => { + if is_pruned__.is_some() { + return Err(serde::de::Error::duplicate_field("isPruned")); + } + is_pruned__ = Some(map.next_value()?); + } + GeneratedField::PruningHeight => { + if pruning_height__.is_some() { + return Err(serde::de::Error::duplicate_field("pruningHeight")); + } + pruning_height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::LastBlockTime => { + if last_block_time__.is_some() { + return Err(serde::de::Error::duplicate_field("lastBlockTime")); + } + last_block_time__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(GetBlockchainInfoResponse { + last_block_height: last_block_height__.unwrap_or_default(), + last_block_hash: last_block_hash__.unwrap_or_default(), + total_accounts: total_accounts__.unwrap_or_default(), + total_validators: total_validators__.unwrap_or_default(), + total_power: total_power__.unwrap_or_default(), + committee_power: committee_power__.unwrap_or_default(), + committee_validators: committee_validators__.unwrap_or_default(), + is_pruned: is_pruned__.unwrap_or_default(), + pruning_height: pruning_height__.unwrap_or_default(), + last_block_time: last_block_time__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetBlockchainInfoResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetConsensusInfoRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("pactus.GetConsensusInfoRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetConsensusInfoRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + Err(serde::de::Error::unknown_field(value, FIELDS)) + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetConsensusInfoRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetConsensusInfoRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetConsensusInfoRequest { + }) + } + } + deserializer.deserialize_struct("pactus.GetConsensusInfoRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetConsensusInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.proposal.is_some() { + len += 1; + } + if !self.instances.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetConsensusInfoResponse", len)?; + if let Some(v) = self.proposal.as_ref() { + struct_ser.serialize_field("proposal", v)?; + } + if !self.instances.is_empty() { + struct_ser.serialize_field("instances", &self.instances)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetConsensusInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "proposal", + "instances", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Proposal, + Instances, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "proposal" => Ok(GeneratedField::Proposal), + "instances" => Ok(GeneratedField::Instances), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetConsensusInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetConsensusInfoResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut proposal__ = None; + let mut instances__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Proposal => { + if proposal__.is_some() { + return Err(serde::de::Error::duplicate_field("proposal")); + } + proposal__ = map.next_value()?; + } + GeneratedField::Instances => { + if instances__.is_some() { + return Err(serde::de::Error::duplicate_field("instances")); + } + instances__ = Some(map.next_value()?); + } + } + } + Ok(GetConsensusInfoResponse { + proposal: proposal__, + instances: instances__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetConsensusInfoResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetNetworkInfoRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.only_connected { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetNetworkInfoRequest", len)?; + if self.only_connected { + struct_ser.serialize_field("onlyConnected", &self.only_connected)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetNetworkInfoRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "only_connected", + "onlyConnected", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + OnlyConnected, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "onlyConnected" | "only_connected" => Ok(GeneratedField::OnlyConnected), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetNetworkInfoRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetNetworkInfoRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut only_connected__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::OnlyConnected => { + if only_connected__.is_some() { + return Err(serde::de::Error::duplicate_field("onlyConnected")); + } + only_connected__ = Some(map.next_value()?); + } + } + } + Ok(GetNetworkInfoRequest { + only_connected: only_connected__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetNetworkInfoRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetNetworkInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.network_name.is_empty() { + len += 1; + } + if self.total_sent_bytes != 0 { + len += 1; + } + if self.total_received_bytes != 0 { + len += 1; + } + if self.connected_peers_count != 0 { + len += 1; + } + if !self.connected_peers.is_empty() { + len += 1; + } + if !self.sent_bytes.is_empty() { + len += 1; + } + if !self.received_bytes.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetNetworkInfoResponse", len)?; + if !self.network_name.is_empty() { + struct_ser.serialize_field("networkName", &self.network_name)?; + } + if self.total_sent_bytes != 0 { + struct_ser.serialize_field("totalSentBytes", ToString::to_string(&self.total_sent_bytes).as_str())?; + } + if self.total_received_bytes != 0 { + struct_ser.serialize_field("totalReceivedBytes", ToString::to_string(&self.total_received_bytes).as_str())?; + } + if self.connected_peers_count != 0 { + struct_ser.serialize_field("connectedPeersCount", &self.connected_peers_count)?; + } + if !self.connected_peers.is_empty() { + struct_ser.serialize_field("connectedPeers", &self.connected_peers)?; + } + if !self.sent_bytes.is_empty() { + let v: std::collections::HashMap<_, _> = self.sent_bytes.iter() + .map(|(k, v)| (k, v.to_string())).collect(); + struct_ser.serialize_field("sentBytes", &v)?; + } + if !self.received_bytes.is_empty() { + let v: std::collections::HashMap<_, _> = self.received_bytes.iter() + .map(|(k, v)| (k, v.to_string())).collect(); + struct_ser.serialize_field("receivedBytes", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetNetworkInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "network_name", + "networkName", + "total_sent_bytes", + "totalSentBytes", + "total_received_bytes", + "totalReceivedBytes", + "connected_peers_count", + "connectedPeersCount", + "connected_peers", + "connectedPeers", + "sent_bytes", + "sentBytes", + "received_bytes", + "receivedBytes", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + NetworkName, + TotalSentBytes, + TotalReceivedBytes, + ConnectedPeersCount, + ConnectedPeers, + SentBytes, + ReceivedBytes, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "networkName" | "network_name" => Ok(GeneratedField::NetworkName), + "totalSentBytes" | "total_sent_bytes" => Ok(GeneratedField::TotalSentBytes), + "totalReceivedBytes" | "total_received_bytes" => Ok(GeneratedField::TotalReceivedBytes), + "connectedPeersCount" | "connected_peers_count" => Ok(GeneratedField::ConnectedPeersCount), + "connectedPeers" | "connected_peers" => Ok(GeneratedField::ConnectedPeers), + "sentBytes" | "sent_bytes" => Ok(GeneratedField::SentBytes), + "receivedBytes" | "received_bytes" => Ok(GeneratedField::ReceivedBytes), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetNetworkInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetNetworkInfoResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut network_name__ = None; + let mut total_sent_bytes__ = None; + let mut total_received_bytes__ = None; + let mut connected_peers_count__ = None; + let mut connected_peers__ = None; + let mut sent_bytes__ = None; + let mut received_bytes__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::NetworkName => { + if network_name__.is_some() { + return Err(serde::de::Error::duplicate_field("networkName")); + } + network_name__ = Some(map.next_value()?); + } + GeneratedField::TotalSentBytes => { + if total_sent_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("totalSentBytes")); + } + total_sent_bytes__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::TotalReceivedBytes => { + if total_received_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("totalReceivedBytes")); + } + total_received_bytes__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::ConnectedPeersCount => { + if connected_peers_count__.is_some() { + return Err(serde::de::Error::duplicate_field("connectedPeersCount")); + } + connected_peers_count__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::ConnectedPeers => { + if connected_peers__.is_some() { + return Err(serde::de::Error::duplicate_field("connectedPeers")); + } + connected_peers__ = Some(map.next_value()?); + } + GeneratedField::SentBytes => { + if sent_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("sentBytes")); + } + sent_bytes__ = Some( + map.next_value::, ::pbjson::private::NumberDeserialize>>()? + .into_iter().map(|(k,v)| (k.0, v.0)).collect() + ); + } + GeneratedField::ReceivedBytes => { + if received_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("receivedBytes")); + } + received_bytes__ = Some( + map.next_value::, ::pbjson::private::NumberDeserialize>>()? + .into_iter().map(|(k,v)| (k.0, v.0)).collect() + ); + } + } + } + Ok(GetNetworkInfoResponse { + network_name: network_name__.unwrap_or_default(), + total_sent_bytes: total_sent_bytes__.unwrap_or_default(), + total_received_bytes: total_received_bytes__.unwrap_or_default(), + connected_peers_count: connected_peers_count__.unwrap_or_default(), + connected_peers: connected_peers__.unwrap_or_default(), + sent_bytes: sent_bytes__.unwrap_or_default(), + received_bytes: received_bytes__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetNetworkInfoResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetNewAddressRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + if self.address_type != 0 { + len += 1; + } + if !self.label.is_empty() { + len += 1; + } + if !self.password.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetNewAddressRequest", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + if self.address_type != 0 { + let v = AddressType::from_i32(self.address_type) + .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.address_type)))?; + struct_ser.serialize_field("addressType", &v)?; + } + if !self.label.is_empty() { + struct_ser.serialize_field("label", &self.label)?; + } + if !self.password.is_empty() { + struct_ser.serialize_field("password", &self.password)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetNewAddressRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + "address_type", + "addressType", + "label", + "password", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + AddressType, + Label, + Password, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + "addressType" | "address_type" => Ok(GeneratedField::AddressType), + "label" => Ok(GeneratedField::Label), + "password" => Ok(GeneratedField::Password), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetNewAddressRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetNewAddressRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + let mut address_type__ = None; + let mut label__ = None; + let mut password__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + GeneratedField::AddressType => { + if address_type__.is_some() { + return Err(serde::de::Error::duplicate_field("addressType")); + } + address_type__ = Some(map.next_value::()? as i32); + } + GeneratedField::Label => { + if label__.is_some() { + return Err(serde::de::Error::duplicate_field("label")); + } + label__ = Some(map.next_value()?); + } + GeneratedField::Password => { + if password__.is_some() { + return Err(serde::de::Error::duplicate_field("password")); + } + password__ = Some(map.next_value()?); + } + } + } + Ok(GetNewAddressRequest { + wallet_name: wallet_name__.unwrap_or_default(), + address_type: address_type__.unwrap_or_default(), + label: label__.unwrap_or_default(), + password: password__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetNewAddressRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetNewAddressResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + if self.address_info.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetNewAddressResponse", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + if let Some(v) = self.address_info.as_ref() { + struct_ser.serialize_field("addressInfo", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetNewAddressResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + "address_info", + "addressInfo", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + AddressInfo, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + "addressInfo" | "address_info" => Ok(GeneratedField::AddressInfo), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetNewAddressResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetNewAddressResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + let mut address_info__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + GeneratedField::AddressInfo => { + if address_info__.is_some() { + return Err(serde::de::Error::duplicate_field("addressInfo")); + } + address_info__ = map.next_value()?; + } + } + } + Ok(GetNewAddressResponse { + wallet_name: wallet_name__.unwrap_or_default(), + address_info: address_info__, + }) + } + } + deserializer.deserialize_struct("pactus.GetNewAddressResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetNodeInfoRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("pactus.GetNodeInfoRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetNodeInfoRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + Err(serde::de::Error::unknown_field(value, FIELDS)) + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetNodeInfoRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetNodeInfoRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetNodeInfoRequest { + }) + } + } + deserializer.deserialize_struct("pactus.GetNodeInfoRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetNodeInfoResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.moniker.is_empty() { + len += 1; + } + if !self.agent.is_empty() { + len += 1; + } + if !self.peer_id.is_empty() { + len += 1; + } + if self.started_at != 0 { + len += 1; + } + if !self.reachability.is_empty() { + len += 1; + } + if self.services != 0 { + len += 1; + } + if !self.services_names.is_empty() { + len += 1; + } + if !self.local_addrs.is_empty() { + len += 1; + } + if !self.protocols.is_empty() { + len += 1; + } + if self.clock_offset != 0. { + len += 1; + } + if self.connection_info.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetNodeInfoResponse", len)?; + if !self.moniker.is_empty() { + struct_ser.serialize_field("moniker", &self.moniker)?; + } + if !self.agent.is_empty() { + struct_ser.serialize_field("agent", &self.agent)?; + } + if !self.peer_id.is_empty() { + struct_ser.serialize_field("peerId", &self.peer_id)?; + } + if self.started_at != 0 { + struct_ser.serialize_field("startedAt", ToString::to_string(&self.started_at).as_str())?; + } + if !self.reachability.is_empty() { + struct_ser.serialize_field("reachability", &self.reachability)?; + } + if self.services != 0 { + struct_ser.serialize_field("services", &self.services)?; + } + if !self.services_names.is_empty() { + struct_ser.serialize_field("servicesNames", &self.services_names)?; + } + if !self.local_addrs.is_empty() { + struct_ser.serialize_field("localAddrs", &self.local_addrs)?; + } + if !self.protocols.is_empty() { + struct_ser.serialize_field("protocols", &self.protocols)?; + } + if self.clock_offset != 0. { + struct_ser.serialize_field("clockOffset", &self.clock_offset)?; + } + if let Some(v) = self.connection_info.as_ref() { + struct_ser.serialize_field("connectionInfo", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetNodeInfoResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "moniker", + "agent", + "peer_id", + "peerId", + "started_at", + "startedAt", + "reachability", + "services", + "services_names", + "servicesNames", + "local_addrs", + "localAddrs", + "protocols", + "clock_offset", + "clockOffset", + "connection_info", + "connectionInfo", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Moniker, + Agent, + PeerId, + StartedAt, + Reachability, + Services, + ServicesNames, + LocalAddrs, + Protocols, + ClockOffset, + ConnectionInfo, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "moniker" => Ok(GeneratedField::Moniker), + "agent" => Ok(GeneratedField::Agent), + "peerId" | "peer_id" => Ok(GeneratedField::PeerId), + "startedAt" | "started_at" => Ok(GeneratedField::StartedAt), + "reachability" => Ok(GeneratedField::Reachability), + "services" => Ok(GeneratedField::Services), + "servicesNames" | "services_names" => Ok(GeneratedField::ServicesNames), + "localAddrs" | "local_addrs" => Ok(GeneratedField::LocalAddrs), + "protocols" => Ok(GeneratedField::Protocols), + "clockOffset" | "clock_offset" => Ok(GeneratedField::ClockOffset), + "connectionInfo" | "connection_info" => Ok(GeneratedField::ConnectionInfo), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetNodeInfoResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetNodeInfoResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut moniker__ = None; + let mut agent__ = None; + let mut peer_id__ = None; + let mut started_at__ = None; + let mut reachability__ = None; + let mut services__ = None; + let mut services_names__ = None; + let mut local_addrs__ = None; + let mut protocols__ = None; + let mut clock_offset__ = None; + let mut connection_info__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Moniker => { + if moniker__.is_some() { + return Err(serde::de::Error::duplicate_field("moniker")); + } + moniker__ = Some(map.next_value()?); + } + GeneratedField::Agent => { + if agent__.is_some() { + return Err(serde::de::Error::duplicate_field("agent")); + } + agent__ = Some(map.next_value()?); + } + GeneratedField::PeerId => { + if peer_id__.is_some() { + return Err(serde::de::Error::duplicate_field("peerId")); + } + peer_id__ = Some(map.next_value()?); + } + GeneratedField::StartedAt => { + if started_at__.is_some() { + return Err(serde::de::Error::duplicate_field("startedAt")); + } + started_at__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Reachability => { + if reachability__.is_some() { + return Err(serde::de::Error::duplicate_field("reachability")); + } + reachability__ = Some(map.next_value()?); + } + GeneratedField::Services => { + if services__.is_some() { + return Err(serde::de::Error::duplicate_field("services")); + } + services__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::ServicesNames => { + if services_names__.is_some() { + return Err(serde::de::Error::duplicate_field("servicesNames")); + } + services_names__ = Some(map.next_value()?); + } + GeneratedField::LocalAddrs => { + if local_addrs__.is_some() { + return Err(serde::de::Error::duplicate_field("localAddrs")); + } + local_addrs__ = Some(map.next_value()?); + } + GeneratedField::Protocols => { + if protocols__.is_some() { + return Err(serde::de::Error::duplicate_field("protocols")); + } + protocols__ = Some(map.next_value()?); + } + GeneratedField::ClockOffset => { + if clock_offset__.is_some() { + return Err(serde::de::Error::duplicate_field("clockOffset")); + } + clock_offset__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::ConnectionInfo => { + if connection_info__.is_some() { + return Err(serde::de::Error::duplicate_field("connectionInfo")); + } + connection_info__ = map.next_value()?; + } + } + } + Ok(GetNodeInfoResponse { + moniker: moniker__.unwrap_or_default(), + agent: agent__.unwrap_or_default(), + peer_id: peer_id__.unwrap_or_default(), + started_at: started_at__.unwrap_or_default(), + reachability: reachability__.unwrap_or_default(), + services: services__.unwrap_or_default(), + services_names: services_names__.unwrap_or_default(), + local_addrs: local_addrs__.unwrap_or_default(), + protocols: protocols__.unwrap_or_default(), + clock_offset: clock_offset__.unwrap_or_default(), + connection_info: connection_info__, + }) + } + } + deserializer.deserialize_struct("pactus.GetNodeInfoResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetPublicKeyRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetPublicKeyRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetPublicKeyRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetPublicKeyRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetPublicKeyRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(GetPublicKeyRequest { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetPublicKeyRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetPublicKeyResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.public_key.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetPublicKeyResponse", len)?; + if !self.public_key.is_empty() { + struct_ser.serialize_field("publicKey", &self.public_key)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetPublicKeyResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "public_key", + "publicKey", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PublicKey, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetPublicKeyResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetPublicKeyResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut public_key__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = Some(map.next_value()?); + } + } + } + Ok(GetPublicKeyResponse { + public_key: public_key__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetPublicKeyResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetRawBondTransactionRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.receiver.is_empty() { + len += 1; + } + if self.stake != 0 { + len += 1; + } + if !self.public_key.is_empty() { + len += 1; + } + if self.fee != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetRawBondTransactionRequest", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.receiver.is_empty() { + struct_ser.serialize_field("receiver", &self.receiver)?; + } + if self.stake != 0 { + struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; + } + if !self.public_key.is_empty() { + struct_ser.serialize_field("publicKey", &self.public_key)?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetRawBondTransactionRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", + "receiver", + "stake", + "public_key", + "publicKey", + "fee", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Receiver, + Stake, + PublicKey, + Fee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "receiver" => Ok(GeneratedField::Receiver), + "stake" => Ok(GeneratedField::Stake), + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + "fee" => Ok(GeneratedField::Fee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetRawBondTransactionRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetRawBondTransactionRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut receiver__ = None; + let mut stake__ = None; + let mut public_key__ = None; + let mut fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::Receiver => { + if receiver__.is_some() { + return Err(serde::de::Error::duplicate_field("receiver")); + } + receiver__ = Some(map.next_value()?); + } + GeneratedField::Stake => { + if stake__.is_some() { + return Err(serde::de::Error::duplicate_field("stake")); + } + stake__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = Some(map.next_value()?); + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(GetRawBondTransactionRequest { + sender: sender__.unwrap_or_default(), + receiver: receiver__.unwrap_or_default(), + stake: stake__.unwrap_or_default(), + public_key: public_key__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetRawBondTransactionRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetRawTransactionRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.lock_time != 0 { + len += 1; + } + if !self.memo.is_empty() { + len += 1; + } + if self.transaction.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetRawTransactionRequest", len)?; + if self.lock_time != 0 { + struct_ser.serialize_field("lockTime", &self.lock_time)?; + } + if !self.memo.is_empty() { + struct_ser.serialize_field("memo", &self.memo)?; + } + if let Some(v) = self.transaction.as_ref() { + match v { + get_raw_transaction_request::Transaction::Transfer(v) => { + struct_ser.serialize_field("transfer", v)?; + } + get_raw_transaction_request::Transaction::Bond(v) => { + struct_ser.serialize_field("bond", v)?; + } + get_raw_transaction_request::Transaction::Unbond(v) => { + struct_ser.serialize_field("unbond", v)?; + } + get_raw_transaction_request::Transaction::Withdraw(v) => { + struct_ser.serialize_field("withdraw", v)?; + } + } + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetRawTransactionRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "lock_time", + "lockTime", + "memo", + "transfer", + "bond", + "unbond", + "withdraw", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + LockTime, + Memo, + Transfer, + Bond, + Unbond, + Withdraw, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), + "memo" => Ok(GeneratedField::Memo), + "transfer" => Ok(GeneratedField::Transfer), + "bond" => Ok(GeneratedField::Bond), + "unbond" => Ok(GeneratedField::Unbond), + "withdraw" => Ok(GeneratedField::Withdraw), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetRawTransactionRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetRawTransactionRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut lock_time__ = None; + let mut memo__ = None; + let mut transaction__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::LockTime => { + if lock_time__.is_some() { + return Err(serde::de::Error::duplicate_field("lockTime")); + } + lock_time__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Memo => { + if memo__.is_some() { + return Err(serde::de::Error::duplicate_field("memo")); + } + memo__ = Some(map.next_value()?); + } + GeneratedField::Transfer => { + if transaction__.is_some() { + return Err(serde::de::Error::duplicate_field("transfer")); + } + transaction__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Transaction::Transfer) +; + } + GeneratedField::Bond => { + if transaction__.is_some() { + return Err(serde::de::Error::duplicate_field("bond")); + } + transaction__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Transaction::Bond) +; + } + GeneratedField::Unbond => { + if transaction__.is_some() { + return Err(serde::de::Error::duplicate_field("unbond")); + } + transaction__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Transaction::Unbond) +; + } + GeneratedField::Withdraw => { + if transaction__.is_some() { + return Err(serde::de::Error::duplicate_field("withdraw")); + } + transaction__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Transaction::Withdraw) +; + } + } + } + Ok(GetRawTransactionRequest { + lock_time: lock_time__.unwrap_or_default(), + memo: memo__.unwrap_or_default(), + transaction: transaction__, + }) + } + } + deserializer.deserialize_struct("pactus.GetRawTransactionRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetRawTransactionResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.raw_transaction.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetRawTransactionResponse", len)?; + if !self.raw_transaction.is_empty() { + struct_ser.serialize_field("rawTransaction", &self.raw_transaction)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetRawTransactionResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "raw_transaction", + "rawTransaction", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + RawTransaction, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "rawTransaction" | "raw_transaction" => Ok(GeneratedField::RawTransaction), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetRawTransactionResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetRawTransactionResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut raw_transaction__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::RawTransaction => { + if raw_transaction__.is_some() { + return Err(serde::de::Error::duplicate_field("rawTransaction")); + } + raw_transaction__ = Some(map.next_value()?); + } + } + } + Ok(GetRawTransactionResponse { + raw_transaction: raw_transaction__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetRawTransactionResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetRawTransferTransactionRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.receiver.is_empty() { + len += 1; + } + if self.amount != 0 { + len += 1; + } + if self.fee != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetRawTransferTransactionRequest", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.receiver.is_empty() { + struct_ser.serialize_field("receiver", &self.receiver)?; + } + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetRawTransferTransactionRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", + "receiver", + "amount", + "fee", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Receiver, + Amount, + Fee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "receiver" => Ok(GeneratedField::Receiver), + "amount" => Ok(GeneratedField::Amount), + "fee" => Ok(GeneratedField::Fee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetRawTransferTransactionRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetRawTransferTransactionRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut receiver__ = None; + let mut amount__ = None; + let mut fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::Receiver => { + if receiver__.is_some() { + return Err(serde::de::Error::duplicate_field("receiver")); + } + receiver__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(GetRawTransferTransactionRequest { + sender: sender__.unwrap_or_default(), + receiver: receiver__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetRawTransferTransactionRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetRawUnbondTransactionRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetRawUnbondTransactionRequest", len)?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetRawUnbondTransactionRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "validator_address", + "validatorAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetRawUnbondTransactionRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetRawUnbondTransactionRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + } + } + Ok(GetRawUnbondTransactionRequest { + validator_address: validator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetRawUnbondTransactionRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetRawWithdrawTransactionRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + if !self.account_address.is_empty() { + len += 1; + } + if self.amount != 0 { + len += 1; + } + if self.fee != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetRawWithdrawTransactionRequest", len)?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if !self.account_address.is_empty() { + struct_ser.serialize_field("accountAddress", &self.account_address)?; + } + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetRawWithdrawTransactionRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "validator_address", + "validatorAddress", + "account_address", + "accountAddress", + "amount", + "fee", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + AccountAddress, + Amount, + Fee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), + "accountAddress" | "account_address" => Ok(GeneratedField::AccountAddress), + "amount" => Ok(GeneratedField::Amount), + "fee" => Ok(GeneratedField::Fee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetRawWithdrawTransactionRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetRawWithdrawTransactionRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + let mut account_address__ = None; + let mut amount__ = None; + let mut fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::AccountAddress => { + if account_address__.is_some() { + return Err(serde::de::Error::duplicate_field("accountAddress")); + } + account_address__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(GetRawWithdrawTransactionRequest { + validator_address: validator_address__.unwrap_or_default(), + account_address: account_address__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetRawWithdrawTransactionRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetTotalBalanceRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetTotalBalanceRequest", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTotalBalanceRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTotalBalanceRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetTotalBalanceRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + } + } + Ok(GetTotalBalanceRequest { + wallet_name: wallet_name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetTotalBalanceRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetTotalBalanceResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + if self.total_balance != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetTotalBalanceResponse", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + if self.total_balance != 0 { + struct_ser.serialize_field("totalBalance", ToString::to_string(&self.total_balance).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTotalBalanceResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + "total_balance", + "totalBalance", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + TotalBalance, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + "totalBalance" | "total_balance" => Ok(GeneratedField::TotalBalance), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTotalBalanceResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetTotalBalanceResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + let mut total_balance__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + GeneratedField::TotalBalance => { + if total_balance__.is_some() { + return Err(serde::de::Error::duplicate_field("totalBalance")); + } + total_balance__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(GetTotalBalanceResponse { + wallet_name: wallet_name__.unwrap_or_default(), + total_balance: total_balance__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetTotalBalanceResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetTransactionRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.id.is_empty() { + len += 1; + } + if self.verbosity != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetTransactionRequest", len)?; + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if self.verbosity != 0 { + let v = TransactionVerbosity::from_i32(self.verbosity) + .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.verbosity)))?; + struct_ser.serialize_field("verbosity", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTransactionRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + "verbosity", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + Verbosity, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + "verbosity" => Ok(GeneratedField::Verbosity), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTransactionRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetTransactionRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + let mut verbosity__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + GeneratedField::Verbosity => { + if verbosity__.is_some() { + return Err(serde::de::Error::duplicate_field("verbosity")); + } + verbosity__ = Some(map.next_value::()? as i32); + } + } + } + Ok(GetTransactionRequest { + id: id__.unwrap_or_default(), + verbosity: verbosity__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetTransactionRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetTransactionResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.block_height != 0 { + len += 1; + } + if self.block_time != 0 { + len += 1; + } + if self.transaction.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetTransactionResponse", len)?; + if self.block_height != 0 { + struct_ser.serialize_field("blockHeight", &self.block_height)?; + } + if self.block_time != 0 { + struct_ser.serialize_field("blockTime", &self.block_time)?; + } + if let Some(v) = self.transaction.as_ref() { + struct_ser.serialize_field("transaction", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTransactionResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "block_height", + "blockHeight", + "block_time", + "blockTime", + "transaction", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + BlockHeight, + BlockTime, + Transaction, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "blockHeight" | "block_height" => Ok(GeneratedField::BlockHeight), + "blockTime" | "block_time" => Ok(GeneratedField::BlockTime), + "transaction" => Ok(GeneratedField::Transaction), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTransactionResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetTransactionResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut block_height__ = None; + let mut block_time__ = None; + let mut transaction__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::BlockHeight => { + if block_height__.is_some() { + return Err(serde::de::Error::duplicate_field("blockHeight")); + } + block_height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::BlockTime => { + if block_time__.is_some() { + return Err(serde::de::Error::duplicate_field("blockTime")); + } + block_time__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Transaction => { + if transaction__.is_some() { + return Err(serde::de::Error::duplicate_field("transaction")); + } + transaction__ = map.next_value()?; + } + } + } + Ok(GetTransactionResponse { + block_height: block_height__.unwrap_or_default(), + block_time: block_time__.unwrap_or_default(), + transaction: transaction__, + }) + } + } + deserializer.deserialize_struct("pactus.GetTransactionResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetTxPoolContentRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.payload_type != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetTxPoolContentRequest", len)?; + if self.payload_type != 0 { + let v = PayloadType::from_i32(self.payload_type) + .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.payload_type)))?; + struct_ser.serialize_field("payloadType", &v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTxPoolContentRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "payload_type", + "payloadType", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PayloadType, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "payloadType" | "payload_type" => Ok(GeneratedField::PayloadType), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTxPoolContentRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetTxPoolContentRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut payload_type__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::PayloadType => { + if payload_type__.is_some() { + return Err(serde::de::Error::duplicate_field("payloadType")); + } + payload_type__ = Some(map.next_value::()? as i32); + } + } + } + Ok(GetTxPoolContentRequest { + payload_type: payload_type__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetTxPoolContentRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetTxPoolContentResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.txs.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetTxPoolContentResponse", len)?; + if !self.txs.is_empty() { + struct_ser.serialize_field("txs", &self.txs)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetTxPoolContentResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "txs", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Txs, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "txs" => Ok(GeneratedField::Txs), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetTxPoolContentResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetTxPoolContentResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut txs__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Txs => { + if txs__.is_some() { + return Err(serde::de::Error::duplicate_field("txs")); + } + txs__ = Some(map.next_value()?); + } + } + } + Ok(GetTxPoolContentResponse { + txs: txs__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetTxPoolContentResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetValidatorAddressRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.public_key.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorAddressRequest", len)?; + if !self.public_key.is_empty() { + struct_ser.serialize_field("publicKey", &self.public_key)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetValidatorAddressRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "public_key", + "publicKey", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PublicKey, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetValidatorAddressRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetValidatorAddressRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut public_key__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = Some(map.next_value()?); + } + } + } + Ok(GetValidatorAddressRequest { + public_key: public_key__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetValidatorAddressRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetValidatorAddressResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorAddressResponse", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetValidatorAddressResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetValidatorAddressResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetValidatorAddressResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(GetValidatorAddressResponse { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetValidatorAddressResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetValidatorAddressesRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let len = 0; + let struct_ser = serializer.serialize_struct("pactus.GetValidatorAddressesRequest", len)?; + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetValidatorAddressesRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + Err(serde::de::Error::unknown_field(value, FIELDS)) + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetValidatorAddressesRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetValidatorAddressesRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + while map.next_key::()?.is_some() { + let _ = map.next_value::()?; + } + Ok(GetValidatorAddressesRequest { + }) + } + } + deserializer.deserialize_struct("pactus.GetValidatorAddressesRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetValidatorAddressesResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.addresses.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorAddressesResponse", len)?; + if !self.addresses.is_empty() { + struct_ser.serialize_field("addresses", &self.addresses)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetValidatorAddressesResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "addresses", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Addresses, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "addresses" => Ok(GeneratedField::Addresses), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetValidatorAddressesResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetValidatorAddressesResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut addresses__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Addresses => { + if addresses__.is_some() { + return Err(serde::de::Error::duplicate_field("addresses")); + } + addresses__ = Some(map.next_value()?); + } + } + } + Ok(GetValidatorAddressesResponse { + addresses: addresses__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetValidatorAddressesResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetValidatorByNumberRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.number != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorByNumberRequest", len)?; + if self.number != 0 { + struct_ser.serialize_field("number", &self.number)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetValidatorByNumberRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "number", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Number, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "number" => Ok(GeneratedField::Number), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetValidatorByNumberRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetValidatorByNumberRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut number__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Number => { + if number__.is_some() { + return Err(serde::de::Error::duplicate_field("number")); + } + number__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(GetValidatorByNumberRequest { + number: number__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetValidatorByNumberRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetValidatorRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorRequest", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetValidatorRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetValidatorRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetValidatorRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + } + } + Ok(GetValidatorRequest { + address: address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.GetValidatorRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for GetValidatorResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.validator.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.GetValidatorResponse", len)?; + if let Some(v) = self.validator.as_ref() { + struct_ser.serialize_field("validator", v)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for GetValidatorResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "validator", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Validator, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validator" => Ok(GeneratedField::Validator), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GetValidatorResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.GetValidatorResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Validator => { + if validator__.is_some() { + return Err(serde::de::Error::duplicate_field("validator")); + } + validator__ = map.next_value()?; + } + } + } + Ok(GetValidatorResponse { + validator: validator__, + }) + } + } + deserializer.deserialize_struct("pactus.GetValidatorResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for HistoryInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.transaction_id.is_empty() { + len += 1; + } + if self.time != 0 { + len += 1; + } + if !self.payload_type.is_empty() { + len += 1; + } + if !self.description.is_empty() { + len += 1; + } + if self.amount != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.HistoryInfo", len)?; + if !self.transaction_id.is_empty() { + struct_ser.serialize_field("transactionId", &self.transaction_id)?; + } + if self.time != 0 { + struct_ser.serialize_field("time", &self.time)?; + } + if !self.payload_type.is_empty() { + struct_ser.serialize_field("payloadType", &self.payload_type)?; + } + if !self.description.is_empty() { + struct_ser.serialize_field("description", &self.description)?; + } + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for HistoryInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "transaction_id", + "transactionId", + "time", + "payload_type", + "payloadType", + "description", + "amount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + TransactionId, + Time, + PayloadType, + Description, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "transactionId" | "transaction_id" => Ok(GeneratedField::TransactionId), + "time" => Ok(GeneratedField::Time), + "payloadType" | "payload_type" => Ok(GeneratedField::PayloadType), + "description" => Ok(GeneratedField::Description), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = HistoryInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.HistoryInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut transaction_id__ = None; + let mut time__ = None; + let mut payload_type__ = None; + let mut description__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::TransactionId => { + if transaction_id__.is_some() { + return Err(serde::de::Error::duplicate_field("transactionId")); + } + transaction_id__ = Some(map.next_value()?); + } + GeneratedField::Time => { + if time__.is_some() { + return Err(serde::de::Error::duplicate_field("time")); + } + time__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::PayloadType => { + if payload_type__.is_some() { + return Err(serde::de::Error::duplicate_field("payloadType")); + } + payload_type__ = Some(map.next_value()?); + } + GeneratedField::Description => { + if description__.is_some() { + return Err(serde::de::Error::duplicate_field("description")); + } + description__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(HistoryInfo { + transaction_id: transaction_id__.unwrap_or_default(), + time: time__.unwrap_or_default(), + payload_type: payload_type__.unwrap_or_default(), + description: description__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.HistoryInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for LoadWalletRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.LoadWalletRequest", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for LoadWalletRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = LoadWalletRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.LoadWalletRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + } + } + Ok(LoadWalletRequest { + wallet_name: wallet_name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.LoadWalletRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for LoadWalletResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.LoadWalletResponse", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for LoadWalletResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = LoadWalletResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.LoadWalletResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + } + } + Ok(LoadWalletResponse { + wallet_name: wallet_name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.LoadWalletResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PayloadBond { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.receiver.is_empty() { + len += 1; + } + if self.stake != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.PayloadBond", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.receiver.is_empty() { + struct_ser.serialize_field("receiver", &self.receiver)?; + } + if self.stake != 0 { + struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PayloadBond { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", + "receiver", + "stake", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Receiver, + Stake, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "receiver" => Ok(GeneratedField::Receiver), + "stake" => Ok(GeneratedField::Stake), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PayloadBond; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.PayloadBond") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut receiver__ = None; + let mut stake__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::Receiver => { + if receiver__.is_some() { + return Err(serde::de::Error::duplicate_field("receiver")); + } + receiver__ = Some(map.next_value()?); + } + GeneratedField::Stake => { + if stake__.is_some() { + return Err(serde::de::Error::duplicate_field("stake")); + } + stake__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(PayloadBond { + sender: sender__.unwrap_or_default(), + receiver: receiver__.unwrap_or_default(), + stake: stake__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.PayloadBond", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PayloadSortition { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.address.is_empty() { + len += 1; + } + if !self.proof.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.PayloadSortition", len)?; + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.proof.is_empty() { + struct_ser.serialize_field("proof", &self.proof)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PayloadSortition { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "address", + "proof", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Address, + Proof, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "address" => Ok(GeneratedField::Address), + "proof" => Ok(GeneratedField::Proof), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PayloadSortition; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.PayloadSortition") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut address__ = None; + let mut proof__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Proof => { + if proof__.is_some() { + return Err(serde::de::Error::duplicate_field("proof")); + } + proof__ = Some(map.next_value()?); + } + } + } + Ok(PayloadSortition { + address: address__.unwrap_or_default(), + proof: proof__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.PayloadSortition", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PayloadTransfer { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.receiver.is_empty() { + len += 1; + } + if self.amount != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.PayloadTransfer", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.receiver.is_empty() { + struct_ser.serialize_field("receiver", &self.receiver)?; + } + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PayloadTransfer { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", + "receiver", + "amount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Receiver, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "receiver" => Ok(GeneratedField::Receiver), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PayloadTransfer; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.PayloadTransfer") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut receiver__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::Receiver => { + if receiver__.is_some() { + return Err(serde::de::Error::duplicate_field("receiver")); + } + receiver__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(PayloadTransfer { + sender: sender__.unwrap_or_default(), + receiver: receiver__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.PayloadTransfer", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PayloadType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::Unknown => "UNKNOWN", + Self::TransferPayload => "TRANSFER_PAYLOAD", + Self::BondPayload => "BOND_PAYLOAD", + Self::SortitionPayload => "SORTITION_PAYLOAD", + Self::UnbondPayload => "UNBOND_PAYLOAD", + Self::WithdrawPayload => "WITHDRAW_PAYLOAD", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for PayloadType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "UNKNOWN", + "TRANSFER_PAYLOAD", + "BOND_PAYLOAD", + "SORTITION_PAYLOAD", + "UNBOND_PAYLOAD", + "WITHDRAW_PAYLOAD", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PayloadType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(PayloadType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(PayloadType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "UNKNOWN" => Ok(PayloadType::Unknown), + "TRANSFER_PAYLOAD" => Ok(PayloadType::TransferPayload), + "BOND_PAYLOAD" => Ok(PayloadType::BondPayload), + "SORTITION_PAYLOAD" => Ok(PayloadType::SortitionPayload), + "UNBOND_PAYLOAD" => Ok(PayloadType::UnbondPayload), + "WITHDRAW_PAYLOAD" => Ok(PayloadType::WithdrawPayload), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for PayloadUnbond { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.PayloadUnbond", len)?; + if !self.validator.is_empty() { + struct_ser.serialize_field("validator", &self.validator)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PayloadUnbond { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "validator", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Validator, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validator" => Ok(GeneratedField::Validator), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PayloadUnbond; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.PayloadUnbond") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Validator => { + if validator__.is_some() { + return Err(serde::de::Error::duplicate_field("validator")); + } + validator__ = Some(map.next_value()?); + } + } + } + Ok(PayloadUnbond { + validator: validator__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.PayloadUnbond", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PayloadWithdraw { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.from.is_empty() { + len += 1; + } + if !self.to.is_empty() { + len += 1; + } + if self.amount != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.PayloadWithdraw", len)?; + if !self.from.is_empty() { + struct_ser.serialize_field("from", &self.from)?; + } + if !self.to.is_empty() { + struct_ser.serialize_field("to", &self.to)?; + } + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PayloadWithdraw { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "from", + "to", + "amount", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + From, + To, + Amount, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "from" => Ok(GeneratedField::From), + "to" => Ok(GeneratedField::To), + "amount" => Ok(GeneratedField::Amount), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PayloadWithdraw; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.PayloadWithdraw") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut from__ = None; + let mut to__ = None; + let mut amount__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::From => { + if from__.is_some() { + return Err(serde::de::Error::duplicate_field("from")); + } + from__ = Some(map.next_value()?); + } + GeneratedField::To => { + if to__.is_some() { + return Err(serde::de::Error::duplicate_field("to")); + } + to__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(PayloadWithdraw { + from: from__.unwrap_or_default(), + to: to__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.PayloadWithdraw", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for PeerInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.status != 0 { + len += 1; + } + if !self.moniker.is_empty() { + len += 1; + } + if !self.agent.is_empty() { + len += 1; + } + if !self.peer_id.is_empty() { + len += 1; + } + if !self.consensus_keys.is_empty() { + len += 1; + } + if !self.consensus_addresses.is_empty() { + len += 1; + } + if self.services != 0 { + len += 1; + } + if !self.last_block_hash.is_empty() { + len += 1; + } + if self.height != 0 { + len += 1; + } + if self.received_bundles != 0 { + len += 1; + } + if self.invalid_bundles != 0 { + len += 1; + } + if self.last_sent != 0 { + len += 1; + } + if self.last_received != 0 { + len += 1; + } + if !self.sent_bytes.is_empty() { + len += 1; + } + if !self.received_bytes.is_empty() { + len += 1; + } + if !self.address.is_empty() { + len += 1; + } + if !self.direction.is_empty() { + len += 1; + } + if !self.protocols.is_empty() { + len += 1; + } + if self.total_sessions != 0 { + len += 1; + } + if self.completed_sessions != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.PeerInfo", len)?; + if self.status != 0 { + struct_ser.serialize_field("status", &self.status)?; + } + if !self.moniker.is_empty() { + struct_ser.serialize_field("moniker", &self.moniker)?; + } + if !self.agent.is_empty() { + struct_ser.serialize_field("agent", &self.agent)?; + } + if !self.peer_id.is_empty() { + struct_ser.serialize_field("peerId", &self.peer_id)?; + } + if !self.consensus_keys.is_empty() { + struct_ser.serialize_field("consensusKeys", &self.consensus_keys)?; + } + if !self.consensus_addresses.is_empty() { + struct_ser.serialize_field("consensusAddresses", &self.consensus_addresses)?; + } + if self.services != 0 { + struct_ser.serialize_field("services", &self.services)?; + } + if !self.last_block_hash.is_empty() { + struct_ser.serialize_field("lastBlockHash", &self.last_block_hash)?; + } + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + if self.received_bundles != 0 { + struct_ser.serialize_field("receivedBundles", &self.received_bundles)?; + } + if self.invalid_bundles != 0 { + struct_ser.serialize_field("invalidBundles", &self.invalid_bundles)?; + } + if self.last_sent != 0 { + struct_ser.serialize_field("lastSent", ToString::to_string(&self.last_sent).as_str())?; + } + if self.last_received != 0 { + struct_ser.serialize_field("lastReceived", ToString::to_string(&self.last_received).as_str())?; + } + if !self.sent_bytes.is_empty() { + let v: std::collections::HashMap<_, _> = self.sent_bytes.iter() + .map(|(k, v)| (k, v.to_string())).collect(); + struct_ser.serialize_field("sentBytes", &v)?; + } + if !self.received_bytes.is_empty() { + let v: std::collections::HashMap<_, _> = self.received_bytes.iter() + .map(|(k, v)| (k, v.to_string())).collect(); + struct_ser.serialize_field("receivedBytes", &v)?; + } + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.direction.is_empty() { + struct_ser.serialize_field("direction", &self.direction)?; + } + if !self.protocols.is_empty() { + struct_ser.serialize_field("protocols", &self.protocols)?; + } + if self.total_sessions != 0 { + struct_ser.serialize_field("totalSessions", &self.total_sessions)?; + } + if self.completed_sessions != 0 { + struct_ser.serialize_field("completedSessions", &self.completed_sessions)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for PeerInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "status", + "moniker", + "agent", + "peer_id", + "peerId", + "consensus_keys", + "consensusKeys", + "consensus_addresses", + "consensusAddresses", + "services", + "last_block_hash", + "lastBlockHash", + "height", + "received_bundles", + "receivedBundles", + "invalid_bundles", + "invalidBundles", + "last_sent", + "lastSent", + "last_received", + "lastReceived", + "sent_bytes", + "sentBytes", + "received_bytes", + "receivedBytes", + "address", + "direction", + "protocols", + "total_sessions", + "totalSessions", + "completed_sessions", + "completedSessions", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Status, + Moniker, + Agent, + PeerId, + ConsensusKeys, + ConsensusAddresses, + Services, + LastBlockHash, + Height, + ReceivedBundles, + InvalidBundles, + LastSent, + LastReceived, + SentBytes, + ReceivedBytes, + Address, + Direction, + Protocols, + TotalSessions, + CompletedSessions, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "status" => Ok(GeneratedField::Status), + "moniker" => Ok(GeneratedField::Moniker), + "agent" => Ok(GeneratedField::Agent), + "peerId" | "peer_id" => Ok(GeneratedField::PeerId), + "consensusKeys" | "consensus_keys" => Ok(GeneratedField::ConsensusKeys), + "consensusAddresses" | "consensus_addresses" => Ok(GeneratedField::ConsensusAddresses), + "services" => Ok(GeneratedField::Services), + "lastBlockHash" | "last_block_hash" => Ok(GeneratedField::LastBlockHash), + "height" => Ok(GeneratedField::Height), + "receivedBundles" | "received_bundles" => Ok(GeneratedField::ReceivedBundles), + "invalidBundles" | "invalid_bundles" => Ok(GeneratedField::InvalidBundles), + "lastSent" | "last_sent" => Ok(GeneratedField::LastSent), + "lastReceived" | "last_received" => Ok(GeneratedField::LastReceived), + "sentBytes" | "sent_bytes" => Ok(GeneratedField::SentBytes), + "receivedBytes" | "received_bytes" => Ok(GeneratedField::ReceivedBytes), + "address" => Ok(GeneratedField::Address), + "direction" => Ok(GeneratedField::Direction), + "protocols" => Ok(GeneratedField::Protocols), + "totalSessions" | "total_sessions" => Ok(GeneratedField::TotalSessions), + "completedSessions" | "completed_sessions" => Ok(GeneratedField::CompletedSessions), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = PeerInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.PeerInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut status__ = None; + let mut moniker__ = None; + let mut agent__ = None; + let mut peer_id__ = None; + let mut consensus_keys__ = None; + let mut consensus_addresses__ = None; + let mut services__ = None; + let mut last_block_hash__ = None; + let mut height__ = None; + let mut received_bundles__ = None; + let mut invalid_bundles__ = None; + let mut last_sent__ = None; + let mut last_received__ = None; + let mut sent_bytes__ = None; + let mut received_bytes__ = None; + let mut address__ = None; + let mut direction__ = None; + let mut protocols__ = None; + let mut total_sessions__ = None; + let mut completed_sessions__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Status => { + if status__.is_some() { + return Err(serde::de::Error::duplicate_field("status")); + } + status__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Moniker => { + if moniker__.is_some() { + return Err(serde::de::Error::duplicate_field("moniker")); + } + moniker__ = Some(map.next_value()?); + } + GeneratedField::Agent => { + if agent__.is_some() { + return Err(serde::de::Error::duplicate_field("agent")); + } + agent__ = Some(map.next_value()?); + } + GeneratedField::PeerId => { + if peer_id__.is_some() { + return Err(serde::de::Error::duplicate_field("peerId")); + } + peer_id__ = Some(map.next_value()?); + } + GeneratedField::ConsensusKeys => { + if consensus_keys__.is_some() { + return Err(serde::de::Error::duplicate_field("consensusKeys")); + } + consensus_keys__ = Some(map.next_value()?); + } + GeneratedField::ConsensusAddresses => { + if consensus_addresses__.is_some() { + return Err(serde::de::Error::duplicate_field("consensusAddresses")); + } + consensus_addresses__ = Some(map.next_value()?); + } + GeneratedField::Services => { + if services__.is_some() { + return Err(serde::de::Error::duplicate_field("services")); + } + services__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::LastBlockHash => { + if last_block_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("lastBlockHash")); + } + last_block_hash__ = Some(map.next_value()?); + } + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::ReceivedBundles => { + if received_bundles__.is_some() { + return Err(serde::de::Error::duplicate_field("receivedBundles")); + } + received_bundles__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::InvalidBundles => { + if invalid_bundles__.is_some() { + return Err(serde::de::Error::duplicate_field("invalidBundles")); + } + invalid_bundles__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::LastSent => { + if last_sent__.is_some() { + return Err(serde::de::Error::duplicate_field("lastSent")); + } + last_sent__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::LastReceived => { + if last_received__.is_some() { + return Err(serde::de::Error::duplicate_field("lastReceived")); + } + last_received__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::SentBytes => { + if sent_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("sentBytes")); + } + sent_bytes__ = Some( + map.next_value::, ::pbjson::private::NumberDeserialize>>()? + .into_iter().map(|(k,v)| (k.0, v.0)).collect() + ); + } + GeneratedField::ReceivedBytes => { + if received_bytes__.is_some() { + return Err(serde::de::Error::duplicate_field("receivedBytes")); + } + received_bytes__ = Some( + map.next_value::, ::pbjson::private::NumberDeserialize>>()? + .into_iter().map(|(k,v)| (k.0, v.0)).collect() + ); + } + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Direction => { + if direction__.is_some() { + return Err(serde::de::Error::duplicate_field("direction")); + } + direction__ = Some(map.next_value()?); + } + GeneratedField::Protocols => { + if protocols__.is_some() { + return Err(serde::de::Error::duplicate_field("protocols")); + } + protocols__ = Some(map.next_value()?); + } + GeneratedField::TotalSessions => { + if total_sessions__.is_some() { + return Err(serde::de::Error::duplicate_field("totalSessions")); + } + total_sessions__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::CompletedSessions => { + if completed_sessions__.is_some() { + return Err(serde::de::Error::duplicate_field("completedSessions")); + } + completed_sessions__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(PeerInfo { + status: status__.unwrap_or_default(), + moniker: moniker__.unwrap_or_default(), + agent: agent__.unwrap_or_default(), + peer_id: peer_id__.unwrap_or_default(), + consensus_keys: consensus_keys__.unwrap_or_default(), + consensus_addresses: consensus_addresses__.unwrap_or_default(), + services: services__.unwrap_or_default(), + last_block_hash: last_block_hash__.unwrap_or_default(), + height: height__.unwrap_or_default(), + received_bundles: received_bundles__.unwrap_or_default(), + invalid_bundles: invalid_bundles__.unwrap_or_default(), + last_sent: last_sent__.unwrap_or_default(), + last_received: last_received__.unwrap_or_default(), + sent_bytes: sent_bytes__.unwrap_or_default(), + received_bytes: received_bytes__.unwrap_or_default(), + address: address__.unwrap_or_default(), + direction: direction__.unwrap_or_default(), + protocols: protocols__.unwrap_or_default(), + total_sessions: total_sessions__.unwrap_or_default(), + completed_sessions: completed_sessions__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.PeerInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for Proposal { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.height != 0 { + len += 1; + } + if self.round != 0 { + len += 1; + } + if !self.block_data.is_empty() { + len += 1; + } + if !self.signature_data.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.Proposal", len)?; + if self.height != 0 { + struct_ser.serialize_field("height", &self.height)?; + } + if self.round != 0 { + struct_ser.serialize_field("round", &self.round)?; + } + if !self.block_data.is_empty() { + struct_ser.serialize_field("blockData", &self.block_data)?; + } + if !self.signature_data.is_empty() { + struct_ser.serialize_field("signatureData", &self.signature_data)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for Proposal { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "height", + "round", + "block_data", + "blockData", + "signature_data", + "signatureData", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Height, + Round, + BlockData, + SignatureData, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "height" => Ok(GeneratedField::Height), + "round" => Ok(GeneratedField::Round), + "blockData" | "block_data" => Ok(GeneratedField::BlockData), + "signatureData" | "signature_data" => Ok(GeneratedField::SignatureData), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = Proposal; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.Proposal") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut height__ = None; + let mut round__ = None; + let mut block_data__ = None; + let mut signature_data__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Height => { + if height__.is_some() { + return Err(serde::de::Error::duplicate_field("height")); + } + height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Round => { + if round__.is_some() { + return Err(serde::de::Error::duplicate_field("round")); + } + round__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::BlockData => { + if block_data__.is_some() { + return Err(serde::de::Error::duplicate_field("blockData")); + } + block_data__ = Some(map.next_value()?); + } + GeneratedField::SignatureData => { + if signature_data__.is_some() { + return Err(serde::de::Error::duplicate_field("signatureData")); + } + signature_data__ = Some(map.next_value()?); + } + } + } + Ok(Proposal { + height: height__.unwrap_or_default(), + round: round__.unwrap_or_default(), + block_data: block_data__.unwrap_or_default(), + signature_data: signature_data__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.Proposal", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RestoreWalletRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + if !self.mnemonic.is_empty() { + len += 1; + } + if !self.password.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.RestoreWalletRequest", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + if !self.mnemonic.is_empty() { + struct_ser.serialize_field("mnemonic", &self.mnemonic)?; + } + if !self.password.is_empty() { + struct_ser.serialize_field("password", &self.password)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RestoreWalletRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + "mnemonic", + "password", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + Mnemonic, + Password, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + "mnemonic" => Ok(GeneratedField::Mnemonic), + "password" => Ok(GeneratedField::Password), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RestoreWalletRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.RestoreWalletRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + let mut mnemonic__ = None; + let mut password__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + GeneratedField::Mnemonic => { + if mnemonic__.is_some() { + return Err(serde::de::Error::duplicate_field("mnemonic")); + } + mnemonic__ = Some(map.next_value()?); + } + GeneratedField::Password => { + if password__.is_some() { + return Err(serde::de::Error::duplicate_field("password")); + } + password__ = Some(map.next_value()?); + } + } + } + Ok(RestoreWalletRequest { + wallet_name: wallet_name__.unwrap_or_default(), + mnemonic: mnemonic__.unwrap_or_default(), + password: password__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.RestoreWalletRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RestoreWalletResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.RestoreWalletResponse", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RestoreWalletResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RestoreWalletResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.RestoreWalletResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + } + } + Ok(RestoreWalletResponse { + wallet_name: wallet_name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.RestoreWalletResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SignMessageRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + if !self.password.is_empty() { + len += 1; + } + if !self.address.is_empty() { + len += 1; + } + if !self.message.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.SignMessageRequest", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + if !self.password.is_empty() { + struct_ser.serialize_field("password", &self.password)?; + } + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if !self.message.is_empty() { + struct_ser.serialize_field("message", &self.message)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignMessageRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + "password", + "address", + "message", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + Password, + Address, + Message, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + "password" => Ok(GeneratedField::Password), + "address" => Ok(GeneratedField::Address), + "message" => Ok(GeneratedField::Message), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SignMessageRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.SignMessageRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + let mut password__ = None; + let mut address__ = None; + let mut message__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + GeneratedField::Password => { + if password__.is_some() { + return Err(serde::de::Error::duplicate_field("password")); + } + password__ = Some(map.next_value()?); + } + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::Message => { + if message__.is_some() { + return Err(serde::de::Error::duplicate_field("message")); + } + message__ = Some(map.next_value()?); + } + } + } + Ok(SignMessageRequest { + wallet_name: wallet_name__.unwrap_or_default(), + password: password__.unwrap_or_default(), + address: address__.unwrap_or_default(), + message: message__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.SignMessageRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SignMessageResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.signature.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.SignMessageResponse", len)?; + if !self.signature.is_empty() { + struct_ser.serialize_field("signature", &self.signature)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignMessageResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "signature", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Signature, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "signature" => Ok(GeneratedField::Signature), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SignMessageResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.SignMessageResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut signature__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Signature => { + if signature__.is_some() { + return Err(serde::de::Error::duplicate_field("signature")); + } + signature__ = Some(map.next_value()?); + } + } + } + Ok(SignMessageResponse { + signature: signature__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.SignMessageResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SignMessageWithPrivateKeyRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.private_key.is_empty() { + len += 1; + } + if !self.message.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.SignMessageWithPrivateKeyRequest", len)?; + if !self.private_key.is_empty() { + struct_ser.serialize_field("privateKey", &self.private_key)?; + } + if !self.message.is_empty() { + struct_ser.serialize_field("message", &self.message)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignMessageWithPrivateKeyRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "private_key", + "privateKey", + "message", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + PrivateKey, + Message, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "privateKey" | "private_key" => Ok(GeneratedField::PrivateKey), + "message" => Ok(GeneratedField::Message), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SignMessageWithPrivateKeyRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.SignMessageWithPrivateKeyRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut private_key__ = None; + let mut message__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::PrivateKey => { + if private_key__.is_some() { + return Err(serde::de::Error::duplicate_field("privateKey")); + } + private_key__ = Some(map.next_value()?); + } + GeneratedField::Message => { + if message__.is_some() { + return Err(serde::de::Error::duplicate_field("message")); + } + message__ = Some(map.next_value()?); + } + } + } + Ok(SignMessageWithPrivateKeyRequest { + private_key: private_key__.unwrap_or_default(), + message: message__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.SignMessageWithPrivateKeyRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SignMessageWithPrivateKeyResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.signature.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.SignMessageWithPrivateKeyResponse", len)?; + if !self.signature.is_empty() { + struct_ser.serialize_field("signature", &self.signature)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignMessageWithPrivateKeyResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "signature", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Signature, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "signature" => Ok(GeneratedField::Signature), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SignMessageWithPrivateKeyResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.SignMessageWithPrivateKeyResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut signature__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Signature => { + if signature__.is_some() { + return Err(serde::de::Error::duplicate_field("signature")); + } + signature__ = Some(map.next_value()?); + } + } + } + Ok(SignMessageWithPrivateKeyResponse { + signature: signature__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.SignMessageWithPrivateKeyResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SignRawTransactionRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + if !self.raw_transaction.is_empty() { + len += 1; + } + if !self.password.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.SignRawTransactionRequest", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + if !self.raw_transaction.is_empty() { + struct_ser.serialize_field("rawTransaction", &self.raw_transaction)?; + } + if !self.password.is_empty() { + struct_ser.serialize_field("password", &self.password)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignRawTransactionRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + "raw_transaction", + "rawTransaction", + "password", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + RawTransaction, + Password, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + "rawTransaction" | "raw_transaction" => Ok(GeneratedField::RawTransaction), + "password" => Ok(GeneratedField::Password), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SignRawTransactionRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.SignRawTransactionRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + let mut raw_transaction__ = None; + let mut password__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + GeneratedField::RawTransaction => { + if raw_transaction__.is_some() { + return Err(serde::de::Error::duplicate_field("rawTransaction")); + } + raw_transaction__ = Some(map.next_value()?); + } + GeneratedField::Password => { + if password__.is_some() { + return Err(serde::de::Error::duplicate_field("password")); + } + password__ = Some(map.next_value()?); + } + } + } + Ok(SignRawTransactionRequest { + wallet_name: wallet_name__.unwrap_or_default(), + raw_transaction: raw_transaction__.unwrap_or_default(), + password: password__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.SignRawTransactionRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for SignRawTransactionResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.transaction_id.is_empty() { + len += 1; + } + if !self.signed_raw_transaction.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.SignRawTransactionResponse", len)?; + if !self.transaction_id.is_empty() { + struct_ser.serialize_field("transactionId", &self.transaction_id)?; + } + if !self.signed_raw_transaction.is_empty() { + struct_ser.serialize_field("signedRawTransaction", &self.signed_raw_transaction)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for SignRawTransactionResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "transaction_id", + "transactionId", + "signed_raw_transaction", + "signedRawTransaction", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + TransactionId, + SignedRawTransaction, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "transactionId" | "transaction_id" => Ok(GeneratedField::TransactionId), + "signedRawTransaction" | "signed_raw_transaction" => Ok(GeneratedField::SignedRawTransaction), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = SignRawTransactionResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.SignRawTransactionResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut transaction_id__ = None; + let mut signed_raw_transaction__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::TransactionId => { + if transaction_id__.is_some() { + return Err(serde::de::Error::duplicate_field("transactionId")); + } + transaction_id__ = Some(map.next_value()?); + } + GeneratedField::SignedRawTransaction => { + if signed_raw_transaction__.is_some() { + return Err(serde::de::Error::duplicate_field("signedRawTransaction")); + } + signed_raw_transaction__ = Some(map.next_value()?); + } + } + } + Ok(SignRawTransactionResponse { + transaction_id: transaction_id__.unwrap_or_default(), + signed_raw_transaction: signed_raw_transaction__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.SignRawTransactionResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for TransactionInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.id.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + if self.version != 0 { + len += 1; + } + if self.lock_time != 0 { + len += 1; + } + if self.value != 0 { + len += 1; + } + if self.fee != 0 { + len += 1; + } + if self.payload_type != 0 { + len += 1; + } + if !self.memo.is_empty() { + len += 1; + } + if !self.public_key.is_empty() { + len += 1; + } + if !self.signature.is_empty() { + len += 1; + } + if self.payload.is_some() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.TransactionInfo", len)?; + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } + if !self.data.is_empty() { + struct_ser.serialize_field("data", &self.data)?; + } + if self.version != 0 { + struct_ser.serialize_field("version", &self.version)?; + } + if self.lock_time != 0 { + struct_ser.serialize_field("lockTime", &self.lock_time)?; + } + if self.value != 0 { + struct_ser.serialize_field("value", ToString::to_string(&self.value).as_str())?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + if self.payload_type != 0 { + let v = PayloadType::from_i32(self.payload_type) + .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.payload_type)))?; + struct_ser.serialize_field("payloadType", &v)?; + } + if !self.memo.is_empty() { + struct_ser.serialize_field("memo", &self.memo)?; + } + if !self.public_key.is_empty() { + struct_ser.serialize_field("publicKey", &self.public_key)?; + } + if !self.signature.is_empty() { + struct_ser.serialize_field("signature", &self.signature)?; + } + if let Some(v) = self.payload.as_ref() { + match v { + transaction_info::Payload::Transfer(v) => { + struct_ser.serialize_field("transfer", v)?; + } + transaction_info::Payload::Bond(v) => { + struct_ser.serialize_field("bond", v)?; + } + transaction_info::Payload::Sortition(v) => { + struct_ser.serialize_field("sortition", v)?; + } + transaction_info::Payload::Unbond(v) => { + struct_ser.serialize_field("unbond", v)?; + } + transaction_info::Payload::Withdraw(v) => { + struct_ser.serialize_field("withdraw", v)?; + } + } + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TransactionInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "id", + "data", + "version", + "lock_time", + "lockTime", + "value", + "fee", + "payload_type", + "payloadType", + "memo", + "public_key", + "publicKey", + "signature", + "transfer", + "bond", + "sortition", + "unbond", + "withdraw", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Id, + Data, + Version, + LockTime, + Value, + Fee, + PayloadType, + Memo, + PublicKey, + Signature, + Transfer, + Bond, + Sortition, + Unbond, + Withdraw, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "id" => Ok(GeneratedField::Id), + "data" => Ok(GeneratedField::Data), + "version" => Ok(GeneratedField::Version), + "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), + "value" => Ok(GeneratedField::Value), + "fee" => Ok(GeneratedField::Fee), + "payloadType" | "payload_type" => Ok(GeneratedField::PayloadType), + "memo" => Ok(GeneratedField::Memo), + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + "signature" => Ok(GeneratedField::Signature), + "transfer" => Ok(GeneratedField::Transfer), + "bond" => Ok(GeneratedField::Bond), + "sortition" => Ok(GeneratedField::Sortition), + "unbond" => Ok(GeneratedField::Unbond), + "withdraw" => Ok(GeneratedField::Withdraw), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TransactionInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.TransactionInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut id__ = None; + let mut data__ = None; + let mut version__ = None; + let mut lock_time__ = None; + let mut value__ = None; + let mut fee__ = None; + let mut payload_type__ = None; + let mut memo__ = None; + let mut public_key__ = None; + let mut signature__ = None; + let mut payload__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some(map.next_value()?); + } + GeneratedField::Version => { + if version__.is_some() { + return Err(serde::de::Error::duplicate_field("version")); + } + version__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::LockTime => { + if lock_time__.is_some() { + return Err(serde::de::Error::duplicate_field("lockTime")); + } + lock_time__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Value => { + if value__.is_some() { + return Err(serde::de::Error::duplicate_field("value")); + } + value__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::PayloadType => { + if payload_type__.is_some() { + return Err(serde::de::Error::duplicate_field("payloadType")); + } + payload_type__ = Some(map.next_value::()? as i32); + } + GeneratedField::Memo => { + if memo__.is_some() { + return Err(serde::de::Error::duplicate_field("memo")); + } + memo__ = Some(map.next_value()?); + } + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = Some(map.next_value()?); + } + GeneratedField::Signature => { + if signature__.is_some() { + return Err(serde::de::Error::duplicate_field("signature")); + } + signature__ = Some(map.next_value()?); + } + GeneratedField::Transfer => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("transfer")); + } + payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Transfer) +; + } + GeneratedField::Bond => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("bond")); + } + payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Bond) +; + } + GeneratedField::Sortition => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("sortition")); + } + payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Sortition) +; + } + GeneratedField::Unbond => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("unbond")); + } + payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Unbond) +; + } + GeneratedField::Withdraw => { + if payload__.is_some() { + return Err(serde::de::Error::duplicate_field("withdraw")); + } + payload__ = map.next_value::<::std::option::Option<_>>()?.map(transaction_info::Payload::Withdraw) +; + } + } + } + Ok(TransactionInfo { + id: id__.unwrap_or_default(), + data: data__.unwrap_or_default(), + version: version__.unwrap_or_default(), + lock_time: lock_time__.unwrap_or_default(), + value: value__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + payload_type: payload_type__.unwrap_or_default(), + memo: memo__.unwrap_or_default(), + public_key: public_key__.unwrap_or_default(), + signature: signature__.unwrap_or_default(), + payload: payload__, + }) + } + } + deserializer.deserialize_struct("pactus.TransactionInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for TransactionVerbosity { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::TransactionData => "TRANSACTION_DATA", + Self::TransactionInfo => "TRANSACTION_INFO", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for TransactionVerbosity { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "TRANSACTION_DATA", + "TRANSACTION_INFO", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TransactionVerbosity; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(TransactionVerbosity::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(TransactionVerbosity::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "TRANSACTION_DATA" => Ok(TransactionVerbosity::TransactionData), + "TRANSACTION_INFO" => Ok(TransactionVerbosity::TransactionInfo), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for UnloadWalletRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.UnloadWalletRequest", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for UnloadWalletRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = UnloadWalletRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.UnloadWalletRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + } + } + Ok(UnloadWalletRequest { + wallet_name: wallet_name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.UnloadWalletRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for UnloadWalletResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.wallet_name.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.UnloadWalletResponse", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for UnloadWalletResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "wallet_name", + "walletName", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + WalletName, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = UnloadWalletResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.UnloadWalletResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut wallet_name__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); + } + wallet_name__ = Some(map.next_value()?); + } + } + } + Ok(UnloadWalletResponse { + wallet_name: wallet_name__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.UnloadWalletResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for ValidatorInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.hash.is_empty() { + len += 1; + } + if !self.data.is_empty() { + len += 1; + } + if !self.public_key.is_empty() { + len += 1; + } + if self.number != 0 { + len += 1; + } + if self.stake != 0 { + len += 1; + } + if self.last_bonding_height != 0 { + len += 1; + } + if self.last_sortition_height != 0 { + len += 1; + } + if self.unbonding_height != 0 { + len += 1; + } + if !self.address.is_empty() { + len += 1; + } + if self.availability_score != 0. { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.ValidatorInfo", len)?; + if !self.hash.is_empty() { + struct_ser.serialize_field("hash", &self.hash)?; + } + if !self.data.is_empty() { + struct_ser.serialize_field("data", &self.data)?; + } + if !self.public_key.is_empty() { + struct_ser.serialize_field("publicKey", &self.public_key)?; + } + if self.number != 0 { + struct_ser.serialize_field("number", &self.number)?; + } + if self.stake != 0 { + struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; + } + if self.last_bonding_height != 0 { + struct_ser.serialize_field("lastBondingHeight", &self.last_bonding_height)?; + } + if self.last_sortition_height != 0 { + struct_ser.serialize_field("lastSortitionHeight", &self.last_sortition_height)?; + } + if self.unbonding_height != 0 { + struct_ser.serialize_field("unbondingHeight", &self.unbonding_height)?; + } + if !self.address.is_empty() { + struct_ser.serialize_field("address", &self.address)?; + } + if self.availability_score != 0. { + struct_ser.serialize_field("availabilityScore", &self.availability_score)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for ValidatorInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "hash", + "data", + "public_key", + "publicKey", + "number", + "stake", + "last_bonding_height", + "lastBondingHeight", + "last_sortition_height", + "lastSortitionHeight", + "unbonding_height", + "unbondingHeight", + "address", + "availability_score", + "availabilityScore", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Hash, + Data, + PublicKey, + Number, + Stake, + LastBondingHeight, + LastSortitionHeight, + UnbondingHeight, + Address, + AvailabilityScore, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "hash" => Ok(GeneratedField::Hash), + "data" => Ok(GeneratedField::Data), + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + "number" => Ok(GeneratedField::Number), + "stake" => Ok(GeneratedField::Stake), + "lastBondingHeight" | "last_bonding_height" => Ok(GeneratedField::LastBondingHeight), + "lastSortitionHeight" | "last_sortition_height" => Ok(GeneratedField::LastSortitionHeight), + "unbondingHeight" | "unbonding_height" => Ok(GeneratedField::UnbondingHeight), + "address" => Ok(GeneratedField::Address), + "availabilityScore" | "availability_score" => Ok(GeneratedField::AvailabilityScore), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = ValidatorInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.ValidatorInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut hash__ = None; + let mut data__ = None; + let mut public_key__ = None; + let mut number__ = None; + let mut stake__ = None; + let mut last_bonding_height__ = None; + let mut last_sortition_height__ = None; + let mut unbonding_height__ = None; + let mut address__ = None; + let mut availability_score__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Hash => { + if hash__.is_some() { + return Err(serde::de::Error::duplicate_field("hash")); + } + hash__ = Some(map.next_value()?); + } + GeneratedField::Data => { + if data__.is_some() { + return Err(serde::de::Error::duplicate_field("data")); + } + data__ = Some(map.next_value()?); + } + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = Some(map.next_value()?); + } + GeneratedField::Number => { + if number__.is_some() { + return Err(serde::de::Error::duplicate_field("number")); + } + number__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Stake => { + if stake__.is_some() { + return Err(serde::de::Error::duplicate_field("stake")); + } + stake__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::LastBondingHeight => { + if last_bonding_height__.is_some() { + return Err(serde::de::Error::duplicate_field("lastBondingHeight")); + } + last_bonding_height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::LastSortitionHeight => { + if last_sortition_height__.is_some() { + return Err(serde::de::Error::duplicate_field("lastSortitionHeight")); + } + last_sortition_height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::UnbondingHeight => { + if unbonding_height__.is_some() { + return Err(serde::de::Error::duplicate_field("unbondingHeight")); + } + unbonding_height__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Address => { + if address__.is_some() { + return Err(serde::de::Error::duplicate_field("address")); + } + address__ = Some(map.next_value()?); + } + GeneratedField::AvailabilityScore => { + if availability_score__.is_some() { + return Err(serde::de::Error::duplicate_field("availabilityScore")); + } + availability_score__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(ValidatorInfo { + hash: hash__.unwrap_or_default(), + data: data__.unwrap_or_default(), + public_key: public_key__.unwrap_or_default(), + number: number__.unwrap_or_default(), + stake: stake__.unwrap_or_default(), + last_bonding_height: last_bonding_height__.unwrap_or_default(), + last_sortition_height: last_sortition_height__.unwrap_or_default(), + unbonding_height: unbonding_height__.unwrap_or_default(), + address: address__.unwrap_or_default(), + availability_score: availability_score__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.ValidatorInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for VerifyMessageRequest { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.message.is_empty() { + len += 1; + } + if !self.signature.is_empty() { + len += 1; + } + if !self.public_key.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.VerifyMessageRequest", len)?; + if !self.message.is_empty() { + struct_ser.serialize_field("message", &self.message)?; + } + if !self.signature.is_empty() { + struct_ser.serialize_field("signature", &self.signature)?; + } + if !self.public_key.is_empty() { + struct_ser.serialize_field("publicKey", &self.public_key)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for VerifyMessageRequest { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "message", + "signature", + "public_key", + "publicKey", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Message, + Signature, + PublicKey, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "message" => Ok(GeneratedField::Message), + "signature" => Ok(GeneratedField::Signature), + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = VerifyMessageRequest; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.VerifyMessageRequest") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut message__ = None; + let mut signature__ = None; + let mut public_key__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Message => { + if message__.is_some() { + return Err(serde::de::Error::duplicate_field("message")); + } + message__ = Some(map.next_value()?); + } + GeneratedField::Signature => { + if signature__.is_some() { + return Err(serde::de::Error::duplicate_field("signature")); + } + signature__ = Some(map.next_value()?); + } + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = Some(map.next_value()?); + } + } + } + Ok(VerifyMessageRequest { + message: message__.unwrap_or_default(), + signature: signature__.unwrap_or_default(), + public_key: public_key__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.VerifyMessageRequest", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for VerifyMessageResponse { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.is_valid { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.VerifyMessageResponse", len)?; + if self.is_valid { + struct_ser.serialize_field("isValid", &self.is_valid)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for VerifyMessageResponse { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "is_valid", + "isValid", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + IsValid, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "isValid" | "is_valid" => Ok(GeneratedField::IsValid), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = VerifyMessageResponse; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.VerifyMessageResponse") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut is_valid__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::IsValid => { + if is_valid__.is_some() { + return Err(serde::de::Error::duplicate_field("isValid")); + } + is_valid__ = Some(map.next_value()?); + } + } + } + Ok(VerifyMessageResponse { + is_valid: is_valid__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.VerifyMessageResponse", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for VoteInfo { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if self.r#type != 0 { + len += 1; + } + if !self.voter.is_empty() { + len += 1; + } + if !self.block_hash.is_empty() { + len += 1; + } + if self.round != 0 { + len += 1; + } + if self.cp_round != 0 { + len += 1; + } + if self.cp_value != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.VoteInfo", len)?; + if self.r#type != 0 { + let v = VoteType::from_i32(self.r#type) + .ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.r#type)))?; + struct_ser.serialize_field("type", &v)?; + } + if !self.voter.is_empty() { + struct_ser.serialize_field("voter", &self.voter)?; + } + if !self.block_hash.is_empty() { + struct_ser.serialize_field("blockHash", &self.block_hash)?; + } + if self.round != 0 { + struct_ser.serialize_field("round", &self.round)?; + } + if self.cp_round != 0 { + struct_ser.serialize_field("cpRound", &self.cp_round)?; + } + if self.cp_value != 0 { + struct_ser.serialize_field("cpValue", &self.cp_value)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for VoteInfo { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "type", + "voter", + "block_hash", + "blockHash", + "round", + "cp_round", + "cpRound", + "cp_value", + "cpValue", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Type, + Voter, + BlockHash, + Round, + CpRound, + CpValue, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "type" => Ok(GeneratedField::Type), + "voter" => Ok(GeneratedField::Voter), + "blockHash" | "block_hash" => Ok(GeneratedField::BlockHash), + "round" => Ok(GeneratedField::Round), + "cpRound" | "cp_round" => Ok(GeneratedField::CpRound), + "cpValue" | "cp_value" => Ok(GeneratedField::CpValue), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = VoteInfo; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.VoteInfo") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut r#type__ = None; + let mut voter__ = None; + let mut block_hash__ = None; + let mut round__ = None; + let mut cp_round__ = None; + let mut cp_value__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Type => { + if r#type__.is_some() { + return Err(serde::de::Error::duplicate_field("type")); + } + r#type__ = Some(map.next_value::()? as i32); + } + GeneratedField::Voter => { + if voter__.is_some() { + return Err(serde::de::Error::duplicate_field("voter")); + } + voter__ = Some(map.next_value()?); + } + GeneratedField::BlockHash => { + if block_hash__.is_some() { + return Err(serde::de::Error::duplicate_field("blockHash")); + } + block_hash__ = Some(map.next_value()?); + } + GeneratedField::Round => { + if round__.is_some() { + return Err(serde::de::Error::duplicate_field("round")); + } + round__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::CpRound => { + if cp_round__.is_some() { + return Err(serde::de::Error::duplicate_field("cpRound")); + } + cp_round__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::CpValue => { + if cp_value__.is_some() { + return Err(serde::de::Error::duplicate_field("cpValue")); + } + cp_value__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(VoteInfo { + r#type: r#type__.unwrap_or_default(), + voter: voter__.unwrap_or_default(), + block_hash: block_hash__.unwrap_or_default(), + round: round__.unwrap_or_default(), + cp_round: cp_round__.unwrap_or_default(), + cp_value: cp_value__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.VoteInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for VoteType { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::VoteUnknown => "VOTE_UNKNOWN", + Self::VotePrepare => "VOTE_PREPARE", + Self::VotePrecommit => "VOTE_PRECOMMIT", + Self::VoteChangeProposer => "VOTE_CHANGE_PROPOSER", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for VoteType { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "VOTE_UNKNOWN", + "VOTE_PREPARE", + "VOTE_PRECOMMIT", + "VOTE_CHANGE_PROPOSER", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = VoteType; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(VoteType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(VoteType::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "VOTE_UNKNOWN" => Ok(VoteType::VoteUnknown), + "VOTE_PREPARE" => Ok(VoteType::VotePrepare), + "VOTE_PRECOMMIT" => Ok(VoteType::VotePrecommit), + "VOTE_CHANGE_PROPOSER" => Ok(VoteType::VoteChangeProposer), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} diff --git a/www/grpc/gen/rust/pactus.tonic.rs b/www/grpc/gen/rust/pactus.tonic.rs new file mode 100644 index 000000000..f375d8eba --- /dev/null +++ b/www/grpc/gen/rust/pactus.tonic.rs @@ -0,0 +1,3329 @@ +// @generated +/// Generated client implementations. +pub mod transaction_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct TransactionClient { + inner: tonic::client::Grpc, + } + impl TransactionClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl TransactionClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> TransactionClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + TransactionClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn get_transaction( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Transaction/GetTransaction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Transaction", "GetTransaction")); + self.inner.unary(req, path, codec).await + } + pub async fn calculate_fee( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Transaction/CalculateFee", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Transaction", "CalculateFee")); + self.inner.unary(req, path, codec).await + } + pub async fn broadcast_transaction( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Transaction/BroadcastTransaction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Transaction", "BroadcastTransaction")); + self.inner.unary(req, path, codec).await + } + pub async fn get_raw_transaction( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Transaction/GetRawTransaction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Transaction", "GetRawTransaction")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod transaction_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with TransactionServer. + #[async_trait] + pub trait Transaction: Send + Sync + 'static { + async fn get_transaction( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn calculate_fee( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn broadcast_transaction( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_raw_transaction( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct TransactionServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl TransactionServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for TransactionServer + where + T: Transaction, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/pactus.Transaction/GetTransaction" => { + #[allow(non_camel_case_types)] + struct GetTransactionSvc(pub Arc); + impl< + T: Transaction, + > tonic::server::UnaryService + for GetTransactionSvc { + type Response = super::GetTransactionResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_transaction(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetTransactionSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Transaction/CalculateFee" => { + #[allow(non_camel_case_types)] + struct CalculateFeeSvc(pub Arc); + impl< + T: Transaction, + > tonic::server::UnaryService + for CalculateFeeSvc { + type Response = super::CalculateFeeResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).calculate_fee(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = CalculateFeeSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Transaction/BroadcastTransaction" => { + #[allow(non_camel_case_types)] + struct BroadcastTransactionSvc(pub Arc); + impl< + T: Transaction, + > tonic::server::UnaryService + for BroadcastTransactionSvc { + type Response = super::BroadcastTransactionResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).broadcast_transaction(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = BroadcastTransactionSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Transaction/GetRawTransaction" => { + #[allow(non_camel_case_types)] + struct GetRawTransactionSvc(pub Arc); + impl< + T: Transaction, + > tonic::server::UnaryService + for GetRawTransactionSvc { + type Response = super::GetRawTransactionResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_raw_transaction(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetRawTransactionSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for TransactionServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for TransactionServer { + const NAME: &'static str = "pactus.Transaction"; + } +} +/// Generated client implementations. +pub mod blockchain_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct BlockchainClient { + inner: tonic::client::Grpc, + } + impl BlockchainClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl BlockchainClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> BlockchainClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + BlockchainClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn get_block( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetBlock", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetBlock")); + self.inner.unary(req, path, codec).await + } + pub async fn get_block_hash( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetBlockHash", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetBlockHash")); + self.inner.unary(req, path, codec).await + } + pub async fn get_block_height( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetBlockHeight", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetBlockHeight")); + self.inner.unary(req, path, codec).await + } + pub async fn get_blockchain_info( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetBlockchainInfo", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetBlockchainInfo")); + self.inner.unary(req, path, codec).await + } + pub async fn get_consensus_info( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetConsensusInfo", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetConsensusInfo")); + self.inner.unary(req, path, codec).await + } + pub async fn get_account( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetAccount", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetAccount")); + self.inner.unary(req, path, codec).await + } + pub async fn get_validator( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetValidator", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetValidator")); + self.inner.unary(req, path, codec).await + } + pub async fn get_validator_by_number( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetValidatorByNumber", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetValidatorByNumber")); + self.inner.unary(req, path, codec).await + } + pub async fn get_validator_addresses( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetValidatorAddresses", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetValidatorAddresses")); + self.inner.unary(req, path, codec).await + } + pub async fn get_public_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetPublicKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetPublicKey")); + self.inner.unary(req, path, codec).await + } + pub async fn get_tx_pool_content( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Blockchain/GetTxPoolContent", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Blockchain", "GetTxPoolContent")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod blockchain_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with BlockchainServer. + #[async_trait] + pub trait Blockchain: Send + Sync + 'static { + async fn get_block( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_block_hash( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_block_height( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_blockchain_info( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_consensus_info( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_account( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_validator( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_validator_by_number( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_validator_addresses( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_public_key( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_tx_pool_content( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct BlockchainServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl BlockchainServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for BlockchainServer + where + T: Blockchain, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/pactus.Blockchain/GetBlock" => { + #[allow(non_camel_case_types)] + struct GetBlockSvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetBlockSvc { + type Response = super::GetBlockResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { (*inner).get_block(request).await }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetBlockSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Blockchain/GetBlockHash" => { + #[allow(non_camel_case_types)] + struct GetBlockHashSvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetBlockHashSvc { + type Response = super::GetBlockHashResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_block_hash(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetBlockHashSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Blockchain/GetBlockHeight" => { + #[allow(non_camel_case_types)] + struct GetBlockHeightSvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetBlockHeightSvc { + type Response = super::GetBlockHeightResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_block_height(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetBlockHeightSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Blockchain/GetBlockchainInfo" => { + #[allow(non_camel_case_types)] + struct GetBlockchainInfoSvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetBlockchainInfoSvc { + type Response = super::GetBlockchainInfoResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_blockchain_info(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetBlockchainInfoSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Blockchain/GetConsensusInfo" => { + #[allow(non_camel_case_types)] + struct GetConsensusInfoSvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetConsensusInfoSvc { + type Response = super::GetConsensusInfoResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_consensus_info(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetConsensusInfoSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Blockchain/GetAccount" => { + #[allow(non_camel_case_types)] + struct GetAccountSvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetAccountSvc { + type Response = super::GetAccountResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { (*inner).get_account(request).await }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetAccountSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Blockchain/GetValidator" => { + #[allow(non_camel_case_types)] + struct GetValidatorSvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetValidatorSvc { + type Response = super::GetValidatorResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_validator(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetValidatorSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Blockchain/GetValidatorByNumber" => { + #[allow(non_camel_case_types)] + struct GetValidatorByNumberSvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetValidatorByNumberSvc { + type Response = super::GetValidatorResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_validator_by_number(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetValidatorByNumberSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Blockchain/GetValidatorAddresses" => { + #[allow(non_camel_case_types)] + struct GetValidatorAddressesSvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetValidatorAddressesSvc { + type Response = super::GetValidatorAddressesResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_validator_addresses(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetValidatorAddressesSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Blockchain/GetPublicKey" => { + #[allow(non_camel_case_types)] + struct GetPublicKeySvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetPublicKeySvc { + type Response = super::GetPublicKeyResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_public_key(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetPublicKeySvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Blockchain/GetTxPoolContent" => { + #[allow(non_camel_case_types)] + struct GetTxPoolContentSvc(pub Arc); + impl< + T: Blockchain, + > tonic::server::UnaryService + for GetTxPoolContentSvc { + type Response = super::GetTxPoolContentResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_tx_pool_content(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetTxPoolContentSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for BlockchainServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for BlockchainServer { + const NAME: &'static str = "pactus.Blockchain"; + } +} +/// Generated client implementations. +pub mod network_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct NetworkClient { + inner: tonic::client::Grpc, + } + impl NetworkClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl NetworkClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> NetworkClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + NetworkClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn get_network_info( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Network/GetNetworkInfo", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Network", "GetNetworkInfo")); + self.inner.unary(req, path, codec).await + } + pub async fn get_node_info( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Network/GetNodeInfo", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Network", "GetNodeInfo")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod network_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with NetworkServer. + #[async_trait] + pub trait Network: Send + Sync + 'static { + async fn get_network_info( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_node_info( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct NetworkServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl NetworkServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for NetworkServer + where + T: Network, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/pactus.Network/GetNetworkInfo" => { + #[allow(non_camel_case_types)] + struct GetNetworkInfoSvc(pub Arc); + impl< + T: Network, + > tonic::server::UnaryService + for GetNetworkInfoSvc { + type Response = super::GetNetworkInfoResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_network_info(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetNetworkInfoSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Network/GetNodeInfo" => { + #[allow(non_camel_case_types)] + struct GetNodeInfoSvc(pub Arc); + impl< + T: Network, + > tonic::server::UnaryService + for GetNodeInfoSvc { + type Response = super::GetNodeInfoResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_node_info(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetNodeInfoSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for NetworkServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for NetworkServer { + const NAME: &'static str = "pactus.Network"; + } +} +/// Generated client implementations. +pub mod utils_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct UtilsClient { + inner: tonic::client::Grpc, + } + impl UtilsClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl UtilsClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> UtilsClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + UtilsClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn sign_message_with_private_key( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Utils/SignMessageWithPrivateKey", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Utils", "SignMessageWithPrivateKey")); + self.inner.unary(req, path, codec).await + } + pub async fn verify_message( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Utils/VerifyMessage", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Utils", "VerifyMessage")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod utils_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with UtilsServer. + #[async_trait] + pub trait Utils: Send + Sync + 'static { + async fn sign_message_with_private_key( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn verify_message( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct UtilsServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl UtilsServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for UtilsServer + where + T: Utils, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/pactus.Utils/SignMessageWithPrivateKey" => { + #[allow(non_camel_case_types)] + struct SignMessageWithPrivateKeySvc(pub Arc); + impl< + T: Utils, + > tonic::server::UnaryService< + super::SignMessageWithPrivateKeyRequest, + > for SignMessageWithPrivateKeySvc { + type Response = super::SignMessageWithPrivateKeyResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::SignMessageWithPrivateKeyRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).sign_message_with_private_key(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = SignMessageWithPrivateKeySvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Utils/VerifyMessage" => { + #[allow(non_camel_case_types)] + struct VerifyMessageSvc(pub Arc); + impl< + T: Utils, + > tonic::server::UnaryService + for VerifyMessageSvc { + type Response = super::VerifyMessageResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).verify_message(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = VerifyMessageSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for UtilsServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for UtilsServer { + const NAME: &'static str = "pactus.Utils"; + } +} +/// Generated client implementations. +pub mod wallet_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct WalletClient { + inner: tonic::client::Grpc, + } + impl WalletClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl WalletClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> WalletClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + WalletClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn create_wallet( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Wallet/CreateWallet", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Wallet", "CreateWallet")); + self.inner.unary(req, path, codec).await + } + pub async fn restore_wallet( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Wallet/RestoreWallet", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Wallet", "RestoreWallet")); + self.inner.unary(req, path, codec).await + } + pub async fn load_wallet( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static("/pactus.Wallet/LoadWallet"); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("pactus.Wallet", "LoadWallet")); + self.inner.unary(req, path, codec).await + } + pub async fn unload_wallet( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Wallet/UnloadWallet", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Wallet", "UnloadWallet")); + self.inner.unary(req, path, codec).await + } + pub async fn get_total_balance( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Wallet/GetTotalBalance", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Wallet", "GetTotalBalance")); + self.inner.unary(req, path, codec).await + } + pub async fn sign_raw_transaction( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Wallet/SignRawTransaction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Wallet", "SignRawTransaction")); + self.inner.unary(req, path, codec).await + } + pub async fn get_validator_address( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Wallet/GetValidatorAddress", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Wallet", "GetValidatorAddress")); + self.inner.unary(req, path, codec).await + } + pub async fn get_new_address( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Wallet/GetNewAddress", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Wallet", "GetNewAddress")); + self.inner.unary(req, path, codec).await + } + pub async fn get_address_history( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Wallet/GetAddressHistory", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Wallet", "GetAddressHistory")); + self.inner.unary(req, path, codec).await + } + pub async fn sign_message( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Wallet/SignMessage", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("pactus.Wallet", "SignMessage")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod wallet_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with WalletServer. + #[async_trait] + pub trait Wallet: Send + Sync + 'static { + async fn create_wallet( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn restore_wallet( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn load_wallet( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn unload_wallet( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_total_balance( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn sign_raw_transaction( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_validator_address( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_new_address( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_address_history( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn sign_message( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct WalletServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl WalletServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for WalletServer + where + T: Wallet, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/pactus.Wallet/CreateWallet" => { + #[allow(non_camel_case_types)] + struct CreateWalletSvc(pub Arc); + impl< + T: Wallet, + > tonic::server::UnaryService + for CreateWalletSvc { + type Response = super::CreateWalletResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).create_wallet(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = CreateWalletSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Wallet/RestoreWallet" => { + #[allow(non_camel_case_types)] + struct RestoreWalletSvc(pub Arc); + impl< + T: Wallet, + > tonic::server::UnaryService + for RestoreWalletSvc { + type Response = super::RestoreWalletResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).restore_wallet(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = RestoreWalletSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Wallet/LoadWallet" => { + #[allow(non_camel_case_types)] + struct LoadWalletSvc(pub Arc); + impl tonic::server::UnaryService + for LoadWalletSvc { + type Response = super::LoadWalletResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { (*inner).load_wallet(request).await }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = LoadWalletSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Wallet/UnloadWallet" => { + #[allow(non_camel_case_types)] + struct UnloadWalletSvc(pub Arc); + impl< + T: Wallet, + > tonic::server::UnaryService + for UnloadWalletSvc { + type Response = super::UnloadWalletResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).unload_wallet(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UnloadWalletSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Wallet/GetTotalBalance" => { + #[allow(non_camel_case_types)] + struct GetTotalBalanceSvc(pub Arc); + impl< + T: Wallet, + > tonic::server::UnaryService + for GetTotalBalanceSvc { + type Response = super::GetTotalBalanceResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_total_balance(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetTotalBalanceSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Wallet/SignRawTransaction" => { + #[allow(non_camel_case_types)] + struct SignRawTransactionSvc(pub Arc); + impl< + T: Wallet, + > tonic::server::UnaryService + for SignRawTransactionSvc { + type Response = super::SignRawTransactionResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).sign_raw_transaction(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = SignRawTransactionSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Wallet/GetValidatorAddress" => { + #[allow(non_camel_case_types)] + struct GetValidatorAddressSvc(pub Arc); + impl< + T: Wallet, + > tonic::server::UnaryService + for GetValidatorAddressSvc { + type Response = super::GetValidatorAddressResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_validator_address(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetValidatorAddressSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Wallet/GetNewAddress" => { + #[allow(non_camel_case_types)] + struct GetNewAddressSvc(pub Arc); + impl< + T: Wallet, + > tonic::server::UnaryService + for GetNewAddressSvc { + type Response = super::GetNewAddressResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_new_address(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetNewAddressSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Wallet/GetAddressHistory" => { + #[allow(non_camel_case_types)] + struct GetAddressHistorySvc(pub Arc); + impl< + T: Wallet, + > tonic::server::UnaryService + for GetAddressHistorySvc { + type Response = super::GetAddressHistoryResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_address_history(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetAddressHistorySvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Wallet/SignMessage" => { + #[allow(non_camel_case_types)] + struct SignMessageSvc(pub Arc); + impl< + T: Wallet, + > tonic::server::UnaryService + for SignMessageSvc { + type Response = super::SignMessageResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).sign_message(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = SignMessageSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for WalletServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for WalletServer { + const NAME: &'static str = "pactus.Wallet"; + } +} From bca8b646dd98da171b8de5170d86ef0541ce6381 Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 10 Sep 2024 10:07:42 +0330 Subject: [PATCH 03/17] fix: lint error --- www/grpc/transaction.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index cf0fba253..69a92823d 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -112,21 +112,25 @@ func (s *transactionServer) GetRawTransaction(_ context.Context, switch r := req.Transaction.(type) { case *pactus.GetRawTransactionRequest_Transfer: raw, err := s.handleRawTransfer(r, lockTime, req.Memo) + return &pactus.GetRawTransactionResponse{ RawTransaction: hex.EncodeToString(raw), }, err case *pactus.GetRawTransactionRequest_Bond: raw, err := s.handleRawBond(r, lockTime, req.Memo) + return &pactus.GetRawTransactionResponse{ RawTransaction: hex.EncodeToString(raw), }, err case *pactus.GetRawTransactionRequest_Unbond: raw, err := s.handleRawUnBond(r, lockTime, req.Memo) + return &pactus.GetRawTransactionResponse{ RawTransaction: hex.EncodeToString(raw), }, err case *pactus.GetRawTransactionRequest_Withdraw: raw, err := s.handleRawWithdraw(r, lockTime, req.Memo) + return &pactus.GetRawTransactionResponse{ RawTransaction: hex.EncodeToString(raw), }, err @@ -187,7 +191,7 @@ func (s *transactionServer) handleRawBond(r *pactus.GetRawTransactionRequest_Bon return bondTx.Bytes() } -func (s *transactionServer) handleRawUnBond(r *pactus.GetRawTransactionRequest_Unbond, +func (*transactionServer) handleRawUnBond(r *pactus.GetRawTransactionRequest_Unbond, lockTime uint32, memo string, ) ([]byte, error) { From 6472923be2ddd92fdea8d4167ee72a6423de8e89 Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 10 Sep 2024 10:11:53 +0330 Subject: [PATCH 04/17] fix: lint error --- www/grpc/transaction.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index 69a92823d..96ae52d9d 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -157,6 +157,7 @@ func (s *transactionServer) handleRawTransfer(r *pactus.GetRawTransactionRequest fee := s.getFee(r.Transfer.Fee, amt) transferTx := tx.NewTransferTx(lockTime, sender, receiver, amt, fee, tx.WithMemo(memo)) + return transferTx.Bytes() } @@ -188,6 +189,7 @@ func (s *transactionServer) handleRawBond(r *pactus.GetRawTransactionRequest_Bon fee := s.getFee(r.Bond.Fee, amt) bondTx := tx.NewBondTx(lockTime, sender, receiver, publicKey, amt, fee, tx.WithMemo(memo)) + return bondTx.Bytes() } @@ -201,6 +203,7 @@ func (*transactionServer) handleRawUnBond(r *pactus.GetRawTransactionRequest_Unb } unbondTx := tx.NewUnbondTx(lockTime, validatorAddr, tx.WithMemo(memo)) + return unbondTx.Bytes() } @@ -222,6 +225,7 @@ func (s *transactionServer) handleRawWithdraw(r *pactus.GetRawTransactionRequest fee := s.getFee(r.Withdraw.Fee, amt) withdrawTx := tx.NewWithdrawTx(lockTime, validatorAddr, accountAddr, amt, fee, tx.WithMemo(memo)) + return withdrawTx.Bytes() } From 6cb2ececcc3c49b1266d872a1e61d753ae9b0a9b Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 10 Sep 2024 14:15:35 +0330 Subject: [PATCH 05/17] fix: add deprecated methods --- www/grpc/buf/grpc-gateway.config.yaml | 16 + www/grpc/gen/dart/transaction.pb.dart | 582 +- www/grpc/gen/dart/transaction.pbjson.dart | 110 +- www/grpc/gen/dart/transaction.pbserver.dart | 12 + www/grpc/gen/docs/grpc.md | 302 +- www/grpc/gen/docs/json-rpc.md | 294 + www/grpc/gen/go/transaction.cobra.pb.go | 198 +- www/grpc/gen/go/transaction.pb.go | 929 ++- www/grpc/gen/go/transaction.pb.gw.go | 348 + www/grpc/gen/go/transaction_grpc.pb.go | 168 +- www/grpc/gen/go/transaction_jgw.pb.go | 68 + .../pactus/transaction/TransactionGrpc.java | 344 + .../transaction/TransactionOuterClass.java | 5786 +++++++++++++++-- www/grpc/gen/js/transaction_grpc_pb.js | 92 + www/grpc/gen/js/transaction_pb.js | 1390 +++- www/grpc/gen/python/transaction_pb2.py | 68 +- www/grpc/gen/python/transaction_pb2.pyi | 76 +- www/grpc/gen/python/transaction_pb2_grpc.py | 136 + www/grpc/gen/rust/pactus.rs | 104 +- www/grpc/gen/rust/pactus.serde.rs | 698 ++ www/grpc/gen/rust/pactus.tonic.rs | 326 + www/grpc/proto/transaction.proto | 94 +- www/grpc/swagger-ui/pactus.swagger.json | 436 +- www/grpc/transaction.go | 119 + 24 files changed, 11647 insertions(+), 1049 deletions(-) diff --git a/www/grpc/buf/grpc-gateway.config.yaml b/www/grpc/buf/grpc-gateway.config.yaml index cb52285f1..367bc7806 100644 --- a/www/grpc/buf/grpc-gateway.config.yaml +++ b/www/grpc/buf/grpc-gateway.config.yaml @@ -47,6 +47,22 @@ http: - selector: pactus.Transaction.GetRawTransaction get: "/pactus/transaction/get_raw_transaction" + # deprecated + - selector: pactus.Transaction.GetRawTransferTransaction + get: "/pactus/transaction/get_raw_transfer_transaction" + + # deprecated + - selector: pactus.Transaction.GetRawBondTransaction + get: "/pactus/transaction/get_raw_bond_transaction" + + # deprecated + - selector: pactus.Transaction.GetRawUnbondTransaction + get: "/pactus/transaction/get_raw_unbond_transaction" + + # deprecated + - selector: pactus.Transaction.GetRawWithdrawTransaction + get: "/pactus/transaction/get_raw_withdraw_transaction" + # Network APIs - selector: pactus.Network.GetNetworkInfo get: "/pactus/network/get_network_info" diff --git a/www/grpc/gen/dart/transaction.pb.dart b/www/grpc/gen/dart/transaction.pb.dart index 843730af4..e8d73ccea 100644 --- a/www/grpc/gen/dart/transaction.pb.dart +++ b/www/grpc/gen/dart/transaction.pb.dart @@ -403,10 +403,10 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { ..oo(0, [3, 4, 5, 6]) ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') - ..aOM(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: GetRawTransferTransactionRequest.create) - ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: GetRawBondTransactionRequest.create) - ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: GetRawUnbondTransactionRequest.create) - ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: GetRawWithdrawTransactionRequest.create) + ..aOM(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: RawTransfer.create) + ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: RawBond.create) + ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: RawUnbond.create) + ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: RawWithdraw.create) ..hasRequiredFields = false ; @@ -414,10 +414,10 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { factory GetRawTransactionRequest({ $core.int? lockTime, $core.String? memo, - GetRawTransferTransactionRequest? transfer, - GetRawBondTransactionRequest? bond, - GetRawUnbondTransactionRequest? unbond, - GetRawWithdrawTransactionRequest? withdraw, + RawTransfer? transfer, + RawBond? bond, + RawUnbond? unbond, + RawWithdraw? withdraw, }) { final _result = create(); if (lockTime != null) { @@ -483,67 +483,74 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { void clearMemo() => clearField(2); @$pb.TagNumber(3) - GetRawTransferTransactionRequest get transfer => $_getN(2); + RawTransfer get transfer => $_getN(2); @$pb.TagNumber(3) - set transfer(GetRawTransferTransactionRequest v) { setField(3, v); } + set transfer(RawTransfer v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasTransfer() => $_has(2); @$pb.TagNumber(3) void clearTransfer() => clearField(3); @$pb.TagNumber(3) - GetRawTransferTransactionRequest ensureTransfer() => $_ensure(2); + RawTransfer ensureTransfer() => $_ensure(2); @$pb.TagNumber(4) - GetRawBondTransactionRequest get bond => $_getN(3); + RawBond get bond => $_getN(3); @$pb.TagNumber(4) - set bond(GetRawBondTransactionRequest v) { setField(4, v); } + set bond(RawBond v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasBond() => $_has(3); @$pb.TagNumber(4) void clearBond() => clearField(4); @$pb.TagNumber(4) - GetRawBondTransactionRequest ensureBond() => $_ensure(3); + RawBond ensureBond() => $_ensure(3); @$pb.TagNumber(5) - GetRawUnbondTransactionRequest get unbond => $_getN(4); + RawUnbond get unbond => $_getN(4); @$pb.TagNumber(5) - set unbond(GetRawUnbondTransactionRequest v) { setField(5, v); } + set unbond(RawUnbond v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasUnbond() => $_has(4); @$pb.TagNumber(5) void clearUnbond() => clearField(5); @$pb.TagNumber(5) - GetRawUnbondTransactionRequest ensureUnbond() => $_ensure(4); + RawUnbond ensureUnbond() => $_ensure(4); @$pb.TagNumber(6) - GetRawWithdrawTransactionRequest get withdraw => $_getN(5); + RawWithdraw get withdraw => $_getN(5); @$pb.TagNumber(6) - set withdraw(GetRawWithdrawTransactionRequest v) { setField(6, v); } + set withdraw(RawWithdraw v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasWithdraw() => $_has(5); @$pb.TagNumber(6) void clearWithdraw() => clearField(6); @$pb.TagNumber(6) - GetRawWithdrawTransactionRequest ensureWithdraw() => $_ensure(5); + RawWithdraw ensureWithdraw() => $_ensure(5); } class GetRawTransferTransactionRequest extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawTransferTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') + ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') ..hasRequiredFields = false ; GetRawTransferTransactionRequest._() : super(); factory GetRawTransferTransactionRequest({ + $core.int? lockTime, $core.String? sender, $core.String? receiver, $fixnum.Int64? amount, $fixnum.Int64? fee, + $core.String? memo, }) { final _result = create(); + if (lockTime != null) { + _result.lockTime = lockTime; + } if (sender != null) { _result.sender = sender; } @@ -556,6 +563,9 @@ class GetRawTransferTransactionRequest extends $pb.GeneratedMessage { if (fee != null) { _result.fee = fee; } + if (memo != null) { + _result.memo = memo; + } return _result; } factory GetRawTransferTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -579,6 +589,436 @@ class GetRawTransferTransactionRequest extends $pb.GeneratedMessage { static GetRawTransferTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetRawTransferTransactionRequest? _defaultInstance; + @$pb.TagNumber(1) + $core.int get lockTime => $_getIZ(0); + @$pb.TagNumber(1) + set lockTime($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasLockTime() => $_has(0); + @$pb.TagNumber(1) + void clearLockTime() => clearField(1); + + @$pb.TagNumber(2) + $core.String get sender => $_getSZ(1); + @$pb.TagNumber(2) + set sender($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasSender() => $_has(1); + @$pb.TagNumber(2) + void clearSender() => clearField(2); + + @$pb.TagNumber(3) + $core.String get receiver => $_getSZ(2); + @$pb.TagNumber(3) + set receiver($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasReceiver() => $_has(2); + @$pb.TagNumber(3) + void clearReceiver() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get amount => $_getI64(3); + @$pb.TagNumber(4) + set amount($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasAmount() => $_has(3); + @$pb.TagNumber(4) + void clearAmount() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get fee => $_getI64(4); + @$pb.TagNumber(5) + set fee($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasFee() => $_has(4); + @$pb.TagNumber(5) + void clearFee() => clearField(5); + + @$pb.TagNumber(6) + $core.String get memo => $_getSZ(5); + @$pb.TagNumber(6) + set memo($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasMemo() => $_has(5); + @$pb.TagNumber(6) + void clearMemo() => clearField(6); +} + +class GetRawBondTransactionRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawBondTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') + ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') + ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') + ..aInt64(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..aOS(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') + ..hasRequiredFields = false + ; + + GetRawBondTransactionRequest._() : super(); + factory GetRawBondTransactionRequest({ + $core.int? lockTime, + $core.String? sender, + $core.String? receiver, + $fixnum.Int64? stake, + $core.String? publicKey, + $fixnum.Int64? fee, + $core.String? memo, + }) { + final _result = create(); + if (lockTime != null) { + _result.lockTime = lockTime; + } + if (sender != null) { + _result.sender = sender; + } + if (receiver != null) { + _result.receiver = receiver; + } + if (stake != null) { + _result.stake = stake; + } + if (publicKey != null) { + _result.publicKey = publicKey; + } + if (fee != null) { + _result.fee = fee; + } + if (memo != null) { + _result.memo = memo; + } + return _result; + } + factory GetRawBondTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRawBondTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRawBondTransactionRequest clone() => GetRawBondTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRawBondTransactionRequest copyWith(void Function(GetRawBondTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawBondTransactionRequest)) as GetRawBondTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRawBondTransactionRequest create() => GetRawBondTransactionRequest._(); + GetRawBondTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRawBondTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRawBondTransactionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get lockTime => $_getIZ(0); + @$pb.TagNumber(1) + set lockTime($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasLockTime() => $_has(0); + @$pb.TagNumber(1) + void clearLockTime() => clearField(1); + + @$pb.TagNumber(2) + $core.String get sender => $_getSZ(1); + @$pb.TagNumber(2) + set sender($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasSender() => $_has(1); + @$pb.TagNumber(2) + void clearSender() => clearField(2); + + @$pb.TagNumber(3) + $core.String get receiver => $_getSZ(2); + @$pb.TagNumber(3) + set receiver($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasReceiver() => $_has(2); + @$pb.TagNumber(3) + void clearReceiver() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get stake => $_getI64(3); + @$pb.TagNumber(4) + set stake($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasStake() => $_has(3); + @$pb.TagNumber(4) + void clearStake() => clearField(4); + + @$pb.TagNumber(5) + $core.String get publicKey => $_getSZ(4); + @$pb.TagNumber(5) + set publicKey($core.String v) { $_setString(4, v); } + @$pb.TagNumber(5) + $core.bool hasPublicKey() => $_has(4); + @$pb.TagNumber(5) + void clearPublicKey() => clearField(5); + + @$pb.TagNumber(6) + $fixnum.Int64 get fee => $_getI64(5); + @$pb.TagNumber(6) + set fee($fixnum.Int64 v) { $_setInt64(5, v); } + @$pb.TagNumber(6) + $core.bool hasFee() => $_has(5); + @$pb.TagNumber(6) + void clearFee() => clearField(6); + + @$pb.TagNumber(7) + $core.String get memo => $_getSZ(6); + @$pb.TagNumber(7) + set memo($core.String v) { $_setString(6, v); } + @$pb.TagNumber(7) + $core.bool hasMemo() => $_has(6); + @$pb.TagNumber(7) + void clearMemo() => clearField(7); +} + +class GetRawUnbondTransactionRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawUnbondTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') + ..hasRequiredFields = false + ; + + GetRawUnbondTransactionRequest._() : super(); + factory GetRawUnbondTransactionRequest({ + $core.int? lockTime, + $core.String? validatorAddress, + $core.String? memo, + }) { + final _result = create(); + if (lockTime != null) { + _result.lockTime = lockTime; + } + if (validatorAddress != null) { + _result.validatorAddress = validatorAddress; + } + if (memo != null) { + _result.memo = memo; + } + return _result; + } + factory GetRawUnbondTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRawUnbondTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRawUnbondTransactionRequest clone() => GetRawUnbondTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRawUnbondTransactionRequest copyWith(void Function(GetRawUnbondTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawUnbondTransactionRequest)) as GetRawUnbondTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRawUnbondTransactionRequest create() => GetRawUnbondTransactionRequest._(); + GetRawUnbondTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRawUnbondTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRawUnbondTransactionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get lockTime => $_getIZ(0); + @$pb.TagNumber(1) + set lockTime($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasLockTime() => $_has(0); + @$pb.TagNumber(1) + void clearLockTime() => clearField(1); + + @$pb.TagNumber(3) + $core.String get validatorAddress => $_getSZ(1); + @$pb.TagNumber(3) + set validatorAddress($core.String v) { $_setString(1, v); } + @$pb.TagNumber(3) + $core.bool hasValidatorAddress() => $_has(1); + @$pb.TagNumber(3) + void clearValidatorAddress() => clearField(3); + + @$pb.TagNumber(4) + $core.String get memo => $_getSZ(2); + @$pb.TagNumber(4) + set memo($core.String v) { $_setString(2, v); } + @$pb.TagNumber(4) + $core.bool hasMemo() => $_has(2); + @$pb.TagNumber(4) + void clearMemo() => clearField(4); +} + +class GetRawWithdrawTransactionRequest extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawWithdrawTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') + ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'accountAddress') + ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..aOS(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') + ..hasRequiredFields = false + ; + + GetRawWithdrawTransactionRequest._() : super(); + factory GetRawWithdrawTransactionRequest({ + $core.int? lockTime, + $core.String? validatorAddress, + $core.String? accountAddress, + $fixnum.Int64? amount, + $fixnum.Int64? fee, + $core.String? memo, + }) { + final _result = create(); + if (lockTime != null) { + _result.lockTime = lockTime; + } + if (validatorAddress != null) { + _result.validatorAddress = validatorAddress; + } + if (accountAddress != null) { + _result.accountAddress = accountAddress; + } + if (amount != null) { + _result.amount = amount; + } + if (fee != null) { + _result.fee = fee; + } + if (memo != null) { + _result.memo = memo; + } + return _result; + } + factory GetRawWithdrawTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory GetRawWithdrawTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + GetRawWithdrawTransactionRequest clone() => GetRawWithdrawTransactionRequest()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + GetRawWithdrawTransactionRequest copyWith(void Function(GetRawWithdrawTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawWithdrawTransactionRequest)) as GetRawWithdrawTransactionRequest; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static GetRawWithdrawTransactionRequest create() => GetRawWithdrawTransactionRequest._(); + GetRawWithdrawTransactionRequest createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static GetRawWithdrawTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static GetRawWithdrawTransactionRequest? _defaultInstance; + + @$pb.TagNumber(1) + $core.int get lockTime => $_getIZ(0); + @$pb.TagNumber(1) + set lockTime($core.int v) { $_setUnsignedInt32(0, v); } + @$pb.TagNumber(1) + $core.bool hasLockTime() => $_has(0); + @$pb.TagNumber(1) + void clearLockTime() => clearField(1); + + @$pb.TagNumber(2) + $core.String get validatorAddress => $_getSZ(1); + @$pb.TagNumber(2) + set validatorAddress($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasValidatorAddress() => $_has(1); + @$pb.TagNumber(2) + void clearValidatorAddress() => clearField(2); + + @$pb.TagNumber(3) + $core.String get accountAddress => $_getSZ(2); + @$pb.TagNumber(3) + set accountAddress($core.String v) { $_setString(2, v); } + @$pb.TagNumber(3) + $core.bool hasAccountAddress() => $_has(2); + @$pb.TagNumber(3) + void clearAccountAddress() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get amount => $_getI64(3); + @$pb.TagNumber(4) + set amount($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasAmount() => $_has(3); + @$pb.TagNumber(4) + void clearAmount() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get fee => $_getI64(4); + @$pb.TagNumber(5) + set fee($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasFee() => $_has(4); + @$pb.TagNumber(5) + void clearFee() => clearField(5); + + @$pb.TagNumber(6) + $core.String get memo => $_getSZ(5); + @$pb.TagNumber(6) + set memo($core.String v) { $_setString(5, v); } + @$pb.TagNumber(6) + $core.bool hasMemo() => $_has(5); + @$pb.TagNumber(6) + void clearMemo() => clearField(6); +} + +class RawTransfer extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RawTransfer', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..hasRequiredFields = false + ; + + RawTransfer._() : super(); + factory RawTransfer({ + $core.String? sender, + $core.String? receiver, + $fixnum.Int64? amount, + $fixnum.Int64? fee, + }) { + final _result = create(); + if (sender != null) { + _result.sender = sender; + } + if (receiver != null) { + _result.receiver = receiver; + } + if (amount != null) { + _result.amount = amount; + } + if (fee != null) { + _result.fee = fee; + } + return _result; + } + factory RawTransfer.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RawTransfer.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + RawTransfer clone() => RawTransfer()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + RawTransfer copyWith(void Function(RawTransfer) updates) => super.copyWith((message) => updates(message as RawTransfer)) as RawTransfer; // ignore: deprecated_member_use + $pb.BuilderInfo get info_ => _i; + @$core.pragma('dart2js:noInline') + static RawTransfer create() => RawTransfer._(); + RawTransfer createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static RawTransfer getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RawTransfer? _defaultInstance; + @$pb.TagNumber(1) $core.String get sender => $_getSZ(0); @$pb.TagNumber(1) @@ -616,8 +1056,8 @@ class GetRawTransferTransactionRequest extends $pb.GeneratedMessage { void clearFee() => clearField(4); } -class GetRawBondTransactionRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawBondTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) +class RawBond extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RawBond', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') @@ -626,8 +1066,8 @@ class GetRawBondTransactionRequest extends $pb.GeneratedMessage { ..hasRequiredFields = false ; - GetRawBondTransactionRequest._() : super(); - factory GetRawBondTransactionRequest({ + RawBond._() : super(); + factory RawBond({ $core.String? sender, $core.String? receiver, $fixnum.Int64? stake, @@ -652,26 +1092,26 @@ class GetRawBondTransactionRequest extends $pb.GeneratedMessage { } return _result; } - factory GetRawBondTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetRawBondTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory RawBond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RawBond.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - GetRawBondTransactionRequest clone() => GetRawBondTransactionRequest()..mergeFromMessage(this); + RawBond clone() => RawBond()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - GetRawBondTransactionRequest copyWith(void Function(GetRawBondTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawBondTransactionRequest)) as GetRawBondTransactionRequest; // ignore: deprecated_member_use + RawBond copyWith(void Function(RawBond) updates) => super.copyWith((message) => updates(message as RawBond)) as RawBond; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetRawBondTransactionRequest create() => GetRawBondTransactionRequest._(); - GetRawBondTransactionRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static RawBond create() => RawBond._(); + RawBond createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetRawBondTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetRawBondTransactionRequest? _defaultInstance; + static RawBond getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RawBond? _defaultInstance; @$pb.TagNumber(1) $core.String get sender => $_getSZ(0); @@ -719,14 +1159,14 @@ class GetRawBondTransactionRequest extends $pb.GeneratedMessage { void clearFee() => clearField(5); } -class GetRawUnbondTransactionRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawUnbondTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) +class RawUnbond extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RawUnbond', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') ..hasRequiredFields = false ; - GetRawUnbondTransactionRequest._() : super(); - factory GetRawUnbondTransactionRequest({ + RawUnbond._() : super(); + factory RawUnbond({ $core.String? validatorAddress, }) { final _result = create(); @@ -735,26 +1175,26 @@ class GetRawUnbondTransactionRequest extends $pb.GeneratedMessage { } return _result; } - factory GetRawUnbondTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetRawUnbondTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory RawUnbond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RawUnbond.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - GetRawUnbondTransactionRequest clone() => GetRawUnbondTransactionRequest()..mergeFromMessage(this); + RawUnbond clone() => RawUnbond()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - GetRawUnbondTransactionRequest copyWith(void Function(GetRawUnbondTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawUnbondTransactionRequest)) as GetRawUnbondTransactionRequest; // ignore: deprecated_member_use + RawUnbond copyWith(void Function(RawUnbond) updates) => super.copyWith((message) => updates(message as RawUnbond)) as RawUnbond; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetRawUnbondTransactionRequest create() => GetRawUnbondTransactionRequest._(); - GetRawUnbondTransactionRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static RawUnbond create() => RawUnbond._(); + RawUnbond createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetRawUnbondTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetRawUnbondTransactionRequest? _defaultInstance; + static RawUnbond getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RawUnbond? _defaultInstance; @$pb.TagNumber(1) $core.String get validatorAddress => $_getSZ(0); @@ -766,8 +1206,8 @@ class GetRawUnbondTransactionRequest extends $pb.GeneratedMessage { void clearValidatorAddress() => clearField(1); } -class GetRawWithdrawTransactionRequest extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawWithdrawTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) +class RawWithdraw extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RawWithdraw', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'accountAddress') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') @@ -775,8 +1215,8 @@ class GetRawWithdrawTransactionRequest extends $pb.GeneratedMessage { ..hasRequiredFields = false ; - GetRawWithdrawTransactionRequest._() : super(); - factory GetRawWithdrawTransactionRequest({ + RawWithdraw._() : super(); + factory RawWithdraw({ $core.String? validatorAddress, $core.String? accountAddress, $fixnum.Int64? amount, @@ -797,26 +1237,26 @@ class GetRawWithdrawTransactionRequest extends $pb.GeneratedMessage { } return _result; } - factory GetRawWithdrawTransactionRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory GetRawWithdrawTransactionRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory RawWithdraw.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory RawWithdraw.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - GetRawWithdrawTransactionRequest clone() => GetRawWithdrawTransactionRequest()..mergeFromMessage(this); + RawWithdraw clone() => RawWithdraw()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - GetRawWithdrawTransactionRequest copyWith(void Function(GetRawWithdrawTransactionRequest) updates) => super.copyWith((message) => updates(message as GetRawWithdrawTransactionRequest)) as GetRawWithdrawTransactionRequest; // ignore: deprecated_member_use + RawWithdraw copyWith(void Function(RawWithdraw) updates) => super.copyWith((message) => updates(message as RawWithdraw)) as RawWithdraw; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static GetRawWithdrawTransactionRequest create() => GetRawWithdrawTransactionRequest._(); - GetRawWithdrawTransactionRequest createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static RawWithdraw create() => RawWithdraw._(); + RawWithdraw createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static GetRawWithdrawTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static GetRawWithdrawTransactionRequest? _defaultInstance; + static RawWithdraw getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static RawWithdraw? _defaultInstance; @$pb.TagNumber(1) $core.String get validatorAddress => $_getSZ(0); @@ -1529,5 +1969,21 @@ class TransactionApi { var emptyResponse = GetRawTransactionResponse(); return _client.invoke(ctx, 'Transaction', 'GetRawTransaction', request, emptyResponse); } + $async.Future getRawTransferTransaction($pb.ClientContext? ctx, GetRawTransferTransactionRequest request) { + var emptyResponse = GetRawTransactionResponse(); + return _client.invoke(ctx, 'Transaction', 'GetRawTransferTransaction', request, emptyResponse); + } + $async.Future getRawBondTransaction($pb.ClientContext? ctx, GetRawBondTransactionRequest request) { + var emptyResponse = GetRawTransactionResponse(); + return _client.invoke(ctx, 'Transaction', 'GetRawBondTransaction', request, emptyResponse); + } + $async.Future getRawUnbondTransaction($pb.ClientContext? ctx, GetRawUnbondTransactionRequest request) { + var emptyResponse = GetRawTransactionResponse(); + return _client.invoke(ctx, 'Transaction', 'GetRawUnbondTransaction', request, emptyResponse); + } + $async.Future getRawWithdrawTransaction($pb.ClientContext? ctx, GetRawWithdrawTransactionRequest request) { + var emptyResponse = GetRawTransactionResponse(); + return _client.invoke(ctx, 'Transaction', 'GetRawWithdrawTransaction', request, emptyResponse); + } } diff --git a/www/grpc/gen/dart/transaction.pbjson.dart b/www/grpc/gen/dart/transaction.pbjson.dart index 218bdb1a2..e2a230ef9 100644 --- a/www/grpc/gen/dart/transaction.pbjson.dart +++ b/www/grpc/gen/dart/transaction.pbjson.dart @@ -106,10 +106,10 @@ const GetRawTransactionRequest$json = const { '2': const [ const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, const {'1': 'memo', '3': 2, '4': 1, '5': 9, '10': 'memo'}, - const {'1': 'transfer', '3': 3, '4': 1, '5': 11, '6': '.pactus.GetRawTransferTransactionRequest', '9': 0, '10': 'transfer'}, - const {'1': 'bond', '3': 4, '4': 1, '5': 11, '6': '.pactus.GetRawBondTransactionRequest', '9': 0, '10': 'bond'}, - const {'1': 'unbond', '3': 5, '4': 1, '5': 11, '6': '.pactus.GetRawUnbondTransactionRequest', '9': 0, '10': 'unbond'}, - const {'1': 'withdraw', '3': 6, '4': 1, '5': 11, '6': '.pactus.GetRawWithdrawTransactionRequest', '9': 0, '10': 'withdraw'}, + const {'1': 'transfer', '3': 3, '4': 1, '5': 11, '6': '.pactus.RawTransfer', '9': 0, '10': 'transfer'}, + const {'1': 'bond', '3': 4, '4': 1, '5': 11, '6': '.pactus.RawBond', '9': 0, '10': 'bond'}, + const {'1': 'unbond', '3': 5, '4': 1, '5': 11, '6': '.pactus.RawUnbond', '9': 0, '10': 'unbond'}, + const {'1': 'withdraw', '3': 6, '4': 1, '5': 11, '6': '.pactus.RawWithdraw', '9': 0, '10': 'withdraw'}, ], '8': const [ const {'1': 'transaction'}, @@ -117,47 +117,105 @@ const GetRawTransactionRequest$json = const { }; /// Descriptor for `GetRawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawTransactionRequestDescriptor = $convert.base64Decode('ChhHZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRISCgRtZW1vGAIgASgJUgRtZW1vEkYKCHRyYW5zZmVyGAMgASgLMigucGFjdHVzLkdldFJhd1RyYW5zZmVyVHJhbnNhY3Rpb25SZXF1ZXN0SABSCHRyYW5zZmVyEjoKBGJvbmQYBCABKAsyJC5wYWN0dXMuR2V0UmF3Qm9uZFRyYW5zYWN0aW9uUmVxdWVzdEgAUgRib25kEkAKBnVuYm9uZBgFIAEoCzImLnBhY3R1cy5HZXRSYXdVbmJvbmRUcmFuc2FjdGlvblJlcXVlc3RIAFIGdW5ib25kEkYKCHdpdGhkcmF3GAYgASgLMigucGFjdHVzLkdldFJhd1dpdGhkcmF3VHJhbnNhY3Rpb25SZXF1ZXN0SABSCHdpdGhkcmF3Qg0KC3RyYW5zYWN0aW9u'); +final $typed_data.Uint8List getRawTransactionRequestDescriptor = $convert.base64Decode('ChhHZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRISCgRtZW1vGAIgASgJUgRtZW1vEjEKCHRyYW5zZmVyGAMgASgLMhMucGFjdHVzLlJhd1RyYW5zZmVySABSCHRyYW5zZmVyEiUKBGJvbmQYBCABKAsyDy5wYWN0dXMuUmF3Qm9uZEgAUgRib25kEisKBnVuYm9uZBgFIAEoCzIRLnBhY3R1cy5SYXdVbmJvbmRIAFIGdW5ib25kEjEKCHdpdGhkcmF3GAYgASgLMhMucGFjdHVzLlJhd1dpdGhkcmF3SABSCHdpdGhkcmF3Qg0KC3RyYW5zYWN0aW9u'); @$core.Deprecated('Use getRawTransferTransactionRequestDescriptor instead') const GetRawTransferTransactionRequest$json = const { '1': 'GetRawTransferTransactionRequest', '2': const [ - const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, - const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, - const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, - const {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'}, + const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, + const {'1': 'sender', '3': 2, '4': 1, '5': 9, '10': 'sender'}, + const {'1': 'receiver', '3': 3, '4': 1, '5': 9, '10': 'receiver'}, + const {'1': 'amount', '3': 4, '4': 1, '5': 3, '10': 'amount'}, + const {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'}, + const {'1': 'memo', '3': 6, '4': 1, '5': 9, '10': 'memo'}, ], }; /// Descriptor for `GetRawTransferTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawTransferTransactionRequestDescriptor = $convert.base64Decode('CiBHZXRSYXdUcmFuc2ZlclRyYW5zYWN0aW9uUmVxdWVzdBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFgoGYW1vdW50GAMgASgDUgZhbW91bnQSEAoDZmVlGAQgASgDUgNmZWU='); +final $typed_data.Uint8List getRawTransferTransactionRequestDescriptor = $convert.base64Decode('CiBHZXRSYXdUcmFuc2ZlclRyYW5zYWN0aW9uUmVxdWVzdBIbCglsb2NrX3RpbWUYASABKA1SCGxvY2tUaW1lEhYKBnNlbmRlchgCIAEoCVIGc2VuZGVyEhoKCHJlY2VpdmVyGAMgASgJUghyZWNlaXZlchIWCgZhbW91bnQYBCABKANSBmFtb3VudBIQCgNmZWUYBSABKANSA2ZlZRISCgRtZW1vGAYgASgJUgRtZW1v'); @$core.Deprecated('Use getRawBondTransactionRequestDescriptor instead') const GetRawBondTransactionRequest$json = const { '1': 'GetRawBondTransactionRequest', '2': const [ - const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, - const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, - const {'1': 'stake', '3': 3, '4': 1, '5': 3, '10': 'stake'}, - const {'1': 'public_key', '3': 4, '4': 1, '5': 9, '10': 'publicKey'}, - const {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'}, + const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, + const {'1': 'sender', '3': 2, '4': 1, '5': 9, '10': 'sender'}, + const {'1': 'receiver', '3': 3, '4': 1, '5': 9, '10': 'receiver'}, + const {'1': 'stake', '3': 4, '4': 1, '5': 3, '10': 'stake'}, + const {'1': 'public_key', '3': 5, '4': 1, '5': 9, '10': 'publicKey'}, + const {'1': 'fee', '3': 6, '4': 1, '5': 3, '10': 'fee'}, + const {'1': 'memo', '3': 7, '4': 1, '5': 9, '10': 'memo'}, ], }; /// Descriptor for `GetRawBondTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawBondTransactionRequestDescriptor = $convert.base64Decode('ChxHZXRSYXdCb25kVHJhbnNhY3Rpb25SZXF1ZXN0EhYKBnNlbmRlchgBIAEoCVIGc2VuZGVyEhoKCHJlY2VpdmVyGAIgASgJUghyZWNlaXZlchIUCgVzdGFrZRgDIAEoA1IFc3Rha2USHQoKcHVibGljX2tleRgEIAEoCVIJcHVibGljS2V5EhAKA2ZlZRgFIAEoA1IDZmVl'); +final $typed_data.Uint8List getRawBondTransactionRequestDescriptor = $convert.base64Decode('ChxHZXRSYXdCb25kVHJhbnNhY3Rpb25SZXF1ZXN0EhsKCWxvY2tfdGltZRgBIAEoDVIIbG9ja1RpbWUSFgoGc2VuZGVyGAIgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAyABKAlSCHJlY2VpdmVyEhQKBXN0YWtlGAQgASgDUgVzdGFrZRIdCgpwdWJsaWNfa2V5GAUgASgJUglwdWJsaWNLZXkSEAoDZmVlGAYgASgDUgNmZWUSEgoEbWVtbxgHIAEoCVIEbWVtbw=='); @$core.Deprecated('Use getRawUnbondTransactionRequestDescriptor instead') const GetRawUnbondTransactionRequest$json = const { '1': 'GetRawUnbondTransactionRequest', '2': const [ - const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, + const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, + const {'1': 'validator_address', '3': 3, '4': 1, '5': 9, '10': 'validatorAddress'}, + const {'1': 'memo', '3': 4, '4': 1, '5': 9, '10': 'memo'}, ], }; /// Descriptor for `GetRawUnbondTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawUnbondTransactionRequestDescriptor = $convert.base64Decode('Ch5HZXRSYXdVbmJvbmRUcmFuc2FjdGlvblJlcXVlc3QSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvckFkZHJlc3M='); +final $typed_data.Uint8List getRawUnbondTransactionRequestDescriptor = $convert.base64Decode('Ch5HZXRSYXdVbmJvbmRUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRIrChF2YWxpZGF0b3JfYWRkcmVzcxgDIAEoCVIQdmFsaWRhdG9yQWRkcmVzcxISCgRtZW1vGAQgASgJUgRtZW1v'); @$core.Deprecated('Use getRawWithdrawTransactionRequestDescriptor instead') const GetRawWithdrawTransactionRequest$json = const { '1': 'GetRawWithdrawTransactionRequest', + '2': const [ + const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, + const {'1': 'validator_address', '3': 2, '4': 1, '5': 9, '10': 'validatorAddress'}, + const {'1': 'account_address', '3': 3, '4': 1, '5': 9, '10': 'accountAddress'}, + const {'1': 'amount', '3': 4, '4': 1, '5': 3, '10': 'amount'}, + const {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'}, + const {'1': 'memo', '3': 6, '4': 1, '5': 9, '10': 'memo'}, + ], +}; + +/// Descriptor for `GetRawWithdrawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List getRawWithdrawTransactionRequestDescriptor = $convert.base64Decode('CiBHZXRSYXdXaXRoZHJhd1RyYW5zYWN0aW9uUmVxdWVzdBIbCglsb2NrX3RpbWUYASABKA1SCGxvY2tUaW1lEisKEXZhbGlkYXRvcl9hZGRyZXNzGAIgASgJUhB2YWxpZGF0b3JBZGRyZXNzEicKD2FjY291bnRfYWRkcmVzcxgDIAEoCVIOYWNjb3VudEFkZHJlc3MSFgoGYW1vdW50GAQgASgDUgZhbW91bnQSEAoDZmVlGAUgASgDUgNmZWUSEgoEbWVtbxgGIAEoCVIEbWVtbw=='); +@$core.Deprecated('Use rawTransferDescriptor instead') +const RawTransfer$json = const { + '1': 'RawTransfer', + '2': const [ + const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, + const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, + const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, + const {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'}, + ], +}; + +/// Descriptor for `RawTransfer`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List rawTransferDescriptor = $convert.base64Decode('CgtSYXdUcmFuc2ZlchIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFgoGYW1vdW50GAMgASgDUgZhbW91bnQSEAoDZmVlGAQgASgDUgNmZWU='); +@$core.Deprecated('Use rawBondDescriptor instead') +const RawBond$json = const { + '1': 'RawBond', + '2': const [ + const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, + const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, + const {'1': 'stake', '3': 3, '4': 1, '5': 3, '10': 'stake'}, + const {'1': 'public_key', '3': 4, '4': 1, '5': 9, '10': 'publicKey'}, + const {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'}, + ], +}; + +/// Descriptor for `RawBond`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List rawBondDescriptor = $convert.base64Decode('CgdSYXdCb25kEhYKBnNlbmRlchgBIAEoCVIGc2VuZGVyEhoKCHJlY2VpdmVyGAIgASgJUghyZWNlaXZlchIUCgVzdGFrZRgDIAEoA1IFc3Rha2USHQoKcHVibGljX2tleRgEIAEoCVIJcHVibGljS2V5EhAKA2ZlZRgFIAEoA1IDZmVl'); +@$core.Deprecated('Use rawUnbondDescriptor instead') +const RawUnbond$json = const { + '1': 'RawUnbond', + '2': const [ + const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, + ], +}; + +/// Descriptor for `RawUnbond`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List rawUnbondDescriptor = $convert.base64Decode('CglSYXdVbmJvbmQSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvckFkZHJlc3M='); +@$core.Deprecated('Use rawWithdrawDescriptor instead') +const RawWithdraw$json = const { + '1': 'RawWithdraw', '2': const [ const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, const {'1': 'account_address', '3': 2, '4': 1, '5': 9, '10': 'accountAddress'}, @@ -166,8 +224,8 @@ const GetRawWithdrawTransactionRequest$json = const { ], }; -/// Descriptor for `GetRawWithdrawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawWithdrawTransactionRequestDescriptor = $convert.base64Decode('CiBHZXRSYXdXaXRoZHJhd1RyYW5zYWN0aW9uUmVxdWVzdBIrChF2YWxpZGF0b3JfYWRkcmVzcxgBIAEoCVIQdmFsaWRhdG9yQWRkcmVzcxInCg9hY2NvdW50X2FkZHJlc3MYAiABKAlSDmFjY291bnRBZGRyZXNzEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50EhAKA2ZlZRgEIAEoA1IDZmVl'); +/// Descriptor for `RawWithdraw`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List rawWithdrawDescriptor = $convert.base64Decode('CgtSYXdXaXRoZHJhdxIrChF2YWxpZGF0b3JfYWRkcmVzcxgBIAEoCVIQdmFsaWRhdG9yQWRkcmVzcxInCg9hY2NvdW50X2FkZHJlc3MYAiABKAlSDmFjY291bnRBZGRyZXNzEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50EhAKA2ZlZRgEIAEoA1IDZmVl'); @$core.Deprecated('Use getRawTransactionResponseDescriptor instead') const GetRawTransactionResponse$json = const { '1': 'GetRawTransactionResponse', @@ -269,6 +327,10 @@ const $core.Map<$core.String, $core.dynamic> TransactionServiceBase$json = const const {'1': 'CalculateFee', '2': '.pactus.CalculateFeeRequest', '3': '.pactus.CalculateFeeResponse'}, const {'1': 'BroadcastTransaction', '2': '.pactus.BroadcastTransactionRequest', '3': '.pactus.BroadcastTransactionResponse'}, const {'1': 'GetRawTransaction', '2': '.pactus.GetRawTransactionRequest', '3': '.pactus.GetRawTransactionResponse'}, + const {'1': 'GetRawTransferTransaction', '2': '.pactus.GetRawTransferTransactionRequest', '3': '.pactus.GetRawTransactionResponse'}, + const {'1': 'GetRawBondTransaction', '2': '.pactus.GetRawBondTransactionRequest', '3': '.pactus.GetRawTransactionResponse'}, + const {'1': 'GetRawUnbondTransaction', '2': '.pactus.GetRawUnbondTransactionRequest', '3': '.pactus.GetRawTransactionResponse'}, + const {'1': 'GetRawWithdrawTransaction', '2': '.pactus.GetRawWithdrawTransactionRequest', '3': '.pactus.GetRawTransactionResponse'}, ], }; @@ -287,12 +349,16 @@ const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> Transactio '.pactus.BroadcastTransactionRequest': BroadcastTransactionRequest$json, '.pactus.BroadcastTransactionResponse': BroadcastTransactionResponse$json, '.pactus.GetRawTransactionRequest': GetRawTransactionRequest$json, + '.pactus.RawTransfer': RawTransfer$json, + '.pactus.RawBond': RawBond$json, + '.pactus.RawUnbond': RawUnbond$json, + '.pactus.RawWithdraw': RawWithdraw$json, + '.pactus.GetRawTransactionResponse': GetRawTransactionResponse$json, '.pactus.GetRawTransferTransactionRequest': GetRawTransferTransactionRequest$json, '.pactus.GetRawBondTransactionRequest': GetRawBondTransactionRequest$json, '.pactus.GetRawUnbondTransactionRequest': GetRawUnbondTransactionRequest$json, '.pactus.GetRawWithdrawTransactionRequest': GetRawWithdrawTransactionRequest$json, - '.pactus.GetRawTransactionResponse': GetRawTransactionResponse$json, }; /// Descriptor for `Transaction`. Decode as a `google.protobuf.ServiceDescriptorProto`. -final $typed_data.Uint8List transactionServiceDescriptor = $convert.base64Decode('CgtUcmFuc2FjdGlvbhJPCg5HZXRUcmFuc2FjdGlvbhIdLnBhY3R1cy5HZXRUcmFuc2FjdGlvblJlcXVlc3QaHi5wYWN0dXMuR2V0VHJhbnNhY3Rpb25SZXNwb25zZRJJCgxDYWxjdWxhdGVGZWUSGy5wYWN0dXMuQ2FsY3VsYXRlRmVlUmVxdWVzdBocLnBhY3R1cy5DYWxjdWxhdGVGZWVSZXNwb25zZRJhChRCcm9hZGNhc3RUcmFuc2FjdGlvbhIjLnBhY3R1cy5Ccm9hZGNhc3RUcmFuc2FjdGlvblJlcXVlc3QaJC5wYWN0dXMuQnJvYWRjYXN0VHJhbnNhY3Rpb25SZXNwb25zZRJYChFHZXRSYXdUcmFuc2FjdGlvbhIgLnBhY3R1cy5HZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QaIS5wYWN0dXMuR2V0UmF3VHJhbnNhY3Rpb25SZXNwb25zZQ=='); +final $typed_data.Uint8List transactionServiceDescriptor = $convert.base64Decode('CgtUcmFuc2FjdGlvbhJPCg5HZXRUcmFuc2FjdGlvbhIdLnBhY3R1cy5HZXRUcmFuc2FjdGlvblJlcXVlc3QaHi5wYWN0dXMuR2V0VHJhbnNhY3Rpb25SZXNwb25zZRJJCgxDYWxjdWxhdGVGZWUSGy5wYWN0dXMuQ2FsY3VsYXRlRmVlUmVxdWVzdBocLnBhY3R1cy5DYWxjdWxhdGVGZWVSZXNwb25zZRJhChRCcm9hZGNhc3RUcmFuc2FjdGlvbhIjLnBhY3R1cy5Ccm9hZGNhc3RUcmFuc2FjdGlvblJlcXVlc3QaJC5wYWN0dXMuQnJvYWRjYXN0VHJhbnNhY3Rpb25SZXNwb25zZRJYChFHZXRSYXdUcmFuc2FjdGlvbhIgLnBhY3R1cy5HZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QaIS5wYWN0dXMuR2V0UmF3VHJhbnNhY3Rpb25SZXNwb25zZRJoChlHZXRSYXdUcmFuc2ZlclRyYW5zYWN0aW9uEigucGFjdHVzLkdldFJhd1RyYW5zZmVyVHJhbnNhY3Rpb25SZXF1ZXN0GiEucGFjdHVzLkdldFJhd1RyYW5zYWN0aW9uUmVzcG9uc2USYAoVR2V0UmF3Qm9uZFRyYW5zYWN0aW9uEiQucGFjdHVzLkdldFJhd0JvbmRUcmFuc2FjdGlvblJlcXVlc3QaIS5wYWN0dXMuR2V0UmF3VHJhbnNhY3Rpb25SZXNwb25zZRJkChdHZXRSYXdVbmJvbmRUcmFuc2FjdGlvbhImLnBhY3R1cy5HZXRSYXdVbmJvbmRUcmFuc2FjdGlvblJlcXVlc3QaIS5wYWN0dXMuR2V0UmF3VHJhbnNhY3Rpb25SZXNwb25zZRJoChlHZXRSYXdXaXRoZHJhd1RyYW5zYWN0aW9uEigucGFjdHVzLkdldFJhd1dpdGhkcmF3VHJhbnNhY3Rpb25SZXF1ZXN0GiEucGFjdHVzLkdldFJhd1RyYW5zYWN0aW9uUmVzcG9uc2U='); diff --git a/www/grpc/gen/dart/transaction.pbserver.dart b/www/grpc/gen/dart/transaction.pbserver.dart index fc888b971..4ad99133e 100644 --- a/www/grpc/gen/dart/transaction.pbserver.dart +++ b/www/grpc/gen/dart/transaction.pbserver.dart @@ -20,6 +20,10 @@ abstract class TransactionServiceBase extends $pb.GeneratedService { $async.Future<$0.CalculateFeeResponse> calculateFee($pb.ServerContext ctx, $0.CalculateFeeRequest request); $async.Future<$0.BroadcastTransactionResponse> broadcastTransaction($pb.ServerContext ctx, $0.BroadcastTransactionRequest request); $async.Future<$0.GetRawTransactionResponse> getRawTransaction($pb.ServerContext ctx, $0.GetRawTransactionRequest request); + $async.Future<$0.GetRawTransactionResponse> getRawTransferTransaction($pb.ServerContext ctx, $0.GetRawTransferTransactionRequest request); + $async.Future<$0.GetRawTransactionResponse> getRawBondTransaction($pb.ServerContext ctx, $0.GetRawBondTransactionRequest request); + $async.Future<$0.GetRawTransactionResponse> getRawUnbondTransaction($pb.ServerContext ctx, $0.GetRawUnbondTransactionRequest request); + $async.Future<$0.GetRawTransactionResponse> getRawWithdrawTransaction($pb.ServerContext ctx, $0.GetRawWithdrawTransactionRequest request); $pb.GeneratedMessage createRequest($core.String method) { switch (method) { @@ -27,6 +31,10 @@ abstract class TransactionServiceBase extends $pb.GeneratedService { case 'CalculateFee': return $0.CalculateFeeRequest(); case 'BroadcastTransaction': return $0.BroadcastTransactionRequest(); case 'GetRawTransaction': return $0.GetRawTransactionRequest(); + case 'GetRawTransferTransaction': return $0.GetRawTransferTransactionRequest(); + case 'GetRawBondTransaction': return $0.GetRawBondTransactionRequest(); + case 'GetRawUnbondTransaction': return $0.GetRawUnbondTransactionRequest(); + case 'GetRawWithdrawTransaction': return $0.GetRawWithdrawTransactionRequest(); default: throw $core.ArgumentError('Unknown method: $method'); } } @@ -37,6 +45,10 @@ abstract class TransactionServiceBase extends $pb.GeneratedService { case 'CalculateFee': return this.calculateFee(ctx, request as $0.CalculateFeeRequest); case 'BroadcastTransaction': return this.broadcastTransaction(ctx, request as $0.BroadcastTransactionRequest); case 'GetRawTransaction': return this.getRawTransaction(ctx, request as $0.GetRawTransactionRequest); + case 'GetRawTransferTransaction': return this.getRawTransferTransaction(ctx, request as $0.GetRawTransferTransactionRequest); + case 'GetRawBondTransaction': return this.getRawBondTransaction(ctx, request as $0.GetRawBondTransactionRequest); + case 'GetRawUnbondTransaction': return this.getRawUnbondTransaction(ctx, request as $0.GetRawUnbondTransactionRequest); + case 'GetRawWithdrawTransaction': return this.getRawWithdrawTransaction(ctx, request as $0.GetRawWithdrawTransactionRequest); default: throw $core.ArgumentError('Unknown method: $method'); } } diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md index 581d2f17a..2cc75c82d 100644 --- a/www/grpc/gen/docs/grpc.md +++ b/www/grpc/gen/docs/grpc.md @@ -31,6 +31,22 @@ Each PAC is equivalent to 1,000,000,000 or 109 NanoPACs. GetRawTransaction +
  • + + GetRawTransferTransaction +
  • +
  • + + GetRawBondTransaction +
  • +
  • + + GetRawUnbondTransaction +
  • +
  • + + GetRawWithdrawTransaction +
  • Blockchain Service @@ -551,28 +567,28 @@ height. transfer - GetRawTransferTransactionRequest + RawTransfer (OneOf) bond - GetRawBondTransactionRequest + RawBond (OneOf) unbond - GetRawUnbondTransactionRequest + RawUnbond (OneOf) withdraw - GetRawWithdrawTransactionRequest + RawWithdraw (OneOf) @@ -596,6 +612,284 @@ height. +### GetRawTransferTransaction + +

    Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.

    + +

    GetRawTransferTransactionRequest Request

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeDescription
    lock_time uint32 + The lock time for the transaction. If not set, defaults to the last block +height. +
    sender string + The sender's account address. +
    receiver string + The receiver's account address. +
    amount int64 + The amount to be transferred, specified in NanoPAC. Must be greater than 0. +
    fee int64 + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. +
    memo string + A memo string for the transaction. +
    +

    GetRawTransactionResponse Response

    + + + + + + + + + + + + +
    FieldTypeDescription
    raw_transaction string + The raw transaction data. +
    + +### GetRawBondTransaction + +

    Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.

    + +

    GetRawBondTransactionRequest Request

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeDescription
    lock_time uint32 + The lock time for the transaction. If not set, defaults to the last block +height. +
    sender string + The sender's account address. +
    receiver string + The receiver's validator address. +
    stake int64 + The stake amount in NanoPAC. Must be greater than 0. +
    public_key string + The public key of the validator. +
    fee int64 + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. +
    memo string + A memo string for the transaction. +
    +

    GetRawTransactionResponse Response

    + + + + + + + + + + + + +
    FieldTypeDescription
    raw_transaction string + The raw transaction data. +
    + +### GetRawUnbondTransaction + +

    Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.

    + +

    GetRawUnbondTransactionRequest Request

    + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeDescription
    lock_time uint32 + The lock time for the transaction. If not set, defaults to the last block +height. +
    validator_address string + The address of the validator to unbond from. +
    memo string + A memo string for the transaction. +
    +

    GetRawTransactionResponse Response

    + + + + + + + + + + + + +
    FieldTypeDescription
    raw_transaction string + The raw transaction data. +
    + +### GetRawWithdrawTransaction + +

    Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.

    + +

    GetRawWithdrawTransactionRequest Request

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeDescription
    lock_time uint32 + The lock time for the transaction. If not set, defaults to the last block +height. +
    validator_address string + The address of the validator to withdraw from. +
    account_address string + The address of the account to withdraw to. +
    amount int64 + The withdrawal amount in NanoPAC. Must be greater than 0. +
    fee int64 + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. +
    memo string + A memo string for the transaction. +
    +

    GetRawTransactionResponse Response

    + + + + + + + + + + + + +
    FieldTypeDescription
    raw_transaction string + The raw transaction data. +
    + ## Blockchain Service

    Blockchain service defines RPC methods for interacting with the blockchain.

    diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md index fa2d83435..6bde14217 100644 --- a/www/grpc/gen/docs/json-rpc.md +++ b/www/grpc/gen/docs/json-rpc.md @@ -82,6 +82,22 @@ curl --location 'http://localhost:8545/' \ pactus.transaction.get_raw_transaction
  • +
  • + + pactus.transaction.get_raw_transfer_transaction +
  • +
  • + + pactus.transaction.get_raw_bond_transaction +
  • +
  • + + pactus.transaction.get_raw_unbond_transaction +
  • +
  • + + pactus.transaction.get_raw_withdraw_transaction +
  • Blockchain Service @@ -647,6 +663,284 @@ height. +### pactus.transaction.get_raw_transfer_transaction + +

    Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.

    + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeDescription
    lock_time numeric + The lock time for the transaction. If not set, defaults to the last block +height. +
    sender string + The sender's account address. +
    receiver string + The receiver's account address. +
    amount numeric + The amount to be transferred, specified in NanoPAC. Must be greater than 0. +
    fee numeric + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. +
    memo string + A memo string for the transaction. +
    +

    Result

    + + + + + + + + + + + + +
    FieldTypeDescription
    raw_transaction string + The raw transaction data. +
    + +### pactus.transaction.get_raw_bond_transaction + +

    Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.

    + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeDescription
    lock_time numeric + The lock time for the transaction. If not set, defaults to the last block +height. +
    sender string + The sender's account address. +
    receiver string + The receiver's validator address. +
    stake numeric + The stake amount in NanoPAC. Must be greater than 0. +
    public_key string + The public key of the validator. +
    fee numeric + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. +
    memo string + A memo string for the transaction. +
    +

    Result

    + + + + + + + + + + + + +
    FieldTypeDescription
    raw_transaction string + The raw transaction data. +
    + +### pactus.transaction.get_raw_unbond_transaction + +

    Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.

    + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeDescription
    lock_time numeric + The lock time for the transaction. If not set, defaults to the last block +height. +
    validator_address string + The address of the validator to unbond from. +
    memo string + A memo string for the transaction. +
    +

    Result

    + + + + + + + + + + + + +
    FieldTypeDescription
    raw_transaction string + The raw transaction data. +
    + +### pactus.transaction.get_raw_withdraw_transaction + +

    Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.

    + +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeDescription
    lock_time numeric + The lock time for the transaction. If not set, defaults to the last block +height. +
    validator_address string + The address of the validator to withdraw from. +
    account_address string + The address of the account to withdraw to. +
    amount numeric + The withdrawal amount in NanoPAC. Must be greater than 0. +
    fee numeric + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. +
    memo string + A memo string for the transaction. +
    +

    Result

    + + + + + + + + + + + + +
    FieldTypeDescription
    raw_transaction string + The raw transaction data. +
    + ## Blockchain Service

    Blockchain service defines RPC methods for interacting with the blockchain.

    diff --git a/www/grpc/gen/go/transaction.cobra.pb.go b/www/grpc/gen/go/transaction.cobra.pb.go index 6dfa0acca..508b798ec 100644 --- a/www/grpc/gen/go/transaction.cobra.pb.go +++ b/www/grpc/gen/go/transaction.cobra.pb.go @@ -24,6 +24,10 @@ func TransactionClientCommand(options ...client.Option) *cobra.Command { _TransactionCalculateFeeCommand(cfg), _TransactionBroadcastTransactionCommand(cfg), _TransactionGetRawTransactionCommand(cfg), + _TransactionGetRawTransferTransactionCommand(cfg), + _TransactionGetRawBondTransactionCommand(cfg), + _TransactionGetRawUnbondTransactionCommand(cfg), + _TransactionGetRawWithdrawTransactionCommand(cfg), ) return cmd } @@ -196,7 +200,7 @@ func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") - _Transfer := &GetRawTransferTransactionRequest{} + _Transfer := &RawTransfer{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Transfer"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) cmd.PersistentFlags().StringVar(&_Transfer.Sender, cfg.FlagNamer("Transfer Sender"), "", "The sender's account address.") @@ -207,7 +211,7 @@ func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Amount"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) cmd.PersistentFlags().Int64Var(&_Transfer.Fee, cfg.FlagNamer("Transfer Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Fee"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) - _Bond := &GetRawBondTransactionRequest{} + _Bond := &RawBond{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Bond"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) cmd.PersistentFlags().StringVar(&_Bond.Sender, cfg.FlagNamer("Bond Sender"), "", "The sender's account address.") @@ -220,12 +224,12 @@ func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond PublicKey"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) cmd.PersistentFlags().Int64Var(&_Bond.Fee, cfg.FlagNamer("Bond Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Fee"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) - _Unbond := &GetRawUnbondTransactionRequest{} + _Unbond := &RawUnbond{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Unbond"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond"), func() { req.Transaction = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) cmd.PersistentFlags().StringVar(&_Unbond.ValidatorAddress, cfg.FlagNamer("Unbond ValidatorAddress"), "", "The address of the validator to unbond from.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond ValidatorAddress"), func() { req.Transaction = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) - _Withdraw := &GetRawWithdrawTransactionRequest{} + _Withdraw := &RawWithdraw{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Withdraw"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) cmd.PersistentFlags().StringVar(&_Withdraw.ValidatorAddress, cfg.FlagNamer("Withdraw ValidatorAddress"), "", "The address of the validator to withdraw from.") @@ -239,3 +243,189 @@ func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { return cmd } + +func _TransactionGetRawTransferTransactionCommand(cfg *client.Config) *cobra.Command { + req := &GetRawTransferTransactionRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetRawTransferTransaction"), + Short: "GetRawTransferTransaction RPC client", + Long: "Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetRawTransferTransaction"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewTransactionClient(cc) + v := &GetRawTransferTransactionRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetRawTransferTransaction(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") + cmd.PersistentFlags().StringVar(&req.Sender, cfg.FlagNamer("Sender"), "", "The sender's account address.") + cmd.PersistentFlags().StringVar(&req.Receiver, cfg.FlagNamer("Receiver"), "", "The receiver's account address.") + cmd.PersistentFlags().Int64Var(&req.Amount, cfg.FlagNamer("Amount"), 0, "The amount to be transferred, specified in NanoPAC. Must be greater than 0.") + cmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer("Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") + cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") + + return cmd +} + +func _TransactionGetRawBondTransactionCommand(cfg *client.Config) *cobra.Command { + req := &GetRawBondTransactionRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetRawBondTransaction"), + Short: "GetRawBondTransaction RPC client", + Long: "Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetRawBondTransaction"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewTransactionClient(cc) + v := &GetRawBondTransactionRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetRawBondTransaction(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") + cmd.PersistentFlags().StringVar(&req.Sender, cfg.FlagNamer("Sender"), "", "The sender's account address.") + cmd.PersistentFlags().StringVar(&req.Receiver, cfg.FlagNamer("Receiver"), "", "The receiver's validator address.") + cmd.PersistentFlags().Int64Var(&req.Stake, cfg.FlagNamer("Stake"), 0, "The stake amount in NanoPAC. Must be greater than 0.") + cmd.PersistentFlags().StringVar(&req.PublicKey, cfg.FlagNamer("PublicKey"), "", "The public key of the validator.") + cmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer("Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") + cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") + + return cmd +} + +func _TransactionGetRawUnbondTransactionCommand(cfg *client.Config) *cobra.Command { + req := &GetRawUnbondTransactionRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetRawUnbondTransaction"), + Short: "GetRawUnbondTransaction RPC client", + Long: "Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetRawUnbondTransaction"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewTransactionClient(cc) + v := &GetRawUnbondTransactionRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetRawUnbondTransaction(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") + cmd.PersistentFlags().StringVar(&req.ValidatorAddress, cfg.FlagNamer("ValidatorAddress"), "", "The address of the validator to unbond from.") + cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") + + return cmd +} + +func _TransactionGetRawWithdrawTransactionCommand(cfg *client.Config) *cobra.Command { + req := &GetRawWithdrawTransactionRequest{} + + cmd := &cobra.Command{ + Use: cfg.CommandNamer("GetRawWithdrawTransaction"), + Short: "GetRawWithdrawTransaction RPC client", + Long: "Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.", + RunE: func(cmd *cobra.Command, args []string) error { + if cfg.UseEnvVars { + if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { + return err + } + if err := flag.SetFlagsFromEnv(cmd.PersistentFlags(), false, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction", "GetRawWithdrawTransaction"); err != nil { + return err + } + } + return client.RoundTrip(cmd.Context(), cfg, func(cc grpc.ClientConnInterface, in iocodec.Decoder, out iocodec.Encoder) error { + cli := NewTransactionClient(cc) + v := &GetRawWithdrawTransactionRequest{} + + if err := in(v); err != nil { + return err + } + proto.Merge(v, req) + + res, err := cli.GetRawWithdrawTransaction(cmd.Context(), v) + + if err != nil { + return err + } + + return out(res) + + }) + }, + } + + cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") + cmd.PersistentFlags().StringVar(&req.ValidatorAddress, cfg.FlagNamer("ValidatorAddress"), "", "The address of the validator to withdraw from.") + cmd.PersistentFlags().StringVar(&req.AccountAddress, cfg.FlagNamer("AccountAddress"), "", "The address of the account to withdraw to.") + cmd.PersistentFlags().Int64Var(&req.Amount, cfg.FlagNamer("Amount"), 0, "The withdrawal amount in NanoPAC. Must be greater than 0.") + cmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer("Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") + cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") + + return cmd +} diff --git a/www/grpc/gen/go/transaction.pb.go b/www/grpc/gen/go/transaction.pb.go index 700498f15..c56bb4d61 100644 --- a/www/grpc/gen/go/transaction.pb.go +++ b/www/grpc/gen/go/transaction.pb.go @@ -555,28 +555,28 @@ func (m *GetRawTransactionRequest) GetTransaction() isGetRawTransactionRequest_T return nil } -func (x *GetRawTransactionRequest) GetTransfer() *GetRawTransferTransactionRequest { +func (x *GetRawTransactionRequest) GetTransfer() *RawTransfer { if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Transfer); ok { return x.Transfer } return nil } -func (x *GetRawTransactionRequest) GetBond() *GetRawBondTransactionRequest { +func (x *GetRawTransactionRequest) GetBond() *RawBond { if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Bond); ok { return x.Bond } return nil } -func (x *GetRawTransactionRequest) GetUnbond() *GetRawUnbondTransactionRequest { +func (x *GetRawTransactionRequest) GetUnbond() *RawUnbond { if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Unbond); ok { return x.Unbond } return nil } -func (x *GetRawTransactionRequest) GetWithdraw() *GetRawWithdrawTransactionRequest { +func (x *GetRawTransactionRequest) GetWithdraw() *RawWithdraw { if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Withdraw); ok { return x.Withdraw } @@ -588,19 +588,19 @@ type isGetRawTransactionRequest_Transaction interface { } type GetRawTransactionRequest_Transfer struct { - Transfer *GetRawTransferTransactionRequest `protobuf:"bytes,3,opt,name=transfer,proto3,oneof"` + Transfer *RawTransfer `protobuf:"bytes,3,opt,name=transfer,proto3,oneof"` } type GetRawTransactionRequest_Bond struct { - Bond *GetRawBondTransactionRequest `protobuf:"bytes,4,opt,name=bond,proto3,oneof"` + Bond *RawBond `protobuf:"bytes,4,opt,name=bond,proto3,oneof"` } type GetRawTransactionRequest_Unbond struct { - Unbond *GetRawUnbondTransactionRequest `protobuf:"bytes,5,opt,name=unbond,proto3,oneof"` + Unbond *RawUnbond `protobuf:"bytes,5,opt,name=unbond,proto3,oneof"` } type GetRawTransactionRequest_Withdraw struct { - Withdraw *GetRawWithdrawTransactionRequest `protobuf:"bytes,6,opt,name=withdraw,proto3,oneof"` + Withdraw *RawWithdraw `protobuf:"bytes,6,opt,name=withdraw,proto3,oneof"` } func (*GetRawTransactionRequest_Transfer) isGetRawTransactionRequest_Transaction() {} @@ -617,14 +617,19 @@ type GetRawTransferTransactionRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The lock time for the transaction. If not set, defaults to the last block + // height. + LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` // The sender's account address. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` // The receiver's account address. - Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` // The amount to be transferred, specified in NanoPAC. Must be greater than 0. - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` + Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` + // A memo string for the transaction. + Memo string `protobuf:"bytes,6,opt,name=memo,proto3" json:"memo,omitempty"` } func (x *GetRawTransferTransactionRequest) Reset() { @@ -659,6 +664,13 @@ func (*GetRawTransferTransactionRequest) Descriptor() ([]byte, []int) { return file_transaction_proto_rawDescGZIP(), []int{7} } +func (x *GetRawTransferTransactionRequest) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + func (x *GetRawTransferTransactionRequest) GetSender() string { if x != nil { return x.Sender @@ -687,22 +699,34 @@ func (x *GetRawTransferTransactionRequest) GetFee() int64 { return 0 } +func (x *GetRawTransferTransactionRequest) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + // Request message for retrieving raw details of a bond transaction. type GetRawBondTransactionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The lock time for the transaction. If not set, defaults to the last block + // height. + LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` // The sender's account address. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` // The receiver's validator address. - Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` // The stake amount in NanoPAC. Must be greater than 0. - Stake int64 `protobuf:"varint,3,opt,name=stake,proto3" json:"stake,omitempty"` + Stake int64 `protobuf:"varint,4,opt,name=stake,proto3" json:"stake,omitempty"` // The public key of the validator. - PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + PublicKey string `protobuf:"bytes,5,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` + Fee int64 `protobuf:"varint,6,opt,name=fee,proto3" json:"fee,omitempty"` + // A memo string for the transaction. + Memo string `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"` } func (x *GetRawBondTransactionRequest) Reset() { @@ -737,6 +761,13 @@ func (*GetRawBondTransactionRequest) Descriptor() ([]byte, []int) { return file_transaction_proto_rawDescGZIP(), []int{8} } +func (x *GetRawBondTransactionRequest) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + func (x *GetRawBondTransactionRequest) GetSender() string { if x != nil { return x.Sender @@ -772,14 +803,26 @@ func (x *GetRawBondTransactionRequest) GetFee() int64 { return 0 } +func (x *GetRawBondTransactionRequest) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + // Request message for retrieving raw details of an unbond transaction. type GetRawUnbondTransactionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The lock time for the transaction. If not set, defaults to the last block + // height. + LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` // The address of the validator to unbond from. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,3,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // A memo string for the transaction. + Memo string `protobuf:"bytes,4,opt,name=memo,proto3" json:"memo,omitempty"` } func (x *GetRawUnbondTransactionRequest) Reset() { @@ -814,6 +857,13 @@ func (*GetRawUnbondTransactionRequest) Descriptor() ([]byte, []int) { return file_transaction_proto_rawDescGZIP(), []int{9} } +func (x *GetRawUnbondTransactionRequest) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + func (x *GetRawUnbondTransactionRequest) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress @@ -821,20 +871,32 @@ func (x *GetRawUnbondTransactionRequest) GetValidatorAddress() string { return "" } +func (x *GetRawUnbondTransactionRequest) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + // Request message for retrieving raw details of a withdraw transaction. type GetRawWithdrawTransactionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The lock time for the transaction. If not set, defaults to the last block + // height. + LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` // The address of the validator to withdraw from. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` // The address of the account to withdraw to. - AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + AccountAddress string `protobuf:"bytes,3,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // The withdrawal amount in NanoPAC. Must be greater than 0. - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` + Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` + // A memo string for the transaction. + Memo string `protobuf:"bytes,6,opt,name=memo,proto3" json:"memo,omitempty"` } func (x *GetRawWithdrawTransactionRequest) Reset() { @@ -869,6 +931,13 @@ func (*GetRawWithdrawTransactionRequest) Descriptor() ([]byte, []int) { return file_transaction_proto_rawDescGZIP(), []int{10} } +func (x *GetRawWithdrawTransactionRequest) GetLockTime() uint32 { + if x != nil { + return x.LockTime + } + return 0 +} + func (x *GetRawWithdrawTransactionRequest) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress @@ -897,6 +966,299 @@ func (x *GetRawWithdrawTransactionRequest) GetFee() int64 { return 0 } +func (x *GetRawWithdrawTransactionRequest) GetMemo() string { + if x != nil { + return x.Memo + } + return "" +} + +// Request message for retrieving raw details of a transfer transaction. +type RawTransfer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sender's account address. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // The receiver's account address. + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // The amount to be transferred, specified in NanoPAC. Must be greater than 0. + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (x *RawTransfer) Reset() { + *x = RawTransfer{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RawTransfer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawTransfer) ProtoMessage() {} + +func (x *RawTransfer) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[11] + 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 RawTransfer.ProtoReflect.Descriptor instead. +func (*RawTransfer) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{11} +} + +func (x *RawTransfer) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *RawTransfer) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *RawTransfer) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *RawTransfer) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Request message for retrieving raw details of a bond transaction. +type RawBond struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sender's account address. + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + // The receiver's validator address. + Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` + // The stake amount in NanoPAC. Must be greater than 0. + Stake int64 `protobuf:"varint,3,opt,name=stake,proto3" json:"stake,omitempty"` + // The public key of the validator. + PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (x *RawBond) Reset() { + *x = RawBond{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RawBond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawBond) ProtoMessage() {} + +func (x *RawBond) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[12] + 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 RawBond.ProtoReflect.Descriptor instead. +func (*RawBond) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{12} +} + +func (x *RawBond) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *RawBond) GetReceiver() string { + if x != nil { + return x.Receiver + } + return "" +} + +func (x *RawBond) GetStake() int64 { + if x != nil { + return x.Stake + } + return 0 +} + +func (x *RawBond) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *RawBond) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +// Request message for retrieving raw details of an unbond transaction. +type RawUnbond struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the validator to unbond from. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` +} + +func (x *RawUnbond) Reset() { + *x = RawUnbond{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RawUnbond) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawUnbond) ProtoMessage() {} + +func (x *RawUnbond) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[13] + 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 RawUnbond.ProtoReflect.Descriptor instead. +func (*RawUnbond) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{13} +} + +func (x *RawUnbond) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +// Request message for retrieving raw details of a withdraw transaction. +type RawWithdraw struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address of the validator to withdraw from. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // The address of the account to withdraw to. + AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + // The withdrawal amount in NanoPAC. Must be greater than 0. + Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (x *RawWithdraw) Reset() { + *x = RawWithdraw{} + if protoimpl.UnsafeEnabled { + mi := &file_transaction_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RawWithdraw) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RawWithdraw) ProtoMessage() {} + +func (x *RawWithdraw) ProtoReflect() protoreflect.Message { + mi := &file_transaction_proto_msgTypes[14] + 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 RawWithdraw.ProtoReflect.Descriptor instead. +func (*RawWithdraw) Descriptor() ([]byte, []int) { + return file_transaction_proto_rawDescGZIP(), []int{14} +} + +func (x *RawWithdraw) GetValidatorAddress() string { + if x != nil { + return x.ValidatorAddress + } + return "" +} + +func (x *RawWithdraw) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *RawWithdraw) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *RawWithdraw) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + // Response message containing raw transaction data. type GetRawTransactionResponse struct { state protoimpl.MessageState @@ -910,7 +1272,7 @@ type GetRawTransactionResponse struct { func (x *GetRawTransactionResponse) Reset() { *x = GetRawTransactionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[11] + mi := &file_transaction_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -923,7 +1285,7 @@ func (x *GetRawTransactionResponse) String() string { func (*GetRawTransactionResponse) ProtoMessage() {} func (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[11] + mi := &file_transaction_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -936,7 +1298,7 @@ func (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRawTransactionResponse.ProtoReflect.Descriptor instead. func (*GetRawTransactionResponse) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{11} + return file_transaction_proto_rawDescGZIP(), []int{15} } func (x *GetRawTransactionResponse) GetRawTransaction() string { @@ -963,7 +1325,7 @@ type PayloadTransfer struct { func (x *PayloadTransfer) Reset() { *x = PayloadTransfer{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[12] + mi := &file_transaction_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -976,7 +1338,7 @@ func (x *PayloadTransfer) String() string { func (*PayloadTransfer) ProtoMessage() {} func (x *PayloadTransfer) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[12] + mi := &file_transaction_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -989,7 +1351,7 @@ func (x *PayloadTransfer) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadTransfer.ProtoReflect.Descriptor instead. func (*PayloadTransfer) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{12} + return file_transaction_proto_rawDescGZIP(), []int{16} } func (x *PayloadTransfer) GetSender() string { @@ -1030,7 +1392,7 @@ type PayloadBond struct { func (x *PayloadBond) Reset() { *x = PayloadBond{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[13] + mi := &file_transaction_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1043,7 +1405,7 @@ func (x *PayloadBond) String() string { func (*PayloadBond) ProtoMessage() {} func (x *PayloadBond) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[13] + mi := &file_transaction_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1056,7 +1418,7 @@ func (x *PayloadBond) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadBond.ProtoReflect.Descriptor instead. func (*PayloadBond) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{13} + return file_transaction_proto_rawDescGZIP(), []int{17} } func (x *PayloadBond) GetSender() string { @@ -1095,7 +1457,7 @@ type PayloadSortition struct { func (x *PayloadSortition) Reset() { *x = PayloadSortition{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[14] + mi := &file_transaction_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1108,7 +1470,7 @@ func (x *PayloadSortition) String() string { func (*PayloadSortition) ProtoMessage() {} func (x *PayloadSortition) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[14] + mi := &file_transaction_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1121,7 +1483,7 @@ func (x *PayloadSortition) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadSortition.ProtoReflect.Descriptor instead. func (*PayloadSortition) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{14} + return file_transaction_proto_rawDescGZIP(), []int{18} } func (x *PayloadSortition) GetAddress() string { @@ -1151,7 +1513,7 @@ type PayloadUnbond struct { func (x *PayloadUnbond) Reset() { *x = PayloadUnbond{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[15] + mi := &file_transaction_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1164,7 +1526,7 @@ func (x *PayloadUnbond) String() string { func (*PayloadUnbond) ProtoMessage() {} func (x *PayloadUnbond) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[15] + mi := &file_transaction_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1177,7 +1539,7 @@ func (x *PayloadUnbond) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUnbond.ProtoReflect.Descriptor instead. func (*PayloadUnbond) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{15} + return file_transaction_proto_rawDescGZIP(), []int{19} } func (x *PayloadUnbond) GetValidator() string { @@ -1204,7 +1566,7 @@ type PayloadWithdraw struct { func (x *PayloadWithdraw) Reset() { *x = PayloadWithdraw{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[16] + mi := &file_transaction_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1217,7 +1579,7 @@ func (x *PayloadWithdraw) String() string { func (*PayloadWithdraw) ProtoMessage() {} func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[16] + mi := &file_transaction_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1230,7 +1592,7 @@ func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadWithdraw.ProtoReflect.Descriptor instead. func (*PayloadWithdraw) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{16} + return file_transaction_proto_rawDescGZIP(), []int{20} } func (x *PayloadWithdraw) GetFrom() string { @@ -1293,7 +1655,7 @@ type TransactionInfo struct { func (x *TransactionInfo) Reset() { *x = TransactionInfo{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[17] + mi := &file_transaction_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1306,7 +1668,7 @@ func (x *TransactionInfo) String() string { func (*TransactionInfo) ProtoMessage() {} func (x *TransactionInfo) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[17] + mi := &file_transaction_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1319,7 +1681,7 @@ func (x *TransactionInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionInfo.ProtoReflect.Descriptor instead. func (*TransactionInfo) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{17} + return file_transaction_proto_rawDescGZIP(), []int{21} } func (x *TransactionInfo) GetId() string { @@ -1514,166 +1876,227 @@ var file_transaction_proto_rawDesc = []byte{ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x1c, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe8, 0x02, 0x0a, 0x18, 0x47, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x94, 0x02, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x46, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x12, 0x3a, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, + 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x31, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x04, 0x62, + 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, + 0x6e, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x52, 0x61, 0x77, 0x55, + 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, + 0x31, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x52, 0x61, 0x77, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0xb1, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0xca, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, + 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, + 0x6d, 0x6f, 0x22, 0x7e, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x40, 0x0a, 0x06, - 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x46, - 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x80, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, - 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x03, 0x66, 0x65, 0x65, 0x22, 0x4d, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, + 0x6d, 0x6f, 0x22, 0xd3, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x6b, 0x0a, 0x0b, 0x52, 0x61, 0x77, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, + 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x07, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x38, 0x0a, 0x09, + 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x0b, 0x52, 0x61, 0x77, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0xa2, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, + 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, + 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x0f, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x57, 0x0a, 0x0b, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x22, 0x42, 0x0a, 0x10, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4d, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, + 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, + 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, - 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, - 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x57, 0x0a, - 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x42, 0x0a, 0x10, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4d, 0x0a, 0x0f, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, - 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, - 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xac, 0x04, 0x0a, 0x0f, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, - 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, - 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, - 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x29, - 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, - 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x6f, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x21, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, - 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6d, - 0x65, 0x6d, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, - 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x83, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, - 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x4f, - 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, - 0x53, 0x4f, 0x52, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, - 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, - 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x48, 0x44, - 0x52, 0x41, 0x57, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x2a, 0x42, 0x0a, - 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x62, - 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, - 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, - 0x01, 0x32, 0xe6, 0x02, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, - 0x65, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, - 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, - 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, - 0x14, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xac, 0x04, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, + 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, + 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, + 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x36, 0x0a, + 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x04, + 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x48, + 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, + 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x22, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, + 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, + 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x83, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, + 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x4f, 0x4e, 0x44, + 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x4f, + 0x52, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, + 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, + 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, + 0x57, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x2a, 0x42, 0x0a, 0x14, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x62, 0x6f, 0x73, + 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x32, + 0x82, 0x06, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, + 0x12, 0x49, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, + 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, + 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, + 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x42, + 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, + 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, + 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x60, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, + 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, + 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x26, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, + 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x46, 0x0a, 0x12, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, + 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, + 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x46, 0x0a, 0x12, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, + 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1689,7 +2112,7 @@ func file_transaction_proto_rawDescGZIP() []byte { } var file_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_transaction_proto_goTypes = []any{ (PayloadType)(0), // 0: pactus.PayloadType (TransactionVerbosity)(0), // 1: pactus.TransactionVerbosity @@ -1704,38 +2127,50 @@ var file_transaction_proto_goTypes = []any{ (*GetRawBondTransactionRequest)(nil), // 10: pactus.GetRawBondTransactionRequest (*GetRawUnbondTransactionRequest)(nil), // 11: pactus.GetRawUnbondTransactionRequest (*GetRawWithdrawTransactionRequest)(nil), // 12: pactus.GetRawWithdrawTransactionRequest - (*GetRawTransactionResponse)(nil), // 13: pactus.GetRawTransactionResponse - (*PayloadTransfer)(nil), // 14: pactus.PayloadTransfer - (*PayloadBond)(nil), // 15: pactus.PayloadBond - (*PayloadSortition)(nil), // 16: pactus.PayloadSortition - (*PayloadUnbond)(nil), // 17: pactus.PayloadUnbond - (*PayloadWithdraw)(nil), // 18: pactus.PayloadWithdraw - (*TransactionInfo)(nil), // 19: pactus.TransactionInfo + (*RawTransfer)(nil), // 13: pactus.RawTransfer + (*RawBond)(nil), // 14: pactus.RawBond + (*RawUnbond)(nil), // 15: pactus.RawUnbond + (*RawWithdraw)(nil), // 16: pactus.RawWithdraw + (*GetRawTransactionResponse)(nil), // 17: pactus.GetRawTransactionResponse + (*PayloadTransfer)(nil), // 18: pactus.PayloadTransfer + (*PayloadBond)(nil), // 19: pactus.PayloadBond + (*PayloadSortition)(nil), // 20: pactus.PayloadSortition + (*PayloadUnbond)(nil), // 21: pactus.PayloadUnbond + (*PayloadWithdraw)(nil), // 22: pactus.PayloadWithdraw + (*TransactionInfo)(nil), // 23: pactus.TransactionInfo } var file_transaction_proto_depIdxs = []int32{ 1, // 0: pactus.GetTransactionRequest.verbosity:type_name -> pactus.TransactionVerbosity - 19, // 1: pactus.GetTransactionResponse.transaction:type_name -> pactus.TransactionInfo + 23, // 1: pactus.GetTransactionResponse.transaction:type_name -> pactus.TransactionInfo 0, // 2: pactus.CalculateFeeRequest.payload_type:type_name -> pactus.PayloadType - 9, // 3: pactus.GetRawTransactionRequest.transfer:type_name -> pactus.GetRawTransferTransactionRequest - 10, // 4: pactus.GetRawTransactionRequest.bond:type_name -> pactus.GetRawBondTransactionRequest - 11, // 5: pactus.GetRawTransactionRequest.unbond:type_name -> pactus.GetRawUnbondTransactionRequest - 12, // 6: pactus.GetRawTransactionRequest.withdraw:type_name -> pactus.GetRawWithdrawTransactionRequest + 13, // 3: pactus.GetRawTransactionRequest.transfer:type_name -> pactus.RawTransfer + 14, // 4: pactus.GetRawTransactionRequest.bond:type_name -> pactus.RawBond + 15, // 5: pactus.GetRawTransactionRequest.unbond:type_name -> pactus.RawUnbond + 16, // 6: pactus.GetRawTransactionRequest.withdraw:type_name -> pactus.RawWithdraw 0, // 7: pactus.TransactionInfo.payload_type:type_name -> pactus.PayloadType - 14, // 8: pactus.TransactionInfo.transfer:type_name -> pactus.PayloadTransfer - 15, // 9: pactus.TransactionInfo.bond:type_name -> pactus.PayloadBond - 16, // 10: pactus.TransactionInfo.sortition:type_name -> pactus.PayloadSortition - 17, // 11: pactus.TransactionInfo.unbond:type_name -> pactus.PayloadUnbond - 18, // 12: pactus.TransactionInfo.withdraw:type_name -> pactus.PayloadWithdraw + 18, // 8: pactus.TransactionInfo.transfer:type_name -> pactus.PayloadTransfer + 19, // 9: pactus.TransactionInfo.bond:type_name -> pactus.PayloadBond + 20, // 10: pactus.TransactionInfo.sortition:type_name -> pactus.PayloadSortition + 21, // 11: pactus.TransactionInfo.unbond:type_name -> pactus.PayloadUnbond + 22, // 12: pactus.TransactionInfo.withdraw:type_name -> pactus.PayloadWithdraw 2, // 13: pactus.Transaction.GetTransaction:input_type -> pactus.GetTransactionRequest 4, // 14: pactus.Transaction.CalculateFee:input_type -> pactus.CalculateFeeRequest 6, // 15: pactus.Transaction.BroadcastTransaction:input_type -> pactus.BroadcastTransactionRequest 8, // 16: pactus.Transaction.GetRawTransaction:input_type -> pactus.GetRawTransactionRequest - 3, // 17: pactus.Transaction.GetTransaction:output_type -> pactus.GetTransactionResponse - 5, // 18: pactus.Transaction.CalculateFee:output_type -> pactus.CalculateFeeResponse - 7, // 19: pactus.Transaction.BroadcastTransaction:output_type -> pactus.BroadcastTransactionResponse - 13, // 20: pactus.Transaction.GetRawTransaction:output_type -> pactus.GetRawTransactionResponse - 17, // [17:21] is the sub-list for method output_type - 13, // [13:17] is the sub-list for method input_type + 9, // 17: pactus.Transaction.GetRawTransferTransaction:input_type -> pactus.GetRawTransferTransactionRequest + 10, // 18: pactus.Transaction.GetRawBondTransaction:input_type -> pactus.GetRawBondTransactionRequest + 11, // 19: pactus.Transaction.GetRawUnbondTransaction:input_type -> pactus.GetRawUnbondTransactionRequest + 12, // 20: pactus.Transaction.GetRawWithdrawTransaction:input_type -> pactus.GetRawWithdrawTransactionRequest + 3, // 21: pactus.Transaction.GetTransaction:output_type -> pactus.GetTransactionResponse + 5, // 22: pactus.Transaction.CalculateFee:output_type -> pactus.CalculateFeeResponse + 7, // 23: pactus.Transaction.BroadcastTransaction:output_type -> pactus.BroadcastTransactionResponse + 17, // 24: pactus.Transaction.GetRawTransaction:output_type -> pactus.GetRawTransactionResponse + 17, // 25: pactus.Transaction.GetRawTransferTransaction:output_type -> pactus.GetRawTransactionResponse + 17, // 26: pactus.Transaction.GetRawBondTransaction:output_type -> pactus.GetRawTransactionResponse + 17, // 27: pactus.Transaction.GetRawUnbondTransaction:output_type -> pactus.GetRawTransactionResponse + 17, // 28: pactus.Transaction.GetRawWithdrawTransaction:output_type -> pactus.GetRawTransactionResponse + 21, // [21:29] is the sub-list for method output_type + 13, // [13:21] is the sub-list for method input_type 13, // [13:13] is the sub-list for extension type_name 13, // [13:13] is the sub-list for extension extendee 0, // [0:13] is the sub-list for field type_name @@ -1880,7 +2315,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*GetRawTransactionResponse); i { + switch v := v.(*RawTransfer); i { case 0: return &v.state case 1: @@ -1892,7 +2327,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*PayloadTransfer); i { + switch v := v.(*RawBond); i { case 0: return &v.state case 1: @@ -1904,7 +2339,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*PayloadBond); i { + switch v := v.(*RawUnbond); i { case 0: return &v.state case 1: @@ -1916,7 +2351,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*PayloadSortition); i { + switch v := v.(*RawWithdraw); i { case 0: return &v.state case 1: @@ -1928,7 +2363,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*PayloadUnbond); i { + switch v := v.(*GetRawTransactionResponse); i { case 0: return &v.state case 1: @@ -1940,7 +2375,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*PayloadWithdraw); i { + switch v := v.(*PayloadTransfer); i { case 0: return &v.state case 1: @@ -1952,6 +2387,54 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[17].Exporter = func(v any, i int) any { + switch v := v.(*PayloadBond); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[18].Exporter = func(v any, i int) any { + switch v := v.(*PayloadSortition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[19].Exporter = func(v any, i int) any { + switch v := v.(*PayloadUnbond); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[20].Exporter = func(v any, i int) any { + switch v := v.(*PayloadWithdraw); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_transaction_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*TransactionInfo); i { case 0: return &v.state @@ -1970,7 +2453,7 @@ func file_transaction_proto_init() { (*GetRawTransactionRequest_Unbond)(nil), (*GetRawTransactionRequest_Withdraw)(nil), } - file_transaction_proto_msgTypes[17].OneofWrappers = []any{ + file_transaction_proto_msgTypes[21].OneofWrappers = []any{ (*TransactionInfo_Transfer)(nil), (*TransactionInfo_Bond)(nil), (*TransactionInfo_Sortition)(nil), @@ -1983,7 +2466,7 @@ func file_transaction_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_transaction_proto_rawDesc, NumEnums: 2, - NumMessages: 18, + NumMessages: 22, NumExtensions: 0, NumServices: 1, }, diff --git a/www/grpc/gen/go/transaction.pb.gw.go b/www/grpc/gen/go/transaction.pb.gw.go index f865d4dc0..4c977039f 100644 --- a/www/grpc/gen/go/transaction.pb.gw.go +++ b/www/grpc/gen/go/transaction.pb.gw.go @@ -175,6 +175,150 @@ func local_request_Transaction_GetRawTransaction_0(ctx context.Context, marshale } +var ( + filter_Transaction_GetRawTransferTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Transaction_GetRawTransferTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRawTransferTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawTransferTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetRawTransferTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Transaction_GetRawTransferTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRawTransferTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawTransferTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetRawTransferTransaction(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Transaction_GetRawBondTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Transaction_GetRawBondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRawBondTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawBondTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetRawBondTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Transaction_GetRawBondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRawBondTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawBondTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetRawBondTransaction(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Transaction_GetRawUnbondTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Transaction_GetRawUnbondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRawUnbondTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawUnbondTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetRawUnbondTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Transaction_GetRawUnbondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRawUnbondTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawUnbondTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetRawUnbondTransaction(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Transaction_GetRawWithdrawTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Transaction_GetRawWithdrawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRawWithdrawTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawWithdrawTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetRawWithdrawTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Transaction_GetRawWithdrawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetRawWithdrawTransactionRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawWithdrawTransaction_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetRawWithdrawTransaction(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterTransactionHandlerServer registers the http handlers for service Transaction to "mux". // UnaryRPC :call TransactionServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -281,6 +425,106 @@ func RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_Transaction_GetRawTransferTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawTransferTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_transfer_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Transaction_GetRawTransferTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetRawTransferTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Transaction_GetRawBondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawBondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_bond_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Transaction_GetRawBondTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetRawBondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Transaction_GetRawUnbondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawUnbondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_unbond_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Transaction_GetRawUnbondTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetRawUnbondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Transaction_GetRawWithdrawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawWithdrawTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_withdraw_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Transaction_GetRawWithdrawTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetRawWithdrawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -410,6 +654,94 @@ func RegisterTransactionHandlerClient(ctx context.Context, mux *runtime.ServeMux }) + mux.Handle("GET", pattern_Transaction_GetRawTransferTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawTransferTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_transfer_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Transaction_GetRawTransferTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetRawTransferTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Transaction_GetRawBondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawBondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_bond_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Transaction_GetRawBondTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetRawBondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Transaction_GetRawUnbondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawUnbondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_unbond_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Transaction_GetRawUnbondTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetRawUnbondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Transaction_GetRawWithdrawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawWithdrawTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_withdraw_transaction")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Transaction_GetRawWithdrawTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Transaction_GetRawWithdrawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -421,6 +753,14 @@ var ( pattern_Transaction_BroadcastTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "broadcast_transaction"}, "")) pattern_Transaction_GetRawTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_transaction"}, "")) + + pattern_Transaction_GetRawTransferTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_transfer_transaction"}, "")) + + pattern_Transaction_GetRawBondTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_bond_transaction"}, "")) + + pattern_Transaction_GetRawUnbondTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_unbond_transaction"}, "")) + + pattern_Transaction_GetRawWithdrawTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_withdraw_transaction"}, "")) ) var ( @@ -431,4 +771,12 @@ var ( forward_Transaction_BroadcastTransaction_0 = runtime.ForwardResponseMessage forward_Transaction_GetRawTransaction_0 = runtime.ForwardResponseMessage + + forward_Transaction_GetRawTransferTransaction_0 = runtime.ForwardResponseMessage + + forward_Transaction_GetRawBondTransaction_0 = runtime.ForwardResponseMessage + + forward_Transaction_GetRawUnbondTransaction_0 = runtime.ForwardResponseMessage + + forward_Transaction_GetRawWithdrawTransaction_0 = runtime.ForwardResponseMessage ) diff --git a/www/grpc/gen/go/transaction_grpc.pb.go b/www/grpc/gen/go/transaction_grpc.pb.go index dc04eec2c..4ac99e86f 100644 --- a/www/grpc/gen/go/transaction_grpc.pb.go +++ b/www/grpc/gen/go/transaction_grpc.pb.go @@ -19,10 +19,14 @@ import ( const _ = grpc.SupportPackageIsVersion8 const ( - Transaction_GetTransaction_FullMethodName = "/pactus.Transaction/GetTransaction" - Transaction_CalculateFee_FullMethodName = "/pactus.Transaction/CalculateFee" - Transaction_BroadcastTransaction_FullMethodName = "/pactus.Transaction/BroadcastTransaction" - Transaction_GetRawTransaction_FullMethodName = "/pactus.Transaction/GetRawTransaction" + Transaction_GetTransaction_FullMethodName = "/pactus.Transaction/GetTransaction" + Transaction_CalculateFee_FullMethodName = "/pactus.Transaction/CalculateFee" + Transaction_BroadcastTransaction_FullMethodName = "/pactus.Transaction/BroadcastTransaction" + Transaction_GetRawTransaction_FullMethodName = "/pactus.Transaction/GetRawTransaction" + Transaction_GetRawTransferTransaction_FullMethodName = "/pactus.Transaction/GetRawTransferTransaction" + Transaction_GetRawBondTransaction_FullMethodName = "/pactus.Transaction/GetRawBondTransaction" + Transaction_GetRawUnbondTransaction_FullMethodName = "/pactus.Transaction/GetRawUnbondTransaction" + Transaction_GetRawWithdrawTransaction_FullMethodName = "/pactus.Transaction/GetRawWithdrawTransaction" ) // TransactionClient is the client API for Transaction service. @@ -42,6 +46,14 @@ type TransactionClient interface { BroadcastTransaction(ctx context.Context, in *BroadcastTransactionRequest, opts ...grpc.CallOption) (*BroadcastTransactionResponse, error) // GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. GetRawTransaction(ctx context.Context, in *GetRawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) + // Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + GetRawTransferTransaction(ctx context.Context, in *GetRawTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) + // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + GetRawBondTransaction(ctx context.Context, in *GetRawBondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) + // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + GetRawUnbondTransaction(ctx context.Context, in *GetRawUnbondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) + // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + GetRawWithdrawTransaction(ctx context.Context, in *GetRawWithdrawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) } type transactionClient struct { @@ -92,6 +104,46 @@ func (c *transactionClient) GetRawTransaction(ctx context.Context, in *GetRawTra return out, nil } +func (c *transactionClient) GetRawTransferTransaction(ctx context.Context, in *GetRawTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRawTransactionResponse) + err := c.cc.Invoke(ctx, Transaction_GetRawTransferTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) GetRawBondTransaction(ctx context.Context, in *GetRawBondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRawTransactionResponse) + err := c.cc.Invoke(ctx, Transaction_GetRawBondTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) GetRawUnbondTransaction(ctx context.Context, in *GetRawUnbondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRawTransactionResponse) + err := c.cc.Invoke(ctx, Transaction_GetRawUnbondTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *transactionClient) GetRawWithdrawTransaction(ctx context.Context, in *GetRawWithdrawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetRawTransactionResponse) + err := c.cc.Invoke(ctx, Transaction_GetRawWithdrawTransaction_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // TransactionServer is the server API for Transaction service. // All implementations should embed UnimplementedTransactionServer // for forward compatibility @@ -109,6 +161,14 @@ type TransactionServer interface { BroadcastTransaction(context.Context, *BroadcastTransactionRequest) (*BroadcastTransactionResponse, error) // GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. GetRawTransaction(context.Context, *GetRawTransactionRequest) (*GetRawTransactionResponse, error) + // Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + GetRawTransferTransaction(context.Context, *GetRawTransferTransactionRequest) (*GetRawTransactionResponse, error) + // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + GetRawBondTransaction(context.Context, *GetRawBondTransactionRequest) (*GetRawTransactionResponse, error) + // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + GetRawUnbondTransaction(context.Context, *GetRawUnbondTransactionRequest) (*GetRawTransactionResponse, error) + // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error) } // UnimplementedTransactionServer should be embedded to have forward compatible implementations. @@ -127,6 +187,18 @@ func (UnimplementedTransactionServer) BroadcastTransaction(context.Context, *Bro func (UnimplementedTransactionServer) GetRawTransaction(context.Context, *GetRawTransactionRequest) (*GetRawTransactionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRawTransaction not implemented") } +func (UnimplementedTransactionServer) GetRawTransferTransaction(context.Context, *GetRawTransferTransactionRequest) (*GetRawTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawTransferTransaction not implemented") +} +func (UnimplementedTransactionServer) GetRawBondTransaction(context.Context, *GetRawBondTransactionRequest) (*GetRawTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawBondTransaction not implemented") +} +func (UnimplementedTransactionServer) GetRawUnbondTransaction(context.Context, *GetRawUnbondTransactionRequest) (*GetRawTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawUnbondTransaction not implemented") +} +func (UnimplementedTransactionServer) GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawWithdrawTransaction not implemented") +} // UnsafeTransactionServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to TransactionServer will @@ -211,6 +283,78 @@ func _Transaction_GetRawTransaction_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _Transaction_GetRawTransferTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRawTransferTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).GetRawTransferTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Transaction_GetRawTransferTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).GetRawTransferTransaction(ctx, req.(*GetRawTransferTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_GetRawBondTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRawBondTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).GetRawBondTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Transaction_GetRawBondTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).GetRawBondTransaction(ctx, req.(*GetRawBondTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_GetRawUnbondTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRawUnbondTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).GetRawUnbondTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Transaction_GetRawUnbondTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).GetRawUnbondTransaction(ctx, req.(*GetRawUnbondTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Transaction_GetRawWithdrawTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetRawWithdrawTransactionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TransactionServer).GetRawWithdrawTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Transaction_GetRawWithdrawTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TransactionServer).GetRawWithdrawTransaction(ctx, req.(*GetRawWithdrawTransactionRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Transaction_ServiceDesc is the grpc.ServiceDesc for Transaction service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -234,6 +378,22 @@ var Transaction_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetRawTransaction", Handler: _Transaction_GetRawTransaction_Handler, }, + { + MethodName: "GetRawTransferTransaction", + Handler: _Transaction_GetRawTransferTransaction_Handler, + }, + { + MethodName: "GetRawBondTransaction", + Handler: _Transaction_GetRawBondTransaction_Handler, + }, + { + MethodName: "GetRawUnbondTransaction", + Handler: _Transaction_GetRawUnbondTransaction_Handler, + }, + { + MethodName: "GetRawWithdrawTransaction", + Handler: _Transaction_GetRawWithdrawTransaction_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "transaction.proto", diff --git a/www/grpc/gen/go/transaction_jgw.pb.go b/www/grpc/gen/go/transaction_jgw.pb.go index c4e6134cf..9982429ab 100644 --- a/www/grpc/gen/go/transaction_jgw.pb.go +++ b/www/grpc/gen/go/transaction_jgw.pb.go @@ -104,5 +104,73 @@ func (s *TransactionJsonRPC) Methods() map[string]func(ctx context.Context, mess return s.client.GetRawTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) }, + + "pactus.transaction.get_raw_transfer_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetRawTransferTransactionRequest) + + var jrpcData paramsAndHeadersTransaction + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetRawTransferTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.transaction.get_raw_bond_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetRawBondTransactionRequest) + + var jrpcData paramsAndHeadersTransaction + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetRawBondTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.transaction.get_raw_unbond_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetRawUnbondTransactionRequest) + + var jrpcData paramsAndHeadersTransaction + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetRawUnbondTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, + + "pactus.transaction.get_raw_withdraw_transaction": func(ctx context.Context, data json.RawMessage) (any, error) { + req := new(GetRawWithdrawTransactionRequest) + + var jrpcData paramsAndHeadersTransaction + + if err := json.Unmarshal(data, &jrpcData); err != nil { + return nil, err + } + + err := protojson.Unmarshal(jrpcData.Params, req) + if err != nil { + return nil, err + } + + return s.client.GetRawWithdrawTransaction(metadata.NewOutgoingContext(ctx, jrpcData.Headers), req) + }, } } diff --git a/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java b/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java index 4c1630cd2..c387d196b 100644 --- a/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java +++ b/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java @@ -143,6 +143,130 @@ pactus.transaction.TransactionOuterClass.GetRawTransactionResponse> getGetRawTra return getGetRawTransactionMethod; } + private static volatile io.grpc.MethodDescriptor getGetRawTransferTransactionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRawTransferTransaction", + requestType = pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.class, + responseType = pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetRawTransferTransactionMethod() { + io.grpc.MethodDescriptor getGetRawTransferTransactionMethod; + if ((getGetRawTransferTransactionMethod = TransactionGrpc.getGetRawTransferTransactionMethod) == null) { + synchronized (TransactionGrpc.class) { + if ((getGetRawTransferTransactionMethod = TransactionGrpc.getGetRawTransferTransactionMethod) == null) { + TransactionGrpc.getGetRawTransferTransactionMethod = getGetRawTransferTransactionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRawTransferTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetRawTransferTransaction")) + .build(); + } + } + } + return getGetRawTransferTransactionMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetRawBondTransactionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRawBondTransaction", + requestType = pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.class, + responseType = pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetRawBondTransactionMethod() { + io.grpc.MethodDescriptor getGetRawBondTransactionMethod; + if ((getGetRawBondTransactionMethod = TransactionGrpc.getGetRawBondTransactionMethod) == null) { + synchronized (TransactionGrpc.class) { + if ((getGetRawBondTransactionMethod = TransactionGrpc.getGetRawBondTransactionMethod) == null) { + TransactionGrpc.getGetRawBondTransactionMethod = getGetRawBondTransactionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRawBondTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetRawBondTransaction")) + .build(); + } + } + } + return getGetRawBondTransactionMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetRawUnbondTransactionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRawUnbondTransaction", + requestType = pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.class, + responseType = pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetRawUnbondTransactionMethod() { + io.grpc.MethodDescriptor getGetRawUnbondTransactionMethod; + if ((getGetRawUnbondTransactionMethod = TransactionGrpc.getGetRawUnbondTransactionMethod) == null) { + synchronized (TransactionGrpc.class) { + if ((getGetRawUnbondTransactionMethod = TransactionGrpc.getGetRawUnbondTransactionMethod) == null) { + TransactionGrpc.getGetRawUnbondTransactionMethod = getGetRawUnbondTransactionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRawUnbondTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetRawUnbondTransaction")) + .build(); + } + } + } + return getGetRawUnbondTransactionMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetRawWithdrawTransactionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetRawWithdrawTransaction", + requestType = pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, + responseType = pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetRawWithdrawTransactionMethod() { + io.grpc.MethodDescriptor getGetRawWithdrawTransactionMethod; + if ((getGetRawWithdrawTransactionMethod = TransactionGrpc.getGetRawWithdrawTransactionMethod) == null) { + synchronized (TransactionGrpc.class) { + if ((getGetRawWithdrawTransactionMethod = TransactionGrpc.getGetRawWithdrawTransactionMethod) == null) { + TransactionGrpc.getGetRawWithdrawTransactionMethod = getGetRawWithdrawTransactionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetRawWithdrawTransaction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.getDefaultInstance())) + .setSchemaDescriptor(new TransactionMethodDescriptorSupplier("GetRawWithdrawTransaction")) + .build(); + } + } + } + return getGetRawWithdrawTransactionMethod; + } + /** * Creates a new async stub that supports all call types for the service */ @@ -237,6 +361,46 @@ public void getRawTransaction(pactus.transaction.TransactionOuterClass.GetRawTra io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawTransactionMethod(), responseObserver); } + /** + *
    +     * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
    +     * 
    + */ + public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawTransferTransactionMethod(), responseObserver); + } + + /** + *
    +     * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
    +     * 
    + */ + public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawBondTransactionMethod(), responseObserver); + } + + /** + *
    +     * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
    +     * 
    + */ + public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawUnbondTransactionMethod(), responseObserver); + } + + /** + *
    +     * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
    +     * 
    + */ + public void getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRawWithdrawTransactionMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( @@ -267,6 +431,34 @@ public void getRawTransaction(pactus.transaction.TransactionOuterClass.GetRawTra pactus.transaction.TransactionOuterClass.GetRawTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawTransactionResponse>( this, METHODID_GET_RAW_TRANSACTION))) + .addMethod( + getGetRawTransferTransactionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest, + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse>( + this, METHODID_GET_RAW_TRANSFER_TRANSACTION))) + .addMethod( + getGetRawBondTransactionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest, + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse>( + this, METHODID_GET_RAW_BOND_TRANSACTION))) + .addMethod( + getGetRawUnbondTransactionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest, + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse>( + this, METHODID_GET_RAW_UNBOND_TRANSACTION))) + .addMethod( + getGetRawWithdrawTransactionMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest, + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse>( + this, METHODID_GET_RAW_WITHDRAW_TRANSACTION))) .build(); } } @@ -334,6 +526,50 @@ public void getRawTransaction(pactus.transaction.TransactionOuterClass.GetRawTra io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetRawTransactionMethod(), getCallOptions()), request, responseObserver); } + + /** + *
    +     * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
    +     * 
    + */ + public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRawTransferTransactionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
    +     * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
    +     * 
    + */ + public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRawBondTransactionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
    +     * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
    +     * 
    + */ + public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRawUnbondTransactionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
    +     * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
    +     * 
    + */ + public void getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRawWithdrawTransactionMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -395,6 +631,46 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRaw return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetRawTransactionMethod(), getCallOptions(), request); } + + /** + *
    +     * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
    +     * 
    + */ + public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRawTransferTransactionMethod(), getCallOptions(), request); + } + + /** + *
    +     * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
    +     * 
    + */ + public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRawBondTransactionMethod(), getCallOptions(), request); + } + + /** + *
    +     * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
    +     * 
    + */ + public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRawUnbondTransactionMethod(), getCallOptions(), request); + } + + /** + *
    +     * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
    +     * 
    + */ + public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRawWithdrawTransactionMethod(), getCallOptions(), request); + } } /** @@ -460,12 +736,60 @@ public com.google.common.util.concurrent.ListenableFuture + * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + * + */ + public com.google.common.util.concurrent.ListenableFuture getRawTransferTransaction( + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRawTransferTransactionMethod(), getCallOptions()), request); + } + + /** + *
    +     * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture getRawBondTransaction( + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRawBondTransactionMethod(), getCallOptions()), request); + } + + /** + *
    +     * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture getRawUnbondTransaction( + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRawUnbondTransactionMethod(), getCallOptions()), request); + } + + /** + *
    +     * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
    +     * 
    + */ + public com.google.common.util.concurrent.ListenableFuture getRawWithdrawTransaction( + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRawWithdrawTransactionMethod(), getCallOptions()), request); + } } private static final int METHODID_GET_TRANSACTION = 0; private static final int METHODID_CALCULATE_FEE = 1; private static final int METHODID_BROADCAST_TRANSACTION = 2; private static final int METHODID_GET_RAW_TRANSACTION = 3; + private static final int METHODID_GET_RAW_TRANSFER_TRANSACTION = 4; + private static final int METHODID_GET_RAW_BOND_TRANSACTION = 5; + private static final int METHODID_GET_RAW_UNBOND_TRANSACTION = 6; + private static final int METHODID_GET_RAW_WITHDRAW_TRANSACTION = 7; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -500,6 +824,22 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.getRawTransaction((pactus.transaction.TransactionOuterClass.GetRawTransactionRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_RAW_TRANSFER_TRANSACTION: + serviceImpl.getRawTransferTransaction((pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RAW_BOND_TRANSACTION: + serviceImpl.getRawBondTransaction((pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RAW_UNBOND_TRANSACTION: + serviceImpl.getRawUnbondTransaction((pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RAW_WITHDRAW_TRANSACTION: + serviceImpl.getRawWithdrawTransaction((pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -565,6 +905,10 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCalculateFeeMethod()) .addMethod(getBroadcastTransactionMethod()) .addMethod(getGetRawTransactionMethod()) + .addMethod(getGetRawTransferTransactionMethod()) + .addMethod(getGetRawBondTransactionMethod()) + .addMethod(getGetRawUnbondTransactionMethod()) + .addMethod(getGetRawWithdrawTransactionMethod()) .build(); } } diff --git a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java index f805db30b..146cbb105 100644 --- a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java +++ b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java @@ -4462,64 +4462,64 @@ public interface GetRawTransactionRequestOrBuilder extends getMemoBytes(); /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; * @return Whether the transfer field is set. */ boolean hasTransfer(); /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; * @return The transfer. */ - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getTransfer(); + pactus.transaction.TransactionOuterClass.RawTransfer getTransfer(); /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; */ - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder getTransferOrBuilder(); + pactus.transaction.TransactionOuterClass.RawTransferOrBuilder getTransferOrBuilder(); /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; * @return Whether the bond field is set. */ boolean hasBond(); /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; * @return The bond. */ - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getBond(); + pactus.transaction.TransactionOuterClass.RawBond getBond(); /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; */ - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder getBondOrBuilder(); + pactus.transaction.TransactionOuterClass.RawBondOrBuilder getBondOrBuilder(); /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; * @return Whether the unbond field is set. */ boolean hasUnbond(); /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; * @return The unbond. */ - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getUnbond(); + pactus.transaction.TransactionOuterClass.RawUnbond getUnbond(); /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; */ - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder getUnbondOrBuilder(); + pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder getUnbondOrBuilder(); /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; * @return Whether the withdraw field is set. */ boolean hasWithdraw(); /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; * @return The withdraw. */ - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getWithdraw(); + pactus.transaction.TransactionOuterClass.RawWithdraw getWithdraw(); /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; */ - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder getWithdrawOrBuilder(); + pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder getWithdrawOrBuilder(); public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.TransactionCase getTransactionCase(); } @@ -4677,7 +4677,7 @@ public java.lang.String getMemo() { public static final int TRANSFER_FIELD_NUMBER = 3; /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; * @return Whether the transfer field is set. */ @java.lang.Override @@ -4685,30 +4685,30 @@ public boolean hasTransfer() { return transactionCase_ == 3; } /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; * @return The transfer. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getTransfer() { + public pactus.transaction.TransactionOuterClass.RawTransfer getTransfer() { if (transactionCase_ == 3) { - return (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance(); } /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder getTransferOrBuilder() { + public pactus.transaction.TransactionOuterClass.RawTransferOrBuilder getTransferOrBuilder() { if (transactionCase_ == 3) { - return (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance(); } public static final int BOND_FIELD_NUMBER = 4; /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; * @return Whether the bond field is set. */ @java.lang.Override @@ -4716,30 +4716,30 @@ public boolean hasBond() { return transactionCase_ == 4; } /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; * @return The bond. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getBond() { + public pactus.transaction.TransactionOuterClass.RawBond getBond() { if (transactionCase_ == 4) { - return (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawBond) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance(); } /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder getBondOrBuilder() { + public pactus.transaction.TransactionOuterClass.RawBondOrBuilder getBondOrBuilder() { if (transactionCase_ == 4) { - return (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawBond) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance(); } public static final int UNBOND_FIELD_NUMBER = 5; /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; * @return Whether the unbond field is set. */ @java.lang.Override @@ -4747,30 +4747,30 @@ public boolean hasUnbond() { return transactionCase_ == 5; } /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; * @return The unbond. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getUnbond() { + public pactus.transaction.TransactionOuterClass.RawUnbond getUnbond() { if (transactionCase_ == 5) { - return (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance(); } /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder getUnbondOrBuilder() { + public pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder getUnbondOrBuilder() { if (transactionCase_ == 5) { - return (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance(); } public static final int WITHDRAW_FIELD_NUMBER = 6; /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; * @return Whether the withdraw field is set. */ @java.lang.Override @@ -4778,25 +4778,25 @@ public boolean hasWithdraw() { return transactionCase_ == 6; } /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; * @return The withdraw. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getWithdraw() { + public pactus.transaction.TransactionOuterClass.RawWithdraw getWithdraw() { if (transactionCase_ == 6) { - return (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance(); } /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder getWithdrawOrBuilder() { + public pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder getWithdrawOrBuilder() { if (transactionCase_ == 6) { - return (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -4820,16 +4820,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) com.google.protobuf.GeneratedMessageV3.writeString(output, 2, memo_); } if (transactionCase_ == 3) { - output.writeMessage(3, (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_); + output.writeMessage(3, (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_); } if (transactionCase_ == 4) { - output.writeMessage(4, (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_); + output.writeMessage(4, (pactus.transaction.TransactionOuterClass.RawBond) transaction_); } if (transactionCase_ == 5) { - output.writeMessage(5, (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_); + output.writeMessage(5, (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_); } if (transactionCase_ == 6) { - output.writeMessage(6, (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_); + output.writeMessage(6, (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_); } getUnknownFields().writeTo(output); } @@ -4849,19 +4849,19 @@ public int getSerializedSize() { } if (transactionCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_); + .computeMessageSize(3, (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_); } if (transactionCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_); + .computeMessageSize(4, (pactus.transaction.TransactionOuterClass.RawBond) transaction_); } if (transactionCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_); + .computeMessageSize(5, (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_); } if (transactionCase_ == 6) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_); + .computeMessageSize(6, (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -5459,9 +5459,9 @@ public Builder setMemoBytes( } private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder> transferBuilder_; + pactus.transaction.TransactionOuterClass.RawTransfer, pactus.transaction.TransactionOuterClass.RawTransfer.Builder, pactus.transaction.TransactionOuterClass.RawTransferOrBuilder> transferBuilder_; /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; * @return Whether the transfer field is set. */ @java.lang.Override @@ -5469,27 +5469,27 @@ public boolean hasTransfer() { return transactionCase_ == 3; } /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; * @return The transfer. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getTransfer() { + public pactus.transaction.TransactionOuterClass.RawTransfer getTransfer() { if (transferBuilder_ == null) { if (transactionCase_ == 3) { - return (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance(); } else { if (transactionCase_ == 3) { return transferBuilder_.getMessage(); } - return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance(); } } /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; */ - public Builder setTransfer(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest value) { + public Builder setTransfer(pactus.transaction.TransactionOuterClass.RawTransfer value) { if (transferBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5503,10 +5503,10 @@ public Builder setTransfer(pactus.transaction.TransactionOuterClass.GetRawTransf return this; } /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; */ public Builder setTransfer( - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder builderForValue) { + pactus.transaction.TransactionOuterClass.RawTransfer.Builder builderForValue) { if (transferBuilder_ == null) { transaction_ = builderForValue.build(); onChanged(); @@ -5517,13 +5517,13 @@ public Builder setTransfer( return this; } /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; */ - public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest value) { + public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.RawTransfer value) { if (transferBuilder_ == null) { if (transactionCase_ == 3 && - transaction_ != pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance()) { - transaction_ = pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.newBuilder((pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_) + transaction_ != pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance()) { + transaction_ = pactus.transaction.TransactionOuterClass.RawTransfer.newBuilder((pactus.transaction.TransactionOuterClass.RawTransfer) transaction_) .mergeFrom(value).buildPartial(); } else { transaction_ = value; @@ -5540,7 +5540,7 @@ public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.GetRawTran return this; } /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; */ public Builder clearTransfer() { if (transferBuilder_ == null) { @@ -5559,38 +5559,38 @@ public Builder clearTransfer() { return this; } /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; */ - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder getTransferBuilder() { + public pactus.transaction.TransactionOuterClass.RawTransfer.Builder getTransferBuilder() { return getTransferFieldBuilder().getBuilder(); } /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder getTransferOrBuilder() { + public pactus.transaction.TransactionOuterClass.RawTransferOrBuilder getTransferOrBuilder() { if ((transactionCase_ == 3) && (transferBuilder_ != null)) { return transferBuilder_.getMessageOrBuilder(); } else { if (transactionCase_ == 3) { - return (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance(); } } /** - * .pactus.GetRawTransferTransactionRequest transfer = 3 [json_name = "transfer"]; + * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; */ private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder> + pactus.transaction.TransactionOuterClass.RawTransfer, pactus.transaction.TransactionOuterClass.RawTransfer.Builder, pactus.transaction.TransactionOuterClass.RawTransferOrBuilder> getTransferFieldBuilder() { if (transferBuilder_ == null) { if (!(transactionCase_ == 3)) { - transaction_ = pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + transaction_ = pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance(); } transferBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder>( - (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) transaction_, + pactus.transaction.TransactionOuterClass.RawTransfer, pactus.transaction.TransactionOuterClass.RawTransfer.Builder, pactus.transaction.TransactionOuterClass.RawTransferOrBuilder>( + (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_, getParentForChildren(), isClean()); transaction_ = null; @@ -5601,9 +5601,9 @@ public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest } private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder> bondBuilder_; + pactus.transaction.TransactionOuterClass.RawBond, pactus.transaction.TransactionOuterClass.RawBond.Builder, pactus.transaction.TransactionOuterClass.RawBondOrBuilder> bondBuilder_; /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; * @return Whether the bond field is set. */ @java.lang.Override @@ -5611,27 +5611,27 @@ public boolean hasBond() { return transactionCase_ == 4; } /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; * @return The bond. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getBond() { + public pactus.transaction.TransactionOuterClass.RawBond getBond() { if (bondBuilder_ == null) { if (transactionCase_ == 4) { - return (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawBond) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance(); } else { if (transactionCase_ == 4) { return bondBuilder_.getMessage(); } - return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance(); } } /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; */ - public Builder setBond(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest value) { + public Builder setBond(pactus.transaction.TransactionOuterClass.RawBond value) { if (bondBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5645,10 +5645,10 @@ public Builder setBond(pactus.transaction.TransactionOuterClass.GetRawBondTransa return this; } /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; */ public Builder setBond( - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder builderForValue) { + pactus.transaction.TransactionOuterClass.RawBond.Builder builderForValue) { if (bondBuilder_ == null) { transaction_ = builderForValue.build(); onChanged(); @@ -5659,13 +5659,13 @@ public Builder setBond( return this; } /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; */ - public Builder mergeBond(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest value) { + public Builder mergeBond(pactus.transaction.TransactionOuterClass.RawBond value) { if (bondBuilder_ == null) { if (transactionCase_ == 4 && - transaction_ != pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance()) { - transaction_ = pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.newBuilder((pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_) + transaction_ != pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance()) { + transaction_ = pactus.transaction.TransactionOuterClass.RawBond.newBuilder((pactus.transaction.TransactionOuterClass.RawBond) transaction_) .mergeFrom(value).buildPartial(); } else { transaction_ = value; @@ -5682,7 +5682,7 @@ public Builder mergeBond(pactus.transaction.TransactionOuterClass.GetRawBondTran return this; } /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; */ public Builder clearBond() { if (bondBuilder_ == null) { @@ -5701,38 +5701,38 @@ public Builder clearBond() { return this; } /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; */ - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder getBondBuilder() { + public pactus.transaction.TransactionOuterClass.RawBond.Builder getBondBuilder() { return getBondFieldBuilder().getBuilder(); } /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder getBondOrBuilder() { + public pactus.transaction.TransactionOuterClass.RawBondOrBuilder getBondOrBuilder() { if ((transactionCase_ == 4) && (bondBuilder_ != null)) { return bondBuilder_.getMessageOrBuilder(); } else { if (transactionCase_ == 4) { - return (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawBond) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance(); } } /** - * .pactus.GetRawBondTransactionRequest bond = 4 [json_name = "bond"]; + * .pactus.RawBond bond = 4 [json_name = "bond"]; */ private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder> + pactus.transaction.TransactionOuterClass.RawBond, pactus.transaction.TransactionOuterClass.RawBond.Builder, pactus.transaction.TransactionOuterClass.RawBondOrBuilder> getBondFieldBuilder() { if (bondBuilder_ == null) { if (!(transactionCase_ == 4)) { - transaction_ = pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + transaction_ = pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance(); } bondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder>( - (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) transaction_, + pactus.transaction.TransactionOuterClass.RawBond, pactus.transaction.TransactionOuterClass.RawBond.Builder, pactus.transaction.TransactionOuterClass.RawBondOrBuilder>( + (pactus.transaction.TransactionOuterClass.RawBond) transaction_, getParentForChildren(), isClean()); transaction_ = null; @@ -5743,9 +5743,9 @@ public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBu } private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder> unbondBuilder_; + pactus.transaction.TransactionOuterClass.RawUnbond, pactus.transaction.TransactionOuterClass.RawUnbond.Builder, pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder> unbondBuilder_; /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; * @return Whether the unbond field is set. */ @java.lang.Override @@ -5753,27 +5753,27 @@ public boolean hasUnbond() { return transactionCase_ == 5; } /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; * @return The unbond. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getUnbond() { + public pactus.transaction.TransactionOuterClass.RawUnbond getUnbond() { if (unbondBuilder_ == null) { if (transactionCase_ == 5) { - return (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance(); } else { if (transactionCase_ == 5) { return unbondBuilder_.getMessage(); } - return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance(); } } /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; */ - public Builder setUnbond(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest value) { + public Builder setUnbond(pactus.transaction.TransactionOuterClass.RawUnbond value) { if (unbondBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5787,10 +5787,10 @@ public Builder setUnbond(pactus.transaction.TransactionOuterClass.GetRawUnbondTr return this; } /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; */ public Builder setUnbond( - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder builderForValue) { + pactus.transaction.TransactionOuterClass.RawUnbond.Builder builderForValue) { if (unbondBuilder_ == null) { transaction_ = builderForValue.build(); onChanged(); @@ -5801,13 +5801,13 @@ public Builder setUnbond( return this; } /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; */ - public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest value) { + public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.RawUnbond value) { if (unbondBuilder_ == null) { if (transactionCase_ == 5 && - transaction_ != pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance()) { - transaction_ = pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.newBuilder((pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_) + transaction_ != pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance()) { + transaction_ = pactus.transaction.TransactionOuterClass.RawUnbond.newBuilder((pactus.transaction.TransactionOuterClass.RawUnbond) transaction_) .mergeFrom(value).buildPartial(); } else { transaction_ = value; @@ -5824,7 +5824,7 @@ public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.GetRawUnbond return this; } /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; */ public Builder clearUnbond() { if (unbondBuilder_ == null) { @@ -5843,38 +5843,38 @@ public Builder clearUnbond() { return this; } /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; */ - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder getUnbondBuilder() { + public pactus.transaction.TransactionOuterClass.RawUnbond.Builder getUnbondBuilder() { return getUnbondFieldBuilder().getBuilder(); } /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder getUnbondOrBuilder() { + public pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder getUnbondOrBuilder() { if ((transactionCase_ == 5) && (unbondBuilder_ != null)) { return unbondBuilder_.getMessageOrBuilder(); } else { if (transactionCase_ == 5) { - return (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance(); } } /** - * .pactus.GetRawUnbondTransactionRequest unbond = 5 [json_name = "unbond"]; + * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; */ private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder> + pactus.transaction.TransactionOuterClass.RawUnbond, pactus.transaction.TransactionOuterClass.RawUnbond.Builder, pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder> getUnbondFieldBuilder() { if (unbondBuilder_ == null) { if (!(transactionCase_ == 5)) { - transaction_ = pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + transaction_ = pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance(); } unbondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder>( - (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) transaction_, + pactus.transaction.TransactionOuterClass.RawUnbond, pactus.transaction.TransactionOuterClass.RawUnbond.Builder, pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder>( + (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_, getParentForChildren(), isClean()); transaction_ = null; @@ -5885,9 +5885,9 @@ public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOr } private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder> withdrawBuilder_; + pactus.transaction.TransactionOuterClass.RawWithdraw, pactus.transaction.TransactionOuterClass.RawWithdraw.Builder, pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder> withdrawBuilder_; /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; * @return Whether the withdraw field is set. */ @java.lang.Override @@ -5895,27 +5895,27 @@ public boolean hasWithdraw() { return transactionCase_ == 6; } /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; * @return The withdraw. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getWithdraw() { + public pactus.transaction.TransactionOuterClass.RawWithdraw getWithdraw() { if (withdrawBuilder_ == null) { if (transactionCase_ == 6) { - return (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance(); } else { if (transactionCase_ == 6) { return withdrawBuilder_.getMessage(); } - return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance(); } } /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; */ - public Builder setWithdraw(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest value) { + public Builder setWithdraw(pactus.transaction.TransactionOuterClass.RawWithdraw value) { if (withdrawBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5929,10 +5929,10 @@ public Builder setWithdraw(pactus.transaction.TransactionOuterClass.GetRawWithdr return this; } /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; */ public Builder setWithdraw( - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder builderForValue) { + pactus.transaction.TransactionOuterClass.RawWithdraw.Builder builderForValue) { if (withdrawBuilder_ == null) { transaction_ = builderForValue.build(); onChanged(); @@ -5943,13 +5943,13 @@ public Builder setWithdraw( return this; } /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; */ - public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest value) { + public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.RawWithdraw value) { if (withdrawBuilder_ == null) { if (transactionCase_ == 6 && - transaction_ != pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance()) { - transaction_ = pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.newBuilder((pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_) + transaction_ != pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance()) { + transaction_ = pactus.transaction.TransactionOuterClass.RawWithdraw.newBuilder((pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_) .mergeFrom(value).buildPartial(); } else { transaction_ = value; @@ -5966,7 +5966,7 @@ public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.GetRawWith return this; } /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; */ public Builder clearWithdraw() { if (withdrawBuilder_ == null) { @@ -5985,38 +5985,38 @@ public Builder clearWithdraw() { return this; } /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; */ - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder getWithdrawBuilder() { + public pactus.transaction.TransactionOuterClass.RawWithdraw.Builder getWithdrawBuilder() { return getWithdrawFieldBuilder().getBuilder(); } /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder getWithdrawOrBuilder() { + public pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder getWithdrawOrBuilder() { if ((transactionCase_ == 6) && (withdrawBuilder_ != null)) { return withdrawBuilder_.getMessageOrBuilder(); } else { if (transactionCase_ == 6) { - return (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_; + return (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_; } - return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance(); } } /** - * .pactus.GetRawWithdrawTransactionRequest withdraw = 6 [json_name = "withdraw"]; + * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; */ private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder> + pactus.transaction.TransactionOuterClass.RawWithdraw, pactus.transaction.TransactionOuterClass.RawWithdraw.Builder, pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder> getWithdrawFieldBuilder() { if (withdrawBuilder_ == null) { if (!(transactionCase_ == 6)) { - transaction_ = pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + transaction_ = pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance(); } withdrawBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder>( - (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) transaction_, + pactus.transaction.TransactionOuterClass.RawWithdraw, pactus.transaction.TransactionOuterClass.RawWithdraw.Builder, pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder>( + (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_, getParentForChildren(), isClean()); transaction_ = null; @@ -6093,6 +6093,4784 @@ public interface GetRawTransferTransactionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:pactus.GetRawTransferTransactionRequest) com.google.protobuf.MessageOrBuilder { + /** + *
    +     * The lock time for the transaction. If not set, defaults to the last block
    +     * height.
    +     * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + int getLockTime(); + + /** + *
    +     * The sender's account address.
    +     * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The sender. + */ + java.lang.String getSender(); + /** + *
    +     * The sender's account address.
    +     * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The bytes for sender. + */ + com.google.protobuf.ByteString + getSenderBytes(); + + /** + *
    +     * The receiver's account address.
    +     * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The receiver. + */ + java.lang.String getReceiver(); + /** + *
    +     * The receiver's account address.
    +     * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + com.google.protobuf.ByteString + getReceiverBytes(); + + /** + *
    +     * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
    +     * 
    + * + * int64 amount = 4 [json_name = "amount"]; + * @return The amount. + */ + long getAmount(); + + /** + *
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); + + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The memo. + */ + java.lang.String getMemo(); + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The bytes for memo. + */ + com.google.protobuf.ByteString + getMemoBytes(); + } + /** + *
    +   * Request message for retrieving raw details of a transfer transaction.
    +   * 
    + * + * Protobuf type {@code pactus.GetRawTransferTransactionRequest} + */ + public static final class GetRawTransferTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetRawTransferTransactionRequest) + GetRawTransferTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRawTransferTransactionRequest.newBuilder() to construct. + private GetRawTransferTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRawTransferTransactionRequest() { + sender_ = ""; + receiver_ = ""; + memo_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRawTransferTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder.class); + } + + public static final int LOCK_TIME_FIELD_NUMBER = 1; + private int lockTime_; + /** + *
    +     * The lock time for the transaction. If not set, defaults to the last block
    +     * height.
    +     * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + + public static final int SENDER_FIELD_NUMBER = 2; + private volatile java.lang.Object sender_; + /** + *
    +     * The sender's account address.
    +     * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The sender. + */ + @java.lang.Override + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } + } + /** + *
    +     * The sender's account address.
    +     * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The bytes for sender. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECEIVER_FIELD_NUMBER = 3; + private volatile java.lang.Object receiver_; + /** + *
    +     * The receiver's account address.
    +     * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The receiver. + */ + @java.lang.Override + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } + } + /** + *
    +     * The receiver's account address.
    +     * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AMOUNT_FIELD_NUMBER = 4; + private long amount_; + /** + *
    +     * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
    +     * 
    + * + * int64 amount = 4 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + + public static final int FEE_FIELD_NUMBER = 5; + private long fee_; + /** + *
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + + public static final int MEMO_FIELD_NUMBER = 6; + private volatile java.lang.Object memo_; + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The memo. + */ + @java.lang.Override + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } + } + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The bytes for memo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (lockTime_ != 0) { + output.writeUInt32(1, lockTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, receiver_); + } + if (amount_ != 0L) { + output.writeInt64(4, amount_); + } + if (fee_ != 0L) { + output.writeInt64(5, fee_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, memo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lockTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, lockTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, receiver_); + } + if (amount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, amount_); + } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, fee_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, memo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) obj; + + if (getLockTime() + != other.getLockTime()) return false; + if (!getSender() + .equals(other.getSender())) return false; + if (!getReceiver() + .equals(other.getReceiver())) return false; + if (getAmount() + != other.getAmount()) return false; + if (getFee() + != other.getFee()) return false; + if (!getMemo() + .equals(other.getMemo())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLockTime(); + hash = (37 * hash) + SENDER_FIELD_NUMBER; + hash = (53 * hash) + getSender().hashCode(); + hash = (37 * hash) + RECEIVER_FIELD_NUMBER; + hash = (53 * hash) + getReceiver().hashCode(); + hash = (37 * hash) + AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAmount()); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); + hash = (37 * hash) + MEMO_FIELD_NUMBER; + hash = (53 * hash) + getMemo().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
    +     * Request message for retrieving raw details of a transfer transaction.
    +     * 
    + * + * Protobuf type {@code pactus.GetRawTransferTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetRawTransferTransactionRequest) + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + lockTime_ = 0; + + sender_ = ""; + + receiver_ = ""; + + amount_ = 0L; + + fee_ = 0L; + + memo_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest build() { + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest(this); + result.lockTime_ = lockTime_; + result.sender_ = sender_; + result.receiver_ = receiver_; + result.amount_ = amount_; + result.fee_ = fee_; + result.memo_ = memo_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance()) return this; + if (other.getLockTime() != 0) { + setLockTime(other.getLockTime()); + } + if (!other.getSender().isEmpty()) { + sender_ = other.sender_; + onChanged(); + } + if (!other.getReceiver().isEmpty()) { + receiver_ = other.receiver_; + onChanged(); + } + if (other.getAmount() != 0L) { + setAmount(other.getAmount()); + } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } + if (!other.getMemo().isEmpty()) { + memo_ = other.memo_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + lockTime_ = input.readUInt32(); + + break; + } // case 8 + case 18: { + sender_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + receiver_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: { + amount_ = input.readInt64(); + + break; + } // case 32 + case 40: { + fee_ = input.readInt64(); + + break; + } // case 40 + case 50: { + memo_ = input.readStringRequireUtf8(); + + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int lockTime_ ; + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @param value The lockTime to set. + * @return This builder for chaining. + */ + public Builder setLockTime(int value) { + + lockTime_ = value; + onChanged(); + return this; + } + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return This builder for chaining. + */ + public Builder clearLockTime() { + + lockTime_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sender_ = ""; + /** + *
    +       * The sender's account address.
    +       * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The sender. + */ + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * The sender's account address.
    +       * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The bytes for sender. + */ + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * The sender's account address.
    +       * 
    + * + * string sender = 2 [json_name = "sender"]; + * @param value The sender to set. + * @return This builder for chaining. + */ + public Builder setSender( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sender_ = value; + onChanged(); + return this; + } + /** + *
    +       * The sender's account address.
    +       * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return This builder for chaining. + */ + public Builder clearSender() { + + sender_ = getDefaultInstance().getSender(); + onChanged(); + return this; + } + /** + *
    +       * The sender's account address.
    +       * 
    + * + * string sender = 2 [json_name = "sender"]; + * @param value The bytes for sender to set. + * @return This builder for chaining. + */ + public Builder setSenderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sender_ = value; + onChanged(); + return this; + } + + private java.lang.Object receiver_ = ""; + /** + *
    +       * The receiver's account address.
    +       * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The receiver. + */ + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * The receiver's account address.
    +       * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * The receiver's account address.
    +       * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @param value The receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiver( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + receiver_ = value; + onChanged(); + return this; + } + /** + *
    +       * The receiver's account address.
    +       * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return This builder for chaining. + */ + public Builder clearReceiver() { + + receiver_ = getDefaultInstance().getReceiver(); + onChanged(); + return this; + } + /** + *
    +       * The receiver's account address.
    +       * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @param value The bytes for receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiverBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + receiver_ = value; + onChanged(); + return this; + } + + private long amount_ ; + /** + *
    +       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
    +       * 
    + * + * int64 amount = 4 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + /** + *
    +       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
    +       * 
    + * + * int64 amount = 4 [json_name = "amount"]; + * @param value The amount to set. + * @return This builder for chaining. + */ + public Builder setAmount(long value) { + + amount_ = value; + onChanged(); + return this; + } + /** + *
    +       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
    +       * 
    + * + * int64 amount = 4 [json_name = "amount"]; + * @return This builder for chaining. + */ + public Builder clearAmount() { + + amount_ = 0L; + onChanged(); + return this; + } + + private long fee_ ; + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object memo_ = ""; + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The memo. + */ + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The bytes for memo. + */ + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 6 [json_name = "memo"]; + * @param value The memo to set. + * @return This builder for chaining. + */ + public Builder setMemo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memo_ = value; + onChanged(); + return this; + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return This builder for chaining. + */ + public Builder clearMemo() { + + memo_ = getDefaultInstance().getMemo(); + onChanged(); + return this; + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 6 [json_name = "memo"]; + * @param value The bytes for memo to set. + * @return This builder for chaining. + */ + public Builder setMemoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memo_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetRawTransferTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetRawTransferTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRawTransferTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetRawBondTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetRawBondTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
    +     * The lock time for the transaction. If not set, defaults to the last block
    +     * height.
    +     * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + int getLockTime(); + + /** + *
    +     * The sender's account address.
    +     * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The sender. + */ + java.lang.String getSender(); + /** + *
    +     * The sender's account address.
    +     * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The bytes for sender. + */ + com.google.protobuf.ByteString + getSenderBytes(); + + /** + *
    +     * The receiver's validator address.
    +     * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The receiver. + */ + java.lang.String getReceiver(); + /** + *
    +     * The receiver's validator address.
    +     * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + com.google.protobuf.ByteString + getReceiverBytes(); + + /** + *
    +     * The stake amount in NanoPAC. Must be greater than 0.
    +     * 
    + * + * int64 stake = 4 [json_name = "stake"]; + * @return The stake. + */ + long getStake(); + + /** + *
    +     * The public key of the validator.
    +     * 
    + * + * string public_key = 5 [json_name = "publicKey"]; + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + *
    +     * The public key of the validator.
    +     * 
    + * + * string public_key = 5 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString + getPublicKeyBytes(); + + /** + *
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 6 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); + + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 7 [json_name = "memo"]; + * @return The memo. + */ + java.lang.String getMemo(); + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 7 [json_name = "memo"]; + * @return The bytes for memo. + */ + com.google.protobuf.ByteString + getMemoBytes(); + } + /** + *
    +   * Request message for retrieving raw details of a bond transaction.
    +   * 
    + * + * Protobuf type {@code pactus.GetRawBondTransactionRequest} + */ + public static final class GetRawBondTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetRawBondTransactionRequest) + GetRawBondTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRawBondTransactionRequest.newBuilder() to construct. + private GetRawBondTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRawBondTransactionRequest() { + sender_ = ""; + receiver_ = ""; + publicKey_ = ""; + memo_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRawBondTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder.class); + } + + public static final int LOCK_TIME_FIELD_NUMBER = 1; + private int lockTime_; + /** + *
    +     * The lock time for the transaction. If not set, defaults to the last block
    +     * height.
    +     * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + + public static final int SENDER_FIELD_NUMBER = 2; + private volatile java.lang.Object sender_; + /** + *
    +     * The sender's account address.
    +     * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The sender. + */ + @java.lang.Override + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } + } + /** + *
    +     * The sender's account address.
    +     * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The bytes for sender. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECEIVER_FIELD_NUMBER = 3; + private volatile java.lang.Object receiver_; + /** + *
    +     * The receiver's validator address.
    +     * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The receiver. + */ + @java.lang.Override + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } + } + /** + *
    +     * The receiver's validator address.
    +     * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STAKE_FIELD_NUMBER = 4; + private long stake_; + /** + *
    +     * The stake amount in NanoPAC. Must be greater than 0.
    +     * 
    + * + * int64 stake = 4 [json_name = "stake"]; + * @return The stake. + */ + @java.lang.Override + public long getStake() { + return stake_; + } + + public static final int PUBLIC_KEY_FIELD_NUMBER = 5; + private volatile java.lang.Object publicKey_; + /** + *
    +     * The public key of the validator.
    +     * 
    + * + * string public_key = 5 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + *
    +     * The public key of the validator.
    +     * 
    + * + * string public_key = 5 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEE_FIELD_NUMBER = 6; + private long fee_; + /** + *
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 6 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + + public static final int MEMO_FIELD_NUMBER = 7; + private volatile java.lang.Object memo_; + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 7 [json_name = "memo"]; + * @return The memo. + */ + @java.lang.Override + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } + } + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 7 [json_name = "memo"]; + * @return The bytes for memo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (lockTime_ != 0) { + output.writeUInt32(1, lockTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, receiver_); + } + if (stake_ != 0L) { + output.writeInt64(4, stake_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, publicKey_); + } + if (fee_ != 0L) { + output.writeInt64(6, fee_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, memo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lockTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, lockTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, receiver_); + } + if (stake_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, stake_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, publicKey_); + } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, fee_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, memo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) obj; + + if (getLockTime() + != other.getLockTime()) return false; + if (!getSender() + .equals(other.getSender())) return false; + if (!getReceiver() + .equals(other.getReceiver())) return false; + if (getStake() + != other.getStake()) return false; + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (getFee() + != other.getFee()) return false; + if (!getMemo() + .equals(other.getMemo())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLockTime(); + hash = (37 * hash) + SENDER_FIELD_NUMBER; + hash = (53 * hash) + getSender().hashCode(); + hash = (37 * hash) + RECEIVER_FIELD_NUMBER; + hash = (53 * hash) + getReceiver().hashCode(); + hash = (37 * hash) + STAKE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStake()); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); + hash = (37 * hash) + MEMO_FIELD_NUMBER; + hash = (53 * hash) + getMemo().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
    +     * Request message for retrieving raw details of a bond transaction.
    +     * 
    + * + * Protobuf type {@code pactus.GetRawBondTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetRawBondTransactionRequest) + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + lockTime_ = 0; + + sender_ = ""; + + receiver_ = ""; + + stake_ = 0L; + + publicKey_ = ""; + + fee_ = 0L; + + memo_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest build() { + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest(this); + result.lockTime_ = lockTime_; + result.sender_ = sender_; + result.receiver_ = receiver_; + result.stake_ = stake_; + result.publicKey_ = publicKey_; + result.fee_ = fee_; + result.memo_ = memo_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance()) return this; + if (other.getLockTime() != 0) { + setLockTime(other.getLockTime()); + } + if (!other.getSender().isEmpty()) { + sender_ = other.sender_; + onChanged(); + } + if (!other.getReceiver().isEmpty()) { + receiver_ = other.receiver_; + onChanged(); + } + if (other.getStake() != 0L) { + setStake(other.getStake()); + } + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } + if (!other.getMemo().isEmpty()) { + memo_ = other.memo_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + lockTime_ = input.readUInt32(); + + break; + } // case 8 + case 18: { + sender_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + receiver_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: { + stake_ = input.readInt64(); + + break; + } // case 32 + case 42: { + publicKey_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: { + fee_ = input.readInt64(); + + break; + } // case 48 + case 58: { + memo_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int lockTime_ ; + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @param value The lockTime to set. + * @return This builder for chaining. + */ + public Builder setLockTime(int value) { + + lockTime_ = value; + onChanged(); + return this; + } + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return This builder for chaining. + */ + public Builder clearLockTime() { + + lockTime_ = 0; + onChanged(); + return this; + } + + private java.lang.Object sender_ = ""; + /** + *
    +       * The sender's account address.
    +       * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The sender. + */ + public java.lang.String getSender() { + java.lang.Object ref = sender_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sender_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * The sender's account address.
    +       * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return The bytes for sender. + */ + public com.google.protobuf.ByteString + getSenderBytes() { + java.lang.Object ref = sender_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * The sender's account address.
    +       * 
    + * + * string sender = 2 [json_name = "sender"]; + * @param value The sender to set. + * @return This builder for chaining. + */ + public Builder setSender( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sender_ = value; + onChanged(); + return this; + } + /** + *
    +       * The sender's account address.
    +       * 
    + * + * string sender = 2 [json_name = "sender"]; + * @return This builder for chaining. + */ + public Builder clearSender() { + + sender_ = getDefaultInstance().getSender(); + onChanged(); + return this; + } + /** + *
    +       * The sender's account address.
    +       * 
    + * + * string sender = 2 [json_name = "sender"]; + * @param value The bytes for sender to set. + * @return This builder for chaining. + */ + public Builder setSenderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sender_ = value; + onChanged(); + return this; + } + + private java.lang.Object receiver_ = ""; + /** + *
    +       * The receiver's validator address.
    +       * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The receiver. + */ + public java.lang.String getReceiver() { + java.lang.Object ref = receiver_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + receiver_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * The receiver's validator address.
    +       * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return The bytes for receiver. + */ + public com.google.protobuf.ByteString + getReceiverBytes() { + java.lang.Object ref = receiver_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + receiver_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * The receiver's validator address.
    +       * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @param value The receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiver( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + receiver_ = value; + onChanged(); + return this; + } + /** + *
    +       * The receiver's validator address.
    +       * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @return This builder for chaining. + */ + public Builder clearReceiver() { + + receiver_ = getDefaultInstance().getReceiver(); + onChanged(); + return this; + } + /** + *
    +       * The receiver's validator address.
    +       * 
    + * + * string receiver = 3 [json_name = "receiver"]; + * @param value The bytes for receiver to set. + * @return This builder for chaining. + */ + public Builder setReceiverBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + receiver_ = value; + onChanged(); + return this; + } + + private long stake_ ; + /** + *
    +       * The stake amount in NanoPAC. Must be greater than 0.
    +       * 
    + * + * int64 stake = 4 [json_name = "stake"]; + * @return The stake. + */ + @java.lang.Override + public long getStake() { + return stake_; + } + /** + *
    +       * The stake amount in NanoPAC. Must be greater than 0.
    +       * 
    + * + * int64 stake = 4 [json_name = "stake"]; + * @param value The stake to set. + * @return This builder for chaining. + */ + public Builder setStake(long value) { + + stake_ = value; + onChanged(); + return this; + } + /** + *
    +       * The stake amount in NanoPAC. Must be greater than 0.
    +       * 
    + * + * int64 stake = 4 [json_name = "stake"]; + * @return This builder for chaining. + */ + public Builder clearStake() { + + stake_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object publicKey_ = ""; + /** + *
    +       * The public key of the validator.
    +       * 
    + * + * string public_key = 5 [json_name = "publicKey"]; + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * The public key of the validator.
    +       * 
    + * + * string public_key = 5 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * The public key of the validator.
    +       * 
    + * + * string public_key = 5 [json_name = "publicKey"]; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + *
    +       * The public key of the validator.
    +       * 
    + * + * string public_key = 5 [json_name = "publicKey"]; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + /** + *
    +       * The public key of the validator.
    +       * 
    + * + * string public_key = 5 [json_name = "publicKey"]; + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKey_ = value; + onChanged(); + return this; + } + + private long fee_ ; + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 6 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 6 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 6 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object memo_ = ""; + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 7 [json_name = "memo"]; + * @return The memo. + */ + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 7 [json_name = "memo"]; + * @return The bytes for memo. + */ + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 7 [json_name = "memo"]; + * @param value The memo to set. + * @return This builder for chaining. + */ + public Builder setMemo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memo_ = value; + onChanged(); + return this; + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 7 [json_name = "memo"]; + * @return This builder for chaining. + */ + public Builder clearMemo() { + + memo_ = getDefaultInstance().getMemo(); + onChanged(); + return this; + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 7 [json_name = "memo"]; + * @param value The bytes for memo to set. + * @return This builder for chaining. + */ + public Builder setMemoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memo_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetRawBondTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetRawBondTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRawBondTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetRawUnbondTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetRawUnbondTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
    +     * The lock time for the transaction. If not set, defaults to the last block
    +     * height.
    +     * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + int getLockTime(); + + /** + *
    +     * The address of the validator to unbond from.
    +     * 
    + * + * string validator_address = 3 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + java.lang.String getValidatorAddress(); + /** + *
    +     * The address of the validator to unbond from.
    +     * 
    + * + * string validator_address = 3 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + com.google.protobuf.ByteString + getValidatorAddressBytes(); + + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 4 [json_name = "memo"]; + * @return The memo. + */ + java.lang.String getMemo(); + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 4 [json_name = "memo"]; + * @return The bytes for memo. + */ + com.google.protobuf.ByteString + getMemoBytes(); + } + /** + *
    +   * Request message for retrieving raw details of an unbond transaction.
    +   * 
    + * + * Protobuf type {@code pactus.GetRawUnbondTransactionRequest} + */ + public static final class GetRawUnbondTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetRawUnbondTransactionRequest) + GetRawUnbondTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRawUnbondTransactionRequest.newBuilder() to construct. + private GetRawUnbondTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRawUnbondTransactionRequest() { + validatorAddress_ = ""; + memo_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRawUnbondTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder.class); + } + + public static final int LOCK_TIME_FIELD_NUMBER = 1; + private int lockTime_; + /** + *
    +     * The lock time for the transaction. If not set, defaults to the last block
    +     * height.
    +     * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + + public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 3; + private volatile java.lang.Object validatorAddress_; + /** + *
    +     * The address of the validator to unbond from.
    +     * 
    + * + * string validator_address = 3 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + @java.lang.Override + public java.lang.String getValidatorAddress() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validatorAddress_ = s; + return s; + } + } + /** + *
    +     * The address of the validator to unbond from.
    +     * 
    + * + * string validator_address = 3 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValidatorAddressBytes() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validatorAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEMO_FIELD_NUMBER = 4; + private volatile java.lang.Object memo_; + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 4 [json_name = "memo"]; + * @return The memo. + */ + @java.lang.Override + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } + } + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 4 [json_name = "memo"]; + * @return The bytes for memo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (lockTime_ != 0) { + output.writeUInt32(1, lockTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, validatorAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, memo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lockTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, lockTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, validatorAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, memo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) obj; + + if (getLockTime() + != other.getLockTime()) return false; + if (!getValidatorAddress() + .equals(other.getValidatorAddress())) return false; + if (!getMemo() + .equals(other.getMemo())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLockTime(); + hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getValidatorAddress().hashCode(); + hash = (37 * hash) + MEMO_FIELD_NUMBER; + hash = (53 * hash) + getMemo().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
    +     * Request message for retrieving raw details of an unbond transaction.
    +     * 
    + * + * Protobuf type {@code pactus.GetRawUnbondTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetRawUnbondTransactionRequest) + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + lockTime_ = 0; + + validatorAddress_ = ""; + + memo_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest build() { + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest(this); + result.lockTime_ = lockTime_; + result.validatorAddress_ = validatorAddress_; + result.memo_ = memo_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance()) return this; + if (other.getLockTime() != 0) { + setLockTime(other.getLockTime()); + } + if (!other.getValidatorAddress().isEmpty()) { + validatorAddress_ = other.validatorAddress_; + onChanged(); + } + if (!other.getMemo().isEmpty()) { + memo_ = other.memo_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + lockTime_ = input.readUInt32(); + + break; + } // case 8 + case 26: { + validatorAddress_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + memo_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int lockTime_ ; + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @param value The lockTime to set. + * @return This builder for chaining. + */ + public Builder setLockTime(int value) { + + lockTime_ = value; + onChanged(); + return this; + } + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return This builder for chaining. + */ + public Builder clearLockTime() { + + lockTime_ = 0; + onChanged(); + return this; + } + + private java.lang.Object validatorAddress_ = ""; + /** + *
    +       * The address of the validator to unbond from.
    +       * 
    + * + * string validator_address = 3 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + public java.lang.String getValidatorAddress() { + java.lang.Object ref = validatorAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validatorAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * The address of the validator to unbond from.
    +       * 
    + * + * string validator_address = 3 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + public com.google.protobuf.ByteString + getValidatorAddressBytes() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validatorAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * The address of the validator to unbond from.
    +       * 
    + * + * string validator_address = 3 [json_name = "validatorAddress"]; + * @param value The validatorAddress to set. + * @return This builder for chaining. + */ + public Builder setValidatorAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + validatorAddress_ = value; + onChanged(); + return this; + } + /** + *
    +       * The address of the validator to unbond from.
    +       * 
    + * + * string validator_address = 3 [json_name = "validatorAddress"]; + * @return This builder for chaining. + */ + public Builder clearValidatorAddress() { + + validatorAddress_ = getDefaultInstance().getValidatorAddress(); + onChanged(); + return this; + } + /** + *
    +       * The address of the validator to unbond from.
    +       * 
    + * + * string validator_address = 3 [json_name = "validatorAddress"]; + * @param value The bytes for validatorAddress to set. + * @return This builder for chaining. + */ + public Builder setValidatorAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + validatorAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object memo_ = ""; + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 4 [json_name = "memo"]; + * @return The memo. + */ + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 4 [json_name = "memo"]; + * @return The bytes for memo. + */ + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 4 [json_name = "memo"]; + * @param value The memo to set. + * @return This builder for chaining. + */ + public Builder setMemo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memo_ = value; + onChanged(); + return this; + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 4 [json_name = "memo"]; + * @return This builder for chaining. + */ + public Builder clearMemo() { + + memo_ = getDefaultInstance().getMemo(); + onChanged(); + return this; + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 4 [json_name = "memo"]; + * @param value The bytes for memo to set. + * @return This builder for chaining. + */ + public Builder setMemoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memo_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetRawUnbondTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetRawUnbondTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRawUnbondTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetRawWithdrawTransactionRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetRawWithdrawTransactionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
    +     * The lock time for the transaction. If not set, defaults to the last block
    +     * height.
    +     * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + int getLockTime(); + + /** + *
    +     * The address of the validator to withdraw from.
    +     * 
    + * + * string validator_address = 2 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + java.lang.String getValidatorAddress(); + /** + *
    +     * The address of the validator to withdraw from.
    +     * 
    + * + * string validator_address = 2 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + com.google.protobuf.ByteString + getValidatorAddressBytes(); + + /** + *
    +     * The address of the account to withdraw to.
    +     * 
    + * + * string account_address = 3 [json_name = "accountAddress"]; + * @return The accountAddress. + */ + java.lang.String getAccountAddress(); + /** + *
    +     * The address of the account to withdraw to.
    +     * 
    + * + * string account_address = 3 [json_name = "accountAddress"]; + * @return The bytes for accountAddress. + */ + com.google.protobuf.ByteString + getAccountAddressBytes(); + + /** + *
    +     * The withdrawal amount in NanoPAC. Must be greater than 0.
    +     * 
    + * + * int64 amount = 4 [json_name = "amount"]; + * @return The amount. + */ + long getAmount(); + + /** + *
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); + + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The memo. + */ + java.lang.String getMemo(); + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The bytes for memo. + */ + com.google.protobuf.ByteString + getMemoBytes(); + } + /** + *
    +   * Request message for retrieving raw details of a withdraw transaction.
    +   * 
    + * + * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest} + */ + public static final class GetRawWithdrawTransactionRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pactus.GetRawWithdrawTransactionRequest) + GetRawWithdrawTransactionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetRawWithdrawTransactionRequest.newBuilder() to construct. + private GetRawWithdrawTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetRawWithdrawTransactionRequest() { + validatorAddress_ = ""; + accountAddress_ = ""; + memo_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetRawWithdrawTransactionRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder.class); + } + + public static final int LOCK_TIME_FIELD_NUMBER = 1; + private int lockTime_; + /** + *
    +     * The lock time for the transaction. If not set, defaults to the last block
    +     * height.
    +     * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + + public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 2; + private volatile java.lang.Object validatorAddress_; + /** + *
    +     * The address of the validator to withdraw from.
    +     * 
    + * + * string validator_address = 2 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + @java.lang.Override + public java.lang.String getValidatorAddress() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validatorAddress_ = s; + return s; + } + } + /** + *
    +     * The address of the validator to withdraw from.
    +     * 
    + * + * string validator_address = 2 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getValidatorAddressBytes() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validatorAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCOUNT_ADDRESS_FIELD_NUMBER = 3; + private volatile java.lang.Object accountAddress_; + /** + *
    +     * The address of the account to withdraw to.
    +     * 
    + * + * string account_address = 3 [json_name = "accountAddress"]; + * @return The accountAddress. + */ + @java.lang.Override + public java.lang.String getAccountAddress() { + java.lang.Object ref = accountAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountAddress_ = s; + return s; + } + } + /** + *
    +     * The address of the account to withdraw to.
    +     * 
    + * + * string account_address = 3 [json_name = "accountAddress"]; + * @return The bytes for accountAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAccountAddressBytes() { + java.lang.Object ref = accountAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + accountAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AMOUNT_FIELD_NUMBER = 4; + private long amount_; + /** + *
    +     * The withdrawal amount in NanoPAC. Must be greater than 0.
    +     * 
    + * + * int64 amount = 4 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + + public static final int FEE_FIELD_NUMBER = 5; + private long fee_; + /** + *
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + + public static final int MEMO_FIELD_NUMBER = 6; + private volatile java.lang.Object memo_; + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The memo. + */ + @java.lang.Override + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } + } + /** + *
    +     * A memo string for the transaction.
    +     * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The bytes for memo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (lockTime_ != 0) { + output.writeUInt32(1, lockTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, validatorAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, accountAddress_); + } + if (amount_ != 0L) { + output.writeInt64(4, amount_); + } + if (fee_ != 0L) { + output.writeInt64(5, fee_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, memo_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lockTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, lockTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, validatorAddress_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, accountAddress_); + } + if (amount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, amount_); + } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, fee_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, memo_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest)) { + return super.equals(obj); + } + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) obj; + + if (getLockTime() + != other.getLockTime()) return false; + if (!getValidatorAddress() + .equals(other.getValidatorAddress())) return false; + if (!getAccountAddress() + .equals(other.getAccountAddress())) return false; + if (getAmount() + != other.getAmount()) return false; + if (getFee() + != other.getFee()) return false; + if (!getMemo() + .equals(other.getMemo())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCK_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLockTime(); + hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getValidatorAddress().hashCode(); + hash = (37 * hash) + ACCOUNT_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAccountAddress().hashCode(); + hash = (37 * hash) + AMOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAmount()); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); + hash = (37 * hash) + MEMO_FIELD_NUMBER; + hash = (53 * hash) + getMemo().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
    +     * Request message for retrieving raw details of a withdraw transaction.
    +     * 
    + * + * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pactus.GetRawWithdrawTransactionRequest) + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder.class); + } + + // Construct using pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + lockTime_ = 0; + + validatorAddress_ = ""; + + accountAddress_ = ""; + + amount_ = 0L; + + fee_ = 0L; + + memo_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest build() { + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest buildPartial() { + pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest(this); + result.lockTime_ = lockTime_; + result.validatorAddress_ = validatorAddress_; + result.accountAddress_ = accountAddress_; + result.amount_ = amount_; + result.fee_ = fee_; + result.memo_ = memo_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) { + return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest other) { + if (other == pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance()) return this; + if (other.getLockTime() != 0) { + setLockTime(other.getLockTime()); + } + if (!other.getValidatorAddress().isEmpty()) { + validatorAddress_ = other.validatorAddress_; + onChanged(); + } + if (!other.getAccountAddress().isEmpty()) { + accountAddress_ = other.accountAddress_; + onChanged(); + } + if (other.getAmount() != 0L) { + setAmount(other.getAmount()); + } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } + if (!other.getMemo().isEmpty()) { + memo_ = other.memo_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + lockTime_ = input.readUInt32(); + + break; + } // case 8 + case 18: { + validatorAddress_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + accountAddress_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: { + amount_ = input.readInt64(); + + break; + } // case 32 + case 40: { + fee_ = input.readInt64(); + + break; + } // case 40 + case 50: { + memo_ = input.readStringRequireUtf8(); + + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int lockTime_ ; + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return The lockTime. + */ + @java.lang.Override + public int getLockTime() { + return lockTime_; + } + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @param value The lockTime to set. + * @return This builder for chaining. + */ + public Builder setLockTime(int value) { + + lockTime_ = value; + onChanged(); + return this; + } + /** + *
    +       * The lock time for the transaction. If not set, defaults to the last block
    +       * height.
    +       * 
    + * + * uint32 lock_time = 1 [json_name = "lockTime"]; + * @return This builder for chaining. + */ + public Builder clearLockTime() { + + lockTime_ = 0; + onChanged(); + return this; + } + + private java.lang.Object validatorAddress_ = ""; + /** + *
    +       * The address of the validator to withdraw from.
    +       * 
    + * + * string validator_address = 2 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + public java.lang.String getValidatorAddress() { + java.lang.Object ref = validatorAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + validatorAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * The address of the validator to withdraw from.
    +       * 
    + * + * string validator_address = 2 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. + */ + public com.google.protobuf.ByteString + getValidatorAddressBytes() { + java.lang.Object ref = validatorAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + validatorAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * The address of the validator to withdraw from.
    +       * 
    + * + * string validator_address = 2 [json_name = "validatorAddress"]; + * @param value The validatorAddress to set. + * @return This builder for chaining. + */ + public Builder setValidatorAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + validatorAddress_ = value; + onChanged(); + return this; + } + /** + *
    +       * The address of the validator to withdraw from.
    +       * 
    + * + * string validator_address = 2 [json_name = "validatorAddress"]; + * @return This builder for chaining. + */ + public Builder clearValidatorAddress() { + + validatorAddress_ = getDefaultInstance().getValidatorAddress(); + onChanged(); + return this; + } + /** + *
    +       * The address of the validator to withdraw from.
    +       * 
    + * + * string validator_address = 2 [json_name = "validatorAddress"]; + * @param value The bytes for validatorAddress to set. + * @return This builder for chaining. + */ + public Builder setValidatorAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + validatorAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object accountAddress_ = ""; + /** + *
    +       * The address of the account to withdraw to.
    +       * 
    + * + * string account_address = 3 [json_name = "accountAddress"]; + * @return The accountAddress. + */ + public java.lang.String getAccountAddress() { + java.lang.Object ref = accountAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * The address of the account to withdraw to.
    +       * 
    + * + * string account_address = 3 [json_name = "accountAddress"]; + * @return The bytes for accountAddress. + */ + public com.google.protobuf.ByteString + getAccountAddressBytes() { + java.lang.Object ref = accountAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + accountAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * The address of the account to withdraw to.
    +       * 
    + * + * string account_address = 3 [json_name = "accountAddress"]; + * @param value The accountAddress to set. + * @return This builder for chaining. + */ + public Builder setAccountAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + accountAddress_ = value; + onChanged(); + return this; + } + /** + *
    +       * The address of the account to withdraw to.
    +       * 
    + * + * string account_address = 3 [json_name = "accountAddress"]; + * @return This builder for chaining. + */ + public Builder clearAccountAddress() { + + accountAddress_ = getDefaultInstance().getAccountAddress(); + onChanged(); + return this; + } + /** + *
    +       * The address of the account to withdraw to.
    +       * 
    + * + * string account_address = 3 [json_name = "accountAddress"]; + * @param value The bytes for accountAddress to set. + * @return This builder for chaining. + */ + public Builder setAccountAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + accountAddress_ = value; + onChanged(); + return this; + } + + private long amount_ ; + /** + *
    +       * The withdrawal amount in NanoPAC. Must be greater than 0.
    +       * 
    + * + * int64 amount = 4 [json_name = "amount"]; + * @return The amount. + */ + @java.lang.Override + public long getAmount() { + return amount_; + } + /** + *
    +       * The withdrawal amount in NanoPAC. Must be greater than 0.
    +       * 
    + * + * int64 amount = 4 [json_name = "amount"]; + * @param value The amount to set. + * @return This builder for chaining. + */ + public Builder setAmount(long value) { + + amount_ = value; + onChanged(); + return this; + } + /** + *
    +       * The withdrawal amount in NanoPAC. Must be greater than 0.
    +       * 
    + * + * int64 amount = 4 [json_name = "amount"]; + * @return This builder for chaining. + */ + public Builder clearAmount() { + + amount_ = 0L; + onChanged(); + return this; + } + + private long fee_ ; + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object memo_ = ""; + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The memo. + */ + public java.lang.String getMemo() { + java.lang.Object ref = memo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + memo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return The bytes for memo. + */ + public com.google.protobuf.ByteString + getMemoBytes() { + java.lang.Object ref = memo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + memo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 6 [json_name = "memo"]; + * @param value The memo to set. + * @return This builder for chaining. + */ + public Builder setMemo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + memo_ = value; + onChanged(); + return this; + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 6 [json_name = "memo"]; + * @return This builder for chaining. + */ + public Builder clearMemo() { + + memo_ = getDefaultInstance().getMemo(); + onChanged(); + return this; + } + /** + *
    +       * A memo string for the transaction.
    +       * 
    + * + * string memo = 6 [json_name = "memo"]; + * @param value The bytes for memo to set. + * @return This builder for chaining. + */ + public Builder setMemoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + memo_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:pactus.GetRawWithdrawTransactionRequest) + } + + // @@protoc_insertion_point(class_scope:pactus.GetRawWithdrawTransactionRequest) + private static final pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest(); + } + + public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetRawWithdrawTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RawTransferOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.RawTransfer) + com.google.protobuf.MessageOrBuilder { + /** *
          * The sender's account address.
    @@ -6158,18 +10936,18 @@ public interface GetRawTransferTransactionRequestOrBuilder extends
        * Request message for retrieving raw details of a transfer transaction.
        * 
    * - * Protobuf type {@code pactus.GetRawTransferTransactionRequest} + * Protobuf type {@code pactus.RawTransfer} */ - public static final class GetRawTransferTransactionRequest extends + public static final class RawTransfer extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetRawTransferTransactionRequest) - GetRawTransferTransactionRequestOrBuilder { + // @@protoc_insertion_point(message_implements:pactus.RawTransfer) + RawTransferOrBuilder { private static final long serialVersionUID = 0L; - // Use GetRawTransferTransactionRequest.newBuilder() to construct. - private GetRawTransferTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use RawTransfer.newBuilder() to construct. + private RawTransfer(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetRawTransferTransactionRequest() { + private RawTransfer() { sender_ = ""; receiver_ = ""; } @@ -6178,7 +10956,7 @@ private GetRawTransferTransactionRequest() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new GetRawTransferTransactionRequest(); + return new RawTransfer(); } @java.lang.Override @@ -6188,15 +10966,15 @@ protected java.lang.Object newInstance( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawTransfer_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawTransfer_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder.class); + pactus.transaction.TransactionOuterClass.RawTransfer.class, pactus.transaction.TransactionOuterClass.RawTransfer.Builder.class); } public static final int SENDER_FIELD_NUMBER = 1; @@ -6380,10 +11158,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest)) { + if (!(obj instanceof pactus.transaction.TransactionOuterClass.RawTransfer)) { return super.equals(obj); } - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) obj; + pactus.transaction.TransactionOuterClass.RawTransfer other = (pactus.transaction.TransactionOuterClass.RawTransfer) obj; if (!getSender() .equals(other.getSender())) return false; @@ -6419,69 +11197,69 @@ public int hashCode() { return hash; } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(byte[] data) + public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseDelimitedFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.RawTransfer parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseDelimitedFrom( + public static pactus.transaction.TransactionOuterClass.RawTransfer parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6494,7 +11272,7 @@ public static pactus.transaction.TransactionOuterClass.GetRawTransferTransaction public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest prototype) { + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.RawTransfer prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -6514,26 +11292,26 @@ protected Builder newBuilderForType( * Request message for retrieving raw details of a transfer transaction. * * - * Protobuf type {@code pactus.GetRawTransferTransactionRequest} + * Protobuf type {@code pactus.RawTransfer} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetRawTransferTransactionRequest) - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:pactus.RawTransfer) + pactus.transaction.TransactionOuterClass.RawTransferOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawTransfer_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawTransfer_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.Builder.class); + pactus.transaction.TransactionOuterClass.RawTransfer.class, pactus.transaction.TransactionOuterClass.RawTransfer.Builder.class); } - // Construct using pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.newBuilder() + // Construct using pactus.transaction.TransactionOuterClass.RawTransfer.newBuilder() private Builder() { } @@ -6560,17 +11338,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransferTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawTransfer_descriptor; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance(); + public pactus.transaction.TransactionOuterClass.RawTransfer getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance(); } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest build() { - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest result = buildPartial(); + public pactus.transaction.TransactionOuterClass.RawTransfer build() { + pactus.transaction.TransactionOuterClass.RawTransfer result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -6578,8 +11356,8 @@ public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest buildPartial() { - pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest(this); + public pactus.transaction.TransactionOuterClass.RawTransfer buildPartial() { + pactus.transaction.TransactionOuterClass.RawTransfer result = new pactus.transaction.TransactionOuterClass.RawTransfer(this); result.sender_ = sender_; result.receiver_ = receiver_; result.amount_ = amount_; @@ -6622,16 +11400,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest)other); + if (other instanceof pactus.transaction.TransactionOuterClass.RawTransfer) { + return mergeFrom((pactus.transaction.TransactionOuterClass.RawTransfer)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest other) { - if (other == pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest.getDefaultInstance()) return this; + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.RawTransfer other) { + if (other == pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance()) return this; if (!other.getSender().isEmpty()) { sender_ = other.sender_; onChanged(); @@ -6998,23 +11776,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:pactus.GetRawTransferTransactionRequest) + // @@protoc_insertion_point(builder_scope:pactus.RawTransfer) } - // @@protoc_insertion_point(class_scope:pactus.GetRawTransferTransactionRequest) - private static final pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:pactus.RawTransfer) + private static final pactus.transaction.TransactionOuterClass.RawTransfer DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest(); + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.RawTransfer(); } - public static pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstance() { + public static pactus.transaction.TransactionOuterClass.RawTransfer getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetRawTransferTransactionRequest parsePartialFrom( + public RawTransfer parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7033,24 +11811,24 @@ public GetRawTransferTransactionRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest getDefaultInstanceForType() { + public pactus.transaction.TransactionOuterClass.RawTransfer getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface GetRawBondTransactionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetRawBondTransactionRequest) + public interface RawBondOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.RawBond) com.google.protobuf.MessageOrBuilder { /** @@ -7138,18 +11916,18 @@ public interface GetRawBondTransactionRequestOrBuilder extends * Request message for retrieving raw details of a bond transaction. * * - * Protobuf type {@code pactus.GetRawBondTransactionRequest} + * Protobuf type {@code pactus.RawBond} */ - public static final class GetRawBondTransactionRequest extends + public static final class RawBond extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetRawBondTransactionRequest) - GetRawBondTransactionRequestOrBuilder { + // @@protoc_insertion_point(message_implements:pactus.RawBond) + RawBondOrBuilder { private static final long serialVersionUID = 0L; - // Use GetRawBondTransactionRequest.newBuilder() to construct. - private GetRawBondTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use RawBond.newBuilder() to construct. + private RawBond(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetRawBondTransactionRequest() { + private RawBond() { sender_ = ""; receiver_ = ""; publicKey_ = ""; @@ -7159,7 +11937,7 @@ private GetRawBondTransactionRequest() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new GetRawBondTransactionRequest(); + return new RawBond(); } @java.lang.Override @@ -7169,15 +11947,15 @@ protected java.lang.Object newInstance( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawBond_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawBond_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder.class); + pactus.transaction.TransactionOuterClass.RawBond.class, pactus.transaction.TransactionOuterClass.RawBond.Builder.class); } public static final int SENDER_FIELD_NUMBER = 1; @@ -7413,10 +12191,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest)) { + if (!(obj instanceof pactus.transaction.TransactionOuterClass.RawBond)) { return super.equals(obj); } - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) obj; + pactus.transaction.TransactionOuterClass.RawBond other = (pactus.transaction.TransactionOuterClass.RawBond) obj; if (!getSender() .equals(other.getSender())) return false; @@ -7456,69 +12234,69 @@ public int hashCode() { return hash; } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(byte[] data) + public static pactus.transaction.TransactionOuterClass.RawBond parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.RawBond parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseDelimitedFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.RawBond parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseDelimitedFrom( + public static pactus.transaction.TransactionOuterClass.RawBond parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7531,7 +12309,7 @@ public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequ public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest prototype) { + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.RawBond prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -7551,26 +12329,26 @@ protected Builder newBuilderForType( * Request message for retrieving raw details of a bond transaction. * * - * Protobuf type {@code pactus.GetRawBondTransactionRequest} + * Protobuf type {@code pactus.RawBond} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetRawBondTransactionRequest) - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:pactus.RawBond) + pactus.transaction.TransactionOuterClass.RawBondOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawBond_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawBond_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.Builder.class); + pactus.transaction.TransactionOuterClass.RawBond.class, pactus.transaction.TransactionOuterClass.RawBond.Builder.class); } - // Construct using pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.newBuilder() + // Construct using pactus.transaction.TransactionOuterClass.RawBond.newBuilder() private Builder() { } @@ -7599,17 +12377,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawBondTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawBond_descriptor; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance(); + public pactus.transaction.TransactionOuterClass.RawBond getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance(); } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest build() { - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest result = buildPartial(); + public pactus.transaction.TransactionOuterClass.RawBond build() { + pactus.transaction.TransactionOuterClass.RawBond result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -7617,8 +12395,8 @@ public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest bui } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest buildPartial() { - pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest(this); + public pactus.transaction.TransactionOuterClass.RawBond buildPartial() { + pactus.transaction.TransactionOuterClass.RawBond result = new pactus.transaction.TransactionOuterClass.RawBond(this); result.sender_ = sender_; result.receiver_ = receiver_; result.stake_ = stake_; @@ -7662,16 +12440,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest)other); + if (other instanceof pactus.transaction.TransactionOuterClass.RawBond) { + return mergeFrom((pactus.transaction.TransactionOuterClass.RawBond)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest other) { - if (other == pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest.getDefaultInstance()) return this; + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.RawBond other) { + if (other == pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance()) return this; if (!other.getSender().isEmpty()) { sender_ = other.sender_; onChanged(); @@ -8143,23 +12921,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:pactus.GetRawBondTransactionRequest) + // @@protoc_insertion_point(builder_scope:pactus.RawBond) } - // @@protoc_insertion_point(class_scope:pactus.GetRawBondTransactionRequest) - private static final pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:pactus.RawBond) + private static final pactus.transaction.TransactionOuterClass.RawBond DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest(); + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.RawBond(); } - public static pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstance() { + public static pactus.transaction.TransactionOuterClass.RawBond getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetRawBondTransactionRequest parsePartialFrom( + public RawBond parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8178,24 +12956,24 @@ public GetRawBondTransactionRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest getDefaultInstanceForType() { + public pactus.transaction.TransactionOuterClass.RawBond getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface GetRawUnbondTransactionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetRawUnbondTransactionRequest) + public interface RawUnbondOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.RawUnbond) com.google.protobuf.MessageOrBuilder { /** @@ -8223,18 +13001,18 @@ public interface GetRawUnbondTransactionRequestOrBuilder extends * Request message for retrieving raw details of an unbond transaction. * * - * Protobuf type {@code pactus.GetRawUnbondTransactionRequest} + * Protobuf type {@code pactus.RawUnbond} */ - public static final class GetRawUnbondTransactionRequest extends + public static final class RawUnbond extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetRawUnbondTransactionRequest) - GetRawUnbondTransactionRequestOrBuilder { + // @@protoc_insertion_point(message_implements:pactus.RawUnbond) + RawUnbondOrBuilder { private static final long serialVersionUID = 0L; - // Use GetRawUnbondTransactionRequest.newBuilder() to construct. - private GetRawUnbondTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use RawUnbond.newBuilder() to construct. + private RawUnbond(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetRawUnbondTransactionRequest() { + private RawUnbond() { validatorAddress_ = ""; } @@ -8242,7 +13020,7 @@ private GetRawUnbondTransactionRequest() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new GetRawUnbondTransactionRequest(); + return new RawUnbond(); } @java.lang.Override @@ -8252,15 +13030,15 @@ protected java.lang.Object newInstance( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawUnbond_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawUnbond_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder.class); + pactus.transaction.TransactionOuterClass.RawUnbond.class, pactus.transaction.TransactionOuterClass.RawUnbond.Builder.class); } public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 1; @@ -8348,10 +13126,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest)) { + if (!(obj instanceof pactus.transaction.TransactionOuterClass.RawUnbond)) { return super.equals(obj); } - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) obj; + pactus.transaction.TransactionOuterClass.RawUnbond other = (pactus.transaction.TransactionOuterClass.RawUnbond) obj; if (!getValidatorAddress() .equals(other.getValidatorAddress())) return false; @@ -8373,69 +13151,69 @@ public int hashCode() { return hash; } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(byte[] data) + public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseDelimitedFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.RawUnbond parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseDelimitedFrom( + public static pactus.transaction.TransactionOuterClass.RawUnbond parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8448,7 +13226,7 @@ public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRe public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest prototype) { + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.RawUnbond prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -8468,26 +13246,26 @@ protected Builder newBuilderForType( * Request message for retrieving raw details of an unbond transaction. * * - * Protobuf type {@code pactus.GetRawUnbondTransactionRequest} + * Protobuf type {@code pactus.RawUnbond} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetRawUnbondTransactionRequest) - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:pactus.RawUnbond) + pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawUnbond_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawUnbond_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.Builder.class); + pactus.transaction.TransactionOuterClass.RawUnbond.class, pactus.transaction.TransactionOuterClass.RawUnbond.Builder.class); } - // Construct using pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.newBuilder() + // Construct using pactus.transaction.TransactionOuterClass.RawUnbond.newBuilder() private Builder() { } @@ -8508,17 +13286,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawUnbondTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawUnbond_descriptor; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance(); + public pactus.transaction.TransactionOuterClass.RawUnbond getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance(); } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest build() { - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest result = buildPartial(); + public pactus.transaction.TransactionOuterClass.RawUnbond build() { + pactus.transaction.TransactionOuterClass.RawUnbond result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -8526,8 +13304,8 @@ public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest b } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest buildPartial() { - pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest(this); + public pactus.transaction.TransactionOuterClass.RawUnbond buildPartial() { + pactus.transaction.TransactionOuterClass.RawUnbond result = new pactus.transaction.TransactionOuterClass.RawUnbond(this); result.validatorAddress_ = validatorAddress_; onBuilt(); return result; @@ -8567,16 +13345,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest)other); + if (other instanceof pactus.transaction.TransactionOuterClass.RawUnbond) { + return mergeFrom((pactus.transaction.TransactionOuterClass.RawUnbond)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest other) { - if (other == pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest.getDefaultInstance()) return this; + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.RawUnbond other) { + if (other == pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance()) return this; if (!other.getValidatorAddress().isEmpty()) { validatorAddress_ = other.validatorAddress_; onChanged(); @@ -8736,23 +13514,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:pactus.GetRawUnbondTransactionRequest) + // @@protoc_insertion_point(builder_scope:pactus.RawUnbond) } - // @@protoc_insertion_point(class_scope:pactus.GetRawUnbondTransactionRequest) - private static final pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:pactus.RawUnbond) + private static final pactus.transaction.TransactionOuterClass.RawUnbond DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest(); + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.RawUnbond(); } - public static pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstance() { + public static pactus.transaction.TransactionOuterClass.RawUnbond getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetRawUnbondTransactionRequest parsePartialFrom( + public RawUnbond parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8771,24 +13549,24 @@ public GetRawUnbondTransactionRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest getDefaultInstanceForType() { + public pactus.transaction.TransactionOuterClass.RawUnbond getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface GetRawWithdrawTransactionRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetRawWithdrawTransactionRequest) + public interface RawWithdrawOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.RawWithdraw) com.google.protobuf.MessageOrBuilder { /** @@ -8856,18 +13634,18 @@ public interface GetRawWithdrawTransactionRequestOrBuilder extends * Request message for retrieving raw details of a withdraw transaction. * * - * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest} + * Protobuf type {@code pactus.RawWithdraw} */ - public static final class GetRawWithdrawTransactionRequest extends + public static final class RawWithdraw extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetRawWithdrawTransactionRequest) - GetRawWithdrawTransactionRequestOrBuilder { + // @@protoc_insertion_point(message_implements:pactus.RawWithdraw) + RawWithdrawOrBuilder { private static final long serialVersionUID = 0L; - // Use GetRawWithdrawTransactionRequest.newBuilder() to construct. - private GetRawWithdrawTransactionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use RawWithdraw.newBuilder() to construct. + private RawWithdraw(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private GetRawWithdrawTransactionRequest() { + private RawWithdraw() { validatorAddress_ = ""; accountAddress_ = ""; } @@ -8876,7 +13654,7 @@ private GetRawWithdrawTransactionRequest() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new GetRawWithdrawTransactionRequest(); + return new RawWithdraw(); } @java.lang.Override @@ -8886,15 +13664,15 @@ protected java.lang.Object newInstance( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawWithdraw_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawWithdraw_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder.class); + pactus.transaction.TransactionOuterClass.RawWithdraw.class, pactus.transaction.TransactionOuterClass.RawWithdraw.Builder.class); } public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 1; @@ -9078,10 +13856,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest)) { + if (!(obj instanceof pactus.transaction.TransactionOuterClass.RawWithdraw)) { return super.equals(obj); } - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest other = (pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) obj; + pactus.transaction.TransactionOuterClass.RawWithdraw other = (pactus.transaction.TransactionOuterClass.RawWithdraw) obj; if (!getValidatorAddress() .equals(other.getValidatorAddress())) return false; @@ -9117,69 +13895,69 @@ public int hashCode() { return hash; } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(byte[] data) + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseDelimitedFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseDelimitedFrom( + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest parseFrom( + public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -9192,7 +13970,7 @@ public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransaction public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest prototype) { + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.RawWithdraw prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -9212,26 +13990,26 @@ protected Builder newBuilderForType( * Request message for retrieving raw details of a withdraw transaction. * * - * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest} + * Protobuf type {@code pactus.RawWithdraw} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.GetRawWithdrawTransactionRequest) - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequestOrBuilder { + // @@protoc_insertion_point(builder_implements:pactus.RawWithdraw) + pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawWithdraw_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawWithdraw_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.Builder.class); + pactus.transaction.TransactionOuterClass.RawWithdraw.class, pactus.transaction.TransactionOuterClass.RawWithdraw.Builder.class); } - // Construct using pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.newBuilder() + // Construct using pactus.transaction.TransactionOuterClass.RawWithdraw.newBuilder() private Builder() { } @@ -9258,17 +14036,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawWithdraw_descriptor; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance(); + public pactus.transaction.TransactionOuterClass.RawWithdraw getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance(); } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest build() { - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest result = buildPartial(); + public pactus.transaction.TransactionOuterClass.RawWithdraw build() { + pactus.transaction.TransactionOuterClass.RawWithdraw result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -9276,8 +14054,8 @@ public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest buildPartial() { - pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest(this); + public pactus.transaction.TransactionOuterClass.RawWithdraw buildPartial() { + pactus.transaction.TransactionOuterClass.RawWithdraw result = new pactus.transaction.TransactionOuterClass.RawWithdraw(this); result.validatorAddress_ = validatorAddress_; result.accountAddress_ = accountAddress_; result.amount_ = amount_; @@ -9320,16 +14098,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest) { - return mergeFrom((pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest)other); + if (other instanceof pactus.transaction.TransactionOuterClass.RawWithdraw) { + return mergeFrom((pactus.transaction.TransactionOuterClass.RawWithdraw)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest other) { - if (other == pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest.getDefaultInstance()) return this; + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.RawWithdraw other) { + if (other == pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance()) return this; if (!other.getValidatorAddress().isEmpty()) { validatorAddress_ = other.validatorAddress_; onChanged(); @@ -9696,23 +14474,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:pactus.GetRawWithdrawTransactionRequest) + // @@protoc_insertion_point(builder_scope:pactus.RawWithdraw) } - // @@protoc_insertion_point(class_scope:pactus.GetRawWithdrawTransactionRequest) - private static final pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:pactus.RawWithdraw) + private static final pactus.transaction.TransactionOuterClass.RawWithdraw DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest(); + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.RawWithdraw(); } - public static pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstance() { + public static pactus.transaction.TransactionOuterClass.RawWithdraw getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public GetRawWithdrawTransactionRequest parsePartialFrom( + public RawWithdraw parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -9731,17 +14509,17 @@ public GetRawWithdrawTransactionRequest parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest getDefaultInstanceForType() { + public pactus.transaction.TransactionOuterClass.RawWithdraw getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -17711,6 +22489,26 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_RawTransfer_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_RawTransfer_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_RawBond_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_RawBond_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_RawUnbond_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_RawUnbond_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pactus_RawWithdraw_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pactus_RawWithdraw_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_pactus_GetRawTransactionResponse_descriptor; private static final @@ -17770,71 +22568,95 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan "R\003fee\"S\n\033BroadcastTransactionRequest\0224\n\026" + "signed_raw_transaction\030\001 \001(\tR\024signedRawT" + "ransaction\".\n\034BroadcastTransactionRespon" + - "se\022\016\n\002id\030\001 \001(\tR\002id\"\350\002\n\030GetRawTransaction" + + "se\022\016\n\002id\030\001 \001(\tR\002id\"\224\002\n\030GetRawTransaction" + "Request\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022\022\n\004" + - "memo\030\002 \001(\tR\004memo\022F\n\010transfer\030\003 \001(\0132(.pac" + - "tus.GetRawTransferTransactionRequestH\000R\010" + - "transfer\022:\n\004bond\030\004 \001(\0132$.pactus.GetRawBo" + - "ndTransactionRequestH\000R\004bond\022@\n\006unbond\030\005" + - " \001(\0132&.pactus.GetRawUnbondTransactionReq" + - "uestH\000R\006unbond\022F\n\010withdraw\030\006 \001(\0132(.pactu" + - "s.GetRawWithdrawTransactionRequestH\000R\010wi" + - "thdrawB\r\n\013transaction\"\200\001\n GetRawTransfer" + - "TransactionRequest\022\026\n\006sender\030\001 \001(\tR\006send" + - "er\022\032\n\010receiver\030\002 \001(\tR\010receiver\022\026\n\006amount" + - "\030\003 \001(\003R\006amount\022\020\n\003fee\030\004 \001(\003R\003fee\"\231\001\n\034Get" + - "RawBondTransactionRequest\022\026\n\006sender\030\001 \001(" + + "memo\030\002 \001(\tR\004memo\0221\n\010transfer\030\003 \001(\0132\023.pac" + + "tus.RawTransferH\000R\010transfer\022%\n\004bond\030\004 \001(" + + "\0132\017.pactus.RawBondH\000R\004bond\022+\n\006unbond\030\005 \001" + + "(\0132\021.pactus.RawUnbondH\000R\006unbond\0221\n\010withd" + + "raw\030\006 \001(\0132\023.pactus.RawWithdrawH\000R\010withdr" + + "awB\r\n\013transaction\"\261\001\n GetRawTransferTran" + + "sactionRequest\022\033\n\tlock_time\030\001 \001(\rR\010lockT" + + "ime\022\026\n\006sender\030\002 \001(\tR\006sender\022\032\n\010receiver\030" + + "\003 \001(\tR\010receiver\022\026\n\006amount\030\004 \001(\003R\006amount\022" + + "\020\n\003fee\030\005 \001(\003R\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"\312\001" + + "\n\034GetRawBondTransactionRequest\022\033\n\tlock_t" + + "ime\030\001 \001(\rR\010lockTime\022\026\n\006sender\030\002 \001(\tR\006sen" + + "der\022\032\n\010receiver\030\003 \001(\tR\010receiver\022\024\n\005stake" + + "\030\004 \001(\003R\005stake\022\035\n\npublic_key\030\005 \001(\tR\tpubli" + + "cKey\022\020\n\003fee\030\006 \001(\003R\003fee\022\022\n\004memo\030\007 \001(\tR\004me" + + "mo\"~\n\036GetRawUnbondTransactionRequest\022\033\n\t" + + "lock_time\030\001 \001(\rR\010lockTime\022+\n\021validator_a" + + "ddress\030\003 \001(\tR\020validatorAddress\022\022\n\004memo\030\004" + + " \001(\tR\004memo\"\323\001\n GetRawWithdrawTransaction" + + "Request\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022+\n\021" + + "validator_address\030\002 \001(\tR\020validatorAddres" + + "s\022\'\n\017account_address\030\003 \001(\tR\016accountAddre" + + "ss\022\026\n\006amount\030\004 \001(\003R\006amount\022\020\n\003fee\030\005 \001(\003R" + + "\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"k\n\013RawTransfer\022" + + "\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 \001(" + + "\tR\010receiver\022\026\n\006amount\030\003 \001(\003R\006amount\022\020\n\003f" + + "ee\030\004 \001(\003R\003fee\"\204\001\n\007RawBond\022\026\n\006sender\030\001 \001(" + "\tR\006sender\022\032\n\010receiver\030\002 \001(\tR\010receiver\022\024\n" + "\005stake\030\003 \001(\003R\005stake\022\035\n\npublic_key\030\004 \001(\tR" + - "\tpublicKey\022\020\n\003fee\030\005 \001(\003R\003fee\"M\n\036GetRawUn" + - "bondTransactionRequest\022+\n\021validator_addr" + - "ess\030\001 \001(\tR\020validatorAddress\"\242\001\n GetRawWi" + - "thdrawTransactionRequest\022+\n\021validator_ad" + - "dress\030\001 \001(\tR\020validatorAddress\022\'\n\017account" + - "_address\030\002 \001(\tR\016accountAddress\022\026\n\006amount" + - "\030\003 \001(\003R\006amount\022\020\n\003fee\030\004 \001(\003R\003fee\"D\n\031GetR" + - "awTransactionResponse\022\'\n\017raw_transaction" + - "\030\001 \001(\tR\016rawTransaction\"]\n\017PayloadTransfe" + - "r\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 " + - "\001(\tR\010receiver\022\026\n\006amount\030\003 \001(\003R\006amount\"W\n" + - "\013PayloadBond\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010" + - "receiver\030\002 \001(\tR\010receiver\022\024\n\005stake\030\003 \001(\003R" + - "\005stake\"B\n\020PayloadSortition\022\030\n\007address\030\001 " + - "\001(\tR\007address\022\024\n\005proof\030\002 \001(\tR\005proof\"-\n\rPa" + - "yloadUnbond\022\034\n\tvalidator\030\001 \001(\tR\tvalidato" + - "r\"M\n\017PayloadWithdraw\022\022\n\004from\030\001 \001(\tR\004from" + - "\022\016\n\002to\030\002 \001(\tR\002to\022\026\n\006amount\030\003 \001(\003R\006amount" + - "\"\254\004\n\017TransactionInfo\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004" + - "data\030\002 \001(\tR\004data\022\030\n\007version\030\003 \001(\005R\007versi" + - "on\022\033\n\tlock_time\030\004 \001(\rR\010lockTime\022\024\n\005value" + - "\030\005 \001(\003R\005value\022\020\n\003fee\030\006 \001(\003R\003fee\0226\n\014paylo" + - "ad_type\030\007 \001(\0162\023.pactus.PayloadTypeR\013payl" + - "oadType\0225\n\010transfer\030\036 \001(\0132\027.pactus.Paylo" + - "adTransferH\000R\010transfer\022)\n\004bond\030\037 \001(\0132\023.p" + - "actus.PayloadBondH\000R\004bond\0228\n\tsortition\030 " + - " \001(\0132\030.pactus.PayloadSortitionH\000R\tsortit" + - "ion\022/\n\006unbond\030! \001(\0132\025.pactus.PayloadUnbo" + - "ndH\000R\006unbond\0225\n\010withdraw\030\" \001(\0132\027.pactus." + - "PayloadWithdrawH\000R\010withdraw\022\022\n\004memo\030\010 \001(" + - "\tR\004memo\022\035\n\npublic_key\030\t \001(\tR\tpublicKey\022\034" + - "\n\tsignature\030\n \001(\tR\tsignatureB\t\n\007payload*" + - "\203\001\n\013PayloadType\022\013\n\007UNKNOWN\020\000\022\024\n\020TRANSFER" + - "_PAYLOAD\020\001\022\020\n\014BOND_PAYLOAD\020\002\022\025\n\021SORTITIO" + - "N_PAYLOAD\020\003\022\022\n\016UNBOND_PAYLOAD\020\004\022\024\n\020WITHD" + - "RAW_PAYLOAD\020\005*B\n\024TransactionVerbosity\022\024\n" + - "\020TRANSACTION_DATA\020\000\022\024\n\020TRANSACTION_INFO\020" + - "\0012\346\002\n\013Transaction\022O\n\016GetTransaction\022\035.pa" + - "ctus.GetTransactionRequest\032\036.pactus.GetT" + - "ransactionResponse\022I\n\014CalculateFee\022\033.pac" + - "tus.CalculateFeeRequest\032\034.pactus.Calcula" + - "teFeeResponse\022a\n\024BroadcastTransaction\022#." + - "pactus.BroadcastTransactionRequest\032$.pac" + - "tus.BroadcastTransactionResponse\022X\n\021GetR" + - "awTransaction\022 .pactus.GetRawTransaction" + - "Request\032!.pactus.GetRawTransactionRespon" + - "seBF\n\022pactus.transactionZ0github.com/pac" + - "tus-project/pactus/www/grpc/pactusb\006prot" + - "o3" + "\tpublicKey\022\020\n\003fee\030\005 \001(\003R\003fee\"8\n\tRawUnbon" + + "d\022+\n\021validator_address\030\001 \001(\tR\020validatorA" + + "ddress\"\215\001\n\013RawWithdraw\022+\n\021validator_addr" + + "ess\030\001 \001(\tR\020validatorAddress\022\'\n\017account_a" + + "ddress\030\002 \001(\tR\016accountAddress\022\026\n\006amount\030\003" + + " \001(\003R\006amount\022\020\n\003fee\030\004 \001(\003R\003fee\"D\n\031GetRaw" + + "TransactionResponse\022\'\n\017raw_transaction\030\001" + + " \001(\tR\016rawTransaction\"]\n\017PayloadTransfer\022" + + "\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 \001(" + + "\tR\010receiver\022\026\n\006amount\030\003 \001(\003R\006amount\"W\n\013P" + + "ayloadBond\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010re" + + "ceiver\030\002 \001(\tR\010receiver\022\024\n\005stake\030\003 \001(\003R\005s" + + "take\"B\n\020PayloadSortition\022\030\n\007address\030\001 \001(" + + "\tR\007address\022\024\n\005proof\030\002 \001(\tR\005proof\"-\n\rPayl" + + "oadUnbond\022\034\n\tvalidator\030\001 \001(\tR\tvalidator\"" + + "M\n\017PayloadWithdraw\022\022\n\004from\030\001 \001(\tR\004from\022\016" + + "\n\002to\030\002 \001(\tR\002to\022\026\n\006amount\030\003 \001(\003R\006amount\"\254" + + "\004\n\017TransactionInfo\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004da" + + "ta\030\002 \001(\tR\004data\022\030\n\007version\030\003 \001(\005R\007version" + + "\022\033\n\tlock_time\030\004 \001(\rR\010lockTime\022\024\n\005value\030\005" + + " \001(\003R\005value\022\020\n\003fee\030\006 \001(\003R\003fee\0226\n\014payload" + + "_type\030\007 \001(\0162\023.pactus.PayloadTypeR\013payloa" + + "dType\0225\n\010transfer\030\036 \001(\0132\027.pactus.Payload" + + "TransferH\000R\010transfer\022)\n\004bond\030\037 \001(\0132\023.pac" + + "tus.PayloadBondH\000R\004bond\0228\n\tsortition\030 \001" + + "(\0132\030.pactus.PayloadSortitionH\000R\tsortitio" + + "n\022/\n\006unbond\030! \001(\0132\025.pactus.PayloadUnbond" + + "H\000R\006unbond\0225\n\010withdraw\030\" \001(\0132\027.pactus.Pa" + + "yloadWithdrawH\000R\010withdraw\022\022\n\004memo\030\010 \001(\tR" + + "\004memo\022\035\n\npublic_key\030\t \001(\tR\tpublicKey\022\034\n\t" + + "signature\030\n \001(\tR\tsignatureB\t\n\007payload*\203\001" + + "\n\013PayloadType\022\013\n\007UNKNOWN\020\000\022\024\n\020TRANSFER_P" + + "AYLOAD\020\001\022\020\n\014BOND_PAYLOAD\020\002\022\025\n\021SORTITION_" + + "PAYLOAD\020\003\022\022\n\016UNBOND_PAYLOAD\020\004\022\024\n\020WITHDRA" + + "W_PAYLOAD\020\005*B\n\024TransactionVerbosity\022\024\n\020T" + + "RANSACTION_DATA\020\000\022\024\n\020TRANSACTION_INFO\020\0012" + + "\202\006\n\013Transaction\022O\n\016GetTransaction\022\035.pact" + + "us.GetTransactionRequest\032\036.pactus.GetTra" + + "nsactionResponse\022I\n\014CalculateFee\022\033.pactu" + + "s.CalculateFeeRequest\032\034.pactus.Calculate" + + "FeeResponse\022a\n\024BroadcastTransaction\022#.pa" + + "ctus.BroadcastTransactionRequest\032$.pactu" + + "s.BroadcastTransactionResponse\022X\n\021GetRaw" + + "Transaction\022 .pactus.GetRawTransactionRe" + + "quest\032!.pactus.GetRawTransactionResponse" + + "\022h\n\031GetRawTransferTransaction\022(.pactus.G" + + "etRawTransferTransactionRequest\032!.pactus" + + ".GetRawTransactionResponse\022`\n\025GetRawBond" + + "Transaction\022$.pactus.GetRawBondTransacti" + + "onRequest\032!.pactus.GetRawTransactionResp" + + "onse\022d\n\027GetRawUnbondTransaction\022&.pactus" + + ".GetRawUnbondTransactionRequest\032!.pactus" + + ".GetRawTransactionResponse\022h\n\031GetRawWith" + + "drawTransaction\022(.pactus.GetRawWithdrawT" + + "ransactionRequest\032!.pactus.GetRawTransac" + + "tionResponseBF\n\022pactus.transactionZ0gith" + + "ub.com/pactus-project/pactus/www/grpc/pa" + + "ctusb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -17887,63 +22709,87 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawTransferTransactionRequest_descriptor, - new java.lang.String[] { "Sender", "Receiver", "Amount", "Fee", }); + new java.lang.String[] { "LockTime", "Sender", "Receiver", "Amount", "Fee", "Memo", }); internal_static_pactus_GetRawBondTransactionRequest_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_pactus_GetRawBondTransactionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawBondTransactionRequest_descriptor, - new java.lang.String[] { "Sender", "Receiver", "Stake", "PublicKey", "Fee", }); + new java.lang.String[] { "LockTime", "Sender", "Receiver", "Stake", "PublicKey", "Fee", "Memo", }); internal_static_pactus_GetRawUnbondTransactionRequest_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_pactus_GetRawUnbondTransactionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawUnbondTransactionRequest_descriptor, - new java.lang.String[] { "ValidatorAddress", }); + new java.lang.String[] { "LockTime", "ValidatorAddress", "Memo", }); internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor, + new java.lang.String[] { "LockTime", "ValidatorAddress", "AccountAddress", "Amount", "Fee", "Memo", }); + internal_static_pactus_RawTransfer_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_pactus_RawTransfer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_RawTransfer_descriptor, + new java.lang.String[] { "Sender", "Receiver", "Amount", "Fee", }); + internal_static_pactus_RawBond_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_pactus_RawBond_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_RawBond_descriptor, + new java.lang.String[] { "Sender", "Receiver", "Stake", "PublicKey", "Fee", }); + internal_static_pactus_RawUnbond_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_pactus_RawUnbond_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_RawUnbond_descriptor, + new java.lang.String[] { "ValidatorAddress", }); + internal_static_pactus_RawWithdraw_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_pactus_RawWithdraw_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pactus_RawWithdraw_descriptor, new java.lang.String[] { "ValidatorAddress", "AccountAddress", "Amount", "Fee", }); internal_static_pactus_GetRawTransactionResponse_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(15); internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawTransactionResponse_descriptor, new java.lang.String[] { "RawTransaction", }); internal_static_pactus_PayloadTransfer_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(16); internal_static_pactus_PayloadTransfer_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadTransfer_descriptor, new java.lang.String[] { "Sender", "Receiver", "Amount", }); internal_static_pactus_PayloadBond_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(17); internal_static_pactus_PayloadBond_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadBond_descriptor, new java.lang.String[] { "Sender", "Receiver", "Stake", }); internal_static_pactus_PayloadSortition_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(18); internal_static_pactus_PayloadSortition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadSortition_descriptor, new java.lang.String[] { "Address", "Proof", }); internal_static_pactus_PayloadUnbond_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(19); internal_static_pactus_PayloadUnbond_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadUnbond_descriptor, new java.lang.String[] { "Validator", }); internal_static_pactus_PayloadWithdraw_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(20); internal_static_pactus_PayloadWithdraw_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadWithdraw_descriptor, new java.lang.String[] { "From", "To", "Amount", }); internal_static_pactus_TransactionInfo_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(21); internal_static_pactus_TransactionInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_TransactionInfo_descriptor, diff --git a/www/grpc/gen/js/transaction_grpc_pb.js b/www/grpc/gen/js/transaction_grpc_pb.js index 11a49b9b0..d516fbb90 100644 --- a/www/grpc/gen/js/transaction_grpc_pb.js +++ b/www/grpc/gen/js/transaction_grpc_pb.js @@ -48,6 +48,17 @@ function deserialize_pactus_CalculateFeeResponse(buffer_arg) { return transaction_pb.CalculateFeeResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_pactus_GetRawBondTransactionRequest(arg) { + if (!(arg instanceof transaction_pb.GetRawBondTransactionRequest)) { + throw new Error('Expected argument of type pactus.GetRawBondTransactionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetRawBondTransactionRequest(buffer_arg) { + return transaction_pb.GetRawBondTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_pactus_GetRawTransactionRequest(arg) { if (!(arg instanceof transaction_pb.GetRawTransactionRequest)) { throw new Error('Expected argument of type pactus.GetRawTransactionRequest'); @@ -70,6 +81,39 @@ function deserialize_pactus_GetRawTransactionResponse(buffer_arg) { return transaction_pb.GetRawTransactionResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_pactus_GetRawTransferTransactionRequest(arg) { + if (!(arg instanceof transaction_pb.GetRawTransferTransactionRequest)) { + throw new Error('Expected argument of type pactus.GetRawTransferTransactionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetRawTransferTransactionRequest(buffer_arg) { + return transaction_pb.GetRawTransferTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetRawUnbondTransactionRequest(arg) { + if (!(arg instanceof transaction_pb.GetRawUnbondTransactionRequest)) { + throw new Error('Expected argument of type pactus.GetRawUnbondTransactionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetRawUnbondTransactionRequest(buffer_arg) { + return transaction_pb.GetRawUnbondTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_pactus_GetRawWithdrawTransactionRequest(arg) { + if (!(arg instanceof transaction_pb.GetRawWithdrawTransactionRequest)) { + throw new Error('Expected argument of type pactus.GetRawWithdrawTransactionRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_pactus_GetRawWithdrawTransactionRequest(buffer_arg) { + return transaction_pb.GetRawWithdrawTransactionRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_pactus_GetTransactionRequest(arg) { if (!(arg instanceof transaction_pb.GetTransactionRequest)) { throw new Error('Expected argument of type pactus.GetTransactionRequest'); @@ -146,6 +190,54 @@ getRawTransaction: { responseSerialize: serialize_pactus_GetRawTransactionResponse, responseDeserialize: deserialize_pactus_GetRawTransactionResponse, }, + // Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. +getRawTransferTransaction: { + path: '/pactus.Transaction/GetRawTransferTransaction', + requestStream: false, + responseStream: false, + requestType: transaction_pb.GetRawTransferTransactionRequest, + responseType: transaction_pb.GetRawTransactionResponse, + requestSerialize: serialize_pactus_GetRawTransferTransactionRequest, + requestDeserialize: deserialize_pactus_GetRawTransferTransactionRequest, + responseSerialize: serialize_pactus_GetRawTransactionResponse, + responseDeserialize: deserialize_pactus_GetRawTransactionResponse, + }, + // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. +getRawBondTransaction: { + path: '/pactus.Transaction/GetRawBondTransaction', + requestStream: false, + responseStream: false, + requestType: transaction_pb.GetRawBondTransactionRequest, + responseType: transaction_pb.GetRawTransactionResponse, + requestSerialize: serialize_pactus_GetRawBondTransactionRequest, + requestDeserialize: deserialize_pactus_GetRawBondTransactionRequest, + responseSerialize: serialize_pactus_GetRawTransactionResponse, + responseDeserialize: deserialize_pactus_GetRawTransactionResponse, + }, + // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. +getRawUnbondTransaction: { + path: '/pactus.Transaction/GetRawUnbondTransaction', + requestStream: false, + responseStream: false, + requestType: transaction_pb.GetRawUnbondTransactionRequest, + responseType: transaction_pb.GetRawTransactionResponse, + requestSerialize: serialize_pactus_GetRawUnbondTransactionRequest, + requestDeserialize: deserialize_pactus_GetRawUnbondTransactionRequest, + responseSerialize: serialize_pactus_GetRawTransactionResponse, + responseDeserialize: deserialize_pactus_GetRawTransactionResponse, + }, + // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. +getRawWithdrawTransaction: { + path: '/pactus.Transaction/GetRawWithdrawTransaction', + requestStream: false, + responseStream: false, + requestType: transaction_pb.GetRawWithdrawTransactionRequest, + responseType: transaction_pb.GetRawTransactionResponse, + requestSerialize: serialize_pactus_GetRawWithdrawTransactionRequest, + requestDeserialize: deserialize_pactus_GetRawWithdrawTransactionRequest, + responseSerialize: serialize_pactus_GetRawTransactionResponse, + responseDeserialize: deserialize_pactus_GetRawTransactionResponse, + }, }; exports.TransactionClient = grpc.makeGenericClientConstructor(TransactionService); diff --git a/www/grpc/gen/js/transaction_pb.js b/www/grpc/gen/js/transaction_pb.js index e3d5bf8d8..355c283a0 100644 --- a/www/grpc/gen/js/transaction_pb.js +++ b/www/grpc/gen/js/transaction_pb.js @@ -40,6 +40,10 @@ goog.exportSymbol('proto.pactus.PayloadTransfer', null, global); goog.exportSymbol('proto.pactus.PayloadType', null, global); goog.exportSymbol('proto.pactus.PayloadUnbond', null, global); goog.exportSymbol('proto.pactus.PayloadWithdraw', null, global); +goog.exportSymbol('proto.pactus.RawBond', null, global); +goog.exportSymbol('proto.pactus.RawTransfer', null, global); +goog.exportSymbol('proto.pactus.RawUnbond', null, global); +goog.exportSymbol('proto.pactus.RawWithdraw', null, global); goog.exportSymbol('proto.pactus.TransactionInfo', null, global); goog.exportSymbol('proto.pactus.TransactionInfo.PayloadCase', null, global); goog.exportSymbol('proto.pactus.TransactionVerbosity', null, global); @@ -274,6 +278,90 @@ if (goog.DEBUG && !COMPILED) { */ proto.pactus.GetRawWithdrawTransactionRequest.displayName = 'proto.pactus.GetRawWithdrawTransactionRequest'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.RawTransfer = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.RawTransfer, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.RawTransfer.displayName = 'proto.pactus.RawTransfer'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.RawBond = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.RawBond, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.RawBond.displayName = 'proto.pactus.RawBond'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.RawUnbond = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.RawUnbond, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.RawUnbond.displayName = 'proto.pactus.RawUnbond'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.pactus.RawWithdraw = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pactus.RawWithdraw, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pactus.RawWithdraw.displayName = 'proto.pactus.RawWithdraw'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -1464,10 +1552,10 @@ proto.pactus.GetRawTransactionRequest.toObject = function(includeInstance, msg) var f, obj = { lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), memo: jspb.Message.getFieldWithDefault(msg, 2, ""), - transfer: (f = msg.getTransfer()) && proto.pactus.GetRawTransferTransactionRequest.toObject(includeInstance, f), - bond: (f = msg.getBond()) && proto.pactus.GetRawBondTransactionRequest.toObject(includeInstance, f), - unbond: (f = msg.getUnbond()) && proto.pactus.GetRawUnbondTransactionRequest.toObject(includeInstance, f), - withdraw: (f = msg.getWithdraw()) && proto.pactus.GetRawWithdrawTransactionRequest.toObject(includeInstance, f) + transfer: (f = msg.getTransfer()) && proto.pactus.RawTransfer.toObject(includeInstance, f), + bond: (f = msg.getBond()) && proto.pactus.RawBond.toObject(includeInstance, f), + unbond: (f = msg.getUnbond()) && proto.pactus.RawUnbond.toObject(includeInstance, f), + withdraw: (f = msg.getWithdraw()) && proto.pactus.RawWithdraw.toObject(includeInstance, f) }; if (includeInstance) { @@ -1513,23 +1601,23 @@ proto.pactus.GetRawTransactionRequest.deserializeBinaryFromReader = function(msg msg.setMemo(value); break; case 3: - var value = new proto.pactus.GetRawTransferTransactionRequest; - reader.readMessage(value,proto.pactus.GetRawTransferTransactionRequest.deserializeBinaryFromReader); + var value = new proto.pactus.RawTransfer; + reader.readMessage(value,proto.pactus.RawTransfer.deserializeBinaryFromReader); msg.setTransfer(value); break; case 4: - var value = new proto.pactus.GetRawBondTransactionRequest; - reader.readMessage(value,proto.pactus.GetRawBondTransactionRequest.deserializeBinaryFromReader); + var value = new proto.pactus.RawBond; + reader.readMessage(value,proto.pactus.RawBond.deserializeBinaryFromReader); msg.setBond(value); break; case 5: - var value = new proto.pactus.GetRawUnbondTransactionRequest; - reader.readMessage(value,proto.pactus.GetRawUnbondTransactionRequest.deserializeBinaryFromReader); + var value = new proto.pactus.RawUnbond; + reader.readMessage(value,proto.pactus.RawUnbond.deserializeBinaryFromReader); msg.setUnbond(value); break; case 6: - var value = new proto.pactus.GetRawWithdrawTransactionRequest; - reader.readMessage(value,proto.pactus.GetRawWithdrawTransactionRequest.deserializeBinaryFromReader); + var value = new proto.pactus.RawWithdraw; + reader.readMessage(value,proto.pactus.RawWithdraw.deserializeBinaryFromReader); msg.setWithdraw(value); break; default: @@ -1580,7 +1668,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 3, f, - proto.pactus.GetRawTransferTransactionRequest.serializeBinaryToWriter + proto.pactus.RawTransfer.serializeBinaryToWriter ); } f = message.getBond(); @@ -1588,7 +1676,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 4, f, - proto.pactus.GetRawBondTransactionRequest.serializeBinaryToWriter + proto.pactus.RawBond.serializeBinaryToWriter ); } f = message.getUnbond(); @@ -1596,7 +1684,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 5, f, - proto.pactus.GetRawUnbondTransactionRequest.serializeBinaryToWriter + proto.pactus.RawUnbond.serializeBinaryToWriter ); } f = message.getWithdraw(); @@ -1604,7 +1692,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 6, f, - proto.pactus.GetRawWithdrawTransactionRequest.serializeBinaryToWriter + proto.pactus.RawWithdraw.serializeBinaryToWriter ); } }; @@ -1647,17 +1735,17 @@ proto.pactus.GetRawTransactionRequest.prototype.setMemo = function(value) { /** - * optional GetRawTransferTransactionRequest transfer = 3; - * @return {?proto.pactus.GetRawTransferTransactionRequest} + * optional RawTransfer transfer = 3; + * @return {?proto.pactus.RawTransfer} */ proto.pactus.GetRawTransactionRequest.prototype.getTransfer = function() { - return /** @type{?proto.pactus.GetRawTransferTransactionRequest} */ ( - jspb.Message.getWrapperField(this, proto.pactus.GetRawTransferTransactionRequest, 3)); + return /** @type{?proto.pactus.RawTransfer} */ ( + jspb.Message.getWrapperField(this, proto.pactus.RawTransfer, 3)); }; /** - * @param {?proto.pactus.GetRawTransferTransactionRequest|undefined} value + * @param {?proto.pactus.RawTransfer|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setTransfer = function(value) { @@ -1684,17 +1772,17 @@ proto.pactus.GetRawTransactionRequest.prototype.hasTransfer = function() { /** - * optional GetRawBondTransactionRequest bond = 4; - * @return {?proto.pactus.GetRawBondTransactionRequest} + * optional RawBond bond = 4; + * @return {?proto.pactus.RawBond} */ proto.pactus.GetRawTransactionRequest.prototype.getBond = function() { - return /** @type{?proto.pactus.GetRawBondTransactionRequest} */ ( - jspb.Message.getWrapperField(this, proto.pactus.GetRawBondTransactionRequest, 4)); + return /** @type{?proto.pactus.RawBond} */ ( + jspb.Message.getWrapperField(this, proto.pactus.RawBond, 4)); }; /** - * @param {?proto.pactus.GetRawBondTransactionRequest|undefined} value + * @param {?proto.pactus.RawBond|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setBond = function(value) { @@ -1721,17 +1809,17 @@ proto.pactus.GetRawTransactionRequest.prototype.hasBond = function() { /** - * optional GetRawUnbondTransactionRequest unbond = 5; - * @return {?proto.pactus.GetRawUnbondTransactionRequest} + * optional RawUnbond unbond = 5; + * @return {?proto.pactus.RawUnbond} */ proto.pactus.GetRawTransactionRequest.prototype.getUnbond = function() { - return /** @type{?proto.pactus.GetRawUnbondTransactionRequest} */ ( - jspb.Message.getWrapperField(this, proto.pactus.GetRawUnbondTransactionRequest, 5)); + return /** @type{?proto.pactus.RawUnbond} */ ( + jspb.Message.getWrapperField(this, proto.pactus.RawUnbond, 5)); }; /** - * @param {?proto.pactus.GetRawUnbondTransactionRequest|undefined} value + * @param {?proto.pactus.RawUnbond|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setUnbond = function(value) { @@ -1758,17 +1846,17 @@ proto.pactus.GetRawTransactionRequest.prototype.hasUnbond = function() { /** - * optional GetRawWithdrawTransactionRequest withdraw = 6; - * @return {?proto.pactus.GetRawWithdrawTransactionRequest} + * optional RawWithdraw withdraw = 6; + * @return {?proto.pactus.RawWithdraw} */ proto.pactus.GetRawTransactionRequest.prototype.getWithdraw = function() { - return /** @type{?proto.pactus.GetRawWithdrawTransactionRequest} */ ( - jspb.Message.getWrapperField(this, proto.pactus.GetRawWithdrawTransactionRequest, 6)); + return /** @type{?proto.pactus.RawWithdraw} */ ( + jspb.Message.getWrapperField(this, proto.pactus.RawWithdraw, 6)); }; /** - * @param {?proto.pactus.GetRawWithdrawTransactionRequest|undefined} value + * @param {?proto.pactus.RawWithdraw|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setWithdraw = function(value) { @@ -1826,10 +1914,12 @@ proto.pactus.GetRawTransferTransactionRequest.prototype.toObject = function(opt_ */ proto.pactus.GetRawTransferTransactionRequest.toObject = function(includeInstance, msg) { var f, obj = { - sender: jspb.Message.getFieldWithDefault(msg, 1, ""), - receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 4, 0) + lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), + sender: jspb.Message.getFieldWithDefault(msg, 2, ""), + receiver: jspb.Message.getFieldWithDefault(msg, 3, ""), + amount: jspb.Message.getFieldWithDefault(msg, 4, 0), + fee: jspb.Message.getFieldWithDefault(msg, 5, 0), + memo: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -1867,21 +1957,29 @@ proto.pactus.GetRawTransferTransactionRequest.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLockTime(value); + break; + case 2: var value = /** @type {string} */ (reader.readString()); msg.setSender(value); break; - case 2: + case 3: var value = /** @type {string} */ (reader.readString()); msg.setReceiver(value); break; - case 3: + case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setAmount(value); break; - case 4: + case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setFee(value); break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; default: reader.skipField(); break; @@ -1911,31 +2009,45 @@ proto.pactus.GetRawTransferTransactionRequest.prototype.serializeBinary = functi */ proto.pactus.GetRawTransferTransactionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getLockTime(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } f = message.getSender(); if (f.length > 0) { writer.writeString( - 1, + 2, f ); } f = message.getReceiver(); if (f.length > 0) { writer.writeString( - 2, + 3, f ); } f = message.getAmount(); if (f !== 0) { writer.writeInt64( - 3, + 4, f ); } f = message.getFee(); if (f !== 0) { writer.writeInt64( - 4, + 5, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, f ); } @@ -1943,11 +2055,29 @@ proto.pactus.GetRawTransferTransactionRequest.serializeBinaryToWriter = function /** - * optional string sender = 1; + * optional uint32 lock_time = 1; + * @return {number} + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.getLockTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.setLockTime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string sender = 2; * @return {string} */ proto.pactus.GetRawTransferTransactionRequest.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -1956,16 +2086,16 @@ proto.pactus.GetRawTransferTransactionRequest.prototype.getSender = function() { * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this */ proto.pactus.GetRawTransferTransactionRequest.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string receiver = 2; + * optional string receiver = 3; * @return {string} */ proto.pactus.GetRawTransferTransactionRequest.prototype.getReceiver = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -1974,16 +2104,16 @@ proto.pactus.GetRawTransferTransactionRequest.prototype.getReceiver = function() * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this */ proto.pactus.GetRawTransferTransactionRequest.prototype.setReceiver = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional int64 amount = 3; + * optional int64 amount = 4; * @return {number} */ proto.pactus.GetRawTransferTransactionRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; @@ -1992,16 +2122,16 @@ proto.pactus.GetRawTransferTransactionRequest.prototype.getAmount = function() { * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this */ proto.pactus.GetRawTransferTransactionRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional int64 fee = 4; + * optional int64 fee = 5; * @return {number} */ proto.pactus.GetRawTransferTransactionRequest.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; @@ -2010,7 +2140,25 @@ proto.pactus.GetRawTransferTransactionRequest.prototype.getFee = function() { * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this */ proto.pactus.GetRawTransferTransactionRequest.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string memo = 6; + * @return {string} + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawTransferTransactionRequest} returns this + */ +proto.pactus.GetRawTransferTransactionRequest.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; @@ -2046,11 +2194,13 @@ proto.pactus.GetRawBondTransactionRequest.prototype.toObject = function(opt_incl */ proto.pactus.GetRawBondTransactionRequest.toObject = function(includeInstance, msg) { var f, obj = { - sender: jspb.Message.getFieldWithDefault(msg, 1, ""), - receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), - stake: jspb.Message.getFieldWithDefault(msg, 3, 0), - publicKey: jspb.Message.getFieldWithDefault(msg, 4, ""), - fee: jspb.Message.getFieldWithDefault(msg, 5, 0) + lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), + sender: jspb.Message.getFieldWithDefault(msg, 2, ""), + receiver: jspb.Message.getFieldWithDefault(msg, 3, ""), + stake: jspb.Message.getFieldWithDefault(msg, 4, 0), + publicKey: jspb.Message.getFieldWithDefault(msg, 5, ""), + fee: jspb.Message.getFieldWithDefault(msg, 6, 0), + memo: jspb.Message.getFieldWithDefault(msg, 7, "") }; if (includeInstance) { @@ -2088,25 +2238,33 @@ proto.pactus.GetRawBondTransactionRequest.deserializeBinaryFromReader = function var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLockTime(value); + break; + case 2: var value = /** @type {string} */ (reader.readString()); msg.setSender(value); break; - case 2: + case 3: var value = /** @type {string} */ (reader.readString()); msg.setReceiver(value); break; - case 3: + case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setStake(value); break; - case 4: + case 5: var value = /** @type {string} */ (reader.readString()); msg.setPublicKey(value); break; - case 5: + case 6: var value = /** @type {number} */ (reader.readInt64()); msg.setFee(value); break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; default: reader.skipField(); break; @@ -2136,38 +2294,52 @@ proto.pactus.GetRawBondTransactionRequest.prototype.serializeBinary = function() */ proto.pactus.GetRawBondTransactionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getLockTime(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } f = message.getSender(); if (f.length > 0) { writer.writeString( - 1, + 2, f ); } f = message.getReceiver(); if (f.length > 0) { writer.writeString( - 2, + 3, f ); } f = message.getStake(); if (f !== 0) { writer.writeInt64( - 3, + 4, f ); } f = message.getPublicKey(); if (f.length > 0) { writer.writeString( - 4, + 5, f ); } f = message.getFee(); if (f !== 0) { writer.writeInt64( - 5, + 6, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 7, f ); } @@ -2175,11 +2347,29 @@ proto.pactus.GetRawBondTransactionRequest.serializeBinaryToWriter = function(mes /** - * optional string sender = 1; + * optional uint32 lock_time = 1; + * @return {number} + */ +proto.pactus.GetRawBondTransactionRequest.prototype.getLockTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawBondTransactionRequest} returns this + */ +proto.pactus.GetRawBondTransactionRequest.prototype.setLockTime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string sender = 2; * @return {string} */ proto.pactus.GetRawBondTransactionRequest.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -2188,16 +2378,16 @@ proto.pactus.GetRawBondTransactionRequest.prototype.getSender = function() { * @return {!proto.pactus.GetRawBondTransactionRequest} returns this */ proto.pactus.GetRawBondTransactionRequest.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string receiver = 2; + * optional string receiver = 3; * @return {string} */ proto.pactus.GetRawBondTransactionRequest.prototype.getReceiver = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -2206,16 +2396,16 @@ proto.pactus.GetRawBondTransactionRequest.prototype.getReceiver = function() { * @return {!proto.pactus.GetRawBondTransactionRequest} returns this */ proto.pactus.GetRawBondTransactionRequest.prototype.setReceiver = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional int64 stake = 3; + * optional int64 stake = 4; * @return {number} */ proto.pactus.GetRawBondTransactionRequest.prototype.getStake = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; @@ -2224,16 +2414,16 @@ proto.pactus.GetRawBondTransactionRequest.prototype.getStake = function() { * @return {!proto.pactus.GetRawBondTransactionRequest} returns this */ proto.pactus.GetRawBondTransactionRequest.prototype.setStake = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional string public_key = 4; + * optional string public_key = 5; * @return {string} */ proto.pactus.GetRawBondTransactionRequest.prototype.getPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; @@ -2242,16 +2432,16 @@ proto.pactus.GetRawBondTransactionRequest.prototype.getPublicKey = function() { * @return {!proto.pactus.GetRawBondTransactionRequest} returns this */ proto.pactus.GetRawBondTransactionRequest.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 5, value); }; /** - * optional int64 fee = 5; + * optional int64 fee = 6; * @return {number} */ proto.pactus.GetRawBondTransactionRequest.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; @@ -2260,19 +2450,37 @@ proto.pactus.GetRawBondTransactionRequest.prototype.getFee = function() { * @return {!proto.pactus.GetRawBondTransactionRequest} returns this */ proto.pactus.GetRawBondTransactionRequest.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 6, value); }; +/** + * optional string memo = 7; + * @return {string} + */ +proto.pactus.GetRawBondTransactionRequest.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * @param {string} value + * @return {!proto.pactus.GetRawBondTransactionRequest} returns this + */ +proto.pactus.GetRawBondTransactionRequest.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the @@ -2296,7 +2504,9 @@ proto.pactus.GetRawUnbondTransactionRequest.prototype.toObject = function(opt_in */ proto.pactus.GetRawUnbondTransactionRequest.toObject = function(includeInstance, msg) { var f, obj = { - validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + memo: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -2334,9 +2544,17 @@ proto.pactus.GetRawUnbondTransactionRequest.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLockTime(value); + break; + case 3: var value = /** @type {string} */ (reader.readString()); msg.setValidatorAddress(value); break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; default: reader.skipField(); break; @@ -2366,10 +2584,24 @@ proto.pactus.GetRawUnbondTransactionRequest.prototype.serializeBinary = function */ proto.pactus.GetRawUnbondTransactionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getLockTime(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } f = message.getValidatorAddress(); if (f.length > 0) { writer.writeString( - 1, + 3, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 4, f ); } @@ -2377,11 +2609,29 @@ proto.pactus.GetRawUnbondTransactionRequest.serializeBinaryToWriter = function(m /** - * optional string validator_address = 1; + * optional uint32 lock_time = 1; + * @return {number} + */ +proto.pactus.GetRawUnbondTransactionRequest.prototype.getLockTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this + */ +proto.pactus.GetRawUnbondTransactionRequest.prototype.setLockTime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string validator_address = 3; * @return {string} */ proto.pactus.GetRawUnbondTransactionRequest.prototype.getValidatorAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -2390,7 +2640,25 @@ proto.pactus.GetRawUnbondTransactionRequest.prototype.getValidatorAddress = func * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this */ proto.pactus.GetRawUnbondTransactionRequest.prototype.setValidatorAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string memo = 4; + * @return {string} + */ +proto.pactus.GetRawUnbondTransactionRequest.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawUnbondTransactionRequest} returns this + */ +proto.pactus.GetRawUnbondTransactionRequest.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -2426,10 +2694,12 @@ proto.pactus.GetRawWithdrawTransactionRequest.prototype.toObject = function(opt_ */ proto.pactus.GetRawWithdrawTransactionRequest.toObject = function(includeInstance, msg) { var f, obj = { - validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - accountAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 4, 0) + lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + accountAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + amount: jspb.Message.getFieldWithDefault(msg, 4, 0), + fee: jspb.Message.getFieldWithDefault(msg, 5, 0), + memo: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { @@ -2467,21 +2737,29 @@ proto.pactus.GetRawWithdrawTransactionRequest.deserializeBinaryFromReader = func var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLockTime(value); + break; + case 2: var value = /** @type {string} */ (reader.readString()); msg.setValidatorAddress(value); break; - case 2: + case 3: var value = /** @type {string} */ (reader.readString()); msg.setAccountAddress(value); break; - case 3: + case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setAmount(value); break; - case 4: + case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setFee(value); break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; default: reader.skipField(); break; @@ -2511,31 +2789,45 @@ proto.pactus.GetRawWithdrawTransactionRequest.prototype.serializeBinary = functi */ proto.pactus.GetRawWithdrawTransactionRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getLockTime(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } f = message.getValidatorAddress(); if (f.length > 0) { writer.writeString( - 1, + 2, f ); } f = message.getAccountAddress(); if (f.length > 0) { writer.writeString( - 2, + 3, f ); } f = message.getAmount(); if (f !== 0) { writer.writeInt64( - 3, + 4, f ); } f = message.getFee(); if (f !== 0) { writer.writeInt64( - 4, + 5, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, f ); } @@ -2543,11 +2835,29 @@ proto.pactus.GetRawWithdrawTransactionRequest.serializeBinaryToWriter = function /** - * optional string validator_address = 1; + * optional uint32 lock_time = 1; + * @return {number} + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.getLockTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.setLockTime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; * @return {string} */ proto.pactus.GetRawWithdrawTransactionRequest.prototype.getValidatorAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -2556,16 +2866,16 @@ proto.pactus.GetRawWithdrawTransactionRequest.prototype.getValidatorAddress = fu * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this */ proto.pactus.GetRawWithdrawTransactionRequest.prototype.setValidatorAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string account_address = 2; + * optional string account_address = 3; * @return {string} */ proto.pactus.GetRawWithdrawTransactionRequest.prototype.getAccountAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -2574,16 +2884,16 @@ proto.pactus.GetRawWithdrawTransactionRequest.prototype.getAccountAddress = func * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this */ proto.pactus.GetRawWithdrawTransactionRequest.prototype.setAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional int64 amount = 3; + * optional int64 amount = 4; * @return {number} */ proto.pactus.GetRawWithdrawTransactionRequest.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; @@ -2592,16 +2902,16 @@ proto.pactus.GetRawWithdrawTransactionRequest.prototype.getAmount = function() { * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this */ proto.pactus.GetRawWithdrawTransactionRequest.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional int64 fee = 4; + * optional int64 fee = 5; * @return {number} */ proto.pactus.GetRawWithdrawTransactionRequest.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; @@ -2610,6 +2920,844 @@ proto.pactus.GetRawWithdrawTransactionRequest.prototype.getFee = function() { * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this */ proto.pactus.GetRawWithdrawTransactionRequest.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string memo = 6; + * @return {string} + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawWithdrawTransactionRequest} returns this + */ +proto.pactus.GetRawWithdrawTransactionRequest.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.RawTransfer.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.RawTransfer.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.RawTransfer} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RawTransfer.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + fee: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.RawTransfer} + */ +proto.pactus.RawTransfer.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.RawTransfer; + return proto.pactus.RawTransfer.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.RawTransfer} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.RawTransfer} + */ +proto.pactus.RawTransfer.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiver(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.RawTransfer.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.RawTransfer.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.RawTransfer} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RawTransfer.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReceiver(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.pactus.RawTransfer.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RawTransfer} returns this + */ +proto.pactus.RawTransfer.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string receiver = 2; + * @return {string} + */ +proto.pactus.RawTransfer.prototype.getReceiver = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RawTransfer} returns this + */ +proto.pactus.RawTransfer.prototype.setReceiver = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 amount = 3; + * @return {number} + */ +proto.pactus.RawTransfer.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.RawTransfer} returns this + */ +proto.pactus.RawTransfer.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 fee = 4; + * @return {number} + */ +proto.pactus.RawTransfer.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.RawTransfer} returns this + */ +proto.pactus.RawTransfer.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.RawBond.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.RawBond.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.RawBond} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RawBond.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), + stake: jspb.Message.getFieldWithDefault(msg, 3, 0), + publicKey: jspb.Message.getFieldWithDefault(msg, 4, ""), + fee: jspb.Message.getFieldWithDefault(msg, 5, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.RawBond} + */ +proto.pactus.RawBond.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.RawBond; + return proto.pactus.RawBond.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.RawBond} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.RawBond} + */ +proto.pactus.RawBond.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiver(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStake(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.RawBond.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.RawBond.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.RawBond} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RawBond.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReceiver(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getStake(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.pactus.RawBond.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RawBond} returns this + */ +proto.pactus.RawBond.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string receiver = 2; + * @return {string} + */ +proto.pactus.RawBond.prototype.getReceiver = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RawBond} returns this + */ +proto.pactus.RawBond.prototype.setReceiver = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 stake = 3; + * @return {number} + */ +proto.pactus.RawBond.prototype.getStake = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.RawBond} returns this + */ +proto.pactus.RawBond.prototype.setStake = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string public_key = 4; + * @return {string} + */ +proto.pactus.RawBond.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RawBond} returns this + */ +proto.pactus.RawBond.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 fee = 5; + * @return {number} + */ +proto.pactus.RawBond.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.RawBond} returns this + */ +proto.pactus.RawBond.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.RawUnbond.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.RawUnbond.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.RawUnbond} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RawUnbond.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.RawUnbond} + */ +proto.pactus.RawUnbond.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.RawUnbond; + return proto.pactus.RawUnbond.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.RawUnbond} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.RawUnbond} + */ +proto.pactus.RawUnbond.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.RawUnbond.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.RawUnbond.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.RawUnbond} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RawUnbond.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.pactus.RawUnbond.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RawUnbond} returns this + */ +proto.pactus.RawUnbond.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.pactus.RawWithdraw.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.RawWithdraw.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.pactus.RawWithdraw} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RawWithdraw.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + accountAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + fee: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.pactus.RawWithdraw} + */ +proto.pactus.RawWithdraw.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pactus.RawWithdraw; + return proto.pactus.RawWithdraw.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pactus.RawWithdraw} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pactus.RawWithdraw} + */ +proto.pactus.RawWithdraw.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAccountAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setAmount(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pactus.RawWithdraw.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pactus.RawWithdraw.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.pactus.RawWithdraw} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pactus.RawWithdraw.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAccountAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.pactus.RawWithdraw.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RawWithdraw} returns this + */ +proto.pactus.RawWithdraw.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string account_address = 2; + * @return {string} + */ +proto.pactus.RawWithdraw.prototype.getAccountAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.RawWithdraw} returns this + */ +proto.pactus.RawWithdraw.prototype.setAccountAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 amount = 3; + * @return {number} + */ +proto.pactus.RawWithdraw.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.RawWithdraw} returns this + */ +proto.pactus.RawWithdraw.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 fee = 4; + * @return {number} + */ +proto.pactus.RawWithdraw.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.RawWithdraw} returns this + */ +proto.pactus.RawWithdraw.prototype.setFee = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; diff --git a/www/grpc/gen/python/transaction_pb2.py b/www/grpc/gen/python/transaction_pb2.py index a1963296a..9882c634b 100644 --- a/www/grpc/gen/python/transaction_pb2.py +++ b/www/grpc/gen/python/transaction_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11transaction.proto\x12\x06pactus\"c\n\x15GetTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tverbosity\x18\x02 \x01(\x0e\x32\x1c.pactus.TransactionVerbosityR\tverbosity\"\x95\x01\n\x16GetTransactionResponse\x12!\n\x0c\x62lock_height\x18\x01 \x01(\rR\x0b\x62lockHeight\x12\x1d\n\nblock_time\x18\x02 \x01(\rR\tblockTime\x12\x39\n\x0btransaction\x18\x03 \x01(\x0b\x32\x17.pactus.TransactionInfoR\x0btransaction\"\x88\x01\n\x13\x43\x61lculateFeeRequest\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x36\n\x0cpayload_type\x18\x02 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12!\n\x0c\x66ixed_amount\x18\x03 \x01(\x08R\x0b\x66ixedAmount\"@\n\x14\x43\x61lculateFeeResponse\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x02 \x01(\x03R\x03\x66\x65\x65\"S\n\x1b\x42roadcastTransactionRequest\x12\x34\n\x16signed_raw_transaction\x18\x01 \x01(\tR\x14signedRawTransaction\".\n\x1c\x42roadcastTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xe8\x02\n\x18GetRawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x12\n\x04memo\x18\x02 \x01(\tR\x04memo\x12\x46\n\x08transfer\x18\x03 \x01(\x0b\x32(.pactus.GetRawTransferTransactionRequestH\x00R\x08transfer\x12:\n\x04\x62ond\x18\x04 \x01(\x0b\x32$.pactus.GetRawBondTransactionRequestH\x00R\x04\x62ond\x12@\n\x06unbond\x18\x05 \x01(\x0b\x32&.pactus.GetRawUnbondTransactionRequestH\x00R\x06unbond\x12\x46\n\x08withdraw\x18\x06 \x01(\x0b\x32(.pactus.GetRawWithdrawTransactionRequestH\x00R\x08withdrawB\r\n\x0btransaction\"\x80\x01\n GetRawTransferTransactionRequest\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"\x99\x01\n\x1cGetRawBondTransactionRequest\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x04 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\"M\n\x1eGetRawUnbondTransactionRequest\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\"\xa2\x01\n GetRawWithdrawTransactionRequest\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x02 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"D\n\x19GetRawTransactionResponse\x12\'\n\x0fraw_transaction\x18\x01 \x01(\tR\x0erawTransaction\"]\n\x0fPayloadTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"W\n\x0bPayloadBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\"B\n\x10PayloadSortition\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x14\n\x05proof\x18\x02 \x01(\tR\x05proof\"-\n\rPayloadUnbond\x12\x1c\n\tvalidator\x18\x01 \x01(\tR\tvalidator\"M\n\x0fPayloadWithdraw\x12\x12\n\x04\x66rom\x18\x01 \x01(\tR\x04\x66rom\x12\x0e\n\x02to\x18\x02 \x01(\tR\x02to\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"\xac\x04\n\x0fTransactionInfo\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x18\n\x07version\x18\x03 \x01(\x05R\x07version\x12\x1b\n\tlock_time\x18\x04 \x01(\rR\x08lockTime\x12\x14\n\x05value\x18\x05 \x01(\x03R\x05value\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x36\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12\x35\n\x08transfer\x18\x1e \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x1f \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12\x38\n\tsortition\x18 \x01(\x0b\x32\x18.pactus.PayloadSortitionH\x00R\tsortition\x12/\n\x06unbond\x18! \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\" \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdraw\x12\x12\n\x04memo\x18\x08 \x01(\tR\x04memo\x12\x1d\n\npublic_key\x18\t \x01(\tR\tpublicKey\x12\x1c\n\tsignature\x18\n \x01(\tR\tsignatureB\t\n\x07payload*\x83\x01\n\x0bPayloadType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10TRANSFER_PAYLOAD\x10\x01\x12\x10\n\x0c\x42OND_PAYLOAD\x10\x02\x12\x15\n\x11SORTITION_PAYLOAD\x10\x03\x12\x12\n\x0eUNBOND_PAYLOAD\x10\x04\x12\x14\n\x10WITHDRAW_PAYLOAD\x10\x05*B\n\x14TransactionVerbosity\x12\x14\n\x10TRANSACTION_DATA\x10\x00\x12\x14\n\x10TRANSACTION_INFO\x10\x01\x32\xe6\x02\n\x0bTransaction\x12O\n\x0eGetTransaction\x12\x1d.pactus.GetTransactionRequest\x1a\x1e.pactus.GetTransactionResponse\x12I\n\x0c\x43\x61lculateFee\x12\x1b.pactus.CalculateFeeRequest\x1a\x1c.pactus.CalculateFeeResponse\x12\x61\n\x14\x42roadcastTransaction\x12#.pactus.BroadcastTransactionRequest\x1a$.pactus.BroadcastTransactionResponse\x12X\n\x11GetRawTransaction\x12 .pactus.GetRawTransactionRequest\x1a!.pactus.GetRawTransactionResponseBF\n\x12pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11transaction.proto\x12\x06pactus\"c\n\x15GetTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tverbosity\x18\x02 \x01(\x0e\x32\x1c.pactus.TransactionVerbosityR\tverbosity\"\x95\x01\n\x16GetTransactionResponse\x12!\n\x0c\x62lock_height\x18\x01 \x01(\rR\x0b\x62lockHeight\x12\x1d\n\nblock_time\x18\x02 \x01(\rR\tblockTime\x12\x39\n\x0btransaction\x18\x03 \x01(\x0b\x32\x17.pactus.TransactionInfoR\x0btransaction\"\x88\x01\n\x13\x43\x61lculateFeeRequest\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x36\n\x0cpayload_type\x18\x02 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12!\n\x0c\x66ixed_amount\x18\x03 \x01(\x08R\x0b\x66ixedAmount\"@\n\x14\x43\x61lculateFeeResponse\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x02 \x01(\x03R\x03\x66\x65\x65\"S\n\x1b\x42roadcastTransactionRequest\x12\x34\n\x16signed_raw_transaction\x18\x01 \x01(\tR\x14signedRawTransaction\".\n\x1c\x42roadcastTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x94\x02\n\x18GetRawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x12\n\x04memo\x18\x02 \x01(\tR\x04memo\x12\x31\n\x08transfer\x18\x03 \x01(\x0b\x32\x13.pactus.RawTransferH\x00R\x08transfer\x12%\n\x04\x62ond\x18\x04 \x01(\x0b\x32\x0f.pactus.RawBondH\x00R\x04\x62ond\x12+\n\x06unbond\x18\x05 \x01(\x0b\x32\x11.pactus.RawUnbondH\x00R\x06unbond\x12\x31\n\x08withdraw\x18\x06 \x01(\x0b\x32\x13.pactus.RawWithdrawH\x00R\x08withdrawB\r\n\x0btransaction\"\xb1\x01\n GetRawTransferTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"\xca\x01\n\x1cGetRawBondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x04 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x05 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x07 \x01(\tR\x04memo\"~\n\x1eGetRawUnbondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x03 \x01(\tR\x10validatorAddress\x12\x12\n\x04memo\x18\x04 \x01(\tR\x04memo\"\xd3\x01\n GetRawWithdrawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"k\n\x0bRawTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"\x84\x01\n\x07RawBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x04 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\"8\n\tRawUnbond\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\"\x8d\x01\n\x0bRawWithdraw\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x02 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"D\n\x19GetRawTransactionResponse\x12\'\n\x0fraw_transaction\x18\x01 \x01(\tR\x0erawTransaction\"]\n\x0fPayloadTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"W\n\x0bPayloadBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\"B\n\x10PayloadSortition\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x14\n\x05proof\x18\x02 \x01(\tR\x05proof\"-\n\rPayloadUnbond\x12\x1c\n\tvalidator\x18\x01 \x01(\tR\tvalidator\"M\n\x0fPayloadWithdraw\x12\x12\n\x04\x66rom\x18\x01 \x01(\tR\x04\x66rom\x12\x0e\n\x02to\x18\x02 \x01(\tR\x02to\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"\xac\x04\n\x0fTransactionInfo\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x18\n\x07version\x18\x03 \x01(\x05R\x07version\x12\x1b\n\tlock_time\x18\x04 \x01(\rR\x08lockTime\x12\x14\n\x05value\x18\x05 \x01(\x03R\x05value\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x36\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12\x35\n\x08transfer\x18\x1e \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x1f \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12\x38\n\tsortition\x18 \x01(\x0b\x32\x18.pactus.PayloadSortitionH\x00R\tsortition\x12/\n\x06unbond\x18! \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\" \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdraw\x12\x12\n\x04memo\x18\x08 \x01(\tR\x04memo\x12\x1d\n\npublic_key\x18\t \x01(\tR\tpublicKey\x12\x1c\n\tsignature\x18\n \x01(\tR\tsignatureB\t\n\x07payload*\x83\x01\n\x0bPayloadType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10TRANSFER_PAYLOAD\x10\x01\x12\x10\n\x0c\x42OND_PAYLOAD\x10\x02\x12\x15\n\x11SORTITION_PAYLOAD\x10\x03\x12\x12\n\x0eUNBOND_PAYLOAD\x10\x04\x12\x14\n\x10WITHDRAW_PAYLOAD\x10\x05*B\n\x14TransactionVerbosity\x12\x14\n\x10TRANSACTION_DATA\x10\x00\x12\x14\n\x10TRANSACTION_INFO\x10\x01\x32\x82\x06\n\x0bTransaction\x12O\n\x0eGetTransaction\x12\x1d.pactus.GetTransactionRequest\x1a\x1e.pactus.GetTransactionResponse\x12I\n\x0c\x43\x61lculateFee\x12\x1b.pactus.CalculateFeeRequest\x1a\x1c.pactus.CalculateFeeResponse\x12\x61\n\x14\x42roadcastTransaction\x12#.pactus.BroadcastTransactionRequest\x1a$.pactus.BroadcastTransactionResponse\x12X\n\x11GetRawTransaction\x12 .pactus.GetRawTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawTransferTransaction\x12(.pactus.GetRawTransferTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12`\n\x15GetRawBondTransaction\x12$.pactus.GetRawBondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12\x64\n\x17GetRawUnbondTransaction\x12&.pactus.GetRawUnbondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawWithdrawTransaction\x12(.pactus.GetRawWithdrawTransactionRequest\x1a!.pactus.GetRawTransactionResponseBF\n\x12pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'transaction_pb2', globals()) @@ -21,10 +21,10 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactus' - _PAYLOADTYPE._serialized_start=2522 - _PAYLOADTYPE._serialized_end=2653 - _TRANSACTIONVERBOSITY._serialized_start=2655 - _TRANSACTIONVERBOSITY._serialized_end=2721 + _PAYLOADTYPE._serialized_start=3080 + _PAYLOADTYPE._serialized_end=3211 + _TRANSACTIONVERBOSITY._serialized_start=3213 + _TRANSACTIONVERBOSITY._serialized_end=3279 _GETTRANSACTIONREQUEST._serialized_start=29 _GETTRANSACTIONREQUEST._serialized_end=128 _GETTRANSACTIONRESPONSE._serialized_start=131 @@ -38,29 +38,37 @@ _BROADCASTTRANSACTIONRESPONSE._serialized_start=572 _BROADCASTTRANSACTIONRESPONSE._serialized_end=618 _GETRAWTRANSACTIONREQUEST._serialized_start=621 - _GETRAWTRANSACTIONREQUEST._serialized_end=981 - _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_start=984 - _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_end=1112 - _GETRAWBONDTRANSACTIONREQUEST._serialized_start=1115 - _GETRAWBONDTRANSACTIONREQUEST._serialized_end=1268 - _GETRAWUNBONDTRANSACTIONREQUEST._serialized_start=1270 - _GETRAWUNBONDTRANSACTIONREQUEST._serialized_end=1347 - _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_start=1350 - _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_end=1512 - _GETRAWTRANSACTIONRESPONSE._serialized_start=1514 - _GETRAWTRANSACTIONRESPONSE._serialized_end=1582 - _PAYLOADTRANSFER._serialized_start=1584 - _PAYLOADTRANSFER._serialized_end=1677 - _PAYLOADBOND._serialized_start=1679 - _PAYLOADBOND._serialized_end=1766 - _PAYLOADSORTITION._serialized_start=1768 - _PAYLOADSORTITION._serialized_end=1834 - _PAYLOADUNBOND._serialized_start=1836 - _PAYLOADUNBOND._serialized_end=1881 - _PAYLOADWITHDRAW._serialized_start=1883 - _PAYLOADWITHDRAW._serialized_end=1960 - _TRANSACTIONINFO._serialized_start=1963 - _TRANSACTIONINFO._serialized_end=2519 - _TRANSACTION._serialized_start=2724 - _TRANSACTION._serialized_end=3082 + _GETRAWTRANSACTIONREQUEST._serialized_end=897 + _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_start=900 + _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_end=1077 + _GETRAWBONDTRANSACTIONREQUEST._serialized_start=1080 + _GETRAWBONDTRANSACTIONREQUEST._serialized_end=1282 + _GETRAWUNBONDTRANSACTIONREQUEST._serialized_start=1284 + _GETRAWUNBONDTRANSACTIONREQUEST._serialized_end=1410 + _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_start=1413 + _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_end=1624 + _RAWTRANSFER._serialized_start=1626 + _RAWTRANSFER._serialized_end=1733 + _RAWBOND._serialized_start=1736 + _RAWBOND._serialized_end=1868 + _RAWUNBOND._serialized_start=1870 + _RAWUNBOND._serialized_end=1926 + _RAWWITHDRAW._serialized_start=1929 + _RAWWITHDRAW._serialized_end=2070 + _GETRAWTRANSACTIONRESPONSE._serialized_start=2072 + _GETRAWTRANSACTIONRESPONSE._serialized_end=2140 + _PAYLOADTRANSFER._serialized_start=2142 + _PAYLOADTRANSFER._serialized_end=2235 + _PAYLOADBOND._serialized_start=2237 + _PAYLOADBOND._serialized_end=2324 + _PAYLOADSORTITION._serialized_start=2326 + _PAYLOADSORTITION._serialized_end=2392 + _PAYLOADUNBOND._serialized_start=2394 + _PAYLOADUNBOND._serialized_end=2439 + _PAYLOADWITHDRAW._serialized_start=2441 + _PAYLOADWITHDRAW._serialized_end=2518 + _TRANSACTIONINFO._serialized_start=2521 + _TRANSACTIONINFO._serialized_end=3077 + _TRANSACTION._serialized_start=3282 + _TRANSACTION._serialized_end=4052 # @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/transaction_pb2.pyi b/www/grpc/gen/python/transaction_pb2.pyi index 530252213..a35724cb4 100644 --- a/www/grpc/gen/python/transaction_pb2.pyi +++ b/www/grpc/gen/python/transaction_pb2.pyi @@ -85,13 +85,73 @@ class GetRawTransactionRequest(_message.Message): WITHDRAW_FIELD_NUMBER: _ClassVar[int] lock_time: int memo: str - transfer: GetRawTransferTransactionRequest - bond: GetRawBondTransactionRequest - unbond: GetRawUnbondTransactionRequest - withdraw: GetRawWithdrawTransactionRequest - def __init__(self, lock_time: _Optional[int] = ..., memo: _Optional[str] = ..., transfer: _Optional[_Union[GetRawTransferTransactionRequest, _Mapping]] = ..., bond: _Optional[_Union[GetRawBondTransactionRequest, _Mapping]] = ..., unbond: _Optional[_Union[GetRawUnbondTransactionRequest, _Mapping]] = ..., withdraw: _Optional[_Union[GetRawWithdrawTransactionRequest, _Mapping]] = ...) -> None: ... + transfer: RawTransfer + bond: RawBond + unbond: RawUnbond + withdraw: RawWithdraw + def __init__(self, lock_time: _Optional[int] = ..., memo: _Optional[str] = ..., transfer: _Optional[_Union[RawTransfer, _Mapping]] = ..., bond: _Optional[_Union[RawBond, _Mapping]] = ..., unbond: _Optional[_Union[RawUnbond, _Mapping]] = ..., withdraw: _Optional[_Union[RawWithdraw, _Mapping]] = ...) -> None: ... class GetRawTransferTransactionRequest(_message.Message): + __slots__ = ("lock_time", "sender", "receiver", "amount", "fee", "memo") + LOCK_TIME_FIELD_NUMBER: _ClassVar[int] + SENDER_FIELD_NUMBER: _ClassVar[int] + RECEIVER_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + FEE_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + lock_time: int + sender: str + receiver: str + amount: int + fee: int + memo: str + def __init__(self, lock_time: _Optional[int] = ..., sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ... + +class GetRawBondTransactionRequest(_message.Message): + __slots__ = ("lock_time", "sender", "receiver", "stake", "public_key", "fee", "memo") + LOCK_TIME_FIELD_NUMBER: _ClassVar[int] + SENDER_FIELD_NUMBER: _ClassVar[int] + RECEIVER_FIELD_NUMBER: _ClassVar[int] + STAKE_FIELD_NUMBER: _ClassVar[int] + PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] + FEE_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + lock_time: int + sender: str + receiver: str + stake: int + public_key: str + fee: int + memo: str + def __init__(self, lock_time: _Optional[int] = ..., sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ... + +class GetRawUnbondTransactionRequest(_message.Message): + __slots__ = ("lock_time", "validator_address", "memo") + LOCK_TIME_FIELD_NUMBER: _ClassVar[int] + VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + lock_time: int + validator_address: str + memo: str + def __init__(self, lock_time: _Optional[int] = ..., validator_address: _Optional[str] = ..., memo: _Optional[str] = ...) -> None: ... + +class GetRawWithdrawTransactionRequest(_message.Message): + __slots__ = ("lock_time", "validator_address", "account_address", "amount", "fee", "memo") + LOCK_TIME_FIELD_NUMBER: _ClassVar[int] + VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int] + AMOUNT_FIELD_NUMBER: _ClassVar[int] + FEE_FIELD_NUMBER: _ClassVar[int] + MEMO_FIELD_NUMBER: _ClassVar[int] + lock_time: int + validator_address: str + account_address: str + amount: int + fee: int + memo: str + def __init__(self, lock_time: _Optional[int] = ..., validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ... + +class RawTransfer(_message.Message): __slots__ = ("sender", "receiver", "amount", "fee") SENDER_FIELD_NUMBER: _ClassVar[int] RECEIVER_FIELD_NUMBER: _ClassVar[int] @@ -103,7 +163,7 @@ class GetRawTransferTransactionRequest(_message.Message): fee: int def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... -class GetRawBondTransactionRequest(_message.Message): +class RawBond(_message.Message): __slots__ = ("sender", "receiver", "stake", "public_key", "fee") SENDER_FIELD_NUMBER: _ClassVar[int] RECEIVER_FIELD_NUMBER: _ClassVar[int] @@ -117,13 +177,13 @@ class GetRawBondTransactionRequest(_message.Message): fee: int def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ..., fee: _Optional[int] = ...) -> None: ... -class GetRawUnbondTransactionRequest(_message.Message): +class RawUnbond(_message.Message): __slots__ = ("validator_address",) VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] validator_address: str def __init__(self, validator_address: _Optional[str] = ...) -> None: ... -class GetRawWithdrawTransactionRequest(_message.Message): +class RawWithdraw(_message.Message): __slots__ = ("validator_address", "account_address", "amount", "fee") VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int] diff --git a/www/grpc/gen/python/transaction_pb2_grpc.py b/www/grpc/gen/python/transaction_pb2_grpc.py index d4e37cb64..cead649ac 100644 --- a/www/grpc/gen/python/transaction_pb2_grpc.py +++ b/www/grpc/gen/python/transaction_pb2_grpc.py @@ -36,6 +36,26 @@ def __init__(self, channel): request_serializer=transaction__pb2.GetRawTransactionRequest.SerializeToString, response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString, ) + self.GetRawTransferTransaction = channel.unary_unary( + '/pactus.Transaction/GetRawTransferTransaction', + request_serializer=transaction__pb2.GetRawTransferTransactionRequest.SerializeToString, + response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString, + ) + self.GetRawBondTransaction = channel.unary_unary( + '/pactus.Transaction/GetRawBondTransaction', + request_serializer=transaction__pb2.GetRawBondTransactionRequest.SerializeToString, + response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString, + ) + self.GetRawUnbondTransaction = channel.unary_unary( + '/pactus.Transaction/GetRawUnbondTransaction', + request_serializer=transaction__pb2.GetRawUnbondTransactionRequest.SerializeToString, + response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString, + ) + self.GetRawWithdrawTransaction = channel.unary_unary( + '/pactus.Transaction/GetRawWithdrawTransaction', + request_serializer=transaction__pb2.GetRawWithdrawTransactionRequest.SerializeToString, + response_deserializer=transaction__pb2.GetRawTransactionResponse.FromString, + ) class TransactionServicer(object): @@ -73,6 +93,34 @@ def GetRawTransaction(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetRawTransferTransaction(self, request, context): + """Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetRawBondTransaction(self, request, context): + """Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetRawUnbondTransaction(self, request, context): + """Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetRawWithdrawTransaction(self, request, context): + """Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_TransactionServicer_to_server(servicer, server): rpc_method_handlers = { @@ -96,6 +144,26 @@ def add_TransactionServicer_to_server(servicer, server): request_deserializer=transaction__pb2.GetRawTransactionRequest.FromString, response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString, ), + 'GetRawTransferTransaction': grpc.unary_unary_rpc_method_handler( + servicer.GetRawTransferTransaction, + request_deserializer=transaction__pb2.GetRawTransferTransactionRequest.FromString, + response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString, + ), + 'GetRawBondTransaction': grpc.unary_unary_rpc_method_handler( + servicer.GetRawBondTransaction, + request_deserializer=transaction__pb2.GetRawBondTransactionRequest.FromString, + response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString, + ), + 'GetRawUnbondTransaction': grpc.unary_unary_rpc_method_handler( + servicer.GetRawUnbondTransaction, + request_deserializer=transaction__pb2.GetRawUnbondTransactionRequest.FromString, + response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString, + ), + 'GetRawWithdrawTransaction': grpc.unary_unary_rpc_method_handler( + servicer.GetRawWithdrawTransaction, + request_deserializer=transaction__pb2.GetRawWithdrawTransactionRequest.FromString, + response_serializer=transaction__pb2.GetRawTransactionResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'pactus.Transaction', rpc_method_handlers) @@ -175,3 +243,71 @@ def GetRawTransaction(request, transaction__pb2.GetRawTransactionResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetRawTransferTransaction(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetRawTransferTransaction', + transaction__pb2.GetRawTransferTransactionRequest.SerializeToString, + transaction__pb2.GetRawTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetRawBondTransaction(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetRawBondTransaction', + transaction__pb2.GetRawBondTransactionRequest.SerializeToString, + transaction__pb2.GetRawTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetRawUnbondTransaction(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetRawUnbondTransaction', + transaction__pb2.GetRawUnbondTransactionRequest.SerializeToString, + transaction__pb2.GetRawTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetRawWithdrawTransaction(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/pactus.Transaction/GetRawWithdrawTransaction', + transaction__pb2.GetRawWithdrawTransactionRequest.SerializeToString, + transaction__pb2.GetRawTransactionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/www/grpc/gen/rust/pactus.rs b/www/grpc/gen/rust/pactus.rs index b04af3399..033108426 100644 --- a/www/grpc/gen/rust/pactus.rs +++ b/www/grpc/gen/rust/pactus.rs @@ -85,19 +85,109 @@ pub mod get_raw_transaction_request { #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Transaction { #[prost(message, tag="3")] - Transfer(super::GetRawTransferTransactionRequest), + Transfer(super::RawTransfer), #[prost(message, tag="4")] - Bond(super::GetRawBondTransactionRequest), + Bond(super::RawBond), #[prost(message, tag="5")] - Unbond(super::GetRawUnbondTransactionRequest), + Unbond(super::RawUnbond), #[prost(message, tag="6")] - Withdraw(super::GetRawWithdrawTransactionRequest), + Withdraw(super::RawWithdraw), } } /// Request message for retrieving raw details of a transfer transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRawTransferTransactionRequest { + /// The lock time for the transaction. If not set, defaults to the last block + /// height. + #[prost(uint32, tag="1")] + pub lock_time: u32, + /// The sender's account address. + #[prost(string, tag="2")] + pub sender: ::prost::alloc::string::String, + /// The receiver's account address. + #[prost(string, tag="3")] + pub receiver: ::prost::alloc::string::String, + /// The amount to be transferred, specified in NanoPAC. Must be greater than 0. + #[prost(int64, tag="4")] + pub amount: i64, + /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + #[prost(int64, tag="5")] + pub fee: i64, + /// A memo string for the transaction. + #[prost(string, tag="6")] + pub memo: ::prost::alloc::string::String, +} +/// Request message for retrieving raw details of a bond transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRawBondTransactionRequest { + /// The lock time for the transaction. If not set, defaults to the last block + /// height. + #[prost(uint32, tag="1")] + pub lock_time: u32, + /// The sender's account address. + #[prost(string, tag="2")] + pub sender: ::prost::alloc::string::String, + /// The receiver's validator address. + #[prost(string, tag="3")] + pub receiver: ::prost::alloc::string::String, + /// The stake amount in NanoPAC. Must be greater than 0. + #[prost(int64, tag="4")] + pub stake: i64, + /// The public key of the validator. + #[prost(string, tag="5")] + pub public_key: ::prost::alloc::string::String, + /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + #[prost(int64, tag="6")] + pub fee: i64, + /// A memo string for the transaction. + #[prost(string, tag="7")] + pub memo: ::prost::alloc::string::String, +} +/// Request message for retrieving raw details of an unbond transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRawUnbondTransactionRequest { + /// The lock time for the transaction. If not set, defaults to the last block + /// height. + #[prost(uint32, tag="1")] + pub lock_time: u32, + /// The address of the validator to unbond from. + #[prost(string, tag="3")] + pub validator_address: ::prost::alloc::string::String, + /// A memo string for the transaction. + #[prost(string, tag="4")] + pub memo: ::prost::alloc::string::String, +} +/// Request message for retrieving raw details of a withdraw transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct GetRawWithdrawTransactionRequest { + /// The lock time for the transaction. If not set, defaults to the last block + /// height. + #[prost(uint32, tag="1")] + pub lock_time: u32, + /// The address of the validator to withdraw from. + #[prost(string, tag="2")] + pub validator_address: ::prost::alloc::string::String, + /// The address of the account to withdraw to. + #[prost(string, tag="3")] + pub account_address: ::prost::alloc::string::String, + /// The withdrawal amount in NanoPAC. Must be greater than 0. + #[prost(int64, tag="4")] + pub amount: i64, + /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + #[prost(int64, tag="5")] + pub fee: i64, + /// A memo string for the transaction. + #[prost(string, tag="6")] + pub memo: ::prost::alloc::string::String, +} +/// Request message for retrieving raw details of a transfer transaction. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct RawTransfer { /// The sender's account address. #[prost(string, tag="1")] pub sender: ::prost::alloc::string::String, @@ -114,7 +204,7 @@ pub struct GetRawTransferTransactionRequest { /// Request message for retrieving raw details of a bond transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetRawBondTransactionRequest { +pub struct RawBond { /// The sender's account address. #[prost(string, tag="1")] pub sender: ::prost::alloc::string::String, @@ -134,7 +224,7 @@ pub struct GetRawBondTransactionRequest { /// Request message for retrieving raw details of an unbond transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetRawUnbondTransactionRequest { +pub struct RawUnbond { /// The address of the validator to unbond from. #[prost(string, tag="1")] pub validator_address: ::prost::alloc::string::String, @@ -142,7 +232,7 @@ pub struct GetRawUnbondTransactionRequest { /// Request message for retrieving raw details of a withdraw transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetRawWithdrawTransactionRequest { +pub struct RawWithdraw { /// The address of the validator to withdraw from. #[prost(string, tag="1")] pub validator_address: ::prost::alloc::string::String, diff --git a/www/grpc/gen/rust/pactus.serde.rs b/www/grpc/gen/rust/pactus.serde.rs index 6cbf81cad..dd312d3fb 100644 --- a/www/grpc/gen/rust/pactus.serde.rs +++ b/www/grpc/gen/rust/pactus.serde.rs @@ -4393,6 +4393,9 @@ impl serde::Serialize for GetRawBondTransactionRequest { { use serde::ser::SerializeStruct; let mut len = 0; + if self.lock_time != 0 { + len += 1; + } if !self.sender.is_empty() { len += 1; } @@ -4408,7 +4411,13 @@ impl serde::Serialize for GetRawBondTransactionRequest { if self.fee != 0 { len += 1; } + if !self.memo.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.GetRawBondTransactionRequest", len)?; + if self.lock_time != 0 { + struct_ser.serialize_field("lockTime", &self.lock_time)?; + } if !self.sender.is_empty() { struct_ser.serialize_field("sender", &self.sender)?; } @@ -4424,6 +4433,9 @@ impl serde::Serialize for GetRawBondTransactionRequest { if self.fee != 0 { struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; } + if !self.memo.is_empty() { + struct_ser.serialize_field("memo", &self.memo)?; + } struct_ser.end() } } @@ -4434,21 +4446,26 @@ impl<'de> serde::Deserialize<'de> for GetRawBondTransactionRequest { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ + "lock_time", + "lockTime", "sender", "receiver", "stake", "public_key", "publicKey", "fee", + "memo", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { + LockTime, Sender, Receiver, Stake, PublicKey, Fee, + Memo, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4470,11 +4487,13 @@ impl<'de> serde::Deserialize<'de> for GetRawBondTransactionRequest { E: serde::de::Error, { match value { + "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), "sender" => Ok(GeneratedField::Sender), "receiver" => Ok(GeneratedField::Receiver), "stake" => Ok(GeneratedField::Stake), "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), "fee" => Ok(GeneratedField::Fee), + "memo" => Ok(GeneratedField::Memo), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -4494,13 +4513,23 @@ impl<'de> serde::Deserialize<'de> for GetRawBondTransactionRequest { where V: serde::de::MapAccess<'de>, { + let mut lock_time__ = None; let mut sender__ = None; let mut receiver__ = None; let mut stake__ = None; let mut public_key__ = None; let mut fee__ = None; + let mut memo__ = None; while let Some(k) = map.next_key()? { match k { + GeneratedField::LockTime => { + if lock_time__.is_some() { + return Err(serde::de::Error::duplicate_field("lockTime")); + } + lock_time__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } GeneratedField::Sender => { if sender__.is_some() { return Err(serde::de::Error::duplicate_field("sender")); @@ -4535,14 +4564,22 @@ impl<'de> serde::Deserialize<'de> for GetRawBondTransactionRequest { Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } + GeneratedField::Memo => { + if memo__.is_some() { + return Err(serde::de::Error::duplicate_field("memo")); + } + memo__ = Some(map.next_value()?); + } } } Ok(GetRawBondTransactionRequest { + lock_time: lock_time__.unwrap_or_default(), sender: sender__.unwrap_or_default(), receiver: receiver__.unwrap_or_default(), stake: stake__.unwrap_or_default(), public_key: public_key__.unwrap_or_default(), fee: fee__.unwrap_or_default(), + memo: memo__.unwrap_or_default(), }) } } @@ -4821,6 +4858,9 @@ impl serde::Serialize for GetRawTransferTransactionRequest { { use serde::ser::SerializeStruct; let mut len = 0; + if self.lock_time != 0 { + len += 1; + } if !self.sender.is_empty() { len += 1; } @@ -4833,7 +4873,13 @@ impl serde::Serialize for GetRawTransferTransactionRequest { if self.fee != 0 { len += 1; } + if !self.memo.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.GetRawTransferTransactionRequest", len)?; + if self.lock_time != 0 { + struct_ser.serialize_field("lockTime", &self.lock_time)?; + } if !self.sender.is_empty() { struct_ser.serialize_field("sender", &self.sender)?; } @@ -4846,6 +4892,9 @@ impl serde::Serialize for GetRawTransferTransactionRequest { if self.fee != 0 { struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; } + if !self.memo.is_empty() { + struct_ser.serialize_field("memo", &self.memo)?; + } struct_ser.end() } } @@ -4856,18 +4905,23 @@ impl<'de> serde::Deserialize<'de> for GetRawTransferTransactionRequest { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ + "lock_time", + "lockTime", "sender", "receiver", "amount", "fee", + "memo", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { + LockTime, Sender, Receiver, Amount, Fee, + Memo, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4889,10 +4943,12 @@ impl<'de> serde::Deserialize<'de> for GetRawTransferTransactionRequest { E: serde::de::Error, { match value { + "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), "sender" => Ok(GeneratedField::Sender), "receiver" => Ok(GeneratedField::Receiver), "amount" => Ok(GeneratedField::Amount), "fee" => Ok(GeneratedField::Fee), + "memo" => Ok(GeneratedField::Memo), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -4912,12 +4968,22 @@ impl<'de> serde::Deserialize<'de> for GetRawTransferTransactionRequest { where V: serde::de::MapAccess<'de>, { + let mut lock_time__ = None; let mut sender__ = None; let mut receiver__ = None; let mut amount__ = None; let mut fee__ = None; + let mut memo__ = None; while let Some(k) = map.next_key()? { match k { + GeneratedField::LockTime => { + if lock_time__.is_some() { + return Err(serde::de::Error::duplicate_field("lockTime")); + } + lock_time__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } GeneratedField::Sender => { if sender__.is_some() { return Err(serde::de::Error::duplicate_field("sender")); @@ -4946,13 +5012,21 @@ impl<'de> serde::Deserialize<'de> for GetRawTransferTransactionRequest { Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } + GeneratedField::Memo => { + if memo__.is_some() { + return Err(serde::de::Error::duplicate_field("memo")); + } + memo__ = Some(map.next_value()?); + } } } Ok(GetRawTransferTransactionRequest { + lock_time: lock_time__.unwrap_or_default(), sender: sender__.unwrap_or_default(), receiver: receiver__.unwrap_or_default(), amount: amount__.unwrap_or_default(), fee: fee__.unwrap_or_default(), + memo: memo__.unwrap_or_default(), }) } } @@ -4967,13 +5041,25 @@ impl serde::Serialize for GetRawUnbondTransactionRequest { { use serde::ser::SerializeStruct; let mut len = 0; + if self.lock_time != 0 { + len += 1; + } if !self.validator_address.is_empty() { len += 1; } + if !self.memo.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.GetRawUnbondTransactionRequest", len)?; + if self.lock_time != 0 { + struct_ser.serialize_field("lockTime", &self.lock_time)?; + } if !self.validator_address.is_empty() { struct_ser.serialize_field("validatorAddress", &self.validator_address)?; } + if !self.memo.is_empty() { + struct_ser.serialize_field("memo", &self.memo)?; + } struct_ser.end() } } @@ -4984,13 +5070,18 @@ impl<'de> serde::Deserialize<'de> for GetRawUnbondTransactionRequest { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ + "lock_time", + "lockTime", "validator_address", "validatorAddress", + "memo", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { + LockTime, ValidatorAddress, + Memo, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -5012,7 +5103,9 @@ impl<'de> serde::Deserialize<'de> for GetRawUnbondTransactionRequest { E: serde::de::Error, { match value { + "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), + "memo" => Ok(GeneratedField::Memo), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -5032,19 +5125,37 @@ impl<'de> serde::Deserialize<'de> for GetRawUnbondTransactionRequest { where V: serde::de::MapAccess<'de>, { + let mut lock_time__ = None; let mut validator_address__ = None; + let mut memo__ = None; while let Some(k) = map.next_key()? { match k { + GeneratedField::LockTime => { + if lock_time__.is_some() { + return Err(serde::de::Error::duplicate_field("lockTime")); + } + lock_time__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); } validator_address__ = Some(map.next_value()?); } + GeneratedField::Memo => { + if memo__.is_some() { + return Err(serde::de::Error::duplicate_field("memo")); + } + memo__ = Some(map.next_value()?); + } } } Ok(GetRawUnbondTransactionRequest { + lock_time: lock_time__.unwrap_or_default(), validator_address: validator_address__.unwrap_or_default(), + memo: memo__.unwrap_or_default(), }) } } @@ -5059,6 +5170,9 @@ impl serde::Serialize for GetRawWithdrawTransactionRequest { { use serde::ser::SerializeStruct; let mut len = 0; + if self.lock_time != 0 { + len += 1; + } if !self.validator_address.is_empty() { len += 1; } @@ -5071,7 +5185,13 @@ impl serde::Serialize for GetRawWithdrawTransactionRequest { if self.fee != 0 { len += 1; } + if !self.memo.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.GetRawWithdrawTransactionRequest", len)?; + if self.lock_time != 0 { + struct_ser.serialize_field("lockTime", &self.lock_time)?; + } if !self.validator_address.is_empty() { struct_ser.serialize_field("validatorAddress", &self.validator_address)?; } @@ -5084,6 +5204,9 @@ impl serde::Serialize for GetRawWithdrawTransactionRequest { if self.fee != 0 { struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; } + if !self.memo.is_empty() { + struct_ser.serialize_field("memo", &self.memo)?; + } struct_ser.end() } } @@ -5094,20 +5217,25 @@ impl<'de> serde::Deserialize<'de> for GetRawWithdrawTransactionRequest { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ + "lock_time", + "lockTime", "validator_address", "validatorAddress", "account_address", "accountAddress", "amount", "fee", + "memo", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { + LockTime, ValidatorAddress, AccountAddress, Amount, Fee, + Memo, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -5129,10 +5257,12 @@ impl<'de> serde::Deserialize<'de> for GetRawWithdrawTransactionRequest { E: serde::de::Error, { match value { + "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), "accountAddress" | "account_address" => Ok(GeneratedField::AccountAddress), "amount" => Ok(GeneratedField::Amount), "fee" => Ok(GeneratedField::Fee), + "memo" => Ok(GeneratedField::Memo), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -5152,12 +5282,22 @@ impl<'de> serde::Deserialize<'de> for GetRawWithdrawTransactionRequest { where V: serde::de::MapAccess<'de>, { + let mut lock_time__ = None; let mut validator_address__ = None; let mut account_address__ = None; let mut amount__ = None; let mut fee__ = None; + let mut memo__ = None; while let Some(k) = map.next_key()? { match k { + GeneratedField::LockTime => { + if lock_time__.is_some() { + return Err(serde::de::Error::duplicate_field("lockTime")); + } + lock_time__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } GeneratedField::ValidatorAddress => { if validator_address__.is_some() { return Err(serde::de::Error::duplicate_field("validatorAddress")); @@ -5186,13 +5326,21 @@ impl<'de> serde::Deserialize<'de> for GetRawWithdrawTransactionRequest { Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } + GeneratedField::Memo => { + if memo__.is_some() { + return Err(serde::de::Error::duplicate_field("memo")); + } + memo__ = Some(map.next_value()?); + } } } Ok(GetRawWithdrawTransactionRequest { + lock_time: lock_time__.unwrap_or_default(), validator_address: validator_address__.unwrap_or_default(), account_address: account_address__.unwrap_or_default(), amount: amount__.unwrap_or_default(), fee: fee__.unwrap_or_default(), + memo: memo__.unwrap_or_default(), }) } } @@ -8065,6 +8213,556 @@ impl<'de> serde::Deserialize<'de> for Proposal { deserializer.deserialize_struct("pactus.Proposal", FIELDS, GeneratedVisitor) } } +impl serde::Serialize for RawBond { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.receiver.is_empty() { + len += 1; + } + if self.stake != 0 { + len += 1; + } + if !self.public_key.is_empty() { + len += 1; + } + if self.fee != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.RawBond", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.receiver.is_empty() { + struct_ser.serialize_field("receiver", &self.receiver)?; + } + if self.stake != 0 { + struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; + } + if !self.public_key.is_empty() { + struct_ser.serialize_field("publicKey", &self.public_key)?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RawBond { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", + "receiver", + "stake", + "public_key", + "publicKey", + "fee", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Receiver, + Stake, + PublicKey, + Fee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "receiver" => Ok(GeneratedField::Receiver), + "stake" => Ok(GeneratedField::Stake), + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + "fee" => Ok(GeneratedField::Fee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RawBond; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.RawBond") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut receiver__ = None; + let mut stake__ = None; + let mut public_key__ = None; + let mut fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::Receiver => { + if receiver__.is_some() { + return Err(serde::de::Error::duplicate_field("receiver")); + } + receiver__ = Some(map.next_value()?); + } + GeneratedField::Stake => { + if stake__.is_some() { + return Err(serde::de::Error::duplicate_field("stake")); + } + stake__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = Some(map.next_value()?); + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(RawBond { + sender: sender__.unwrap_or_default(), + receiver: receiver__.unwrap_or_default(), + stake: stake__.unwrap_or_default(), + public_key: public_key__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.RawBond", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RawTransfer { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.receiver.is_empty() { + len += 1; + } + if self.amount != 0 { + len += 1; + } + if self.fee != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.RawTransfer", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.receiver.is_empty() { + struct_ser.serialize_field("receiver", &self.receiver)?; + } + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RawTransfer { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", + "receiver", + "amount", + "fee", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Receiver, + Amount, + Fee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "receiver" => Ok(GeneratedField::Receiver), + "amount" => Ok(GeneratedField::Amount), + "fee" => Ok(GeneratedField::Fee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RawTransfer; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.RawTransfer") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut receiver__ = None; + let mut amount__ = None; + let mut fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::Receiver => { + if receiver__.is_some() { + return Err(serde::de::Error::duplicate_field("receiver")); + } + receiver__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(RawTransfer { + sender: sender__.unwrap_or_default(), + receiver: receiver__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.RawTransfer", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RawUnbond { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.RawUnbond", len)?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RawUnbond { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "validator_address", + "validatorAddress", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RawUnbond; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.RawUnbond") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + } + } + Ok(RawUnbond { + validator_address: validator_address__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.RawUnbond", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for RawWithdraw { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + if !self.account_address.is_empty() { + len += 1; + } + if self.amount != 0 { + len += 1; + } + if self.fee != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.RawWithdraw", len)?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if !self.account_address.is_empty() { + struct_ser.serialize_field("accountAddress", &self.account_address)?; + } + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for RawWithdraw { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "validator_address", + "validatorAddress", + "account_address", + "accountAddress", + "amount", + "fee", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + AccountAddress, + Amount, + Fee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), + "accountAddress" | "account_address" => Ok(GeneratedField::AccountAddress), + "amount" => Ok(GeneratedField::Amount), + "fee" => Ok(GeneratedField::Fee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = RawWithdraw; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.RawWithdraw") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + let mut account_address__ = None; + let mut amount__ = None; + let mut fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::AccountAddress => { + if account_address__.is_some() { + return Err(serde::de::Error::duplicate_field("accountAddress")); + } + account_address__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(RawWithdraw { + validator_address: validator_address__.unwrap_or_default(), + account_address: account_address__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.RawWithdraw", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for RestoreWalletRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result diff --git a/www/grpc/gen/rust/pactus.tonic.rs b/www/grpc/gen/rust/pactus.tonic.rs index f375d8eba..a2ce32b96 100644 --- a/www/grpc/gen/rust/pactus.tonic.rs +++ b/www/grpc/gen/rust/pactus.tonic.rs @@ -184,6 +184,112 @@ pub mod transaction_client { .insert(GrpcMethod::new("pactus.Transaction", "GetRawTransaction")); self.inner.unary(req, path, codec).await } + pub async fn get_raw_transfer_transaction( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Transaction/GetRawTransferTransaction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("pactus.Transaction", "GetRawTransferTransaction"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_raw_bond_transaction( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Transaction/GetRawBondTransaction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("pactus.Transaction", "GetRawBondTransaction")); + self.inner.unary(req, path, codec).await + } + pub async fn get_raw_unbond_transaction( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Transaction/GetRawUnbondTransaction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("pactus.Transaction", "GetRawUnbondTransaction"), + ); + self.inner.unary(req, path, codec).await + } + pub async fn get_raw_withdraw_transaction( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/pactus.Transaction/GetRawWithdrawTransaction", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("pactus.Transaction", "GetRawWithdrawTransaction"), + ); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -221,6 +327,34 @@ pub mod transaction_server { tonic::Response, tonic::Status, >; + async fn get_raw_transfer_transaction( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_raw_bond_transaction( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_raw_unbond_transaction( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + async fn get_raw_withdraw_transaction( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } #[derive(Debug)] pub struct TransactionServer { @@ -485,6 +619,198 @@ pub mod transaction_server { }; Box::pin(fut) } + "/pactus.Transaction/GetRawTransferTransaction" => { + #[allow(non_camel_case_types)] + struct GetRawTransferTransactionSvc(pub Arc); + impl< + T: Transaction, + > tonic::server::UnaryService< + super::GetRawTransferTransactionRequest, + > for GetRawTransferTransactionSvc { + type Response = super::GetRawTransactionResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::GetRawTransferTransactionRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_raw_transfer_transaction(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetRawTransferTransactionSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Transaction/GetRawBondTransaction" => { + #[allow(non_camel_case_types)] + struct GetRawBondTransactionSvc(pub Arc); + impl< + T: Transaction, + > tonic::server::UnaryService + for GetRawBondTransactionSvc { + type Response = super::GetRawTransactionResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_raw_bond_transaction(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetRawBondTransactionSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Transaction/GetRawUnbondTransaction" => { + #[allow(non_camel_case_types)] + struct GetRawUnbondTransactionSvc(pub Arc); + impl< + T: Transaction, + > tonic::server::UnaryService + for GetRawUnbondTransactionSvc { + type Response = super::GetRawTransactionResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::GetRawUnbondTransactionRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_raw_unbond_transaction(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetRawUnbondTransactionSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/pactus.Transaction/GetRawWithdrawTransaction" => { + #[allow(non_camel_case_types)] + struct GetRawWithdrawTransactionSvc(pub Arc); + impl< + T: Transaction, + > tonic::server::UnaryService< + super::GetRawWithdrawTransactionRequest, + > for GetRawWithdrawTransactionSvc { + type Response = super::GetRawTransactionResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::GetRawWithdrawTransactionRequest, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + (*inner).get_raw_withdraw_transaction(request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = GetRawWithdrawTransactionSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { Ok( diff --git a/www/grpc/proto/transaction.proto b/www/grpc/proto/transaction.proto index d608bee3e..e3855870c 100644 --- a/www/grpc/proto/transaction.proto +++ b/www/grpc/proto/transaction.proto @@ -21,6 +21,22 @@ service Transaction { // GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. rpc GetRawTransaction(GetRawTransactionRequest) returns(GetRawTransactionResponse); + + // Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + rpc GetRawTransferTransaction(GetRawTransferTransactionRequest) + returns (GetRawTransactionResponse); + + // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + rpc GetRawBondTransaction(GetRawBondTransactionRequest) + returns (GetRawTransactionResponse); + + // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + rpc GetRawUnbondTransaction(GetRawUnbondTransactionRequest) + returns (GetRawTransactionResponse); + + // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + rpc GetRawWithdrawTransaction(GetRawWithdrawTransactionRequest) + returns (GetRawTransactionResponse); } // Request message for retrieving transaction details. @@ -80,15 +96,79 @@ message GetRawTransactionRequest { string memo = 2; oneof transaction { - GetRawTransferTransactionRequest transfer = 3; - GetRawBondTransactionRequest bond = 4; - GetRawUnbondTransactionRequest unbond = 5; - GetRawWithdrawTransactionRequest withdraw = 6; + RawTransfer transfer = 3; + RawBond bond = 4; + RawUnbond unbond = 5; + RawWithdraw withdraw = 6; } } // Request message for retrieving raw details of a transfer transaction. message GetRawTransferTransactionRequest { + // The lock time for the transaction. If not set, defaults to the last block + // height. + uint32 lock_time = 1; + // The sender's account address. + string sender = 2; + // The receiver's account address. + string receiver = 3; + // The amount to be transferred, specified in NanoPAC. Must be greater than 0. + int64 amount = 4; + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + int64 fee = 5; + // A memo string for the transaction. + string memo = 6; +} + +// Request message for retrieving raw details of a bond transaction. +message GetRawBondTransactionRequest { + // The lock time for the transaction. If not set, defaults to the last block + // height. + uint32 lock_time = 1; + // The sender's account address. + string sender = 2; + // The receiver's validator address. + string receiver = 3; + // The stake amount in NanoPAC. Must be greater than 0. + int64 stake = 4; + // The public key of the validator. + string public_key = 5; + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + int64 fee = 6; + // A memo string for the transaction. + string memo = 7; +} + +// Request message for retrieving raw details of an unbond transaction. +message GetRawUnbondTransactionRequest { + // The lock time for the transaction. If not set, defaults to the last block + // height. + uint32 lock_time = 1; + // The address of the validator to unbond from. + string validator_address = 3; + // A memo string for the transaction. + string memo = 4; +} + +// Request message for retrieving raw details of a withdraw transaction. +message GetRawWithdrawTransactionRequest { + // The lock time for the transaction. If not set, defaults to the last block + // height. + uint32 lock_time = 1; + // The address of the validator to withdraw from. + string validator_address = 2; + // The address of the account to withdraw to. + string account_address = 3; + // The withdrawal amount in NanoPAC. Must be greater than 0. + int64 amount = 4; + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + int64 fee = 5; + // A memo string for the transaction. + string memo = 6; +} + +// Request message for retrieving raw details of a transfer transaction. +message RawTransfer { // The sender's account address. string sender = 1; // The receiver's account address. @@ -100,7 +180,7 @@ message GetRawTransferTransactionRequest { } // Request message for retrieving raw details of a bond transaction. -message GetRawBondTransactionRequest { +message RawBond { // The sender's account address. string sender = 1; // The receiver's validator address. @@ -114,13 +194,13 @@ message GetRawBondTransactionRequest { } // Request message for retrieving raw details of an unbond transaction. -message GetRawUnbondTransactionRequest { +message RawUnbond { // The address of the validator to unbond from. string validator_address = 1; } // Request message for retrieving raw details of a withdraw transaction. -message GetRawWithdrawTransactionRequest { +message RawWithdraw { // The address of the validator to withdraw from. string validator_address = 1; // The address of the account to withdraw to. diff --git a/www/grpc/swagger-ui/pactus.swagger.json b/www/grpc/swagger-ui/pactus.swagger.json index 505fb746c..98778d5ed 100644 --- a/www/grpc/swagger-ui/pactus.swagger.json +++ b/www/grpc/swagger-ui/pactus.swagger.json @@ -596,6 +596,83 @@ ] } }, + "/pactus/transaction/get_raw_bond_transaction": { + "get": { + "summary": "Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.", + "operationId": "Transaction_GetRawBondTransaction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pactusGetRawTransactionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "lockTime", + "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "sender", + "description": "The sender's account address.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "receiver", + "description": "The receiver's validator address.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "stake", + "description": "The stake amount in NanoPAC. Must be greater than 0.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "publicKey", + "description": "The public key of the validator.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "fee", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "memo", + "description": "A memo string for the transaction.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Transaction" + ] + } + }, "/pactus/transaction/get_raw_transaction": { "get": { "summary": "GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.", @@ -740,6 +817,193 @@ ] } }, + "/pactus/transaction/get_raw_transfer_transaction": { + "get": { + "summary": "Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.", + "operationId": "Transaction_GetRawTransferTransaction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pactusGetRawTransactionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "lockTime", + "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "sender", + "description": "The sender's account address.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "receiver", + "description": "The receiver's account address.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "amount", + "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "fee", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "memo", + "description": "A memo string for the transaction.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Transaction" + ] + } + }, + "/pactus/transaction/get_raw_unbond_transaction": { + "get": { + "summary": "Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.", + "operationId": "Transaction_GetRawUnbondTransaction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pactusGetRawTransactionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "lockTime", + "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "validatorAddress", + "description": "The address of the validator to unbond from.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "memo", + "description": "A memo string for the transaction.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Transaction" + ] + } + }, + "/pactus/transaction/get_raw_withdraw_transaction": { + "get": { + "summary": "Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.", + "operationId": "Transaction_GetRawWithdrawTransaction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/pactusGetRawTransactionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "lockTime", + "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "validatorAddress", + "description": "The address of the validator to withdraw from.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "accountAddress", + "description": "The address of the account to withdraw to.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "amount", + "description": "The withdrawal amount in NanoPAC. Must be greater than 0.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "fee", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, + { + "name": "memo", + "description": "A memo string for the transaction.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Transaction" + ] + } + }, "/pactus/transaction/get_transaction": { "get": { "summary": "GetTransaction retrieves transaction details based on the provided request\nparameters.", @@ -1672,34 +1936,6 @@ }, "description": "Message containing the response with the public key." }, - "pactusGetRawBondTransactionRequest": { - "type": "object", - "properties": { - "sender": { - "type": "string", - "description": "The sender's account address." - }, - "receiver": { - "type": "string", - "description": "The receiver's validator address." - }, - "stake": { - "type": "string", - "format": "int64", - "description": "The stake amount in NanoPAC. Must be greater than 0." - }, - "publicKey": { - "type": "string", - "description": "The public key of the validator." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." - } - }, - "description": "Request message for retrieving raw details of a bond transaction." - }, "pactusGetRawTransactionResponse": { "type": "object", "properties": { @@ -1710,64 +1946,6 @@ }, "description": "Response message containing raw transaction data." }, - "pactusGetRawTransferTransactionRequest": { - "type": "object", - "properties": { - "sender": { - "type": "string", - "description": "The sender's account address." - }, - "receiver": { - "type": "string", - "description": "The receiver's account address." - }, - "amount": { - "type": "string", - "format": "int64", - "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." - } - }, - "description": "Request message for retrieving raw details of a transfer transaction." - }, - "pactusGetRawUnbondTransactionRequest": { - "type": "object", - "properties": { - "validatorAddress": { - "type": "string", - "description": "The address of the validator to unbond from." - } - }, - "description": "Request message for retrieving raw details of an unbond transaction." - }, - "pactusGetRawWithdrawTransactionRequest": { - "type": "object", - "properties": { - "validatorAddress": { - "type": "string", - "description": "The address of the validator to withdraw from." - }, - "accountAddress": { - "type": "string", - "description": "The address of the account to withdraw to." - }, - "amount": { - "type": "string", - "format": "int64", - "description": "The withdrawal amount in NanoPAC. Must be greater than 0." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." - } - }, - "description": "Request message for retrieving raw details of a withdraw transaction." - }, "pactusGetTotalBalanceResponse": { "type": "object", "properties": { @@ -2118,6 +2296,92 @@ }, "description": "Message containing information about a proposal." }, + "pactusRawBond": { + "type": "object", + "properties": { + "sender": { + "type": "string", + "description": "The sender's account address." + }, + "receiver": { + "type": "string", + "description": "The receiver's validator address." + }, + "stake": { + "type": "string", + "format": "int64", + "description": "The stake amount in NanoPAC. Must be greater than 0." + }, + "publicKey": { + "type": "string", + "description": "The public key of the validator." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." + } + }, + "description": "Request message for retrieving raw details of a bond transaction." + }, + "pactusRawTransfer": { + "type": "object", + "properties": { + "sender": { + "type": "string", + "description": "The sender's account address." + }, + "receiver": { + "type": "string", + "description": "The receiver's account address." + }, + "amount": { + "type": "string", + "format": "int64", + "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." + } + }, + "description": "Request message for retrieving raw details of a transfer transaction." + }, + "pactusRawUnbond": { + "type": "object", + "properties": { + "validatorAddress": { + "type": "string", + "description": "The address of the validator to unbond from." + } + }, + "description": "Request message for retrieving raw details of an unbond transaction." + }, + "pactusRawWithdraw": { + "type": "object", + "properties": { + "validatorAddress": { + "type": "string", + "description": "The address of the validator to withdraw from." + }, + "accountAddress": { + "type": "string", + "description": "The address of the account to withdraw to." + }, + "amount": { + "type": "string", + "format": "int64", + "description": "The withdrawal amount in NanoPAC. Must be greater than 0." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." + } + }, + "description": "Request message for retrieving raw details of a withdraw transaction." + }, "pactusRestoreWalletResponse": { "type": "object", "properties": { diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index 96ae52d9d..b0f3b7bef 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -139,6 +139,125 @@ func (s *transactionServer) GetRawTransaction(_ context.Context, return nil, status.Errorf(codes.InvalidArgument, "invalid transaction type") } +// Deprecated: GetRawTransferTransaction +func (s *transactionServer) GetRawTransferTransaction(_ context.Context, + req *pactus.GetRawTransferTransactionRequest, +) (*pactus.GetRawTransactionResponse, error) { + sender, err := crypto.AddressFromString(req.Sender) + if err != nil { + return nil, err + } + + receiver, err := crypto.AddressFromString(req.Receiver) + if err != nil { + return nil, err + } + + amt := amount.Amount(req.Amount) + fee := s.getFee(req.Fee, amt) + lockTime := s.getLockTime(req.LockTime) + + transferTx := tx.NewTransferTx(lockTime, sender, receiver, amt, fee, tx.WithMemo(req.Memo)) + rawTx, err := transferTx.Bytes() + if err != nil { + return nil, err + } + + return &pactus.GetRawTransactionResponse{ + RawTransaction: hex.EncodeToString(rawTx), + }, nil +} + +// Deprecated: GetRawBondTransaction +func (s *transactionServer) GetRawBondTransaction(_ context.Context, + req *pactus.GetRawBondTransactionRequest, +) (*pactus.GetRawTransactionResponse, error) { + sender, err := crypto.AddressFromString(req.Sender) + if err != nil { + return nil, err + } + + receiver, err := crypto.AddressFromString(req.Receiver) + if err != nil { + return nil, err + } + + var publicKey *bls.PublicKey + if req.PublicKey != "" { + publicKey, err = bls.PublicKeyFromString(req.PublicKey) + if err != nil { + return nil, err + } + } else { + publicKey = nil + } + + amt := amount.Amount(req.Stake) + fee := s.getFee(req.Fee, amt) + lockTime := s.getLockTime(req.LockTime) + + bondTx := tx.NewBondTx(lockTime, sender, receiver, publicKey, amt, fee, tx.WithMemo(req.Memo)) + rawTx, err := bondTx.Bytes() + if err != nil { + return nil, err + } + + return &pactus.GetRawTransactionResponse{ + RawTransaction: hex.EncodeToString(rawTx), + }, nil +} + +// Deprecated: GetRawUnbondTransaction +func (s *transactionServer) GetRawUnbondTransaction(_ context.Context, + req *pactus.GetRawUnbondTransactionRequest, +) (*pactus.GetRawTransactionResponse, error) { + validatorAddr, err := crypto.AddressFromString(req.ValidatorAddress) + if err != nil { + return nil, err + } + + lockTime := s.getLockTime(req.LockTime) + + unbondTx := tx.NewUnbondTx(lockTime, validatorAddr, tx.WithMemo(req.Memo)) + rawTx, err := unbondTx.Bytes() + if err != nil { + return nil, err + } + + return &pactus.GetRawTransactionResponse{ + RawTransaction: hex.EncodeToString(rawTx), + }, nil +} + +// Deprecated: GetRawWithdrawTransaction +func (s *transactionServer) GetRawWithdrawTransaction(_ context.Context, + req *pactus.GetRawWithdrawTransactionRequest, +) (*pactus.GetRawTransactionResponse, error) { + validatorAddr, err := crypto.AddressFromString(req.ValidatorAddress) + if err != nil { + return nil, err + } + + accountAddr, err := crypto.AddressFromString(req.AccountAddress) + if err != nil { + return nil, err + } + + amt := amount.Amount(req.Amount) + fee := s.getFee(req.Fee, amt) + lockTime := s.getLockTime(req.LockTime) + + withdrawTx := tx.NewWithdrawTx(lockTime, validatorAddr, accountAddr, amt, fee, tx.WithMemo(req.Memo)) + rawTx, err := withdrawTx.Bytes() + if err != nil { + return nil, err + } + + return &pactus.GetRawTransactionResponse{ + RawTransaction: hex.EncodeToString(rawTx), + }, nil +} + func (s *transactionServer) handleRawTransfer(r *pactus.GetRawTransactionRequest_Transfer, lockTime uint32, memo string, From a61671cd593dbb449769d7db77aeac9d1ec3e8fe Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 10 Sep 2024 14:17:21 +0330 Subject: [PATCH 06/17] fix: removed grpc gateway selector --- www/grpc/buf/grpc-gateway.config.yaml | 16 -- www/grpc/gen/go/transaction.pb.gw.go | 348 ------------------------ www/grpc/swagger-ui/pactus.swagger.json | 264 ------------------ 3 files changed, 628 deletions(-) diff --git a/www/grpc/buf/grpc-gateway.config.yaml b/www/grpc/buf/grpc-gateway.config.yaml index 367bc7806..cb52285f1 100644 --- a/www/grpc/buf/grpc-gateway.config.yaml +++ b/www/grpc/buf/grpc-gateway.config.yaml @@ -47,22 +47,6 @@ http: - selector: pactus.Transaction.GetRawTransaction get: "/pactus/transaction/get_raw_transaction" - # deprecated - - selector: pactus.Transaction.GetRawTransferTransaction - get: "/pactus/transaction/get_raw_transfer_transaction" - - # deprecated - - selector: pactus.Transaction.GetRawBondTransaction - get: "/pactus/transaction/get_raw_bond_transaction" - - # deprecated - - selector: pactus.Transaction.GetRawUnbondTransaction - get: "/pactus/transaction/get_raw_unbond_transaction" - - # deprecated - - selector: pactus.Transaction.GetRawWithdrawTransaction - get: "/pactus/transaction/get_raw_withdraw_transaction" - # Network APIs - selector: pactus.Network.GetNetworkInfo get: "/pactus/network/get_network_info" diff --git a/www/grpc/gen/go/transaction.pb.gw.go b/www/grpc/gen/go/transaction.pb.gw.go index 4c977039f..f865d4dc0 100644 --- a/www/grpc/gen/go/transaction.pb.gw.go +++ b/www/grpc/gen/go/transaction.pb.gw.go @@ -175,150 +175,6 @@ func local_request_Transaction_GetRawTransaction_0(ctx context.Context, marshale } -var ( - filter_Transaction_GetRawTransferTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_GetRawTransferTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawTransferTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawTransferTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRawTransferTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_GetRawTransferTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawTransferTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawTransferTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRawTransferTransaction(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Transaction_GetRawBondTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_GetRawBondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawBondTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawBondTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRawBondTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_GetRawBondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawBondTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawBondTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRawBondTransaction(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Transaction_GetRawUnbondTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_GetRawUnbondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawUnbondTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawUnbondTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRawUnbondTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_GetRawUnbondTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawUnbondTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawUnbondTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRawUnbondTransaction(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Transaction_GetRawWithdrawTransaction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Transaction_GetRawWithdrawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, client TransactionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawWithdrawTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawWithdrawTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetRawWithdrawTransaction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Transaction_GetRawWithdrawTransaction_0(ctx context.Context, marshaler runtime.Marshaler, server TransactionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetRawWithdrawTransactionRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Transaction_GetRawWithdrawTransaction_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetRawWithdrawTransaction(ctx, &protoReq) - return msg, metadata, err - -} - // RegisterTransactionHandlerServer registers the http handlers for service Transaction to "mux". // UnaryRPC :call TransactionServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -425,106 +281,6 @@ func RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_Transaction_GetRawTransferTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawTransferTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_transfer_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_GetRawTransferTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawTransferTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawBondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawBondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_bond_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_GetRawBondTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawBondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawUnbondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawUnbondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_unbond_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_GetRawUnbondTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawUnbondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawWithdrawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/pactus.Transaction/GetRawWithdrawTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_withdraw_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Transaction_GetRawWithdrawTransaction_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawWithdrawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -654,94 +410,6 @@ func RegisterTransactionHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_Transaction_GetRawTransferTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawTransferTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_transfer_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_GetRawTransferTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawTransferTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawBondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawBondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_bond_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_GetRawBondTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawBondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawUnbondTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawUnbondTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_unbond_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_GetRawUnbondTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawUnbondTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Transaction_GetRawWithdrawTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/pactus.Transaction/GetRawWithdrawTransaction", runtime.WithHTTPPathPattern("/pactus/transaction/get_raw_withdraw_transaction")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Transaction_GetRawWithdrawTransaction_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_Transaction_GetRawWithdrawTransaction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -753,14 +421,6 @@ var ( pattern_Transaction_BroadcastTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "broadcast_transaction"}, "")) pattern_Transaction_GetRawTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_transaction"}, "")) - - pattern_Transaction_GetRawTransferTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_transfer_transaction"}, "")) - - pattern_Transaction_GetRawBondTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_bond_transaction"}, "")) - - pattern_Transaction_GetRawUnbondTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_unbond_transaction"}, "")) - - pattern_Transaction_GetRawWithdrawTransaction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"pactus", "transaction", "get_raw_withdraw_transaction"}, "")) ) var ( @@ -771,12 +431,4 @@ var ( forward_Transaction_BroadcastTransaction_0 = runtime.ForwardResponseMessage forward_Transaction_GetRawTransaction_0 = runtime.ForwardResponseMessage - - forward_Transaction_GetRawTransferTransaction_0 = runtime.ForwardResponseMessage - - forward_Transaction_GetRawBondTransaction_0 = runtime.ForwardResponseMessage - - forward_Transaction_GetRawUnbondTransaction_0 = runtime.ForwardResponseMessage - - forward_Transaction_GetRawWithdrawTransaction_0 = runtime.ForwardResponseMessage ) diff --git a/www/grpc/swagger-ui/pactus.swagger.json b/www/grpc/swagger-ui/pactus.swagger.json index 98778d5ed..9eb7952b0 100644 --- a/www/grpc/swagger-ui/pactus.swagger.json +++ b/www/grpc/swagger-ui/pactus.swagger.json @@ -596,83 +596,6 @@ ] } }, - "/pactus/transaction/get_raw_bond_transaction": { - "get": { - "summary": "Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.", - "operationId": "Transaction_GetRawBondTransaction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/pactusGetRawTransactionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "lockTime", - "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "sender", - "description": "The sender's account address.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "receiver", - "description": "The receiver's validator address.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "stake", - "description": "The stake amount in NanoPAC. Must be greater than 0.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "publicKey", - "description": "The public key of the validator.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "fee", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "memo", - "description": "A memo string for the transaction.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "Transaction" - ] - } - }, "/pactus/transaction/get_raw_transaction": { "get": { "summary": "GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.", @@ -817,193 +740,6 @@ ] } }, - "/pactus/transaction/get_raw_transfer_transaction": { - "get": { - "summary": "Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.", - "operationId": "Transaction_GetRawTransferTransaction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/pactusGetRawTransactionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "lockTime", - "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "sender", - "description": "The sender's account address.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "receiver", - "description": "The receiver's account address.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "amount", - "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "fee", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "memo", - "description": "A memo string for the transaction.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "Transaction" - ] - } - }, - "/pactus/transaction/get_raw_unbond_transaction": { - "get": { - "summary": "Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.", - "operationId": "Transaction_GetRawUnbondTransaction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/pactusGetRawTransactionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "lockTime", - "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "validatorAddress", - "description": "The address of the validator to unbond from.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "memo", - "description": "A memo string for the transaction.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "Transaction" - ] - } - }, - "/pactus/transaction/get_raw_withdraw_transaction": { - "get": { - "summary": "Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.", - "operationId": "Transaction_GetRawWithdrawTransaction", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/pactusGetRawTransactionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "lockTime", - "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", - "in": "query", - "required": false, - "type": "integer", - "format": "int64" - }, - { - "name": "validatorAddress", - "description": "The address of the validator to withdraw from.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "accountAddress", - "description": "The address of the account to withdraw to.", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "amount", - "description": "The withdrawal amount in NanoPAC. Must be greater than 0.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "fee", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, - { - "name": "memo", - "description": "A memo string for the transaction.", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "Transaction" - ] - } - }, "/pactus/transaction/get_transaction": { "get": { "summary": "GetTransaction retrieves transaction details based on the provided request\nparameters.", From 6bf488910822d66a5a5d5d169deb99dffb52e8f2 Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 10 Sep 2024 14:18:30 +0330 Subject: [PATCH 07/17] fix: transaction test raw struct --- www/grpc/transaction_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/www/grpc/transaction_test.go b/www/grpc/transaction_test.go index baa8e9312..be85f17e8 100644 --- a/www/grpc/transaction_test.go +++ b/www/grpc/transaction_test.go @@ -131,7 +131,7 @@ func TestGetRawTransaction(t *testing.T) { res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ Transaction: &pactus.GetRawTransactionRequest_Transfer{ - Transfer: &pactus.GetRawTransferTransactionRequest{ + Transfer: &pactus.RawTransfer{ Sender: td.RandAccAddress().String(), Receiver: td.RandAccAddress().String(), Amount: amt.ToNanoPAC(), @@ -159,7 +159,7 @@ func TestGetRawTransaction(t *testing.T) { res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ Transaction: &pactus.GetRawTransactionRequest_Bond{ - Bond: &pactus.GetRawBondTransactionRequest{ + Bond: &pactus.RawBond{ Sender: td.RandAccAddress().String(), Receiver: td.RandValAddress().String(), Stake: amt.ToNanoPAC(), @@ -185,7 +185,7 @@ func TestGetRawTransaction(t *testing.T) { res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ Transaction: &pactus.GetRawTransactionRequest_Unbond{ - Unbond: &pactus.GetRawUnbondTransactionRequest{ + Unbond: &pactus.RawUnbond{ ValidatorAddress: td.RandValAddress().String(), }, }, @@ -208,7 +208,7 @@ func TestGetRawTransaction(t *testing.T) { res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ Transaction: &pactus.GetRawTransactionRequest_Withdraw{ - Withdraw: &pactus.GetRawWithdrawTransactionRequest{ + Withdraw: &pactus.RawWithdraw{ ValidatorAddress: td.RandValAddress().String(), AccountAddress: td.RandAccAddress().String(), Amount: amt.ToNanoPAC(), From cbc86d57cdbc6124ce4f8aada3ec0c80782621b4 Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 10 Sep 2024 14:25:49 +0330 Subject: [PATCH 08/17] fix: lint error --- www/grpc/transaction.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index b0f3b7bef..0c42c8b48 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -139,7 +139,7 @@ func (s *transactionServer) GetRawTransaction(_ context.Context, return nil, status.Errorf(codes.InvalidArgument, "invalid transaction type") } -// Deprecated: GetRawTransferTransaction +// Deprecated: GetRawTransferTransaction. func (s *transactionServer) GetRawTransferTransaction(_ context.Context, req *pactus.GetRawTransferTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -168,7 +168,7 @@ func (s *transactionServer) GetRawTransferTransaction(_ context.Context, }, nil } -// Deprecated: GetRawBondTransaction +// Deprecated: GetRawBondTransaction. func (s *transactionServer) GetRawBondTransaction(_ context.Context, req *pactus.GetRawBondTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -207,7 +207,7 @@ func (s *transactionServer) GetRawBondTransaction(_ context.Context, }, nil } -// Deprecated: GetRawUnbondTransaction +// Deprecated: GetRawUnbondTransaction. func (s *transactionServer) GetRawUnbondTransaction(_ context.Context, req *pactus.GetRawUnbondTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -229,7 +229,7 @@ func (s *transactionServer) GetRawUnbondTransaction(_ context.Context, }, nil } -// Deprecated: GetRawWithdrawTransaction +// Deprecated: GetRawWithdrawTransaction. func (s *transactionServer) GetRawWithdrawTransaction(_ context.Context, req *pactus.GetRawWithdrawTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { From 5b614bf902c93909dbfc6c1cc2405d5aa13a1792 Mon Sep 17 00:00:00 2001 From: Javad Date: Mon, 16 Sep 2024 08:41:36 +0330 Subject: [PATCH 09/17] fix: name convation transaction to payload --- www/grpc/gen/dart/transaction.pb.dart | 162 +- www/grpc/gen/dart/transaction.pbjson.dart | 60 +- www/grpc/gen/docs/grpc.md | 8 +- www/grpc/gen/go/transaction.cobra.pb.go | 44 +- www/grpc/gen/go/transaction.pb.go | 587 ++++---- .../transaction/TransactionOuterClass.java | 1340 ++++++++--------- www/grpc/gen/js/transaction_pb.js | 320 ++-- www/grpc/gen/python/transaction_pb2.py | 76 +- www/grpc/gen/python/transaction_pb2.pyi | 18 +- www/grpc/gen/rust/pactus.rs | 30 +- www/grpc/gen/rust/pactus.serde.rs | 1316 ++++++++-------- www/grpc/proto/transaction.proto | 26 +- www/grpc/swagger-ui/pactus.swagger.json | 172 +-- www/grpc/transaction.go | 2 +- www/grpc/transaction_test.go | 16 +- 15 files changed, 2089 insertions(+), 2088 deletions(-) diff --git a/www/grpc/gen/dart/transaction.pb.dart b/www/grpc/gen/dart/transaction.pb.dart index e8d73ccea..fedddc6bd 100644 --- a/www/grpc/gen/dart/transaction.pb.dart +++ b/www/grpc/gen/dart/transaction.pb.dart @@ -383,7 +383,7 @@ class BroadcastTransactionResponse extends $pb.GeneratedMessage { void clearId() => clearField(1); } -enum GetRawTransactionRequest_Transaction { +enum GetRawTransactionRequest_Payload { transfer, bond, unbond, @@ -392,21 +392,21 @@ enum GetRawTransactionRequest_Transaction { } class GetRawTransactionRequest extends $pb.GeneratedMessage { - static const $core.Map<$core.int, GetRawTransactionRequest_Transaction> _GetRawTransactionRequest_TransactionByTag = { - 3 : GetRawTransactionRequest_Transaction.transfer, - 4 : GetRawTransactionRequest_Transaction.bond, - 5 : GetRawTransactionRequest_Transaction.unbond, - 6 : GetRawTransactionRequest_Transaction.withdraw, - 0 : GetRawTransactionRequest_Transaction.notSet + static const $core.Map<$core.int, GetRawTransactionRequest_Payload> _GetRawTransactionRequest_PayloadByTag = { + 3 : GetRawTransactionRequest_Payload.transfer, + 4 : GetRawTransactionRequest_Payload.bond, + 5 : GetRawTransactionRequest_Payload.unbond, + 6 : GetRawTransactionRequest_Payload.withdraw, + 0 : GetRawTransactionRequest_Payload.notSet }; static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..oo(0, [3, 4, 5, 6]) ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') - ..aOM(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: RawTransfer.create) - ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: RawBond.create) - ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: RawUnbond.create) - ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: RawWithdraw.create) + ..aOM(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: TransferPayload.create) + ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: BondPayload.create) + ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: UnbondPayload.create) + ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: WithdrawPayload.create) ..hasRequiredFields = false ; @@ -414,10 +414,10 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { factory GetRawTransactionRequest({ $core.int? lockTime, $core.String? memo, - RawTransfer? transfer, - RawBond? bond, - RawUnbond? unbond, - RawWithdraw? withdraw, + TransferPayload? transfer, + BondPayload? bond, + UnbondPayload? unbond, + WithdrawPayload? withdraw, }) { final _result = create(); if (lockTime != null) { @@ -461,8 +461,8 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { static GetRawTransactionRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetRawTransactionRequest? _defaultInstance; - GetRawTransactionRequest_Transaction whichTransaction() => _GetRawTransactionRequest_TransactionByTag[$_whichOneof(0)]!; - void clearTransaction() => clearField($_whichOneof(0)); + GetRawTransactionRequest_Payload whichPayload() => _GetRawTransactionRequest_PayloadByTag[$_whichOneof(0)]!; + void clearPayload() => clearField($_whichOneof(0)); @$pb.TagNumber(1) $core.int get lockTime => $_getIZ(0); @@ -483,48 +483,48 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { void clearMemo() => clearField(2); @$pb.TagNumber(3) - RawTransfer get transfer => $_getN(2); + TransferPayload get transfer => $_getN(2); @$pb.TagNumber(3) - set transfer(RawTransfer v) { setField(3, v); } + set transfer(TransferPayload v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasTransfer() => $_has(2); @$pb.TagNumber(3) void clearTransfer() => clearField(3); @$pb.TagNumber(3) - RawTransfer ensureTransfer() => $_ensure(2); + TransferPayload ensureTransfer() => $_ensure(2); @$pb.TagNumber(4) - RawBond get bond => $_getN(3); + BondPayload get bond => $_getN(3); @$pb.TagNumber(4) - set bond(RawBond v) { setField(4, v); } + set bond(BondPayload v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasBond() => $_has(3); @$pb.TagNumber(4) void clearBond() => clearField(4); @$pb.TagNumber(4) - RawBond ensureBond() => $_ensure(3); + BondPayload ensureBond() => $_ensure(3); @$pb.TagNumber(5) - RawUnbond get unbond => $_getN(4); + UnbondPayload get unbond => $_getN(4); @$pb.TagNumber(5) - set unbond(RawUnbond v) { setField(5, v); } + set unbond(UnbondPayload v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasUnbond() => $_has(4); @$pb.TagNumber(5) void clearUnbond() => clearField(5); @$pb.TagNumber(5) - RawUnbond ensureUnbond() => $_ensure(4); + UnbondPayload ensureUnbond() => $_ensure(4); @$pb.TagNumber(6) - RawWithdraw get withdraw => $_getN(5); + WithdrawPayload get withdraw => $_getN(5); @$pb.TagNumber(6) - set withdraw(RawWithdraw v) { setField(6, v); } + set withdraw(WithdrawPayload v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasWithdraw() => $_has(5); @$pb.TagNumber(6) void clearWithdraw() => clearField(6); @$pb.TagNumber(6) - RawWithdraw ensureWithdraw() => $_ensure(5); + WithdrawPayload ensureWithdraw() => $_ensure(5); } class GetRawTransferTransactionRequest extends $pb.GeneratedMessage { @@ -967,8 +967,8 @@ class GetRawWithdrawTransactionRequest extends $pb.GeneratedMessage { void clearMemo() => clearField(6); } -class RawTransfer extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RawTransfer', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) +class TransferPayload extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'TransferPayload', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') @@ -976,8 +976,8 @@ class RawTransfer extends $pb.GeneratedMessage { ..hasRequiredFields = false ; - RawTransfer._() : super(); - factory RawTransfer({ + TransferPayload._() : super(); + factory TransferPayload({ $core.String? sender, $core.String? receiver, $fixnum.Int64? amount, @@ -998,26 +998,26 @@ class RawTransfer extends $pb.GeneratedMessage { } return _result; } - factory RawTransfer.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory RawTransfer.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory TransferPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TransferPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - RawTransfer clone() => RawTransfer()..mergeFromMessage(this); + TransferPayload clone() => TransferPayload()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - RawTransfer copyWith(void Function(RawTransfer) updates) => super.copyWith((message) => updates(message as RawTransfer)) as RawTransfer; // ignore: deprecated_member_use + TransferPayload copyWith(void Function(TransferPayload) updates) => super.copyWith((message) => updates(message as TransferPayload)) as TransferPayload; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static RawTransfer create() => RawTransfer._(); - RawTransfer createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static TransferPayload create() => TransferPayload._(); + TransferPayload createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static RawTransfer getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RawTransfer? _defaultInstance; + static TransferPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TransferPayload? _defaultInstance; @$pb.TagNumber(1) $core.String get sender => $_getSZ(0); @@ -1056,8 +1056,8 @@ class RawTransfer extends $pb.GeneratedMessage { void clearFee() => clearField(4); } -class RawBond extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RawBond', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) +class BondPayload extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BondPayload', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') @@ -1066,8 +1066,8 @@ class RawBond extends $pb.GeneratedMessage { ..hasRequiredFields = false ; - RawBond._() : super(); - factory RawBond({ + BondPayload._() : super(); + factory BondPayload({ $core.String? sender, $core.String? receiver, $fixnum.Int64? stake, @@ -1092,26 +1092,26 @@ class RawBond extends $pb.GeneratedMessage { } return _result; } - factory RawBond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory RawBond.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory BondPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory BondPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - RawBond clone() => RawBond()..mergeFromMessage(this); + BondPayload clone() => BondPayload()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - RawBond copyWith(void Function(RawBond) updates) => super.copyWith((message) => updates(message as RawBond)) as RawBond; // ignore: deprecated_member_use + BondPayload copyWith(void Function(BondPayload) updates) => super.copyWith((message) => updates(message as BondPayload)) as BondPayload; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static RawBond create() => RawBond._(); - RawBond createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static BondPayload create() => BondPayload._(); + BondPayload createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static RawBond getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RawBond? _defaultInstance; + static BondPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static BondPayload? _defaultInstance; @$pb.TagNumber(1) $core.String get sender => $_getSZ(0); @@ -1159,14 +1159,14 @@ class RawBond extends $pb.GeneratedMessage { void clearFee() => clearField(5); } -class RawUnbond extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RawUnbond', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) +class UnbondPayload extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UnbondPayload', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') ..hasRequiredFields = false ; - RawUnbond._() : super(); - factory RawUnbond({ + UnbondPayload._() : super(); + factory UnbondPayload({ $core.String? validatorAddress, }) { final _result = create(); @@ -1175,26 +1175,26 @@ class RawUnbond extends $pb.GeneratedMessage { } return _result; } - factory RawUnbond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory RawUnbond.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory UnbondPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory UnbondPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - RawUnbond clone() => RawUnbond()..mergeFromMessage(this); + UnbondPayload clone() => UnbondPayload()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - RawUnbond copyWith(void Function(RawUnbond) updates) => super.copyWith((message) => updates(message as RawUnbond)) as RawUnbond; // ignore: deprecated_member_use + UnbondPayload copyWith(void Function(UnbondPayload) updates) => super.copyWith((message) => updates(message as UnbondPayload)) as UnbondPayload; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static RawUnbond create() => RawUnbond._(); - RawUnbond createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static UnbondPayload create() => UnbondPayload._(); + UnbondPayload createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static RawUnbond getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RawUnbond? _defaultInstance; + static UnbondPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static UnbondPayload? _defaultInstance; @$pb.TagNumber(1) $core.String get validatorAddress => $_getSZ(0); @@ -1206,8 +1206,8 @@ class RawUnbond extends $pb.GeneratedMessage { void clearValidatorAddress() => clearField(1); } -class RawWithdraw extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'RawWithdraw', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) +class WithdrawPayload extends $pb.GeneratedMessage { + static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'WithdrawPayload', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'accountAddress') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') @@ -1215,8 +1215,8 @@ class RawWithdraw extends $pb.GeneratedMessage { ..hasRequiredFields = false ; - RawWithdraw._() : super(); - factory RawWithdraw({ + WithdrawPayload._() : super(); + factory WithdrawPayload({ $core.String? validatorAddress, $core.String? accountAddress, $fixnum.Int64? amount, @@ -1237,26 +1237,26 @@ class RawWithdraw extends $pb.GeneratedMessage { } return _result; } - factory RawWithdraw.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory RawWithdraw.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + factory WithdrawPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory WithdrawPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 'Will be removed in next major version') - RawWithdraw clone() => RawWithdraw()..mergeFromMessage(this); + WithdrawPayload clone() => WithdrawPayload()..mergeFromMessage(this); @$core.Deprecated( 'Using this can add significant overhead to your binary. ' 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 'Will be removed in next major version') - RawWithdraw copyWith(void Function(RawWithdraw) updates) => super.copyWith((message) => updates(message as RawWithdraw)) as RawWithdraw; // ignore: deprecated_member_use + WithdrawPayload copyWith(void Function(WithdrawPayload) updates) => super.copyWith((message) => updates(message as WithdrawPayload)) as WithdrawPayload; // ignore: deprecated_member_use $pb.BuilderInfo get info_ => _i; @$core.pragma('dart2js:noInline') - static RawWithdraw create() => RawWithdraw._(); - RawWithdraw createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); + static WithdrawPayload create() => WithdrawPayload._(); + WithdrawPayload createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); @$core.pragma('dart2js:noInline') - static RawWithdraw getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static RawWithdraw? _defaultInstance; + static WithdrawPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static WithdrawPayload? _defaultInstance; @$pb.TagNumber(1) $core.String get validatorAddress => $_getSZ(0); diff --git a/www/grpc/gen/dart/transaction.pbjson.dart b/www/grpc/gen/dart/transaction.pbjson.dart index e2a230ef9..c7e7cfd05 100644 --- a/www/grpc/gen/dart/transaction.pbjson.dart +++ b/www/grpc/gen/dart/transaction.pbjson.dart @@ -106,18 +106,18 @@ const GetRawTransactionRequest$json = const { '2': const [ const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, const {'1': 'memo', '3': 2, '4': 1, '5': 9, '10': 'memo'}, - const {'1': 'transfer', '3': 3, '4': 1, '5': 11, '6': '.pactus.RawTransfer', '9': 0, '10': 'transfer'}, - const {'1': 'bond', '3': 4, '4': 1, '5': 11, '6': '.pactus.RawBond', '9': 0, '10': 'bond'}, - const {'1': 'unbond', '3': 5, '4': 1, '5': 11, '6': '.pactus.RawUnbond', '9': 0, '10': 'unbond'}, - const {'1': 'withdraw', '3': 6, '4': 1, '5': 11, '6': '.pactus.RawWithdraw', '9': 0, '10': 'withdraw'}, + const {'1': 'transfer', '3': 3, '4': 1, '5': 11, '6': '.pactus.TransferPayload', '9': 0, '10': 'transfer'}, + const {'1': 'bond', '3': 4, '4': 1, '5': 11, '6': '.pactus.BondPayload', '9': 0, '10': 'bond'}, + const {'1': 'unbond', '3': 5, '4': 1, '5': 11, '6': '.pactus.UnbondPayload', '9': 0, '10': 'unbond'}, + const {'1': 'withdraw', '3': 6, '4': 1, '5': 11, '6': '.pactus.WithdrawPayload', '9': 0, '10': 'withdraw'}, ], '8': const [ - const {'1': 'transaction'}, + const {'1': 'payload'}, ], }; /// Descriptor for `GetRawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawTransactionRequestDescriptor = $convert.base64Decode('ChhHZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRISCgRtZW1vGAIgASgJUgRtZW1vEjEKCHRyYW5zZmVyGAMgASgLMhMucGFjdHVzLlJhd1RyYW5zZmVySABSCHRyYW5zZmVyEiUKBGJvbmQYBCABKAsyDy5wYWN0dXMuUmF3Qm9uZEgAUgRib25kEisKBnVuYm9uZBgFIAEoCzIRLnBhY3R1cy5SYXdVbmJvbmRIAFIGdW5ib25kEjEKCHdpdGhkcmF3GAYgASgLMhMucGFjdHVzLlJhd1dpdGhkcmF3SABSCHdpdGhkcmF3Qg0KC3RyYW5zYWN0aW9u'); +final $typed_data.Uint8List getRawTransactionRequestDescriptor = $convert.base64Decode('ChhHZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRISCgRtZW1vGAIgASgJUgRtZW1vEjUKCHRyYW5zZmVyGAMgASgLMhcucGFjdHVzLlRyYW5zZmVyUGF5bG9hZEgAUgh0cmFuc2ZlchIpCgRib25kGAQgASgLMhMucGFjdHVzLkJvbmRQYXlsb2FkSABSBGJvbmQSLwoGdW5ib25kGAUgASgLMhUucGFjdHVzLlVuYm9uZFBheWxvYWRIAFIGdW5ib25kEjUKCHdpdGhkcmF3GAYgASgLMhcucGFjdHVzLldpdGhkcmF3UGF5bG9hZEgAUgh3aXRoZHJhd0IJCgdwYXlsb2Fk'); @$core.Deprecated('Use getRawTransferTransactionRequestDescriptor instead') const GetRawTransferTransactionRequest$json = const { '1': 'GetRawTransferTransactionRequest', @@ -176,9 +176,9 @@ const GetRawWithdrawTransactionRequest$json = const { /// Descriptor for `GetRawWithdrawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getRawWithdrawTransactionRequestDescriptor = $convert.base64Decode('CiBHZXRSYXdXaXRoZHJhd1RyYW5zYWN0aW9uUmVxdWVzdBIbCglsb2NrX3RpbWUYASABKA1SCGxvY2tUaW1lEisKEXZhbGlkYXRvcl9hZGRyZXNzGAIgASgJUhB2YWxpZGF0b3JBZGRyZXNzEicKD2FjY291bnRfYWRkcmVzcxgDIAEoCVIOYWNjb3VudEFkZHJlc3MSFgoGYW1vdW50GAQgASgDUgZhbW91bnQSEAoDZmVlGAUgASgDUgNmZWUSEgoEbWVtbxgGIAEoCVIEbWVtbw=='); -@$core.Deprecated('Use rawTransferDescriptor instead') -const RawTransfer$json = const { - '1': 'RawTransfer', +@$core.Deprecated('Use transferPayloadDescriptor instead') +const TransferPayload$json = const { + '1': 'TransferPayload', '2': const [ const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, @@ -187,11 +187,11 @@ const RawTransfer$json = const { ], }; -/// Descriptor for `RawTransfer`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List rawTransferDescriptor = $convert.base64Decode('CgtSYXdUcmFuc2ZlchIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFgoGYW1vdW50GAMgASgDUgZhbW91bnQSEAoDZmVlGAQgASgDUgNmZWU='); -@$core.Deprecated('Use rawBondDescriptor instead') -const RawBond$json = const { - '1': 'RawBond', +/// Descriptor for `TransferPayload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List transferPayloadDescriptor = $convert.base64Decode('Cg9UcmFuc2ZlclBheWxvYWQSFgoGc2VuZGVyGAEgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAiABKAlSCHJlY2VpdmVyEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50EhAKA2ZlZRgEIAEoA1IDZmVl'); +@$core.Deprecated('Use bondPayloadDescriptor instead') +const BondPayload$json = const { + '1': 'BondPayload', '2': const [ const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, @@ -201,21 +201,21 @@ const RawBond$json = const { ], }; -/// Descriptor for `RawBond`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List rawBondDescriptor = $convert.base64Decode('CgdSYXdCb25kEhYKBnNlbmRlchgBIAEoCVIGc2VuZGVyEhoKCHJlY2VpdmVyGAIgASgJUghyZWNlaXZlchIUCgVzdGFrZRgDIAEoA1IFc3Rha2USHQoKcHVibGljX2tleRgEIAEoCVIJcHVibGljS2V5EhAKA2ZlZRgFIAEoA1IDZmVl'); -@$core.Deprecated('Use rawUnbondDescriptor instead') -const RawUnbond$json = const { - '1': 'RawUnbond', +/// Descriptor for `BondPayload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List bondPayloadDescriptor = $convert.base64Decode('CgtCb25kUGF5bG9hZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtlEh0KCnB1YmxpY19rZXkYBCABKAlSCXB1YmxpY0tleRIQCgNmZWUYBSABKANSA2ZlZQ=='); +@$core.Deprecated('Use unbondPayloadDescriptor instead') +const UnbondPayload$json = const { + '1': 'UnbondPayload', '2': const [ const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, ], }; -/// Descriptor for `RawUnbond`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List rawUnbondDescriptor = $convert.base64Decode('CglSYXdVbmJvbmQSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvckFkZHJlc3M='); -@$core.Deprecated('Use rawWithdrawDescriptor instead') -const RawWithdraw$json = const { - '1': 'RawWithdraw', +/// Descriptor for `UnbondPayload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List unbondPayloadDescriptor = $convert.base64Decode('Cg1VbmJvbmRQYXlsb2FkEisKEXZhbGlkYXRvcl9hZGRyZXNzGAEgASgJUhB2YWxpZGF0b3JBZGRyZXNz'); +@$core.Deprecated('Use withdrawPayloadDescriptor instead') +const WithdrawPayload$json = const { + '1': 'WithdrawPayload', '2': const [ const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, const {'1': 'account_address', '3': 2, '4': 1, '5': 9, '10': 'accountAddress'}, @@ -224,8 +224,8 @@ const RawWithdraw$json = const { ], }; -/// Descriptor for `RawWithdraw`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List rawWithdrawDescriptor = $convert.base64Decode('CgtSYXdXaXRoZHJhdxIrChF2YWxpZGF0b3JfYWRkcmVzcxgBIAEoCVIQdmFsaWRhdG9yQWRkcmVzcxInCg9hY2NvdW50X2FkZHJlc3MYAiABKAlSDmFjY291bnRBZGRyZXNzEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50EhAKA2ZlZRgEIAEoA1IDZmVl'); +/// Descriptor for `WithdrawPayload`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List withdrawPayloadDescriptor = $convert.base64Decode('Cg9XaXRoZHJhd1BheWxvYWQSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvckFkZHJlc3MSJwoPYWNjb3VudF9hZGRyZXNzGAIgASgJUg5hY2NvdW50QWRkcmVzcxIWCgZhbW91bnQYAyABKANSBmFtb3VudBIQCgNmZWUYBCABKANSA2ZlZQ=='); @$core.Deprecated('Use getRawTransactionResponseDescriptor instead') const GetRawTransactionResponse$json = const { '1': 'GetRawTransactionResponse', @@ -349,10 +349,10 @@ const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> Transactio '.pactus.BroadcastTransactionRequest': BroadcastTransactionRequest$json, '.pactus.BroadcastTransactionResponse': BroadcastTransactionResponse$json, '.pactus.GetRawTransactionRequest': GetRawTransactionRequest$json, - '.pactus.RawTransfer': RawTransfer$json, - '.pactus.RawBond': RawBond$json, - '.pactus.RawUnbond': RawUnbond$json, - '.pactus.RawWithdraw': RawWithdraw$json, + '.pactus.TransferPayload': TransferPayload$json, + '.pactus.BondPayload': BondPayload$json, + '.pactus.UnbondPayload': UnbondPayload$json, + '.pactus.WithdrawPayload': WithdrawPayload$json, '.pactus.GetRawTransactionResponse': GetRawTransactionResponse$json, '.pactus.GetRawTransferTransactionRequest': GetRawTransferTransactionRequest$json, '.pactus.GetRawBondTransactionRequest': GetRawBondTransactionRequest$json, diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md index 2cc75c82d..44d071944 100644 --- a/www/grpc/gen/docs/grpc.md +++ b/www/grpc/gen/docs/grpc.md @@ -567,28 +567,28 @@ height. transfer - RawTransfer + TransferPayload (OneOf) bond - RawBond + BondPayload (OneOf) unbond - RawUnbond + UnbondPayload (OneOf) withdraw - RawWithdraw + WithdrawPayload (OneOf) diff --git a/www/grpc/gen/go/transaction.cobra.pb.go b/www/grpc/gen/go/transaction.cobra.pb.go index 508b798ec..4bc35bf63 100644 --- a/www/grpc/gen/go/transaction.cobra.pb.go +++ b/www/grpc/gen/go/transaction.cobra.pb.go @@ -200,46 +200,46 @@ func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") - _Transfer := &RawTransfer{} + _Transfer := &TransferPayload{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Transfer"), false, "") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) cmd.PersistentFlags().StringVar(&_Transfer.Sender, cfg.FlagNamer("Transfer Sender"), "", "The sender's account address.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Sender"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Sender"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) cmd.PersistentFlags().StringVar(&_Transfer.Receiver, cfg.FlagNamer("Transfer Receiver"), "", "The receiver's account address.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Receiver"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Receiver"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) cmd.PersistentFlags().Int64Var(&_Transfer.Amount, cfg.FlagNamer("Transfer Amount"), 0, "The amount to be transferred, specified in NanoPAC. Must be greater than 0.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Amount"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Amount"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) cmd.PersistentFlags().Int64Var(&_Transfer.Fee, cfg.FlagNamer("Transfer Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Fee"), func() { req.Transaction = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) - _Bond := &RawBond{} + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Fee"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) + _Bond := &BondPayload{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Bond"), false, "") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) cmd.PersistentFlags().StringVar(&_Bond.Sender, cfg.FlagNamer("Bond Sender"), "", "The sender's account address.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Sender"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Sender"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) cmd.PersistentFlags().StringVar(&_Bond.Receiver, cfg.FlagNamer("Bond Receiver"), "", "The receiver's validator address.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Receiver"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Receiver"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) cmd.PersistentFlags().Int64Var(&_Bond.Stake, cfg.FlagNamer("Bond Stake"), 0, "The stake amount in NanoPAC. Must be greater than 0.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Stake"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Stake"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) cmd.PersistentFlags().StringVar(&_Bond.PublicKey, cfg.FlagNamer("Bond PublicKey"), "", "The public key of the validator.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond PublicKey"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond PublicKey"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) cmd.PersistentFlags().Int64Var(&_Bond.Fee, cfg.FlagNamer("Bond Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Fee"), func() { req.Transaction = &GetRawTransactionRequest_Bond{Bond: _Bond} }) - _Unbond := &RawUnbond{} + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Fee"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) + _Unbond := &UnbondPayload{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Unbond"), false, "") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond"), func() { req.Transaction = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond"), func() { req.Payload = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) cmd.PersistentFlags().StringVar(&_Unbond.ValidatorAddress, cfg.FlagNamer("Unbond ValidatorAddress"), "", "The address of the validator to unbond from.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond ValidatorAddress"), func() { req.Transaction = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) - _Withdraw := &RawWithdraw{} + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond ValidatorAddress"), func() { req.Payload = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) + _Withdraw := &WithdrawPayload{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Withdraw"), false, "") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) cmd.PersistentFlags().StringVar(&_Withdraw.ValidatorAddress, cfg.FlagNamer("Withdraw ValidatorAddress"), "", "The address of the validator to withdraw from.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw ValidatorAddress"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw ValidatorAddress"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) cmd.PersistentFlags().StringVar(&_Withdraw.AccountAddress, cfg.FlagNamer("Withdraw AccountAddress"), "", "The address of the account to withdraw to.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw AccountAddress"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw AccountAddress"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) cmd.PersistentFlags().Int64Var(&_Withdraw.Amount, cfg.FlagNamer("Withdraw Amount"), 0, "The withdrawal amount in NanoPAC. Must be greater than 0.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Amount"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Amount"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) cmd.PersistentFlags().Int64Var(&_Withdraw.Fee, cfg.FlagNamer("Withdraw Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Fee"), func() { req.Transaction = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Fee"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) return cmd } diff --git a/www/grpc/gen/go/transaction.pb.go b/www/grpc/gen/go/transaction.pb.go index c56bb4d61..9f46799c9 100644 --- a/www/grpc/gen/go/transaction.pb.go +++ b/www/grpc/gen/go/transaction.pb.go @@ -493,13 +493,13 @@ type GetRawTransactionRequest struct { LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` // A memo string for the transaction. Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` - // Types that are assignable to Transaction: + // Types that are assignable to Payload: // // *GetRawTransactionRequest_Transfer // *GetRawTransactionRequest_Bond // *GetRawTransactionRequest_Unbond // *GetRawTransactionRequest_Withdraw - Transaction isGetRawTransactionRequest_Transaction `protobuf_oneof:"transaction"` + Payload isGetRawTransactionRequest_Payload `protobuf_oneof:"payload"` } func (x *GetRawTransactionRequest) Reset() { @@ -548,68 +548,68 @@ func (x *GetRawTransactionRequest) GetMemo() string { return "" } -func (m *GetRawTransactionRequest) GetTransaction() isGetRawTransactionRequest_Transaction { +func (m *GetRawTransactionRequest) GetPayload() isGetRawTransactionRequest_Payload { if m != nil { - return m.Transaction + return m.Payload } return nil } -func (x *GetRawTransactionRequest) GetTransfer() *RawTransfer { - if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Transfer); ok { +func (x *GetRawTransactionRequest) GetTransfer() *TransferPayload { + if x, ok := x.GetPayload().(*GetRawTransactionRequest_Transfer); ok { return x.Transfer } return nil } -func (x *GetRawTransactionRequest) GetBond() *RawBond { - if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Bond); ok { +func (x *GetRawTransactionRequest) GetBond() *BondPayload { + if x, ok := x.GetPayload().(*GetRawTransactionRequest_Bond); ok { return x.Bond } return nil } -func (x *GetRawTransactionRequest) GetUnbond() *RawUnbond { - if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Unbond); ok { +func (x *GetRawTransactionRequest) GetUnbond() *UnbondPayload { + if x, ok := x.GetPayload().(*GetRawTransactionRequest_Unbond); ok { return x.Unbond } return nil } -func (x *GetRawTransactionRequest) GetWithdraw() *RawWithdraw { - if x, ok := x.GetTransaction().(*GetRawTransactionRequest_Withdraw); ok { +func (x *GetRawTransactionRequest) GetWithdraw() *WithdrawPayload { + if x, ok := x.GetPayload().(*GetRawTransactionRequest_Withdraw); ok { return x.Withdraw } return nil } -type isGetRawTransactionRequest_Transaction interface { - isGetRawTransactionRequest_Transaction() +type isGetRawTransactionRequest_Payload interface { + isGetRawTransactionRequest_Payload() } type GetRawTransactionRequest_Transfer struct { - Transfer *RawTransfer `protobuf:"bytes,3,opt,name=transfer,proto3,oneof"` + Transfer *TransferPayload `protobuf:"bytes,3,opt,name=transfer,proto3,oneof"` } type GetRawTransactionRequest_Bond struct { - Bond *RawBond `protobuf:"bytes,4,opt,name=bond,proto3,oneof"` + Bond *BondPayload `protobuf:"bytes,4,opt,name=bond,proto3,oneof"` } type GetRawTransactionRequest_Unbond struct { - Unbond *RawUnbond `protobuf:"bytes,5,opt,name=unbond,proto3,oneof"` + Unbond *UnbondPayload `protobuf:"bytes,5,opt,name=unbond,proto3,oneof"` } type GetRawTransactionRequest_Withdraw struct { - Withdraw *RawWithdraw `protobuf:"bytes,6,opt,name=withdraw,proto3,oneof"` + Withdraw *WithdrawPayload `protobuf:"bytes,6,opt,name=withdraw,proto3,oneof"` } -func (*GetRawTransactionRequest_Transfer) isGetRawTransactionRequest_Transaction() {} +func (*GetRawTransactionRequest_Transfer) isGetRawTransactionRequest_Payload() {} -func (*GetRawTransactionRequest_Bond) isGetRawTransactionRequest_Transaction() {} +func (*GetRawTransactionRequest_Bond) isGetRawTransactionRequest_Payload() {} -func (*GetRawTransactionRequest_Unbond) isGetRawTransactionRequest_Transaction() {} +func (*GetRawTransactionRequest_Unbond) isGetRawTransactionRequest_Payload() {} -func (*GetRawTransactionRequest_Withdraw) isGetRawTransactionRequest_Transaction() {} +func (*GetRawTransactionRequest_Withdraw) isGetRawTransactionRequest_Payload() {} // Request message for retrieving raw details of a transfer transaction. type GetRawTransferTransactionRequest struct { @@ -973,8 +973,8 @@ func (x *GetRawWithdrawTransactionRequest) GetMemo() string { return "" } -// Request message for retrieving raw details of a transfer transaction. -type RawTransfer struct { +// Payload message for retrieving raw details of a transfer transaction. +type TransferPayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -989,8 +989,8 @@ type RawTransfer struct { Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` } -func (x *RawTransfer) Reset() { - *x = RawTransfer{} +func (x *TransferPayload) Reset() { + *x = TransferPayload{} if protoimpl.UnsafeEnabled { mi := &file_transaction_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -998,13 +998,13 @@ func (x *RawTransfer) Reset() { } } -func (x *RawTransfer) String() string { +func (x *TransferPayload) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RawTransfer) ProtoMessage() {} +func (*TransferPayload) ProtoMessage() {} -func (x *RawTransfer) ProtoReflect() protoreflect.Message { +func (x *TransferPayload) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1016,41 +1016,41 @@ func (x *RawTransfer) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RawTransfer.ProtoReflect.Descriptor instead. -func (*RawTransfer) Descriptor() ([]byte, []int) { +// Deprecated: Use TransferPayload.ProtoReflect.Descriptor instead. +func (*TransferPayload) Descriptor() ([]byte, []int) { return file_transaction_proto_rawDescGZIP(), []int{11} } -func (x *RawTransfer) GetSender() string { +func (x *TransferPayload) GetSender() string { if x != nil { return x.Sender } return "" } -func (x *RawTransfer) GetReceiver() string { +func (x *TransferPayload) GetReceiver() string { if x != nil { return x.Receiver } return "" } -func (x *RawTransfer) GetAmount() int64 { +func (x *TransferPayload) GetAmount() int64 { if x != nil { return x.Amount } return 0 } -func (x *RawTransfer) GetFee() int64 { +func (x *TransferPayload) GetFee() int64 { if x != nil { return x.Fee } return 0 } -// Request message for retrieving raw details of a bond transaction. -type RawBond struct { +// Payload message for retrieving raw details of a bond transaction. +type BondPayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1067,8 +1067,8 @@ type RawBond struct { Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` } -func (x *RawBond) Reset() { - *x = RawBond{} +func (x *BondPayload) Reset() { + *x = BondPayload{} if protoimpl.UnsafeEnabled { mi := &file_transaction_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1076,13 +1076,13 @@ func (x *RawBond) Reset() { } } -func (x *RawBond) String() string { +func (x *BondPayload) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RawBond) ProtoMessage() {} +func (*BondPayload) ProtoMessage() {} -func (x *RawBond) ProtoReflect() protoreflect.Message { +func (x *BondPayload) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1094,48 +1094,48 @@ func (x *RawBond) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RawBond.ProtoReflect.Descriptor instead. -func (*RawBond) Descriptor() ([]byte, []int) { +// Deprecated: Use BondPayload.ProtoReflect.Descriptor instead. +func (*BondPayload) Descriptor() ([]byte, []int) { return file_transaction_proto_rawDescGZIP(), []int{12} } -func (x *RawBond) GetSender() string { +func (x *BondPayload) GetSender() string { if x != nil { return x.Sender } return "" } -func (x *RawBond) GetReceiver() string { +func (x *BondPayload) GetReceiver() string { if x != nil { return x.Receiver } return "" } -func (x *RawBond) GetStake() int64 { +func (x *BondPayload) GetStake() int64 { if x != nil { return x.Stake } return 0 } -func (x *RawBond) GetPublicKey() string { +func (x *BondPayload) GetPublicKey() string { if x != nil { return x.PublicKey } return "" } -func (x *RawBond) GetFee() int64 { +func (x *BondPayload) GetFee() int64 { if x != nil { return x.Fee } return 0 } -// Request message for retrieving raw details of an unbond transaction. -type RawUnbond struct { +// Payload message for retrieving raw details of an unbond transaction. +type UnbondPayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1144,8 +1144,8 @@ type RawUnbond struct { ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` } -func (x *RawUnbond) Reset() { - *x = RawUnbond{} +func (x *UnbondPayload) Reset() { + *x = UnbondPayload{} if protoimpl.UnsafeEnabled { mi := &file_transaction_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1153,13 +1153,13 @@ func (x *RawUnbond) Reset() { } } -func (x *RawUnbond) String() string { +func (x *UnbondPayload) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RawUnbond) ProtoMessage() {} +func (*UnbondPayload) ProtoMessage() {} -func (x *RawUnbond) ProtoReflect() protoreflect.Message { +func (x *UnbondPayload) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1171,20 +1171,20 @@ func (x *RawUnbond) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RawUnbond.ProtoReflect.Descriptor instead. -func (*RawUnbond) Descriptor() ([]byte, []int) { +// Deprecated: Use UnbondPayload.ProtoReflect.Descriptor instead. +func (*UnbondPayload) Descriptor() ([]byte, []int) { return file_transaction_proto_rawDescGZIP(), []int{13} } -func (x *RawUnbond) GetValidatorAddress() string { +func (x *UnbondPayload) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress } return "" } -// Request message for retrieving raw details of a withdraw transaction. -type RawWithdraw struct { +// Payload message for retrieving raw details of a withdraw transaction. +type WithdrawPayload struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1199,8 +1199,8 @@ type RawWithdraw struct { Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` } -func (x *RawWithdraw) Reset() { - *x = RawWithdraw{} +func (x *WithdrawPayload) Reset() { + *x = WithdrawPayload{} if protoimpl.UnsafeEnabled { mi := &file_transaction_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1208,13 +1208,13 @@ func (x *RawWithdraw) Reset() { } } -func (x *RawWithdraw) String() string { +func (x *WithdrawPayload) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RawWithdraw) ProtoMessage() {} +func (*WithdrawPayload) ProtoMessage() {} -func (x *RawWithdraw) ProtoReflect() protoreflect.Message { +func (x *WithdrawPayload) ProtoReflect() protoreflect.Message { mi := &file_transaction_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1226,33 +1226,33 @@ func (x *RawWithdraw) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RawWithdraw.ProtoReflect.Descriptor instead. -func (*RawWithdraw) Descriptor() ([]byte, []int) { +// Deprecated: Use WithdrawPayload.ProtoReflect.Descriptor instead. +func (*WithdrawPayload) Descriptor() ([]byte, []int) { return file_transaction_proto_rawDescGZIP(), []int{14} } -func (x *RawWithdraw) GetValidatorAddress() string { +func (x *WithdrawPayload) GetValidatorAddress() string { if x != nil { return x.ValidatorAddress } return "" } -func (x *RawWithdraw) GetAccountAddress() string { +func (x *WithdrawPayload) GetAccountAddress() string { if x != nil { return x.AccountAddress } return "" } -func (x *RawWithdraw) GetAmount() int64 { +func (x *WithdrawPayload) GetAmount() int64 { if x != nil { return x.Amount } return 0 } -func (x *RawWithdraw) GetFee() int64 { +func (x *WithdrawPayload) GetFee() int64 { if x != nil { return x.Fee } @@ -1876,227 +1876,228 @@ var file_transaction_proto_rawDesc = []byte{ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x1c, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x94, 0x02, 0x0a, 0x18, 0x47, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xa0, 0x02, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x31, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, - 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x04, 0x62, - 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, - 0x6e, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x52, 0x61, 0x77, 0x55, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, - 0x31, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x52, 0x61, 0x77, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0xb1, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0xca, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, - 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, - 0x6d, 0x6f, 0x22, 0x7e, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, - 0x6d, 0x6f, 0x22, 0xd3, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x6b, 0x0a, 0x0b, 0x52, 0x61, 0x77, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, + 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, + 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xb1, 0x01, + 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, + 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, + 0x6f, 0x22, 0xca, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, + 0x6d, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x7e, + 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, + 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, + 0x6d, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0xd3, + 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, + 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x6f, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x07, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, - 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, - 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x38, 0x0a, 0x09, - 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x0b, 0x52, 0x61, 0x77, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, - 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x0f, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x57, 0x0a, 0x0b, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x22, 0x42, 0x0a, 0x10, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, - 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4d, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, - 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, - 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xac, 0x04, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, - 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, - 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x36, 0x0a, - 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x04, - 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x48, - 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x22, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, - 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, - 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x1d, 0x0a, - 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x83, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, - 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x4f, 0x4e, 0x44, - 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x4f, - 0x52, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, - 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, - 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, - 0x57, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x2a, 0x42, 0x0a, 0x14, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x62, 0x6f, 0x73, - 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, - 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x32, - 0x82, 0x06, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x49, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, - 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, - 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, - 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x42, - 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, - 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, - 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x60, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, - 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x26, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, - 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, + 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x0b, 0x42, 0x6f, 0x6e, 0x64, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, + 0x22, 0x3c, 0x0a, 0x0d, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x91, + 0x01, 0x0a, 0x0f, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, + 0x65, 0x65, 0x22, 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x57, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, + 0x22, 0x42, 0x0a, 0x10, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, + 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, + 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x22, 0x4d, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0xac, 0x04, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x1e, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, + 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, + 0x6f, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x00, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, + 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, + 0x62, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, + 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x2a, 0x83, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, + 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, + 0x41, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, + 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x4f, 0x52, 0x54, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, + 0x0e, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, + 0x04, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x5f, 0x50, 0x41, + 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x2a, 0x42, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, + 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, + 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x32, 0x82, 0x06, 0x0a, 0x0b, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, + 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1b, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, + 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x42, 0x72, 0x6f, 0x61, 0x64, + 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, + 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, + 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x46, 0x0a, 0x12, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, - 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, + 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x64, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, + 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, + 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x46, 0x0a, 0x12, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2127,10 +2128,10 @@ var file_transaction_proto_goTypes = []any{ (*GetRawBondTransactionRequest)(nil), // 10: pactus.GetRawBondTransactionRequest (*GetRawUnbondTransactionRequest)(nil), // 11: pactus.GetRawUnbondTransactionRequest (*GetRawWithdrawTransactionRequest)(nil), // 12: pactus.GetRawWithdrawTransactionRequest - (*RawTransfer)(nil), // 13: pactus.RawTransfer - (*RawBond)(nil), // 14: pactus.RawBond - (*RawUnbond)(nil), // 15: pactus.RawUnbond - (*RawWithdraw)(nil), // 16: pactus.RawWithdraw + (*TransferPayload)(nil), // 13: pactus.TransferPayload + (*BondPayload)(nil), // 14: pactus.BondPayload + (*UnbondPayload)(nil), // 15: pactus.UnbondPayload + (*WithdrawPayload)(nil), // 16: pactus.WithdrawPayload (*GetRawTransactionResponse)(nil), // 17: pactus.GetRawTransactionResponse (*PayloadTransfer)(nil), // 18: pactus.PayloadTransfer (*PayloadBond)(nil), // 19: pactus.PayloadBond @@ -2143,10 +2144,10 @@ var file_transaction_proto_depIdxs = []int32{ 1, // 0: pactus.GetTransactionRequest.verbosity:type_name -> pactus.TransactionVerbosity 23, // 1: pactus.GetTransactionResponse.transaction:type_name -> pactus.TransactionInfo 0, // 2: pactus.CalculateFeeRequest.payload_type:type_name -> pactus.PayloadType - 13, // 3: pactus.GetRawTransactionRequest.transfer:type_name -> pactus.RawTransfer - 14, // 4: pactus.GetRawTransactionRequest.bond:type_name -> pactus.RawBond - 15, // 5: pactus.GetRawTransactionRequest.unbond:type_name -> pactus.RawUnbond - 16, // 6: pactus.GetRawTransactionRequest.withdraw:type_name -> pactus.RawWithdraw + 13, // 3: pactus.GetRawTransactionRequest.transfer:type_name -> pactus.TransferPayload + 14, // 4: pactus.GetRawTransactionRequest.bond:type_name -> pactus.BondPayload + 15, // 5: pactus.GetRawTransactionRequest.unbond:type_name -> pactus.UnbondPayload + 16, // 6: pactus.GetRawTransactionRequest.withdraw:type_name -> pactus.WithdrawPayload 0, // 7: pactus.TransactionInfo.payload_type:type_name -> pactus.PayloadType 18, // 8: pactus.TransactionInfo.transfer:type_name -> pactus.PayloadTransfer 19, // 9: pactus.TransactionInfo.bond:type_name -> pactus.PayloadBond @@ -2315,7 +2316,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*RawTransfer); i { + switch v := v.(*TransferPayload); i { case 0: return &v.state case 1: @@ -2327,7 +2328,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*RawBond); i { + switch v := v.(*BondPayload); i { case 0: return &v.state case 1: @@ -2339,7 +2340,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*RawUnbond); i { + switch v := v.(*UnbondPayload); i { case 0: return &v.state case 1: @@ -2351,7 +2352,7 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*RawWithdraw); i { + switch v := v.(*WithdrawPayload); i { case 0: return &v.state case 1: diff --git a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java index 146cbb105..9d0a6a544 100644 --- a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java +++ b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java @@ -4462,66 +4462,66 @@ public interface GetRawTransactionRequestOrBuilder extends getMemoBytes(); /** - * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; * @return Whether the transfer field is set. */ boolean hasTransfer(); /** - * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; * @return The transfer. */ - pactus.transaction.TransactionOuterClass.RawTransfer getTransfer(); + pactus.transaction.TransactionOuterClass.TransferPayload getTransfer(); /** - * .pactus.RawTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; */ - pactus.transaction.TransactionOuterClass.RawTransferOrBuilder getTransferOrBuilder(); + pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder getTransferOrBuilder(); /** - * .pactus.RawBond bond = 4 [json_name = "bond"]; + * .pactus.BondPayload bond = 4 [json_name = "bond"]; * @return Whether the bond field is set. */ boolean hasBond(); /** - * .pactus.RawBond bond = 4 [json_name = "bond"]; + * .pactus.BondPayload bond = 4 [json_name = "bond"]; * @return The bond. */ - pactus.transaction.TransactionOuterClass.RawBond getBond(); + pactus.transaction.TransactionOuterClass.BondPayload getBond(); /** - * .pactus.RawBond bond = 4 [json_name = "bond"]; + * .pactus.BondPayload bond = 4 [json_name = "bond"]; */ - pactus.transaction.TransactionOuterClass.RawBondOrBuilder getBondOrBuilder(); + pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder getBondOrBuilder(); /** - * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; * @return Whether the unbond field is set. */ boolean hasUnbond(); /** - * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; * @return The unbond. */ - pactus.transaction.TransactionOuterClass.RawUnbond getUnbond(); + pactus.transaction.TransactionOuterClass.UnbondPayload getUnbond(); /** - * .pactus.RawUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; */ - pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder getUnbondOrBuilder(); + pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder getUnbondOrBuilder(); /** - * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; * @return Whether the withdraw field is set. */ boolean hasWithdraw(); /** - * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; * @return The withdraw. */ - pactus.transaction.TransactionOuterClass.RawWithdraw getWithdraw(); + pactus.transaction.TransactionOuterClass.WithdrawPayload getWithdraw(); /** - * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; */ - pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder getWithdrawOrBuilder(); + pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder getWithdrawOrBuilder(); - public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.TransactionCase getTransactionCase(); + public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.PayloadCase getPayloadCase(); } /** *
    @@ -4568,18 +4568,18 @@ protected java.lang.Object newInstance(
                   pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.class, pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.Builder.class);
         }
     
    -    private int transactionCase_ = 0;
    -    private java.lang.Object transaction_;
    -    public enum TransactionCase
    +    private int payloadCase_ = 0;
    +    private java.lang.Object payload_;
    +    public enum PayloadCase
             implements com.google.protobuf.Internal.EnumLite,
                 com.google.protobuf.AbstractMessage.InternalOneOfEnum {
           TRANSFER(3),
           BOND(4),
           UNBOND(5),
           WITHDRAW(6),
    -      TRANSACTION_NOT_SET(0);
    +      PAYLOAD_NOT_SET(0);
           private final int value;
    -      private TransactionCase(int value) {
    +      private PayloadCase(int value) {
             this.value = value;
           }
           /**
    @@ -4588,17 +4588,17 @@ private TransactionCase(int value) {
            * @deprecated Use {@link #forNumber(int)} instead.
            */
           @java.lang.Deprecated
    -      public static TransactionCase valueOf(int value) {
    +      public static PayloadCase valueOf(int value) {
             return forNumber(value);
           }
     
    -      public static TransactionCase forNumber(int value) {
    +      public static PayloadCase forNumber(int value) {
             switch (value) {
               case 3: return TRANSFER;
               case 4: return BOND;
               case 5: return UNBOND;
               case 6: return WITHDRAW;
    -          case 0: return TRANSACTION_NOT_SET;
    +          case 0: return PAYLOAD_NOT_SET;
               default: return null;
             }
           }
    @@ -4607,10 +4607,10 @@ public int getNumber() {
           }
         };
     
    -    public TransactionCase
    -    getTransactionCase() {
    -      return TransactionCase.forNumber(
    -          transactionCase_);
    +    public PayloadCase
    +    getPayloadCase() {
    +      return PayloadCase.forNumber(
    +          payloadCase_);
         }
     
         public static final int LOCK_TIME_FIELD_NUMBER = 1;
    @@ -4677,126 +4677,126 @@ public java.lang.String getMemo() {
     
         public static final int TRANSFER_FIELD_NUMBER = 3;
         /**
    -     * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +     * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
          * @return Whether the transfer field is set.
          */
         @java.lang.Override
         public boolean hasTransfer() {
    -      return transactionCase_ == 3;
    +      return payloadCase_ == 3;
         }
         /**
    -     * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +     * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
          * @return The transfer.
          */
         @java.lang.Override
    -    public pactus.transaction.TransactionOuterClass.RawTransfer getTransfer() {
    -      if (transactionCase_ == 3) {
    -         return (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_;
    +    public pactus.transaction.TransactionOuterClass.TransferPayload getTransfer() {
    +      if (payloadCase_ == 3) {
    +         return (pactus.transaction.TransactionOuterClass.TransferPayload) payload_;
           }
    -      return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance();
    +      return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance();
         }
         /**
    -     * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +     * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
          */
         @java.lang.Override
    -    public pactus.transaction.TransactionOuterClass.RawTransferOrBuilder getTransferOrBuilder() {
    -      if (transactionCase_ == 3) {
    -         return (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_;
    +    public pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder getTransferOrBuilder() {
    +      if (payloadCase_ == 3) {
    +         return (pactus.transaction.TransactionOuterClass.TransferPayload) payload_;
           }
    -      return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance();
    +      return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance();
         }
     
         public static final int BOND_FIELD_NUMBER = 4;
         /**
    -     * .pactus.RawBond bond = 4 [json_name = "bond"];
    +     * .pactus.BondPayload bond = 4 [json_name = "bond"];
          * @return Whether the bond field is set.
          */
         @java.lang.Override
         public boolean hasBond() {
    -      return transactionCase_ == 4;
    +      return payloadCase_ == 4;
         }
         /**
    -     * .pactus.RawBond bond = 4 [json_name = "bond"];
    +     * .pactus.BondPayload bond = 4 [json_name = "bond"];
          * @return The bond.
          */
         @java.lang.Override
    -    public pactus.transaction.TransactionOuterClass.RawBond getBond() {
    -      if (transactionCase_ == 4) {
    -         return (pactus.transaction.TransactionOuterClass.RawBond) transaction_;
    +    public pactus.transaction.TransactionOuterClass.BondPayload getBond() {
    +      if (payloadCase_ == 4) {
    +         return (pactus.transaction.TransactionOuterClass.BondPayload) payload_;
           }
    -      return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance();
    +      return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance();
         }
         /**
    -     * .pactus.RawBond bond = 4 [json_name = "bond"];
    +     * .pactus.BondPayload bond = 4 [json_name = "bond"];
          */
         @java.lang.Override
    -    public pactus.transaction.TransactionOuterClass.RawBondOrBuilder getBondOrBuilder() {
    -      if (transactionCase_ == 4) {
    -         return (pactus.transaction.TransactionOuterClass.RawBond) transaction_;
    +    public pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder getBondOrBuilder() {
    +      if (payloadCase_ == 4) {
    +         return (pactus.transaction.TransactionOuterClass.BondPayload) payload_;
           }
    -      return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance();
    +      return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance();
         }
     
         public static final int UNBOND_FIELD_NUMBER = 5;
         /**
    -     * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +     * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
          * @return Whether the unbond field is set.
          */
         @java.lang.Override
         public boolean hasUnbond() {
    -      return transactionCase_ == 5;
    +      return payloadCase_ == 5;
         }
         /**
    -     * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +     * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
          * @return The unbond.
          */
         @java.lang.Override
    -    public pactus.transaction.TransactionOuterClass.RawUnbond getUnbond() {
    -      if (transactionCase_ == 5) {
    -         return (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_;
    +    public pactus.transaction.TransactionOuterClass.UnbondPayload getUnbond() {
    +      if (payloadCase_ == 5) {
    +         return (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_;
           }
    -      return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance();
    +      return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance();
         }
         /**
    -     * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +     * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
          */
         @java.lang.Override
    -    public pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder getUnbondOrBuilder() {
    -      if (transactionCase_ == 5) {
    -         return (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_;
    +    public pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder getUnbondOrBuilder() {
    +      if (payloadCase_ == 5) {
    +         return (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_;
           }
    -      return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance();
    +      return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance();
         }
     
         public static final int WITHDRAW_FIELD_NUMBER = 6;
         /**
    -     * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +     * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
          * @return Whether the withdraw field is set.
          */
         @java.lang.Override
         public boolean hasWithdraw() {
    -      return transactionCase_ == 6;
    +      return payloadCase_ == 6;
         }
         /**
    -     * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +     * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
          * @return The withdraw.
          */
         @java.lang.Override
    -    public pactus.transaction.TransactionOuterClass.RawWithdraw getWithdraw() {
    -      if (transactionCase_ == 6) {
    -         return (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_;
    +    public pactus.transaction.TransactionOuterClass.WithdrawPayload getWithdraw() {
    +      if (payloadCase_ == 6) {
    +         return (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_;
           }
    -      return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance();
    +      return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance();
         }
         /**
    -     * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +     * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
          */
         @java.lang.Override
    -    public pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder getWithdrawOrBuilder() {
    -      if (transactionCase_ == 6) {
    -         return (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_;
    +    public pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder getWithdrawOrBuilder() {
    +      if (payloadCase_ == 6) {
    +         return (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_;
           }
    -      return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance();
    +      return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance();
         }
     
         private byte memoizedIsInitialized = -1;
    @@ -4819,17 +4819,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
           if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) {
             com.google.protobuf.GeneratedMessageV3.writeString(output, 2, memo_);
           }
    -      if (transactionCase_ == 3) {
    -        output.writeMessage(3, (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_);
    +      if (payloadCase_ == 3) {
    +        output.writeMessage(3, (pactus.transaction.TransactionOuterClass.TransferPayload) payload_);
           }
    -      if (transactionCase_ == 4) {
    -        output.writeMessage(4, (pactus.transaction.TransactionOuterClass.RawBond) transaction_);
    +      if (payloadCase_ == 4) {
    +        output.writeMessage(4, (pactus.transaction.TransactionOuterClass.BondPayload) payload_);
           }
    -      if (transactionCase_ == 5) {
    -        output.writeMessage(5, (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_);
    +      if (payloadCase_ == 5) {
    +        output.writeMessage(5, (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_);
           }
    -      if (transactionCase_ == 6) {
    -        output.writeMessage(6, (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_);
    +      if (payloadCase_ == 6) {
    +        output.writeMessage(6, (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_);
           }
           getUnknownFields().writeTo(output);
         }
    @@ -4847,21 +4847,21 @@ public int getSerializedSize() {
           if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) {
             size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, memo_);
           }
    -      if (transactionCase_ == 3) {
    +      if (payloadCase_ == 3) {
             size += com.google.protobuf.CodedOutputStream
    -          .computeMessageSize(3, (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_);
    +          .computeMessageSize(3, (pactus.transaction.TransactionOuterClass.TransferPayload) payload_);
           }
    -      if (transactionCase_ == 4) {
    +      if (payloadCase_ == 4) {
             size += com.google.protobuf.CodedOutputStream
    -          .computeMessageSize(4, (pactus.transaction.TransactionOuterClass.RawBond) transaction_);
    +          .computeMessageSize(4, (pactus.transaction.TransactionOuterClass.BondPayload) payload_);
           }
    -      if (transactionCase_ == 5) {
    +      if (payloadCase_ == 5) {
             size += com.google.protobuf.CodedOutputStream
    -          .computeMessageSize(5, (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_);
    +          .computeMessageSize(5, (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_);
           }
    -      if (transactionCase_ == 6) {
    +      if (payloadCase_ == 6) {
             size += com.google.protobuf.CodedOutputStream
    -          .computeMessageSize(6, (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_);
    +          .computeMessageSize(6, (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_);
           }
           size += getUnknownFields().getSerializedSize();
           memoizedSize = size;
    @@ -4882,8 +4882,8 @@ public boolean equals(final java.lang.Object obj) {
               != other.getLockTime()) return false;
           if (!getMemo()
               .equals(other.getMemo())) return false;
    -      if (!getTransactionCase().equals(other.getTransactionCase())) return false;
    -      switch (transactionCase_) {
    +      if (!getPayloadCase().equals(other.getPayloadCase())) return false;
    +      switch (payloadCase_) {
             case 3:
               if (!getTransfer()
                   .equals(other.getTransfer())) return false;
    @@ -4918,7 +4918,7 @@ public int hashCode() {
           hash = (53 * hash) + getLockTime();
           hash = (37 * hash) + MEMO_FIELD_NUMBER;
           hash = (53 * hash) + getMemo().hashCode();
    -      switch (transactionCase_) {
    +      switch (payloadCase_) {
             case 3:
               hash = (37 * hash) + TRANSFER_FIELD_NUMBER;
               hash = (53 * hash) + getTransfer().hashCode();
    @@ -5086,8 +5086,8 @@ public Builder clear() {
             if (withdrawBuilder_ != null) {
               withdrawBuilder_.clear();
             }
    -        transactionCase_ = 0;
    -        transaction_ = null;
    +        payloadCase_ = 0;
    +        payload_ = null;
             return this;
           }
     
    @@ -5116,35 +5116,35 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest buildPa
             pactus.transaction.TransactionOuterClass.GetRawTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawTransactionRequest(this);
             result.lockTime_ = lockTime_;
             result.memo_ = memo_;
    -        if (transactionCase_ == 3) {
    +        if (payloadCase_ == 3) {
               if (transferBuilder_ == null) {
    -            result.transaction_ = transaction_;
    +            result.payload_ = payload_;
               } else {
    -            result.transaction_ = transferBuilder_.build();
    +            result.payload_ = transferBuilder_.build();
               }
             }
    -        if (transactionCase_ == 4) {
    +        if (payloadCase_ == 4) {
               if (bondBuilder_ == null) {
    -            result.transaction_ = transaction_;
    +            result.payload_ = payload_;
               } else {
    -            result.transaction_ = bondBuilder_.build();
    +            result.payload_ = bondBuilder_.build();
               }
             }
    -        if (transactionCase_ == 5) {
    +        if (payloadCase_ == 5) {
               if (unbondBuilder_ == null) {
    -            result.transaction_ = transaction_;
    +            result.payload_ = payload_;
               } else {
    -            result.transaction_ = unbondBuilder_.build();
    +            result.payload_ = unbondBuilder_.build();
               }
             }
    -        if (transactionCase_ == 6) {
    +        if (payloadCase_ == 6) {
               if (withdrawBuilder_ == null) {
    -            result.transaction_ = transaction_;
    +            result.payload_ = payload_;
               } else {
    -            result.transaction_ = withdrawBuilder_.build();
    +            result.payload_ = withdrawBuilder_.build();
               }
             }
    -        result.transactionCase_ = transactionCase_;
    +        result.payloadCase_ = payloadCase_;
             onBuilt();
             return result;
           }
    @@ -5200,7 +5200,7 @@ public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransact
               memo_ = other.memo_;
               onChanged();
             }
    -        switch (other.getTransactionCase()) {
    +        switch (other.getPayloadCase()) {
               case TRANSFER: {
                 mergeTransfer(other.getTransfer());
                 break;
    @@ -5217,7 +5217,7 @@ public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransact
                 mergeWithdraw(other.getWithdraw());
                 break;
               }
    -          case TRANSACTION_NOT_SET: {
    +          case PAYLOAD_NOT_SET: {
                 break;
               }
             }
    @@ -5261,28 +5261,28 @@ public Builder mergeFrom(
                     input.readMessage(
                         getTransferFieldBuilder().getBuilder(),
                         extensionRegistry);
    -                transactionCase_ = 3;
    +                payloadCase_ = 3;
                     break;
                   } // case 26
                   case 34: {
                     input.readMessage(
                         getBondFieldBuilder().getBuilder(),
                         extensionRegistry);
    -                transactionCase_ = 4;
    +                payloadCase_ = 4;
                     break;
                   } // case 34
                   case 42: {
                     input.readMessage(
                         getUnbondFieldBuilder().getBuilder(),
                         extensionRegistry);
    -                transactionCase_ = 5;
    +                payloadCase_ = 5;
                     break;
                   } // case 42
                   case 50: {
                     input.readMessage(
                         getWithdrawFieldBuilder().getBuilder(),
                         extensionRegistry);
    -                transactionCase_ = 6;
    +                payloadCase_ = 6;
                     break;
                   } // case 50
                   default: {
    @@ -5300,17 +5300,17 @@ public Builder mergeFrom(
             } // finally
             return this;
           }
    -      private int transactionCase_ = 0;
    -      private java.lang.Object transaction_;
    -      public TransactionCase
    -          getTransactionCase() {
    -        return TransactionCase.forNumber(
    -            transactionCase_);
    +      private int payloadCase_ = 0;
    +      private java.lang.Object payload_;
    +      public PayloadCase
    +          getPayloadCase() {
    +        return PayloadCase.forNumber(
    +            payloadCase_);
           }
     
    -      public Builder clearTransaction() {
    -        transactionCase_ = 0;
    -        transaction_ = null;
    +      public Builder clearPayload() {
    +        payloadCase_ = 0;
    +        payload_ = null;
             onChanged();
             return this;
           }
    @@ -5459,569 +5459,569 @@ public Builder setMemoBytes(
           }
     
           private com.google.protobuf.SingleFieldBuilderV3<
    -          pactus.transaction.TransactionOuterClass.RawTransfer, pactus.transaction.TransactionOuterClass.RawTransfer.Builder, pactus.transaction.TransactionOuterClass.RawTransferOrBuilder> transferBuilder_;
    +          pactus.transaction.TransactionOuterClass.TransferPayload, pactus.transaction.TransactionOuterClass.TransferPayload.Builder, pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder> transferBuilder_;
           /**
    -       * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +       * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
            * @return Whether the transfer field is set.
            */
           @java.lang.Override
           public boolean hasTransfer() {
    -        return transactionCase_ == 3;
    +        return payloadCase_ == 3;
           }
           /**
    -       * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +       * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
            * @return The transfer.
            */
           @java.lang.Override
    -      public pactus.transaction.TransactionOuterClass.RawTransfer getTransfer() {
    +      public pactus.transaction.TransactionOuterClass.TransferPayload getTransfer() {
             if (transferBuilder_ == null) {
    -          if (transactionCase_ == 3) {
    -            return (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_;
    +          if (payloadCase_ == 3) {
    +            return (pactus.transaction.TransactionOuterClass.TransferPayload) payload_;
               }
    -          return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance();
             } else {
    -          if (transactionCase_ == 3) {
    +          if (payloadCase_ == 3) {
                 return transferBuilder_.getMessage();
               }
    -          return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance();
             }
           }
           /**
    -       * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +       * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
            */
    -      public Builder setTransfer(pactus.transaction.TransactionOuterClass.RawTransfer value) {
    +      public Builder setTransfer(pactus.transaction.TransactionOuterClass.TransferPayload value) {
             if (transferBuilder_ == null) {
               if (value == null) {
                 throw new NullPointerException();
               }
    -          transaction_ = value;
    +          payload_ = value;
               onChanged();
             } else {
               transferBuilder_.setMessage(value);
             }
    -        transactionCase_ = 3;
    +        payloadCase_ = 3;
             return this;
           }
           /**
    -       * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +       * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
            */
           public Builder setTransfer(
    -          pactus.transaction.TransactionOuterClass.RawTransfer.Builder builderForValue) {
    +          pactus.transaction.TransactionOuterClass.TransferPayload.Builder builderForValue) {
             if (transferBuilder_ == null) {
    -          transaction_ = builderForValue.build();
    +          payload_ = builderForValue.build();
               onChanged();
             } else {
               transferBuilder_.setMessage(builderForValue.build());
             }
    -        transactionCase_ = 3;
    +        payloadCase_ = 3;
             return this;
           }
           /**
    -       * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +       * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
            */
    -      public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.RawTransfer value) {
    +      public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.TransferPayload value) {
             if (transferBuilder_ == null) {
    -          if (transactionCase_ == 3 &&
    -              transaction_ != pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance()) {
    -            transaction_ = pactus.transaction.TransactionOuterClass.RawTransfer.newBuilder((pactus.transaction.TransactionOuterClass.RawTransfer) transaction_)
    +          if (payloadCase_ == 3 &&
    +              payload_ != pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance()) {
    +            payload_ = pactus.transaction.TransactionOuterClass.TransferPayload.newBuilder((pactus.transaction.TransactionOuterClass.TransferPayload) payload_)
                     .mergeFrom(value).buildPartial();
               } else {
    -            transaction_ = value;
    +            payload_ = value;
               }
               onChanged();
             } else {
    -          if (transactionCase_ == 3) {
    +          if (payloadCase_ == 3) {
                 transferBuilder_.mergeFrom(value);
               } else {
                 transferBuilder_.setMessage(value);
               }
             }
    -        transactionCase_ = 3;
    +        payloadCase_ = 3;
             return this;
           }
           /**
    -       * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +       * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
            */
           public Builder clearTransfer() {
             if (transferBuilder_ == null) {
    -          if (transactionCase_ == 3) {
    -            transactionCase_ = 0;
    -            transaction_ = null;
    +          if (payloadCase_ == 3) {
    +            payloadCase_ = 0;
    +            payload_ = null;
                 onChanged();
               }
             } else {
    -          if (transactionCase_ == 3) {
    -            transactionCase_ = 0;
    -            transaction_ = null;
    +          if (payloadCase_ == 3) {
    +            payloadCase_ = 0;
    +            payload_ = null;
               }
               transferBuilder_.clear();
             }
             return this;
           }
           /**
    -       * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +       * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
            */
    -      public pactus.transaction.TransactionOuterClass.RawTransfer.Builder getTransferBuilder() {
    +      public pactus.transaction.TransactionOuterClass.TransferPayload.Builder getTransferBuilder() {
             return getTransferFieldBuilder().getBuilder();
           }
           /**
    -       * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +       * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
            */
           @java.lang.Override
    -      public pactus.transaction.TransactionOuterClass.RawTransferOrBuilder getTransferOrBuilder() {
    -        if ((transactionCase_ == 3) && (transferBuilder_ != null)) {
    +      public pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder getTransferOrBuilder() {
    +        if ((payloadCase_ == 3) && (transferBuilder_ != null)) {
               return transferBuilder_.getMessageOrBuilder();
             } else {
    -          if (transactionCase_ == 3) {
    -            return (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_;
    +          if (payloadCase_ == 3) {
    +            return (pactus.transaction.TransactionOuterClass.TransferPayload) payload_;
               }
    -          return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance();
             }
           }
           /**
    -       * .pactus.RawTransfer transfer = 3 [json_name = "transfer"];
    +       * .pactus.TransferPayload transfer = 3 [json_name = "transfer"];
            */
           private com.google.protobuf.SingleFieldBuilderV3<
    -          pactus.transaction.TransactionOuterClass.RawTransfer, pactus.transaction.TransactionOuterClass.RawTransfer.Builder, pactus.transaction.TransactionOuterClass.RawTransferOrBuilder> 
    +          pactus.transaction.TransactionOuterClass.TransferPayload, pactus.transaction.TransactionOuterClass.TransferPayload.Builder, pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder> 
               getTransferFieldBuilder() {
             if (transferBuilder_ == null) {
    -          if (!(transactionCase_ == 3)) {
    -            transaction_ = pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance();
    +          if (!(payloadCase_ == 3)) {
    +            payload_ = pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance();
               }
               transferBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    -              pactus.transaction.TransactionOuterClass.RawTransfer, pactus.transaction.TransactionOuterClass.RawTransfer.Builder, pactus.transaction.TransactionOuterClass.RawTransferOrBuilder>(
    -                  (pactus.transaction.TransactionOuterClass.RawTransfer) transaction_,
    +              pactus.transaction.TransactionOuterClass.TransferPayload, pactus.transaction.TransactionOuterClass.TransferPayload.Builder, pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder>(
    +                  (pactus.transaction.TransactionOuterClass.TransferPayload) payload_,
                       getParentForChildren(),
                       isClean());
    -          transaction_ = null;
    +          payload_ = null;
             }
    -        transactionCase_ = 3;
    +        payloadCase_ = 3;
             onChanged();;
             return transferBuilder_;
           }
     
           private com.google.protobuf.SingleFieldBuilderV3<
    -          pactus.transaction.TransactionOuterClass.RawBond, pactus.transaction.TransactionOuterClass.RawBond.Builder, pactus.transaction.TransactionOuterClass.RawBondOrBuilder> bondBuilder_;
    +          pactus.transaction.TransactionOuterClass.BondPayload, pactus.transaction.TransactionOuterClass.BondPayload.Builder, pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder> bondBuilder_;
           /**
    -       * .pactus.RawBond bond = 4 [json_name = "bond"];
    +       * .pactus.BondPayload bond = 4 [json_name = "bond"];
            * @return Whether the bond field is set.
            */
           @java.lang.Override
           public boolean hasBond() {
    -        return transactionCase_ == 4;
    +        return payloadCase_ == 4;
           }
           /**
    -       * .pactus.RawBond bond = 4 [json_name = "bond"];
    +       * .pactus.BondPayload bond = 4 [json_name = "bond"];
            * @return The bond.
            */
           @java.lang.Override
    -      public pactus.transaction.TransactionOuterClass.RawBond getBond() {
    +      public pactus.transaction.TransactionOuterClass.BondPayload getBond() {
             if (bondBuilder_ == null) {
    -          if (transactionCase_ == 4) {
    -            return (pactus.transaction.TransactionOuterClass.RawBond) transaction_;
    +          if (payloadCase_ == 4) {
    +            return (pactus.transaction.TransactionOuterClass.BondPayload) payload_;
               }
    -          return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance();
             } else {
    -          if (transactionCase_ == 4) {
    +          if (payloadCase_ == 4) {
                 return bondBuilder_.getMessage();
               }
    -          return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance();
             }
           }
           /**
    -       * .pactus.RawBond bond = 4 [json_name = "bond"];
    +       * .pactus.BondPayload bond = 4 [json_name = "bond"];
            */
    -      public Builder setBond(pactus.transaction.TransactionOuterClass.RawBond value) {
    +      public Builder setBond(pactus.transaction.TransactionOuterClass.BondPayload value) {
             if (bondBuilder_ == null) {
               if (value == null) {
                 throw new NullPointerException();
               }
    -          transaction_ = value;
    +          payload_ = value;
               onChanged();
             } else {
               bondBuilder_.setMessage(value);
             }
    -        transactionCase_ = 4;
    +        payloadCase_ = 4;
             return this;
           }
           /**
    -       * .pactus.RawBond bond = 4 [json_name = "bond"];
    +       * .pactus.BondPayload bond = 4 [json_name = "bond"];
            */
           public Builder setBond(
    -          pactus.transaction.TransactionOuterClass.RawBond.Builder builderForValue) {
    +          pactus.transaction.TransactionOuterClass.BondPayload.Builder builderForValue) {
             if (bondBuilder_ == null) {
    -          transaction_ = builderForValue.build();
    +          payload_ = builderForValue.build();
               onChanged();
             } else {
               bondBuilder_.setMessage(builderForValue.build());
             }
    -        transactionCase_ = 4;
    +        payloadCase_ = 4;
             return this;
           }
           /**
    -       * .pactus.RawBond bond = 4 [json_name = "bond"];
    +       * .pactus.BondPayload bond = 4 [json_name = "bond"];
            */
    -      public Builder mergeBond(pactus.transaction.TransactionOuterClass.RawBond value) {
    +      public Builder mergeBond(pactus.transaction.TransactionOuterClass.BondPayload value) {
             if (bondBuilder_ == null) {
    -          if (transactionCase_ == 4 &&
    -              transaction_ != pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance()) {
    -            transaction_ = pactus.transaction.TransactionOuterClass.RawBond.newBuilder((pactus.transaction.TransactionOuterClass.RawBond) transaction_)
    +          if (payloadCase_ == 4 &&
    +              payload_ != pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance()) {
    +            payload_ = pactus.transaction.TransactionOuterClass.BondPayload.newBuilder((pactus.transaction.TransactionOuterClass.BondPayload) payload_)
                     .mergeFrom(value).buildPartial();
               } else {
    -            transaction_ = value;
    +            payload_ = value;
               }
               onChanged();
             } else {
    -          if (transactionCase_ == 4) {
    +          if (payloadCase_ == 4) {
                 bondBuilder_.mergeFrom(value);
               } else {
                 bondBuilder_.setMessage(value);
               }
             }
    -        transactionCase_ = 4;
    +        payloadCase_ = 4;
             return this;
           }
           /**
    -       * .pactus.RawBond bond = 4 [json_name = "bond"];
    +       * .pactus.BondPayload bond = 4 [json_name = "bond"];
            */
           public Builder clearBond() {
             if (bondBuilder_ == null) {
    -          if (transactionCase_ == 4) {
    -            transactionCase_ = 0;
    -            transaction_ = null;
    +          if (payloadCase_ == 4) {
    +            payloadCase_ = 0;
    +            payload_ = null;
                 onChanged();
               }
             } else {
    -          if (transactionCase_ == 4) {
    -            transactionCase_ = 0;
    -            transaction_ = null;
    +          if (payloadCase_ == 4) {
    +            payloadCase_ = 0;
    +            payload_ = null;
               }
               bondBuilder_.clear();
             }
             return this;
           }
           /**
    -       * .pactus.RawBond bond = 4 [json_name = "bond"];
    +       * .pactus.BondPayload bond = 4 [json_name = "bond"];
            */
    -      public pactus.transaction.TransactionOuterClass.RawBond.Builder getBondBuilder() {
    +      public pactus.transaction.TransactionOuterClass.BondPayload.Builder getBondBuilder() {
             return getBondFieldBuilder().getBuilder();
           }
           /**
    -       * .pactus.RawBond bond = 4 [json_name = "bond"];
    +       * .pactus.BondPayload bond = 4 [json_name = "bond"];
            */
           @java.lang.Override
    -      public pactus.transaction.TransactionOuterClass.RawBondOrBuilder getBondOrBuilder() {
    -        if ((transactionCase_ == 4) && (bondBuilder_ != null)) {
    +      public pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder getBondOrBuilder() {
    +        if ((payloadCase_ == 4) && (bondBuilder_ != null)) {
               return bondBuilder_.getMessageOrBuilder();
             } else {
    -          if (transactionCase_ == 4) {
    -            return (pactus.transaction.TransactionOuterClass.RawBond) transaction_;
    +          if (payloadCase_ == 4) {
    +            return (pactus.transaction.TransactionOuterClass.BondPayload) payload_;
               }
    -          return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance();
             }
           }
           /**
    -       * .pactus.RawBond bond = 4 [json_name = "bond"];
    +       * .pactus.BondPayload bond = 4 [json_name = "bond"];
            */
           private com.google.protobuf.SingleFieldBuilderV3<
    -          pactus.transaction.TransactionOuterClass.RawBond, pactus.transaction.TransactionOuterClass.RawBond.Builder, pactus.transaction.TransactionOuterClass.RawBondOrBuilder> 
    +          pactus.transaction.TransactionOuterClass.BondPayload, pactus.transaction.TransactionOuterClass.BondPayload.Builder, pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder> 
               getBondFieldBuilder() {
             if (bondBuilder_ == null) {
    -          if (!(transactionCase_ == 4)) {
    -            transaction_ = pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance();
    +          if (!(payloadCase_ == 4)) {
    +            payload_ = pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance();
               }
               bondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    -              pactus.transaction.TransactionOuterClass.RawBond, pactus.transaction.TransactionOuterClass.RawBond.Builder, pactus.transaction.TransactionOuterClass.RawBondOrBuilder>(
    -                  (pactus.transaction.TransactionOuterClass.RawBond) transaction_,
    +              pactus.transaction.TransactionOuterClass.BondPayload, pactus.transaction.TransactionOuterClass.BondPayload.Builder, pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder>(
    +                  (pactus.transaction.TransactionOuterClass.BondPayload) payload_,
                       getParentForChildren(),
                       isClean());
    -          transaction_ = null;
    +          payload_ = null;
             }
    -        transactionCase_ = 4;
    +        payloadCase_ = 4;
             onChanged();;
             return bondBuilder_;
           }
     
           private com.google.protobuf.SingleFieldBuilderV3<
    -          pactus.transaction.TransactionOuterClass.RawUnbond, pactus.transaction.TransactionOuterClass.RawUnbond.Builder, pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder> unbondBuilder_;
    +          pactus.transaction.TransactionOuterClass.UnbondPayload, pactus.transaction.TransactionOuterClass.UnbondPayload.Builder, pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder> unbondBuilder_;
           /**
    -       * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +       * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
            * @return Whether the unbond field is set.
            */
           @java.lang.Override
           public boolean hasUnbond() {
    -        return transactionCase_ == 5;
    +        return payloadCase_ == 5;
           }
           /**
    -       * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +       * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
            * @return The unbond.
            */
           @java.lang.Override
    -      public pactus.transaction.TransactionOuterClass.RawUnbond getUnbond() {
    +      public pactus.transaction.TransactionOuterClass.UnbondPayload getUnbond() {
             if (unbondBuilder_ == null) {
    -          if (transactionCase_ == 5) {
    -            return (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_;
    +          if (payloadCase_ == 5) {
    +            return (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_;
               }
    -          return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance();
             } else {
    -          if (transactionCase_ == 5) {
    +          if (payloadCase_ == 5) {
                 return unbondBuilder_.getMessage();
               }
    -          return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance();
             }
           }
           /**
    -       * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +       * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
            */
    -      public Builder setUnbond(pactus.transaction.TransactionOuterClass.RawUnbond value) {
    +      public Builder setUnbond(pactus.transaction.TransactionOuterClass.UnbondPayload value) {
             if (unbondBuilder_ == null) {
               if (value == null) {
                 throw new NullPointerException();
               }
    -          transaction_ = value;
    +          payload_ = value;
               onChanged();
             } else {
               unbondBuilder_.setMessage(value);
             }
    -        transactionCase_ = 5;
    +        payloadCase_ = 5;
             return this;
           }
           /**
    -       * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +       * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
            */
           public Builder setUnbond(
    -          pactus.transaction.TransactionOuterClass.RawUnbond.Builder builderForValue) {
    +          pactus.transaction.TransactionOuterClass.UnbondPayload.Builder builderForValue) {
             if (unbondBuilder_ == null) {
    -          transaction_ = builderForValue.build();
    +          payload_ = builderForValue.build();
               onChanged();
             } else {
               unbondBuilder_.setMessage(builderForValue.build());
             }
    -        transactionCase_ = 5;
    +        payloadCase_ = 5;
             return this;
           }
           /**
    -       * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +       * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
            */
    -      public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.RawUnbond value) {
    +      public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.UnbondPayload value) {
             if (unbondBuilder_ == null) {
    -          if (transactionCase_ == 5 &&
    -              transaction_ != pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance()) {
    -            transaction_ = pactus.transaction.TransactionOuterClass.RawUnbond.newBuilder((pactus.transaction.TransactionOuterClass.RawUnbond) transaction_)
    +          if (payloadCase_ == 5 &&
    +              payload_ != pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance()) {
    +            payload_ = pactus.transaction.TransactionOuterClass.UnbondPayload.newBuilder((pactus.transaction.TransactionOuterClass.UnbondPayload) payload_)
                     .mergeFrom(value).buildPartial();
               } else {
    -            transaction_ = value;
    +            payload_ = value;
               }
               onChanged();
             } else {
    -          if (transactionCase_ == 5) {
    +          if (payloadCase_ == 5) {
                 unbondBuilder_.mergeFrom(value);
               } else {
                 unbondBuilder_.setMessage(value);
               }
             }
    -        transactionCase_ = 5;
    +        payloadCase_ = 5;
             return this;
           }
           /**
    -       * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +       * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
            */
           public Builder clearUnbond() {
             if (unbondBuilder_ == null) {
    -          if (transactionCase_ == 5) {
    -            transactionCase_ = 0;
    -            transaction_ = null;
    +          if (payloadCase_ == 5) {
    +            payloadCase_ = 0;
    +            payload_ = null;
                 onChanged();
               }
             } else {
    -          if (transactionCase_ == 5) {
    -            transactionCase_ = 0;
    -            transaction_ = null;
    +          if (payloadCase_ == 5) {
    +            payloadCase_ = 0;
    +            payload_ = null;
               }
               unbondBuilder_.clear();
             }
             return this;
           }
           /**
    -       * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +       * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
            */
    -      public pactus.transaction.TransactionOuterClass.RawUnbond.Builder getUnbondBuilder() {
    +      public pactus.transaction.TransactionOuterClass.UnbondPayload.Builder getUnbondBuilder() {
             return getUnbondFieldBuilder().getBuilder();
           }
           /**
    -       * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +       * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
            */
           @java.lang.Override
    -      public pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder getUnbondOrBuilder() {
    -        if ((transactionCase_ == 5) && (unbondBuilder_ != null)) {
    +      public pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder getUnbondOrBuilder() {
    +        if ((payloadCase_ == 5) && (unbondBuilder_ != null)) {
               return unbondBuilder_.getMessageOrBuilder();
             } else {
    -          if (transactionCase_ == 5) {
    -            return (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_;
    +          if (payloadCase_ == 5) {
    +            return (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_;
               }
    -          return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance();
             }
           }
           /**
    -       * .pactus.RawUnbond unbond = 5 [json_name = "unbond"];
    +       * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"];
            */
           private com.google.protobuf.SingleFieldBuilderV3<
    -          pactus.transaction.TransactionOuterClass.RawUnbond, pactus.transaction.TransactionOuterClass.RawUnbond.Builder, pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder> 
    +          pactus.transaction.TransactionOuterClass.UnbondPayload, pactus.transaction.TransactionOuterClass.UnbondPayload.Builder, pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder> 
               getUnbondFieldBuilder() {
             if (unbondBuilder_ == null) {
    -          if (!(transactionCase_ == 5)) {
    -            transaction_ = pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance();
    +          if (!(payloadCase_ == 5)) {
    +            payload_ = pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance();
               }
               unbondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    -              pactus.transaction.TransactionOuterClass.RawUnbond, pactus.transaction.TransactionOuterClass.RawUnbond.Builder, pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder>(
    -                  (pactus.transaction.TransactionOuterClass.RawUnbond) transaction_,
    +              pactus.transaction.TransactionOuterClass.UnbondPayload, pactus.transaction.TransactionOuterClass.UnbondPayload.Builder, pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder>(
    +                  (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_,
                       getParentForChildren(),
                       isClean());
    -          transaction_ = null;
    +          payload_ = null;
             }
    -        transactionCase_ = 5;
    +        payloadCase_ = 5;
             onChanged();;
             return unbondBuilder_;
           }
     
           private com.google.protobuf.SingleFieldBuilderV3<
    -          pactus.transaction.TransactionOuterClass.RawWithdraw, pactus.transaction.TransactionOuterClass.RawWithdraw.Builder, pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder> withdrawBuilder_;
    +          pactus.transaction.TransactionOuterClass.WithdrawPayload, pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder, pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder> withdrawBuilder_;
           /**
    -       * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +       * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
            * @return Whether the withdraw field is set.
            */
           @java.lang.Override
           public boolean hasWithdraw() {
    -        return transactionCase_ == 6;
    +        return payloadCase_ == 6;
           }
           /**
    -       * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +       * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
            * @return The withdraw.
            */
           @java.lang.Override
    -      public pactus.transaction.TransactionOuterClass.RawWithdraw getWithdraw() {
    +      public pactus.transaction.TransactionOuterClass.WithdrawPayload getWithdraw() {
             if (withdrawBuilder_ == null) {
    -          if (transactionCase_ == 6) {
    -            return (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_;
    +          if (payloadCase_ == 6) {
    +            return (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_;
               }
    -          return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance();
             } else {
    -          if (transactionCase_ == 6) {
    +          if (payloadCase_ == 6) {
                 return withdrawBuilder_.getMessage();
               }
    -          return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance();
             }
           }
           /**
    -       * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +       * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
            */
    -      public Builder setWithdraw(pactus.transaction.TransactionOuterClass.RawWithdraw value) {
    +      public Builder setWithdraw(pactus.transaction.TransactionOuterClass.WithdrawPayload value) {
             if (withdrawBuilder_ == null) {
               if (value == null) {
                 throw new NullPointerException();
               }
    -          transaction_ = value;
    +          payload_ = value;
               onChanged();
             } else {
               withdrawBuilder_.setMessage(value);
             }
    -        transactionCase_ = 6;
    +        payloadCase_ = 6;
             return this;
           }
           /**
    -       * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +       * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
            */
           public Builder setWithdraw(
    -          pactus.transaction.TransactionOuterClass.RawWithdraw.Builder builderForValue) {
    +          pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder builderForValue) {
             if (withdrawBuilder_ == null) {
    -          transaction_ = builderForValue.build();
    +          payload_ = builderForValue.build();
               onChanged();
             } else {
               withdrawBuilder_.setMessage(builderForValue.build());
             }
    -        transactionCase_ = 6;
    +        payloadCase_ = 6;
             return this;
           }
           /**
    -       * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +       * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
            */
    -      public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.RawWithdraw value) {
    +      public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.WithdrawPayload value) {
             if (withdrawBuilder_ == null) {
    -          if (transactionCase_ == 6 &&
    -              transaction_ != pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance()) {
    -            transaction_ = pactus.transaction.TransactionOuterClass.RawWithdraw.newBuilder((pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_)
    +          if (payloadCase_ == 6 &&
    +              payload_ != pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance()) {
    +            payload_ = pactus.transaction.TransactionOuterClass.WithdrawPayload.newBuilder((pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_)
                     .mergeFrom(value).buildPartial();
               } else {
    -            transaction_ = value;
    +            payload_ = value;
               }
               onChanged();
             } else {
    -          if (transactionCase_ == 6) {
    +          if (payloadCase_ == 6) {
                 withdrawBuilder_.mergeFrom(value);
               } else {
                 withdrawBuilder_.setMessage(value);
               }
             }
    -        transactionCase_ = 6;
    +        payloadCase_ = 6;
             return this;
           }
           /**
    -       * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +       * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
            */
           public Builder clearWithdraw() {
             if (withdrawBuilder_ == null) {
    -          if (transactionCase_ == 6) {
    -            transactionCase_ = 0;
    -            transaction_ = null;
    +          if (payloadCase_ == 6) {
    +            payloadCase_ = 0;
    +            payload_ = null;
                 onChanged();
               }
             } else {
    -          if (transactionCase_ == 6) {
    -            transactionCase_ = 0;
    -            transaction_ = null;
    +          if (payloadCase_ == 6) {
    +            payloadCase_ = 0;
    +            payload_ = null;
               }
               withdrawBuilder_.clear();
             }
             return this;
           }
           /**
    -       * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +       * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
            */
    -      public pactus.transaction.TransactionOuterClass.RawWithdraw.Builder getWithdrawBuilder() {
    +      public pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder getWithdrawBuilder() {
             return getWithdrawFieldBuilder().getBuilder();
           }
           /**
    -       * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +       * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
            */
           @java.lang.Override
    -      public pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder getWithdrawOrBuilder() {
    -        if ((transactionCase_ == 6) && (withdrawBuilder_ != null)) {
    +      public pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder getWithdrawOrBuilder() {
    +        if ((payloadCase_ == 6) && (withdrawBuilder_ != null)) {
               return withdrawBuilder_.getMessageOrBuilder();
             } else {
    -          if (transactionCase_ == 6) {
    -            return (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_;
    +          if (payloadCase_ == 6) {
    +            return (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_;
               }
    -          return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance();
    +          return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance();
             }
           }
           /**
    -       * .pactus.RawWithdraw withdraw = 6 [json_name = "withdraw"];
    +       * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"];
            */
           private com.google.protobuf.SingleFieldBuilderV3<
    -          pactus.transaction.TransactionOuterClass.RawWithdraw, pactus.transaction.TransactionOuterClass.RawWithdraw.Builder, pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder> 
    +          pactus.transaction.TransactionOuterClass.WithdrawPayload, pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder, pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder> 
               getWithdrawFieldBuilder() {
             if (withdrawBuilder_ == null) {
    -          if (!(transactionCase_ == 6)) {
    -            transaction_ = pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance();
    +          if (!(payloadCase_ == 6)) {
    +            payload_ = pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance();
               }
               withdrawBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
    -              pactus.transaction.TransactionOuterClass.RawWithdraw, pactus.transaction.TransactionOuterClass.RawWithdraw.Builder, pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder>(
    -                  (pactus.transaction.TransactionOuterClass.RawWithdraw) transaction_,
    +              pactus.transaction.TransactionOuterClass.WithdrawPayload, pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder, pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder>(
    +                  (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_,
                       getParentForChildren(),
                       isClean());
    -          transaction_ = null;
    +          payload_ = null;
             }
    -        transactionCase_ = 6;
    +        payloadCase_ = 6;
             onChanged();;
             return withdrawBuilder_;
           }
    @@ -10867,8 +10867,8 @@ public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest
     
       }
     
    -  public interface RawTransferOrBuilder extends
    -      // @@protoc_insertion_point(interface_extends:pactus.RawTransfer)
    +  public interface TransferPayloadOrBuilder extends
    +      // @@protoc_insertion_point(interface_extends:pactus.TransferPayload)
           com.google.protobuf.MessageOrBuilder {
     
         /**
    @@ -10933,21 +10933,21 @@ public interface RawTransferOrBuilder extends
       }
       /**
        * 
    -   * Request message for retrieving raw details of a transfer transaction.
    +   * Payload message for retrieving raw details of a transfer transaction.
        * 
    * - * Protobuf type {@code pactus.RawTransfer} + * Protobuf type {@code pactus.TransferPayload} */ - public static final class RawTransfer extends + public static final class TransferPayload extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.RawTransfer) - RawTransferOrBuilder { + // @@protoc_insertion_point(message_implements:pactus.TransferPayload) + TransferPayloadOrBuilder { private static final long serialVersionUID = 0L; - // Use RawTransfer.newBuilder() to construct. - private RawTransfer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use TransferPayload.newBuilder() to construct. + private TransferPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private RawTransfer() { + private TransferPayload() { sender_ = ""; receiver_ = ""; } @@ -10956,7 +10956,7 @@ private RawTransfer() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new RawTransfer(); + return new TransferPayload(); } @java.lang.Override @@ -10966,15 +10966,15 @@ protected java.lang.Object newInstance( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawTransfer_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransferPayload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawTransfer_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransferPayload_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.RawTransfer.class, pactus.transaction.TransactionOuterClass.RawTransfer.Builder.class); + pactus.transaction.TransactionOuterClass.TransferPayload.class, pactus.transaction.TransactionOuterClass.TransferPayload.Builder.class); } public static final int SENDER_FIELD_NUMBER = 1; @@ -11158,10 +11158,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.RawTransfer)) { + if (!(obj instanceof pactus.transaction.TransactionOuterClass.TransferPayload)) { return super.equals(obj); } - pactus.transaction.TransactionOuterClass.RawTransfer other = (pactus.transaction.TransactionOuterClass.RawTransfer) obj; + pactus.transaction.TransactionOuterClass.TransferPayload other = (pactus.transaction.TransactionOuterClass.TransferPayload) obj; if (!getSender() .equals(other.getSender())) return false; @@ -11197,69 +11197,69 @@ public int hashCode() { return hash; } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( + public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( + public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( + public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( + public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom(byte[] data) + public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( + public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( + public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseDelimitedFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.TransferPayload parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseDelimitedFrom( + public static pactus.transaction.TransactionOuterClass.TransferPayload parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( + public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( + public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -11272,7 +11272,7 @@ public static pactus.transaction.TransactionOuterClass.RawTransfer parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.RawTransfer prototype) { + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.TransferPayload prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -11289,29 +11289,29 @@ protected Builder newBuilderForType( } /** *
    -     * Request message for retrieving raw details of a transfer transaction.
    +     * Payload message for retrieving raw details of a transfer transaction.
          * 
    * - * Protobuf type {@code pactus.RawTransfer} + * Protobuf type {@code pactus.TransferPayload} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.RawTransfer) - pactus.transaction.TransactionOuterClass.RawTransferOrBuilder { + // @@protoc_insertion_point(builder_implements:pactus.TransferPayload) + pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawTransfer_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransferPayload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawTransfer_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransferPayload_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.RawTransfer.class, pactus.transaction.TransactionOuterClass.RawTransfer.Builder.class); + pactus.transaction.TransactionOuterClass.TransferPayload.class, pactus.transaction.TransactionOuterClass.TransferPayload.Builder.class); } - // Construct using pactus.transaction.TransactionOuterClass.RawTransfer.newBuilder() + // Construct using pactus.transaction.TransactionOuterClass.TransferPayload.newBuilder() private Builder() { } @@ -11338,17 +11338,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawTransfer_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransferPayload_descriptor; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawTransfer getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance(); + public pactus.transaction.TransactionOuterClass.TransferPayload getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance(); } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawTransfer build() { - pactus.transaction.TransactionOuterClass.RawTransfer result = buildPartial(); + public pactus.transaction.TransactionOuterClass.TransferPayload build() { + pactus.transaction.TransactionOuterClass.TransferPayload result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -11356,8 +11356,8 @@ public pactus.transaction.TransactionOuterClass.RawTransfer build() { } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawTransfer buildPartial() { - pactus.transaction.TransactionOuterClass.RawTransfer result = new pactus.transaction.TransactionOuterClass.RawTransfer(this); + public pactus.transaction.TransactionOuterClass.TransferPayload buildPartial() { + pactus.transaction.TransactionOuterClass.TransferPayload result = new pactus.transaction.TransactionOuterClass.TransferPayload(this); result.sender_ = sender_; result.receiver_ = receiver_; result.amount_ = amount_; @@ -11400,16 +11400,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.RawTransfer) { - return mergeFrom((pactus.transaction.TransactionOuterClass.RawTransfer)other); + if (other instanceof pactus.transaction.TransactionOuterClass.TransferPayload) { + return mergeFrom((pactus.transaction.TransactionOuterClass.TransferPayload)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.RawTransfer other) { - if (other == pactus.transaction.TransactionOuterClass.RawTransfer.getDefaultInstance()) return this; + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.TransferPayload other) { + if (other == pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance()) return this; if (!other.getSender().isEmpty()) { sender_ = other.sender_; onChanged(); @@ -11776,23 +11776,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:pactus.RawTransfer) + // @@protoc_insertion_point(builder_scope:pactus.TransferPayload) } - // @@protoc_insertion_point(class_scope:pactus.RawTransfer) - private static final pactus.transaction.TransactionOuterClass.RawTransfer DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:pactus.TransferPayload) + private static final pactus.transaction.TransactionOuterClass.TransferPayload DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.RawTransfer(); + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.TransferPayload(); } - public static pactus.transaction.TransactionOuterClass.RawTransfer getDefaultInstance() { + public static pactus.transaction.TransactionOuterClass.TransferPayload getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public RawTransfer parsePartialFrom( + public TransferPayload parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -11811,24 +11811,24 @@ public RawTransfer parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawTransfer getDefaultInstanceForType() { + public pactus.transaction.TransactionOuterClass.TransferPayload getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface RawBondOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.RawBond) + public interface BondPayloadOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.BondPayload) com.google.protobuf.MessageOrBuilder { /** @@ -11913,21 +11913,21 @@ public interface RawBondOrBuilder extends } /** *
    -   * Request message for retrieving raw details of a bond transaction.
    +   * Payload message for retrieving raw details of a bond transaction.
        * 
    * - * Protobuf type {@code pactus.RawBond} + * Protobuf type {@code pactus.BondPayload} */ - public static final class RawBond extends + public static final class BondPayload extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.RawBond) - RawBondOrBuilder { + // @@protoc_insertion_point(message_implements:pactus.BondPayload) + BondPayloadOrBuilder { private static final long serialVersionUID = 0L; - // Use RawBond.newBuilder() to construct. - private RawBond(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use BondPayload.newBuilder() to construct. + private BondPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private RawBond() { + private BondPayload() { sender_ = ""; receiver_ = ""; publicKey_ = ""; @@ -11937,7 +11937,7 @@ private RawBond() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new RawBond(); + return new BondPayload(); } @java.lang.Override @@ -11947,15 +11947,15 @@ protected java.lang.Object newInstance( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawBond_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BondPayload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawBond_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BondPayload_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.RawBond.class, pactus.transaction.TransactionOuterClass.RawBond.Builder.class); + pactus.transaction.TransactionOuterClass.BondPayload.class, pactus.transaction.TransactionOuterClass.BondPayload.Builder.class); } public static final int SENDER_FIELD_NUMBER = 1; @@ -12191,10 +12191,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.RawBond)) { + if (!(obj instanceof pactus.transaction.TransactionOuterClass.BondPayload)) { return super.equals(obj); } - pactus.transaction.TransactionOuterClass.RawBond other = (pactus.transaction.TransactionOuterClass.RawBond) obj; + pactus.transaction.TransactionOuterClass.BondPayload other = (pactus.transaction.TransactionOuterClass.BondPayload) obj; if (!getSender() .equals(other.getSender())) return false; @@ -12234,69 +12234,69 @@ public int hashCode() { return hash; } - public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( + public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( + public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( + public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( + public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawBond parseFrom(byte[] data) + public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( + public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawBond parseFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( + public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawBond parseDelimitedFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.BondPayload parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawBond parseDelimitedFrom( + public static pactus.transaction.TransactionOuterClass.BondPayload parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( + public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( + public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12309,7 +12309,7 @@ public static pactus.transaction.TransactionOuterClass.RawBond parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.RawBond prototype) { + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.BondPayload prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -12326,29 +12326,29 @@ protected Builder newBuilderForType( } /** *
    -     * Request message for retrieving raw details of a bond transaction.
    +     * Payload message for retrieving raw details of a bond transaction.
          * 
    * - * Protobuf type {@code pactus.RawBond} + * Protobuf type {@code pactus.BondPayload} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.RawBond) - pactus.transaction.TransactionOuterClass.RawBondOrBuilder { + // @@protoc_insertion_point(builder_implements:pactus.BondPayload) + pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawBond_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BondPayload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawBond_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BondPayload_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.RawBond.class, pactus.transaction.TransactionOuterClass.RawBond.Builder.class); + pactus.transaction.TransactionOuterClass.BondPayload.class, pactus.transaction.TransactionOuterClass.BondPayload.Builder.class); } - // Construct using pactus.transaction.TransactionOuterClass.RawBond.newBuilder() + // Construct using pactus.transaction.TransactionOuterClass.BondPayload.newBuilder() private Builder() { } @@ -12377,17 +12377,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawBond_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_BondPayload_descriptor; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawBond getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance(); + public pactus.transaction.TransactionOuterClass.BondPayload getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance(); } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawBond build() { - pactus.transaction.TransactionOuterClass.RawBond result = buildPartial(); + public pactus.transaction.TransactionOuterClass.BondPayload build() { + pactus.transaction.TransactionOuterClass.BondPayload result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -12395,8 +12395,8 @@ public pactus.transaction.TransactionOuterClass.RawBond build() { } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawBond buildPartial() { - pactus.transaction.TransactionOuterClass.RawBond result = new pactus.transaction.TransactionOuterClass.RawBond(this); + public pactus.transaction.TransactionOuterClass.BondPayload buildPartial() { + pactus.transaction.TransactionOuterClass.BondPayload result = new pactus.transaction.TransactionOuterClass.BondPayload(this); result.sender_ = sender_; result.receiver_ = receiver_; result.stake_ = stake_; @@ -12440,16 +12440,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.RawBond) { - return mergeFrom((pactus.transaction.TransactionOuterClass.RawBond)other); + if (other instanceof pactus.transaction.TransactionOuterClass.BondPayload) { + return mergeFrom((pactus.transaction.TransactionOuterClass.BondPayload)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.RawBond other) { - if (other == pactus.transaction.TransactionOuterClass.RawBond.getDefaultInstance()) return this; + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.BondPayload other) { + if (other == pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance()) return this; if (!other.getSender().isEmpty()) { sender_ = other.sender_; onChanged(); @@ -12921,23 +12921,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:pactus.RawBond) + // @@protoc_insertion_point(builder_scope:pactus.BondPayload) } - // @@protoc_insertion_point(class_scope:pactus.RawBond) - private static final pactus.transaction.TransactionOuterClass.RawBond DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:pactus.BondPayload) + private static final pactus.transaction.TransactionOuterClass.BondPayload DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.RawBond(); + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.BondPayload(); } - public static pactus.transaction.TransactionOuterClass.RawBond getDefaultInstance() { + public static pactus.transaction.TransactionOuterClass.BondPayload getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public RawBond parsePartialFrom( + public BondPayload parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -12956,24 +12956,24 @@ public RawBond parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawBond getDefaultInstanceForType() { + public pactus.transaction.TransactionOuterClass.BondPayload getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface RawUnbondOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.RawUnbond) + public interface UnbondPayloadOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.UnbondPayload) com.google.protobuf.MessageOrBuilder { /** @@ -12998,21 +12998,21 @@ public interface RawUnbondOrBuilder extends } /** *
    -   * Request message for retrieving raw details of an unbond transaction.
    +   * Payload message for retrieving raw details of an unbond transaction.
        * 
    * - * Protobuf type {@code pactus.RawUnbond} + * Protobuf type {@code pactus.UnbondPayload} */ - public static final class RawUnbond extends + public static final class UnbondPayload extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.RawUnbond) - RawUnbondOrBuilder { + // @@protoc_insertion_point(message_implements:pactus.UnbondPayload) + UnbondPayloadOrBuilder { private static final long serialVersionUID = 0L; - // Use RawUnbond.newBuilder() to construct. - private RawUnbond(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use UnbondPayload.newBuilder() to construct. + private UnbondPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private RawUnbond() { + private UnbondPayload() { validatorAddress_ = ""; } @@ -13020,7 +13020,7 @@ private RawUnbond() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new RawUnbond(); + return new UnbondPayload(); } @java.lang.Override @@ -13030,15 +13030,15 @@ protected java.lang.Object newInstance( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawUnbond_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_UnbondPayload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawUnbond_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_UnbondPayload_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.RawUnbond.class, pactus.transaction.TransactionOuterClass.RawUnbond.Builder.class); + pactus.transaction.TransactionOuterClass.UnbondPayload.class, pactus.transaction.TransactionOuterClass.UnbondPayload.Builder.class); } public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 1; @@ -13126,10 +13126,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.RawUnbond)) { + if (!(obj instanceof pactus.transaction.TransactionOuterClass.UnbondPayload)) { return super.equals(obj); } - pactus.transaction.TransactionOuterClass.RawUnbond other = (pactus.transaction.TransactionOuterClass.RawUnbond) obj; + pactus.transaction.TransactionOuterClass.UnbondPayload other = (pactus.transaction.TransactionOuterClass.UnbondPayload) obj; if (!getValidatorAddress() .equals(other.getValidatorAddress())) return false; @@ -13151,69 +13151,69 @@ public int hashCode() { return hash; } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom(byte[] data) + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseDelimitedFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseDelimitedFrom( + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( + public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13226,7 +13226,7 @@ public static pactus.transaction.TransactionOuterClass.RawUnbond parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.RawUnbond prototype) { + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.UnbondPayload prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -13243,29 +13243,29 @@ protected Builder newBuilderForType( } /** *
    -     * Request message for retrieving raw details of an unbond transaction.
    +     * Payload message for retrieving raw details of an unbond transaction.
          * 
    * - * Protobuf type {@code pactus.RawUnbond} + * Protobuf type {@code pactus.UnbondPayload} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.RawUnbond) - pactus.transaction.TransactionOuterClass.RawUnbondOrBuilder { + // @@protoc_insertion_point(builder_implements:pactus.UnbondPayload) + pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawUnbond_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_UnbondPayload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawUnbond_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_UnbondPayload_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.RawUnbond.class, pactus.transaction.TransactionOuterClass.RawUnbond.Builder.class); + pactus.transaction.TransactionOuterClass.UnbondPayload.class, pactus.transaction.TransactionOuterClass.UnbondPayload.Builder.class); } - // Construct using pactus.transaction.TransactionOuterClass.RawUnbond.newBuilder() + // Construct using pactus.transaction.TransactionOuterClass.UnbondPayload.newBuilder() private Builder() { } @@ -13286,17 +13286,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawUnbond_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_UnbondPayload_descriptor; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawUnbond getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance(); + public pactus.transaction.TransactionOuterClass.UnbondPayload getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance(); } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawUnbond build() { - pactus.transaction.TransactionOuterClass.RawUnbond result = buildPartial(); + public pactus.transaction.TransactionOuterClass.UnbondPayload build() { + pactus.transaction.TransactionOuterClass.UnbondPayload result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -13304,8 +13304,8 @@ public pactus.transaction.TransactionOuterClass.RawUnbond build() { } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawUnbond buildPartial() { - pactus.transaction.TransactionOuterClass.RawUnbond result = new pactus.transaction.TransactionOuterClass.RawUnbond(this); + public pactus.transaction.TransactionOuterClass.UnbondPayload buildPartial() { + pactus.transaction.TransactionOuterClass.UnbondPayload result = new pactus.transaction.TransactionOuterClass.UnbondPayload(this); result.validatorAddress_ = validatorAddress_; onBuilt(); return result; @@ -13345,16 +13345,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.RawUnbond) { - return mergeFrom((pactus.transaction.TransactionOuterClass.RawUnbond)other); + if (other instanceof pactus.transaction.TransactionOuterClass.UnbondPayload) { + return mergeFrom((pactus.transaction.TransactionOuterClass.UnbondPayload)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.RawUnbond other) { - if (other == pactus.transaction.TransactionOuterClass.RawUnbond.getDefaultInstance()) return this; + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.UnbondPayload other) { + if (other == pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance()) return this; if (!other.getValidatorAddress().isEmpty()) { validatorAddress_ = other.validatorAddress_; onChanged(); @@ -13514,23 +13514,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:pactus.RawUnbond) + // @@protoc_insertion_point(builder_scope:pactus.UnbondPayload) } - // @@protoc_insertion_point(class_scope:pactus.RawUnbond) - private static final pactus.transaction.TransactionOuterClass.RawUnbond DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:pactus.UnbondPayload) + private static final pactus.transaction.TransactionOuterClass.UnbondPayload DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.RawUnbond(); + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.UnbondPayload(); } - public static pactus.transaction.TransactionOuterClass.RawUnbond getDefaultInstance() { + public static pactus.transaction.TransactionOuterClass.UnbondPayload getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public RawUnbond parsePartialFrom( + public UnbondPayload parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -13549,24 +13549,24 @@ public RawUnbond parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawUnbond getDefaultInstanceForType() { + public pactus.transaction.TransactionOuterClass.UnbondPayload getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface RawWithdrawOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.RawWithdraw) + public interface WithdrawPayloadOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.WithdrawPayload) com.google.protobuf.MessageOrBuilder { /** @@ -13631,21 +13631,21 @@ public interface RawWithdrawOrBuilder extends } /** *
    -   * Request message for retrieving raw details of a withdraw transaction.
    +   * Payload message for retrieving raw details of a withdraw transaction.
        * 
    * - * Protobuf type {@code pactus.RawWithdraw} + * Protobuf type {@code pactus.WithdrawPayload} */ - public static final class RawWithdraw extends + public static final class WithdrawPayload extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.RawWithdraw) - RawWithdrawOrBuilder { + // @@protoc_insertion_point(message_implements:pactus.WithdrawPayload) + WithdrawPayloadOrBuilder { private static final long serialVersionUID = 0L; - // Use RawWithdraw.newBuilder() to construct. - private RawWithdraw(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use WithdrawPayload.newBuilder() to construct. + private WithdrawPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private RawWithdraw() { + private WithdrawPayload() { validatorAddress_ = ""; accountAddress_ = ""; } @@ -13654,7 +13654,7 @@ private RawWithdraw() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new RawWithdraw(); + return new WithdrawPayload(); } @java.lang.Override @@ -13664,15 +13664,15 @@ protected java.lang.Object newInstance( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawWithdraw_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_WithdrawPayload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawWithdraw_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_WithdrawPayload_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.RawWithdraw.class, pactus.transaction.TransactionOuterClass.RawWithdraw.Builder.class); + pactus.transaction.TransactionOuterClass.WithdrawPayload.class, pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder.class); } public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 1; @@ -13856,10 +13856,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.RawWithdraw)) { + if (!(obj instanceof pactus.transaction.TransactionOuterClass.WithdrawPayload)) { return super.equals(obj); } - pactus.transaction.TransactionOuterClass.RawWithdraw other = (pactus.transaction.TransactionOuterClass.RawWithdraw) obj; + pactus.transaction.TransactionOuterClass.WithdrawPayload other = (pactus.transaction.TransactionOuterClass.WithdrawPayload) obj; if (!getValidatorAddress() .equals(other.getValidatorAddress())) return false; @@ -13895,69 +13895,69 @@ public int hashCode() { return hash; } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom(byte[] data) + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseDelimitedFrom(java.io.InputStream input) + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseDelimitedFrom( + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( + public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13970,7 +13970,7 @@ public static pactus.transaction.TransactionOuterClass.RawWithdraw parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.RawWithdraw prototype) { + public static Builder newBuilder(pactus.transaction.TransactionOuterClass.WithdrawPayload prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -13987,29 +13987,29 @@ protected Builder newBuilderForType( } /** *
    -     * Request message for retrieving raw details of a withdraw transaction.
    +     * Payload message for retrieving raw details of a withdraw transaction.
          * 
    * - * Protobuf type {@code pactus.RawWithdraw} + * Protobuf type {@code pactus.WithdrawPayload} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.RawWithdraw) - pactus.transaction.TransactionOuterClass.RawWithdrawOrBuilder { + // @@protoc_insertion_point(builder_implements:pactus.WithdrawPayload) + pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawWithdraw_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_WithdrawPayload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawWithdraw_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_WithdrawPayload_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.RawWithdraw.class, pactus.transaction.TransactionOuterClass.RawWithdraw.Builder.class); + pactus.transaction.TransactionOuterClass.WithdrawPayload.class, pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder.class); } - // Construct using pactus.transaction.TransactionOuterClass.RawWithdraw.newBuilder() + // Construct using pactus.transaction.TransactionOuterClass.WithdrawPayload.newBuilder() private Builder() { } @@ -14036,17 +14036,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_RawWithdraw_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_WithdrawPayload_descriptor; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawWithdraw getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance(); + public pactus.transaction.TransactionOuterClass.WithdrawPayload getDefaultInstanceForType() { + return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance(); } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawWithdraw build() { - pactus.transaction.TransactionOuterClass.RawWithdraw result = buildPartial(); + public pactus.transaction.TransactionOuterClass.WithdrawPayload build() { + pactus.transaction.TransactionOuterClass.WithdrawPayload result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -14054,8 +14054,8 @@ public pactus.transaction.TransactionOuterClass.RawWithdraw build() { } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawWithdraw buildPartial() { - pactus.transaction.TransactionOuterClass.RawWithdraw result = new pactus.transaction.TransactionOuterClass.RawWithdraw(this); + public pactus.transaction.TransactionOuterClass.WithdrawPayload buildPartial() { + pactus.transaction.TransactionOuterClass.WithdrawPayload result = new pactus.transaction.TransactionOuterClass.WithdrawPayload(this); result.validatorAddress_ = validatorAddress_; result.accountAddress_ = accountAddress_; result.amount_ = amount_; @@ -14098,16 +14098,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.RawWithdraw) { - return mergeFrom((pactus.transaction.TransactionOuterClass.RawWithdraw)other); + if (other instanceof pactus.transaction.TransactionOuterClass.WithdrawPayload) { + return mergeFrom((pactus.transaction.TransactionOuterClass.WithdrawPayload)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.RawWithdraw other) { - if (other == pactus.transaction.TransactionOuterClass.RawWithdraw.getDefaultInstance()) return this; + public Builder mergeFrom(pactus.transaction.TransactionOuterClass.WithdrawPayload other) { + if (other == pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance()) return this; if (!other.getValidatorAddress().isEmpty()) { validatorAddress_ = other.validatorAddress_; onChanged(); @@ -14474,23 +14474,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:pactus.RawWithdraw) + // @@protoc_insertion_point(builder_scope:pactus.WithdrawPayload) } - // @@protoc_insertion_point(class_scope:pactus.RawWithdraw) - private static final pactus.transaction.TransactionOuterClass.RawWithdraw DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:pactus.WithdrawPayload) + private static final pactus.transaction.TransactionOuterClass.WithdrawPayload DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.RawWithdraw(); + DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.WithdrawPayload(); } - public static pactus.transaction.TransactionOuterClass.RawWithdraw getDefaultInstance() { + public static pactus.transaction.TransactionOuterClass.WithdrawPayload getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public RawWithdraw parsePartialFrom( + public WithdrawPayload parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -14509,17 +14509,17 @@ public RawWithdraw parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public pactus.transaction.TransactionOuterClass.RawWithdraw getDefaultInstanceForType() { + public pactus.transaction.TransactionOuterClass.WithdrawPayload getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -22490,25 +22490,25 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_RawTransfer_descriptor; + internal_static_pactus_TransferPayload_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_RawTransfer_fieldAccessorTable; + internal_static_pactus_TransferPayload_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_RawBond_descriptor; + internal_static_pactus_BondPayload_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_RawBond_fieldAccessorTable; + internal_static_pactus_BondPayload_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_RawUnbond_descriptor; + internal_static_pactus_UnbondPayload_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_RawUnbond_fieldAccessorTable; + internal_static_pactus_UnbondPayload_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_RawWithdraw_descriptor; + internal_static_pactus_WithdrawPayload_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_RawWithdraw_fieldAccessorTable; + internal_static_pactus_WithdrawPayload_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_pactus_GetRawTransactionResponse_descriptor; private static final @@ -22568,95 +22568,95 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan "R\003fee\"S\n\033BroadcastTransactionRequest\0224\n\026" + "signed_raw_transaction\030\001 \001(\tR\024signedRawT" + "ransaction\".\n\034BroadcastTransactionRespon" + - "se\022\016\n\002id\030\001 \001(\tR\002id\"\224\002\n\030GetRawTransaction" + + "se\022\016\n\002id\030\001 \001(\tR\002id\"\240\002\n\030GetRawTransaction" + "Request\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022\022\n\004" + - "memo\030\002 \001(\tR\004memo\0221\n\010transfer\030\003 \001(\0132\023.pac" + - "tus.RawTransferH\000R\010transfer\022%\n\004bond\030\004 \001(" + - "\0132\017.pactus.RawBondH\000R\004bond\022+\n\006unbond\030\005 \001" + - "(\0132\021.pactus.RawUnbondH\000R\006unbond\0221\n\010withd" + - "raw\030\006 \001(\0132\023.pactus.RawWithdrawH\000R\010withdr" + - "awB\r\n\013transaction\"\261\001\n GetRawTransferTran" + - "sactionRequest\022\033\n\tlock_time\030\001 \001(\rR\010lockT" + - "ime\022\026\n\006sender\030\002 \001(\tR\006sender\022\032\n\010receiver\030" + - "\003 \001(\tR\010receiver\022\026\n\006amount\030\004 \001(\003R\006amount\022" + - "\020\n\003fee\030\005 \001(\003R\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"\312\001" + - "\n\034GetRawBondTransactionRequest\022\033\n\tlock_t" + - "ime\030\001 \001(\rR\010lockTime\022\026\n\006sender\030\002 \001(\tR\006sen" + - "der\022\032\n\010receiver\030\003 \001(\tR\010receiver\022\024\n\005stake" + - "\030\004 \001(\003R\005stake\022\035\n\npublic_key\030\005 \001(\tR\tpubli" + - "cKey\022\020\n\003fee\030\006 \001(\003R\003fee\022\022\n\004memo\030\007 \001(\tR\004me" + - "mo\"~\n\036GetRawUnbondTransactionRequest\022\033\n\t" + - "lock_time\030\001 \001(\rR\010lockTime\022+\n\021validator_a" + - "ddress\030\003 \001(\tR\020validatorAddress\022\022\n\004memo\030\004" + - " \001(\tR\004memo\"\323\001\n GetRawWithdrawTransaction" + - "Request\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022+\n\021" + - "validator_address\030\002 \001(\tR\020validatorAddres" + - "s\022\'\n\017account_address\030\003 \001(\tR\016accountAddre" + - "ss\022\026\n\006amount\030\004 \001(\003R\006amount\022\020\n\003fee\030\005 \001(\003R" + - "\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"k\n\013RawTransfer\022" + - "\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 \001(" + - "\tR\010receiver\022\026\n\006amount\030\003 \001(\003R\006amount\022\020\n\003f" + - "ee\030\004 \001(\003R\003fee\"\204\001\n\007RawBond\022\026\n\006sender\030\001 \001(" + - "\tR\006sender\022\032\n\010receiver\030\002 \001(\tR\010receiver\022\024\n" + - "\005stake\030\003 \001(\003R\005stake\022\035\n\npublic_key\030\004 \001(\tR" + - "\tpublicKey\022\020\n\003fee\030\005 \001(\003R\003fee\"8\n\tRawUnbon" + - "d\022+\n\021validator_address\030\001 \001(\tR\020validatorA" + - "ddress\"\215\001\n\013RawWithdraw\022+\n\021validator_addr" + - "ess\030\001 \001(\tR\020validatorAddress\022\'\n\017account_a" + - "ddress\030\002 \001(\tR\016accountAddress\022\026\n\006amount\030\003" + - " \001(\003R\006amount\022\020\n\003fee\030\004 \001(\003R\003fee\"D\n\031GetRaw" + - "TransactionResponse\022\'\n\017raw_transaction\030\001" + - " \001(\tR\016rawTransaction\"]\n\017PayloadTransfer\022" + - "\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 \001(" + - "\tR\010receiver\022\026\n\006amount\030\003 \001(\003R\006amount\"W\n\013P" + - "ayloadBond\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010re" + - "ceiver\030\002 \001(\tR\010receiver\022\024\n\005stake\030\003 \001(\003R\005s" + - "take\"B\n\020PayloadSortition\022\030\n\007address\030\001 \001(" + - "\tR\007address\022\024\n\005proof\030\002 \001(\tR\005proof\"-\n\rPayl" + - "oadUnbond\022\034\n\tvalidator\030\001 \001(\tR\tvalidator\"" + - "M\n\017PayloadWithdraw\022\022\n\004from\030\001 \001(\tR\004from\022\016" + - "\n\002to\030\002 \001(\tR\002to\022\026\n\006amount\030\003 \001(\003R\006amount\"\254" + - "\004\n\017TransactionInfo\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004da" + - "ta\030\002 \001(\tR\004data\022\030\n\007version\030\003 \001(\005R\007version" + - "\022\033\n\tlock_time\030\004 \001(\rR\010lockTime\022\024\n\005value\030\005" + - " \001(\003R\005value\022\020\n\003fee\030\006 \001(\003R\003fee\0226\n\014payload" + - "_type\030\007 \001(\0162\023.pactus.PayloadTypeR\013payloa" + - "dType\0225\n\010transfer\030\036 \001(\0132\027.pactus.Payload" + - "TransferH\000R\010transfer\022)\n\004bond\030\037 \001(\0132\023.pac" + - "tus.PayloadBondH\000R\004bond\0228\n\tsortition\030 \001" + - "(\0132\030.pactus.PayloadSortitionH\000R\tsortitio" + - "n\022/\n\006unbond\030! \001(\0132\025.pactus.PayloadUnbond" + - "H\000R\006unbond\0225\n\010withdraw\030\" \001(\0132\027.pactus.Pa" + - "yloadWithdrawH\000R\010withdraw\022\022\n\004memo\030\010 \001(\tR" + - "\004memo\022\035\n\npublic_key\030\t \001(\tR\tpublicKey\022\034\n\t" + - "signature\030\n \001(\tR\tsignatureB\t\n\007payload*\203\001" + - "\n\013PayloadType\022\013\n\007UNKNOWN\020\000\022\024\n\020TRANSFER_P" + - "AYLOAD\020\001\022\020\n\014BOND_PAYLOAD\020\002\022\025\n\021SORTITION_" + - "PAYLOAD\020\003\022\022\n\016UNBOND_PAYLOAD\020\004\022\024\n\020WITHDRA" + - "W_PAYLOAD\020\005*B\n\024TransactionVerbosity\022\024\n\020T" + - "RANSACTION_DATA\020\000\022\024\n\020TRANSACTION_INFO\020\0012" + - "\202\006\n\013Transaction\022O\n\016GetTransaction\022\035.pact" + - "us.GetTransactionRequest\032\036.pactus.GetTra" + - "nsactionResponse\022I\n\014CalculateFee\022\033.pactu" + - "s.CalculateFeeRequest\032\034.pactus.Calculate" + - "FeeResponse\022a\n\024BroadcastTransaction\022#.pa" + - "ctus.BroadcastTransactionRequest\032$.pactu" + - "s.BroadcastTransactionResponse\022X\n\021GetRaw" + - "Transaction\022 .pactus.GetRawTransactionRe" + + "memo\030\002 \001(\tR\004memo\0225\n\010transfer\030\003 \001(\0132\027.pac" + + "tus.TransferPayloadH\000R\010transfer\022)\n\004bond\030" + + "\004 \001(\0132\023.pactus.BondPayloadH\000R\004bond\022/\n\006un" + + "bond\030\005 \001(\0132\025.pactus.UnbondPayloadH\000R\006unb" + + "ond\0225\n\010withdraw\030\006 \001(\0132\027.pactus.WithdrawP" + + "ayloadH\000R\010withdrawB\t\n\007payload\"\261\001\n GetRaw" + + "TransferTransactionRequest\022\033\n\tlock_time\030" + + "\001 \001(\rR\010lockTime\022\026\n\006sender\030\002 \001(\tR\006sender\022" + + "\032\n\010receiver\030\003 \001(\tR\010receiver\022\026\n\006amount\030\004 " + + "\001(\003R\006amount\022\020\n\003fee\030\005 \001(\003R\003fee\022\022\n\004memo\030\006 " + + "\001(\tR\004memo\"\312\001\n\034GetRawBondTransactionReque" + + "st\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022\026\n\006sende" + + "r\030\002 \001(\tR\006sender\022\032\n\010receiver\030\003 \001(\tR\010recei" + + "ver\022\024\n\005stake\030\004 \001(\003R\005stake\022\035\n\npublic_key\030" + + "\005 \001(\tR\tpublicKey\022\020\n\003fee\030\006 \001(\003R\003fee\022\022\n\004me" + + "mo\030\007 \001(\tR\004memo\"~\n\036GetRawUnbondTransactio" + + "nRequest\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022+\n" + + "\021validator_address\030\003 \001(\tR\020validatorAddre" + + "ss\022\022\n\004memo\030\004 \001(\tR\004memo\"\323\001\n GetRawWithdra" + + "wTransactionRequest\022\033\n\tlock_time\030\001 \001(\rR\010" + + "lockTime\022+\n\021validator_address\030\002 \001(\tR\020val" + + "idatorAddress\022\'\n\017account_address\030\003 \001(\tR\016" + + "accountAddress\022\026\n\006amount\030\004 \001(\003R\006amount\022\020" + + "\n\003fee\030\005 \001(\003R\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"o\n\017" + + "TransferPayload\022\026\n\006sender\030\001 \001(\tR\006sender\022" + + "\032\n\010receiver\030\002 \001(\tR\010receiver\022\026\n\006amount\030\003 " + + "\001(\003R\006amount\022\020\n\003fee\030\004 \001(\003R\003fee\"\210\001\n\013BondPa" + + "yload\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receive" + + "r\030\002 \001(\tR\010receiver\022\024\n\005stake\030\003 \001(\003R\005stake\022" + + "\035\n\npublic_key\030\004 \001(\tR\tpublicKey\022\020\n\003fee\030\005 " + + "\001(\003R\003fee\"<\n\rUnbondPayload\022+\n\021validator_a" + + "ddress\030\001 \001(\tR\020validatorAddress\"\221\001\n\017Withd" + + "rawPayload\022+\n\021validator_address\030\001 \001(\tR\020v" + + "alidatorAddress\022\'\n\017account_address\030\002 \001(\t" + + "R\016accountAddress\022\026\n\006amount\030\003 \001(\003R\006amount" + + "\022\020\n\003fee\030\004 \001(\003R\003fee\"D\n\031GetRawTransactionR" + + "esponse\022\'\n\017raw_transaction\030\001 \001(\tR\016rawTra" + + "nsaction\"]\n\017PayloadTransfer\022\026\n\006sender\030\001 " + + "\001(\tR\006sender\022\032\n\010receiver\030\002 \001(\tR\010receiver\022" + + "\026\n\006amount\030\003 \001(\003R\006amount\"W\n\013PayloadBond\022\026" + + "\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 \001(\t" + + "R\010receiver\022\024\n\005stake\030\003 \001(\003R\005stake\"B\n\020Payl" + + "oadSortition\022\030\n\007address\030\001 \001(\tR\007address\022\024" + + "\n\005proof\030\002 \001(\tR\005proof\"-\n\rPayloadUnbond\022\034\n" + + "\tvalidator\030\001 \001(\tR\tvalidator\"M\n\017PayloadWi" + + "thdraw\022\022\n\004from\030\001 \001(\tR\004from\022\016\n\002to\030\002 \001(\tR\002" + + "to\022\026\n\006amount\030\003 \001(\003R\006amount\"\254\004\n\017Transacti" + + "onInfo\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004data\030\002 \001(\tR\004da" + + "ta\022\030\n\007version\030\003 \001(\005R\007version\022\033\n\tlock_tim" + + "e\030\004 \001(\rR\010lockTime\022\024\n\005value\030\005 \001(\003R\005value\022" + + "\020\n\003fee\030\006 \001(\003R\003fee\0226\n\014payload_type\030\007 \001(\0162" + + "\023.pactus.PayloadTypeR\013payloadType\0225\n\010tra" + + "nsfer\030\036 \001(\0132\027.pactus.PayloadTransferH\000R\010" + + "transfer\022)\n\004bond\030\037 \001(\0132\023.pactus.PayloadB" + + "ondH\000R\004bond\0228\n\tsortition\030 \001(\0132\030.pactus." + + "PayloadSortitionH\000R\tsortition\022/\n\006unbond\030" + + "! \001(\0132\025.pactus.PayloadUnbondH\000R\006unbond\0225" + + "\n\010withdraw\030\" \001(\0132\027.pactus.PayloadWithdra" + + "wH\000R\010withdraw\022\022\n\004memo\030\010 \001(\tR\004memo\022\035\n\npub" + + "lic_key\030\t \001(\tR\tpublicKey\022\034\n\tsignature\030\n " + + "\001(\tR\tsignatureB\t\n\007payload*\203\001\n\013PayloadTyp" + + "e\022\013\n\007UNKNOWN\020\000\022\024\n\020TRANSFER_PAYLOAD\020\001\022\020\n\014" + + "BOND_PAYLOAD\020\002\022\025\n\021SORTITION_PAYLOAD\020\003\022\022\n" + + "\016UNBOND_PAYLOAD\020\004\022\024\n\020WITHDRAW_PAYLOAD\020\005*" + + "B\n\024TransactionVerbosity\022\024\n\020TRANSACTION_D" + + "ATA\020\000\022\024\n\020TRANSACTION_INFO\020\0012\202\006\n\013Transact" + + "ion\022O\n\016GetTransaction\022\035.pactus.GetTransa" + + "ctionRequest\032\036.pactus.GetTransactionResp" + + "onse\022I\n\014CalculateFee\022\033.pactus.CalculateF" + + "eeRequest\032\034.pactus.CalculateFeeResponse\022" + + "a\n\024BroadcastTransaction\022#.pactus.Broadca" + + "stTransactionRequest\032$.pactus.BroadcastT" + + "ransactionResponse\022X\n\021GetRawTransaction\022" + + " .pactus.GetRawTransactionRequest\032!.pact" + + "us.GetRawTransactionResponse\022h\n\031GetRawTr" + + "ansferTransaction\022(.pactus.GetRawTransfe" + + "rTransactionRequest\032!.pactus.GetRawTrans" + + "actionResponse\022`\n\025GetRawBondTransaction\022" + + "$.pactus.GetRawBondTransactionRequest\032!." + + "pactus.GetRawTransactionResponse\022d\n\027GetR" + + "awUnbondTransaction\022&.pactus.GetRawUnbon" + + "dTransactionRequest\032!.pactus.GetRawTrans" + + "actionResponse\022h\n\031GetRawWithdrawTransact" + + "ion\022(.pactus.GetRawWithdrawTransactionRe" + "quest\032!.pactus.GetRawTransactionResponse" + - "\022h\n\031GetRawTransferTransaction\022(.pactus.G" + - "etRawTransferTransactionRequest\032!.pactus" + - ".GetRawTransactionResponse\022`\n\025GetRawBond" + - "Transaction\022$.pactus.GetRawBondTransacti" + - "onRequest\032!.pactus.GetRawTransactionResp" + - "onse\022d\n\027GetRawUnbondTransaction\022&.pactus" + - ".GetRawUnbondTransactionRequest\032!.pactus" + - ".GetRawTransactionResponse\022h\n\031GetRawWith" + - "drawTransaction\022(.pactus.GetRawWithdrawT" + - "ransactionRequest\032!.pactus.GetRawTransac" + - "tionResponseBF\n\022pactus.transactionZ0gith" + - "ub.com/pactus-project/pactus/www/grpc/pa" + - "ctusb\006proto3" + "BF\n\022pactus.transactionZ0github.com/pactu" + + "s-project/pactus/www/grpc/pactusb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -22703,7 +22703,7 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan internal_static_pactus_GetRawTransactionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawTransactionRequest_descriptor, - new java.lang.String[] { "LockTime", "Memo", "Transfer", "Bond", "Unbond", "Withdraw", "Transaction", }); + new java.lang.String[] { "LockTime", "Memo", "Transfer", "Bond", "Unbond", "Withdraw", "Payload", }); internal_static_pactus_GetRawTransferTransactionRequest_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable = new @@ -22728,29 +22728,29 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor, new java.lang.String[] { "LockTime", "ValidatorAddress", "AccountAddress", "Amount", "Fee", "Memo", }); - internal_static_pactus_RawTransfer_descriptor = + internal_static_pactus_TransferPayload_descriptor = getDescriptor().getMessageTypes().get(11); - internal_static_pactus_RawTransfer_fieldAccessorTable = new + internal_static_pactus_TransferPayload_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_RawTransfer_descriptor, + internal_static_pactus_TransferPayload_descriptor, new java.lang.String[] { "Sender", "Receiver", "Amount", "Fee", }); - internal_static_pactus_RawBond_descriptor = + internal_static_pactus_BondPayload_descriptor = getDescriptor().getMessageTypes().get(12); - internal_static_pactus_RawBond_fieldAccessorTable = new + internal_static_pactus_BondPayload_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_RawBond_descriptor, + internal_static_pactus_BondPayload_descriptor, new java.lang.String[] { "Sender", "Receiver", "Stake", "PublicKey", "Fee", }); - internal_static_pactus_RawUnbond_descriptor = + internal_static_pactus_UnbondPayload_descriptor = getDescriptor().getMessageTypes().get(13); - internal_static_pactus_RawUnbond_fieldAccessorTable = new + internal_static_pactus_UnbondPayload_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_RawUnbond_descriptor, + internal_static_pactus_UnbondPayload_descriptor, new java.lang.String[] { "ValidatorAddress", }); - internal_static_pactus_RawWithdraw_descriptor = + internal_static_pactus_WithdrawPayload_descriptor = getDescriptor().getMessageTypes().get(14); - internal_static_pactus_RawWithdraw_fieldAccessorTable = new + internal_static_pactus_WithdrawPayload_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_RawWithdraw_descriptor, + internal_static_pactus_WithdrawPayload_descriptor, new java.lang.String[] { "ValidatorAddress", "AccountAddress", "Amount", "Fee", }); internal_static_pactus_GetRawTransactionResponse_descriptor = getDescriptor().getMessageTypes().get(15); diff --git a/www/grpc/gen/js/transaction_pb.js b/www/grpc/gen/js/transaction_pb.js index 355c283a0..6ee2a8700 100644 --- a/www/grpc/gen/js/transaction_pb.js +++ b/www/grpc/gen/js/transaction_pb.js @@ -21,13 +21,14 @@ var global = (function () { return this; }).call(null) || Function('return this')(); +goog.exportSymbol('proto.pactus.BondPayload', null, global); goog.exportSymbol('proto.pactus.BroadcastTransactionRequest', null, global); goog.exportSymbol('proto.pactus.BroadcastTransactionResponse', null, global); goog.exportSymbol('proto.pactus.CalculateFeeRequest', null, global); goog.exportSymbol('proto.pactus.CalculateFeeResponse', null, global); goog.exportSymbol('proto.pactus.GetRawBondTransactionRequest', null, global); goog.exportSymbol('proto.pactus.GetRawTransactionRequest', null, global); -goog.exportSymbol('proto.pactus.GetRawTransactionRequest.TransactionCase', null, global); +goog.exportSymbol('proto.pactus.GetRawTransactionRequest.PayloadCase', null, global); goog.exportSymbol('proto.pactus.GetRawTransactionResponse', null, global); goog.exportSymbol('proto.pactus.GetRawTransferTransactionRequest', null, global); goog.exportSymbol('proto.pactus.GetRawUnbondTransactionRequest', null, global); @@ -40,13 +41,12 @@ goog.exportSymbol('proto.pactus.PayloadTransfer', null, global); goog.exportSymbol('proto.pactus.PayloadType', null, global); goog.exportSymbol('proto.pactus.PayloadUnbond', null, global); goog.exportSymbol('proto.pactus.PayloadWithdraw', null, global); -goog.exportSymbol('proto.pactus.RawBond', null, global); -goog.exportSymbol('proto.pactus.RawTransfer', null, global); -goog.exportSymbol('proto.pactus.RawUnbond', null, global); -goog.exportSymbol('proto.pactus.RawWithdraw', null, global); goog.exportSymbol('proto.pactus.TransactionInfo', null, global); goog.exportSymbol('proto.pactus.TransactionInfo.PayloadCase', null, global); goog.exportSymbol('proto.pactus.TransactionVerbosity', null, global); +goog.exportSymbol('proto.pactus.TransferPayload', null, global); +goog.exportSymbol('proto.pactus.UnbondPayload', null, global); +goog.exportSymbol('proto.pactus.WithdrawPayload', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -288,16 +288,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.pactus.RawTransfer = function(opt_data) { +proto.pactus.TransferPayload = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.pactus.RawTransfer, jspb.Message); +goog.inherits(proto.pactus.TransferPayload, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.pactus.RawTransfer.displayName = 'proto.pactus.RawTransfer'; + proto.pactus.TransferPayload.displayName = 'proto.pactus.TransferPayload'; } /** * Generated by JsPbCodeGenerator. @@ -309,16 +309,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.pactus.RawBond = function(opt_data) { +proto.pactus.BondPayload = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.pactus.RawBond, jspb.Message); +goog.inherits(proto.pactus.BondPayload, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.pactus.RawBond.displayName = 'proto.pactus.RawBond'; + proto.pactus.BondPayload.displayName = 'proto.pactus.BondPayload'; } /** * Generated by JsPbCodeGenerator. @@ -330,16 +330,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.pactus.RawUnbond = function(opt_data) { +proto.pactus.UnbondPayload = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.pactus.RawUnbond, jspb.Message); +goog.inherits(proto.pactus.UnbondPayload, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.pactus.RawUnbond.displayName = 'proto.pactus.RawUnbond'; + proto.pactus.UnbondPayload.displayName = 'proto.pactus.UnbondPayload'; } /** * Generated by JsPbCodeGenerator. @@ -351,16 +351,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.pactus.RawWithdraw = function(opt_data) { +proto.pactus.WithdrawPayload = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.pactus.RawWithdraw, jspb.Message); +goog.inherits(proto.pactus.WithdrawPayload, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.pactus.RawWithdraw.displayName = 'proto.pactus.RawWithdraw'; + proto.pactus.WithdrawPayload.displayName = 'proto.pactus.WithdrawPayload'; } /** * Generated by JsPbCodeGenerator. @@ -1504,8 +1504,8 @@ proto.pactus.GetRawTransactionRequest.oneofGroups_ = [[3,4,5,6]]; /** * @enum {number} */ -proto.pactus.GetRawTransactionRequest.TransactionCase = { - TRANSACTION_NOT_SET: 0, +proto.pactus.GetRawTransactionRequest.PayloadCase = { + PAYLOAD_NOT_SET: 0, TRANSFER: 3, BOND: 4, UNBOND: 5, @@ -1513,10 +1513,10 @@ proto.pactus.GetRawTransactionRequest.TransactionCase = { }; /** - * @return {proto.pactus.GetRawTransactionRequest.TransactionCase} + * @return {proto.pactus.GetRawTransactionRequest.PayloadCase} */ -proto.pactus.GetRawTransactionRequest.prototype.getTransactionCase = function() { - return /** @type {proto.pactus.GetRawTransactionRequest.TransactionCase} */(jspb.Message.computeOneofCase(this, proto.pactus.GetRawTransactionRequest.oneofGroups_[0])); +proto.pactus.GetRawTransactionRequest.prototype.getPayloadCase = function() { + return /** @type {proto.pactus.GetRawTransactionRequest.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.pactus.GetRawTransactionRequest.oneofGroups_[0])); }; @@ -1552,10 +1552,10 @@ proto.pactus.GetRawTransactionRequest.toObject = function(includeInstance, msg) var f, obj = { lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), memo: jspb.Message.getFieldWithDefault(msg, 2, ""), - transfer: (f = msg.getTransfer()) && proto.pactus.RawTransfer.toObject(includeInstance, f), - bond: (f = msg.getBond()) && proto.pactus.RawBond.toObject(includeInstance, f), - unbond: (f = msg.getUnbond()) && proto.pactus.RawUnbond.toObject(includeInstance, f), - withdraw: (f = msg.getWithdraw()) && proto.pactus.RawWithdraw.toObject(includeInstance, f) + transfer: (f = msg.getTransfer()) && proto.pactus.TransferPayload.toObject(includeInstance, f), + bond: (f = msg.getBond()) && proto.pactus.BondPayload.toObject(includeInstance, f), + unbond: (f = msg.getUnbond()) && proto.pactus.UnbondPayload.toObject(includeInstance, f), + withdraw: (f = msg.getWithdraw()) && proto.pactus.WithdrawPayload.toObject(includeInstance, f) }; if (includeInstance) { @@ -1601,23 +1601,23 @@ proto.pactus.GetRawTransactionRequest.deserializeBinaryFromReader = function(msg msg.setMemo(value); break; case 3: - var value = new proto.pactus.RawTransfer; - reader.readMessage(value,proto.pactus.RawTransfer.deserializeBinaryFromReader); + var value = new proto.pactus.TransferPayload; + reader.readMessage(value,proto.pactus.TransferPayload.deserializeBinaryFromReader); msg.setTransfer(value); break; case 4: - var value = new proto.pactus.RawBond; - reader.readMessage(value,proto.pactus.RawBond.deserializeBinaryFromReader); + var value = new proto.pactus.BondPayload; + reader.readMessage(value,proto.pactus.BondPayload.deserializeBinaryFromReader); msg.setBond(value); break; case 5: - var value = new proto.pactus.RawUnbond; - reader.readMessage(value,proto.pactus.RawUnbond.deserializeBinaryFromReader); + var value = new proto.pactus.UnbondPayload; + reader.readMessage(value,proto.pactus.UnbondPayload.deserializeBinaryFromReader); msg.setUnbond(value); break; case 6: - var value = new proto.pactus.RawWithdraw; - reader.readMessage(value,proto.pactus.RawWithdraw.deserializeBinaryFromReader); + var value = new proto.pactus.WithdrawPayload; + reader.readMessage(value,proto.pactus.WithdrawPayload.deserializeBinaryFromReader); msg.setWithdraw(value); break; default: @@ -1668,7 +1668,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 3, f, - proto.pactus.RawTransfer.serializeBinaryToWriter + proto.pactus.TransferPayload.serializeBinaryToWriter ); } f = message.getBond(); @@ -1676,7 +1676,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 4, f, - proto.pactus.RawBond.serializeBinaryToWriter + proto.pactus.BondPayload.serializeBinaryToWriter ); } f = message.getUnbond(); @@ -1684,7 +1684,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 5, f, - proto.pactus.RawUnbond.serializeBinaryToWriter + proto.pactus.UnbondPayload.serializeBinaryToWriter ); } f = message.getWithdraw(); @@ -1692,7 +1692,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 6, f, - proto.pactus.RawWithdraw.serializeBinaryToWriter + proto.pactus.WithdrawPayload.serializeBinaryToWriter ); } }; @@ -1735,17 +1735,17 @@ proto.pactus.GetRawTransactionRequest.prototype.setMemo = function(value) { /** - * optional RawTransfer transfer = 3; - * @return {?proto.pactus.RawTransfer} + * optional TransferPayload transfer = 3; + * @return {?proto.pactus.TransferPayload} */ proto.pactus.GetRawTransactionRequest.prototype.getTransfer = function() { - return /** @type{?proto.pactus.RawTransfer} */ ( - jspb.Message.getWrapperField(this, proto.pactus.RawTransfer, 3)); + return /** @type{?proto.pactus.TransferPayload} */ ( + jspb.Message.getWrapperField(this, proto.pactus.TransferPayload, 3)); }; /** - * @param {?proto.pactus.RawTransfer|undefined} value + * @param {?proto.pactus.TransferPayload|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setTransfer = function(value) { @@ -1772,17 +1772,17 @@ proto.pactus.GetRawTransactionRequest.prototype.hasTransfer = function() { /** - * optional RawBond bond = 4; - * @return {?proto.pactus.RawBond} + * optional BondPayload bond = 4; + * @return {?proto.pactus.BondPayload} */ proto.pactus.GetRawTransactionRequest.prototype.getBond = function() { - return /** @type{?proto.pactus.RawBond} */ ( - jspb.Message.getWrapperField(this, proto.pactus.RawBond, 4)); + return /** @type{?proto.pactus.BondPayload} */ ( + jspb.Message.getWrapperField(this, proto.pactus.BondPayload, 4)); }; /** - * @param {?proto.pactus.RawBond|undefined} value + * @param {?proto.pactus.BondPayload|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setBond = function(value) { @@ -1809,17 +1809,17 @@ proto.pactus.GetRawTransactionRequest.prototype.hasBond = function() { /** - * optional RawUnbond unbond = 5; - * @return {?proto.pactus.RawUnbond} + * optional UnbondPayload unbond = 5; + * @return {?proto.pactus.UnbondPayload} */ proto.pactus.GetRawTransactionRequest.prototype.getUnbond = function() { - return /** @type{?proto.pactus.RawUnbond} */ ( - jspb.Message.getWrapperField(this, proto.pactus.RawUnbond, 5)); + return /** @type{?proto.pactus.UnbondPayload} */ ( + jspb.Message.getWrapperField(this, proto.pactus.UnbondPayload, 5)); }; /** - * @param {?proto.pactus.RawUnbond|undefined} value + * @param {?proto.pactus.UnbondPayload|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setUnbond = function(value) { @@ -1846,17 +1846,17 @@ proto.pactus.GetRawTransactionRequest.prototype.hasUnbond = function() { /** - * optional RawWithdraw withdraw = 6; - * @return {?proto.pactus.RawWithdraw} + * optional WithdrawPayload withdraw = 6; + * @return {?proto.pactus.WithdrawPayload} */ proto.pactus.GetRawTransactionRequest.prototype.getWithdraw = function() { - return /** @type{?proto.pactus.RawWithdraw} */ ( - jspb.Message.getWrapperField(this, proto.pactus.RawWithdraw, 6)); + return /** @type{?proto.pactus.WithdrawPayload} */ ( + jspb.Message.getWrapperField(this, proto.pactus.WithdrawPayload, 6)); }; /** - * @param {?proto.pactus.RawWithdraw|undefined} value + * @param {?proto.pactus.WithdrawPayload|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setWithdraw = function(value) { @@ -2958,8 +2958,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.pactus.RawTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.RawTransfer.toObject(opt_includeInstance, this); +proto.pactus.TransferPayload.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.TransferPayload.toObject(opt_includeInstance, this); }; @@ -2968,11 +2968,11 @@ proto.pactus.RawTransfer.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.pactus.RawTransfer} msg The msg instance to transform. + * @param {!proto.pactus.TransferPayload} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.RawTransfer.toObject = function(includeInstance, msg) { +proto.pactus.TransferPayload.toObject = function(includeInstance, msg) { var f, obj = { sender: jspb.Message.getFieldWithDefault(msg, 1, ""), receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), @@ -2991,23 +2991,23 @@ proto.pactus.RawTransfer.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.RawTransfer} + * @return {!proto.pactus.TransferPayload} */ -proto.pactus.RawTransfer.deserializeBinary = function(bytes) { +proto.pactus.TransferPayload.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.RawTransfer; - return proto.pactus.RawTransfer.deserializeBinaryFromReader(msg, reader); + var msg = new proto.pactus.TransferPayload; + return proto.pactus.TransferPayload.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.pactus.RawTransfer} msg The message object to deserialize into. + * @param {!proto.pactus.TransferPayload} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.RawTransfer} + * @return {!proto.pactus.TransferPayload} */ -proto.pactus.RawTransfer.deserializeBinaryFromReader = function(msg, reader) { +proto.pactus.TransferPayload.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3043,9 +3043,9 @@ proto.pactus.RawTransfer.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.pactus.RawTransfer.prototype.serializeBinary = function() { +proto.pactus.TransferPayload.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.pactus.RawTransfer.serializeBinaryToWriter(this, writer); + proto.pactus.TransferPayload.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3053,11 +3053,11 @@ proto.pactus.RawTransfer.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.pactus.RawTransfer} message + * @param {!proto.pactus.TransferPayload} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.RawTransfer.serializeBinaryToWriter = function(message, writer) { +proto.pactus.TransferPayload.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSender(); if (f.length > 0) { @@ -3094,16 +3094,16 @@ proto.pactus.RawTransfer.serializeBinaryToWriter = function(message, writer) { * optional string sender = 1; * @return {string} */ -proto.pactus.RawTransfer.prototype.getSender = function() { +proto.pactus.TransferPayload.prototype.getSender = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.pactus.RawTransfer} returns this + * @return {!proto.pactus.TransferPayload} returns this */ -proto.pactus.RawTransfer.prototype.setSender = function(value) { +proto.pactus.TransferPayload.prototype.setSender = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3112,16 +3112,16 @@ proto.pactus.RawTransfer.prototype.setSender = function(value) { * optional string receiver = 2; * @return {string} */ -proto.pactus.RawTransfer.prototype.getReceiver = function() { +proto.pactus.TransferPayload.prototype.getReceiver = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.pactus.RawTransfer} returns this + * @return {!proto.pactus.TransferPayload} returns this */ -proto.pactus.RawTransfer.prototype.setReceiver = function(value) { +proto.pactus.TransferPayload.prototype.setReceiver = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -3130,16 +3130,16 @@ proto.pactus.RawTransfer.prototype.setReceiver = function(value) { * optional int64 amount = 3; * @return {number} */ -proto.pactus.RawTransfer.prototype.getAmount = function() { +proto.pactus.TransferPayload.prototype.getAmount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.pactus.RawTransfer} returns this + * @return {!proto.pactus.TransferPayload} returns this */ -proto.pactus.RawTransfer.prototype.setAmount = function(value) { +proto.pactus.TransferPayload.prototype.setAmount = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -3148,16 +3148,16 @@ proto.pactus.RawTransfer.prototype.setAmount = function(value) { * optional int64 fee = 4; * @return {number} */ -proto.pactus.RawTransfer.prototype.getFee = function() { +proto.pactus.TransferPayload.prototype.getFee = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.pactus.RawTransfer} returns this + * @return {!proto.pactus.TransferPayload} returns this */ -proto.pactus.RawTransfer.prototype.setFee = function(value) { +proto.pactus.TransferPayload.prototype.setFee = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; @@ -3178,8 +3178,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.pactus.RawBond.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.RawBond.toObject(opt_includeInstance, this); +proto.pactus.BondPayload.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.BondPayload.toObject(opt_includeInstance, this); }; @@ -3188,11 +3188,11 @@ proto.pactus.RawBond.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.pactus.RawBond} msg The msg instance to transform. + * @param {!proto.pactus.BondPayload} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.RawBond.toObject = function(includeInstance, msg) { +proto.pactus.BondPayload.toObject = function(includeInstance, msg) { var f, obj = { sender: jspb.Message.getFieldWithDefault(msg, 1, ""), receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), @@ -3212,23 +3212,23 @@ proto.pactus.RawBond.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.RawBond} + * @return {!proto.pactus.BondPayload} */ -proto.pactus.RawBond.deserializeBinary = function(bytes) { +proto.pactus.BondPayload.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.RawBond; - return proto.pactus.RawBond.deserializeBinaryFromReader(msg, reader); + var msg = new proto.pactus.BondPayload; + return proto.pactus.BondPayload.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.pactus.RawBond} msg The message object to deserialize into. + * @param {!proto.pactus.BondPayload} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.RawBond} + * @return {!proto.pactus.BondPayload} */ -proto.pactus.RawBond.deserializeBinaryFromReader = function(msg, reader) { +proto.pactus.BondPayload.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3268,9 +3268,9 @@ proto.pactus.RawBond.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.pactus.RawBond.prototype.serializeBinary = function() { +proto.pactus.BondPayload.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.pactus.RawBond.serializeBinaryToWriter(this, writer); + proto.pactus.BondPayload.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3278,11 +3278,11 @@ proto.pactus.RawBond.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.pactus.RawBond} message + * @param {!proto.pactus.BondPayload} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.RawBond.serializeBinaryToWriter = function(message, writer) { +proto.pactus.BondPayload.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSender(); if (f.length > 0) { @@ -3326,16 +3326,16 @@ proto.pactus.RawBond.serializeBinaryToWriter = function(message, writer) { * optional string sender = 1; * @return {string} */ -proto.pactus.RawBond.prototype.getSender = function() { +proto.pactus.BondPayload.prototype.getSender = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.pactus.RawBond} returns this + * @return {!proto.pactus.BondPayload} returns this */ -proto.pactus.RawBond.prototype.setSender = function(value) { +proto.pactus.BondPayload.prototype.setSender = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3344,16 +3344,16 @@ proto.pactus.RawBond.prototype.setSender = function(value) { * optional string receiver = 2; * @return {string} */ -proto.pactus.RawBond.prototype.getReceiver = function() { +proto.pactus.BondPayload.prototype.getReceiver = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.pactus.RawBond} returns this + * @return {!proto.pactus.BondPayload} returns this */ -proto.pactus.RawBond.prototype.setReceiver = function(value) { +proto.pactus.BondPayload.prototype.setReceiver = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -3362,16 +3362,16 @@ proto.pactus.RawBond.prototype.setReceiver = function(value) { * optional int64 stake = 3; * @return {number} */ -proto.pactus.RawBond.prototype.getStake = function() { +proto.pactus.BondPayload.prototype.getStake = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.pactus.RawBond} returns this + * @return {!proto.pactus.BondPayload} returns this */ -proto.pactus.RawBond.prototype.setStake = function(value) { +proto.pactus.BondPayload.prototype.setStake = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -3380,16 +3380,16 @@ proto.pactus.RawBond.prototype.setStake = function(value) { * optional string public_key = 4; * @return {string} */ -proto.pactus.RawBond.prototype.getPublicKey = function() { +proto.pactus.BondPayload.prototype.getPublicKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value - * @return {!proto.pactus.RawBond} returns this + * @return {!proto.pactus.BondPayload} returns this */ -proto.pactus.RawBond.prototype.setPublicKey = function(value) { +proto.pactus.BondPayload.prototype.setPublicKey = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; @@ -3398,16 +3398,16 @@ proto.pactus.RawBond.prototype.setPublicKey = function(value) { * optional int64 fee = 5; * @return {number} */ -proto.pactus.RawBond.prototype.getFee = function() { +proto.pactus.BondPayload.prototype.getFee = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value - * @return {!proto.pactus.RawBond} returns this + * @return {!proto.pactus.BondPayload} returns this */ -proto.pactus.RawBond.prototype.setFee = function(value) { +proto.pactus.BondPayload.prototype.setFee = function(value) { return jspb.Message.setProto3IntField(this, 5, value); }; @@ -3428,8 +3428,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.pactus.RawUnbond.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.RawUnbond.toObject(opt_includeInstance, this); +proto.pactus.UnbondPayload.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.UnbondPayload.toObject(opt_includeInstance, this); }; @@ -3438,11 +3438,11 @@ proto.pactus.RawUnbond.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.pactus.RawUnbond} msg The msg instance to transform. + * @param {!proto.pactus.UnbondPayload} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.RawUnbond.toObject = function(includeInstance, msg) { +proto.pactus.UnbondPayload.toObject = function(includeInstance, msg) { var f, obj = { validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, "") }; @@ -3458,23 +3458,23 @@ proto.pactus.RawUnbond.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.RawUnbond} + * @return {!proto.pactus.UnbondPayload} */ -proto.pactus.RawUnbond.deserializeBinary = function(bytes) { +proto.pactus.UnbondPayload.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.RawUnbond; - return proto.pactus.RawUnbond.deserializeBinaryFromReader(msg, reader); + var msg = new proto.pactus.UnbondPayload; + return proto.pactus.UnbondPayload.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.pactus.RawUnbond} msg The message object to deserialize into. + * @param {!proto.pactus.UnbondPayload} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.RawUnbond} + * @return {!proto.pactus.UnbondPayload} */ -proto.pactus.RawUnbond.deserializeBinaryFromReader = function(msg, reader) { +proto.pactus.UnbondPayload.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3498,9 +3498,9 @@ proto.pactus.RawUnbond.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.pactus.RawUnbond.prototype.serializeBinary = function() { +proto.pactus.UnbondPayload.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.pactus.RawUnbond.serializeBinaryToWriter(this, writer); + proto.pactus.UnbondPayload.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3508,11 +3508,11 @@ proto.pactus.RawUnbond.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.pactus.RawUnbond} message + * @param {!proto.pactus.UnbondPayload} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.RawUnbond.serializeBinaryToWriter = function(message, writer) { +proto.pactus.UnbondPayload.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getValidatorAddress(); if (f.length > 0) { @@ -3528,16 +3528,16 @@ proto.pactus.RawUnbond.serializeBinaryToWriter = function(message, writer) { * optional string validator_address = 1; * @return {string} */ -proto.pactus.RawUnbond.prototype.getValidatorAddress = function() { +proto.pactus.UnbondPayload.prototype.getValidatorAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.pactus.RawUnbond} returns this + * @return {!proto.pactus.UnbondPayload} returns this */ -proto.pactus.RawUnbond.prototype.setValidatorAddress = function(value) { +proto.pactus.UnbondPayload.prototype.setValidatorAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3558,8 +3558,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.pactus.RawWithdraw.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.RawWithdraw.toObject(opt_includeInstance, this); +proto.pactus.WithdrawPayload.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.WithdrawPayload.toObject(opt_includeInstance, this); }; @@ -3568,11 +3568,11 @@ proto.pactus.RawWithdraw.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.pactus.RawWithdraw} msg The msg instance to transform. + * @param {!proto.pactus.WithdrawPayload} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.RawWithdraw.toObject = function(includeInstance, msg) { +proto.pactus.WithdrawPayload.toObject = function(includeInstance, msg) { var f, obj = { validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), accountAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), @@ -3591,23 +3591,23 @@ proto.pactus.RawWithdraw.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.RawWithdraw} + * @return {!proto.pactus.WithdrawPayload} */ -proto.pactus.RawWithdraw.deserializeBinary = function(bytes) { +proto.pactus.WithdrawPayload.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.RawWithdraw; - return proto.pactus.RawWithdraw.deserializeBinaryFromReader(msg, reader); + var msg = new proto.pactus.WithdrawPayload; + return proto.pactus.WithdrawPayload.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.pactus.RawWithdraw} msg The message object to deserialize into. + * @param {!proto.pactus.WithdrawPayload} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.RawWithdraw} + * @return {!proto.pactus.WithdrawPayload} */ -proto.pactus.RawWithdraw.deserializeBinaryFromReader = function(msg, reader) { +proto.pactus.WithdrawPayload.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3643,9 +3643,9 @@ proto.pactus.RawWithdraw.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.pactus.RawWithdraw.prototype.serializeBinary = function() { +proto.pactus.WithdrawPayload.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.pactus.RawWithdraw.serializeBinaryToWriter(this, writer); + proto.pactus.WithdrawPayload.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3653,11 +3653,11 @@ proto.pactus.RawWithdraw.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.pactus.RawWithdraw} message + * @param {!proto.pactus.WithdrawPayload} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.RawWithdraw.serializeBinaryToWriter = function(message, writer) { +proto.pactus.WithdrawPayload.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getValidatorAddress(); if (f.length > 0) { @@ -3694,16 +3694,16 @@ proto.pactus.RawWithdraw.serializeBinaryToWriter = function(message, writer) { * optional string validator_address = 1; * @return {string} */ -proto.pactus.RawWithdraw.prototype.getValidatorAddress = function() { +proto.pactus.WithdrawPayload.prototype.getValidatorAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.pactus.RawWithdraw} returns this + * @return {!proto.pactus.WithdrawPayload} returns this */ -proto.pactus.RawWithdraw.prototype.setValidatorAddress = function(value) { +proto.pactus.WithdrawPayload.prototype.setValidatorAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3712,16 +3712,16 @@ proto.pactus.RawWithdraw.prototype.setValidatorAddress = function(value) { * optional string account_address = 2; * @return {string} */ -proto.pactus.RawWithdraw.prototype.getAccountAddress = function() { +proto.pactus.WithdrawPayload.prototype.getAccountAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.pactus.RawWithdraw} returns this + * @return {!proto.pactus.WithdrawPayload} returns this */ -proto.pactus.RawWithdraw.prototype.setAccountAddress = function(value) { +proto.pactus.WithdrawPayload.prototype.setAccountAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -3730,16 +3730,16 @@ proto.pactus.RawWithdraw.prototype.setAccountAddress = function(value) { * optional int64 amount = 3; * @return {number} */ -proto.pactus.RawWithdraw.prototype.getAmount = function() { +proto.pactus.WithdrawPayload.prototype.getAmount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.pactus.RawWithdraw} returns this + * @return {!proto.pactus.WithdrawPayload} returns this */ -proto.pactus.RawWithdraw.prototype.setAmount = function(value) { +proto.pactus.WithdrawPayload.prototype.setAmount = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; @@ -3748,16 +3748,16 @@ proto.pactus.RawWithdraw.prototype.setAmount = function(value) { * optional int64 fee = 4; * @return {number} */ -proto.pactus.RawWithdraw.prototype.getFee = function() { +proto.pactus.WithdrawPayload.prototype.getFee = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.pactus.RawWithdraw} returns this + * @return {!proto.pactus.WithdrawPayload} returns this */ -proto.pactus.RawWithdraw.prototype.setFee = function(value) { +proto.pactus.WithdrawPayload.prototype.setFee = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; diff --git a/www/grpc/gen/python/transaction_pb2.py b/www/grpc/gen/python/transaction_pb2.py index 9882c634b..5b2122dfc 100644 --- a/www/grpc/gen/python/transaction_pb2.py +++ b/www/grpc/gen/python/transaction_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11transaction.proto\x12\x06pactus\"c\n\x15GetTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tverbosity\x18\x02 \x01(\x0e\x32\x1c.pactus.TransactionVerbosityR\tverbosity\"\x95\x01\n\x16GetTransactionResponse\x12!\n\x0c\x62lock_height\x18\x01 \x01(\rR\x0b\x62lockHeight\x12\x1d\n\nblock_time\x18\x02 \x01(\rR\tblockTime\x12\x39\n\x0btransaction\x18\x03 \x01(\x0b\x32\x17.pactus.TransactionInfoR\x0btransaction\"\x88\x01\n\x13\x43\x61lculateFeeRequest\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x36\n\x0cpayload_type\x18\x02 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12!\n\x0c\x66ixed_amount\x18\x03 \x01(\x08R\x0b\x66ixedAmount\"@\n\x14\x43\x61lculateFeeResponse\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x02 \x01(\x03R\x03\x66\x65\x65\"S\n\x1b\x42roadcastTransactionRequest\x12\x34\n\x16signed_raw_transaction\x18\x01 \x01(\tR\x14signedRawTransaction\".\n\x1c\x42roadcastTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x94\x02\n\x18GetRawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x12\n\x04memo\x18\x02 \x01(\tR\x04memo\x12\x31\n\x08transfer\x18\x03 \x01(\x0b\x32\x13.pactus.RawTransferH\x00R\x08transfer\x12%\n\x04\x62ond\x18\x04 \x01(\x0b\x32\x0f.pactus.RawBondH\x00R\x04\x62ond\x12+\n\x06unbond\x18\x05 \x01(\x0b\x32\x11.pactus.RawUnbondH\x00R\x06unbond\x12\x31\n\x08withdraw\x18\x06 \x01(\x0b\x32\x13.pactus.RawWithdrawH\x00R\x08withdrawB\r\n\x0btransaction\"\xb1\x01\n GetRawTransferTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"\xca\x01\n\x1cGetRawBondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x04 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x05 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x07 \x01(\tR\x04memo\"~\n\x1eGetRawUnbondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x03 \x01(\tR\x10validatorAddress\x12\x12\n\x04memo\x18\x04 \x01(\tR\x04memo\"\xd3\x01\n GetRawWithdrawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"k\n\x0bRawTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"\x84\x01\n\x07RawBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x04 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\"8\n\tRawUnbond\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\"\x8d\x01\n\x0bRawWithdraw\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x02 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"D\n\x19GetRawTransactionResponse\x12\'\n\x0fraw_transaction\x18\x01 \x01(\tR\x0erawTransaction\"]\n\x0fPayloadTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"W\n\x0bPayloadBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\"B\n\x10PayloadSortition\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x14\n\x05proof\x18\x02 \x01(\tR\x05proof\"-\n\rPayloadUnbond\x12\x1c\n\tvalidator\x18\x01 \x01(\tR\tvalidator\"M\n\x0fPayloadWithdraw\x12\x12\n\x04\x66rom\x18\x01 \x01(\tR\x04\x66rom\x12\x0e\n\x02to\x18\x02 \x01(\tR\x02to\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"\xac\x04\n\x0fTransactionInfo\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x18\n\x07version\x18\x03 \x01(\x05R\x07version\x12\x1b\n\tlock_time\x18\x04 \x01(\rR\x08lockTime\x12\x14\n\x05value\x18\x05 \x01(\x03R\x05value\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x36\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12\x35\n\x08transfer\x18\x1e \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x1f \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12\x38\n\tsortition\x18 \x01(\x0b\x32\x18.pactus.PayloadSortitionH\x00R\tsortition\x12/\n\x06unbond\x18! \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\" \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdraw\x12\x12\n\x04memo\x18\x08 \x01(\tR\x04memo\x12\x1d\n\npublic_key\x18\t \x01(\tR\tpublicKey\x12\x1c\n\tsignature\x18\n \x01(\tR\tsignatureB\t\n\x07payload*\x83\x01\n\x0bPayloadType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10TRANSFER_PAYLOAD\x10\x01\x12\x10\n\x0c\x42OND_PAYLOAD\x10\x02\x12\x15\n\x11SORTITION_PAYLOAD\x10\x03\x12\x12\n\x0eUNBOND_PAYLOAD\x10\x04\x12\x14\n\x10WITHDRAW_PAYLOAD\x10\x05*B\n\x14TransactionVerbosity\x12\x14\n\x10TRANSACTION_DATA\x10\x00\x12\x14\n\x10TRANSACTION_INFO\x10\x01\x32\x82\x06\n\x0bTransaction\x12O\n\x0eGetTransaction\x12\x1d.pactus.GetTransactionRequest\x1a\x1e.pactus.GetTransactionResponse\x12I\n\x0c\x43\x61lculateFee\x12\x1b.pactus.CalculateFeeRequest\x1a\x1c.pactus.CalculateFeeResponse\x12\x61\n\x14\x42roadcastTransaction\x12#.pactus.BroadcastTransactionRequest\x1a$.pactus.BroadcastTransactionResponse\x12X\n\x11GetRawTransaction\x12 .pactus.GetRawTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawTransferTransaction\x12(.pactus.GetRawTransferTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12`\n\x15GetRawBondTransaction\x12$.pactus.GetRawBondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12\x64\n\x17GetRawUnbondTransaction\x12&.pactus.GetRawUnbondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawWithdrawTransaction\x12(.pactus.GetRawWithdrawTransactionRequest\x1a!.pactus.GetRawTransactionResponseBF\n\x12pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11transaction.proto\x12\x06pactus\"c\n\x15GetTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tverbosity\x18\x02 \x01(\x0e\x32\x1c.pactus.TransactionVerbosityR\tverbosity\"\x95\x01\n\x16GetTransactionResponse\x12!\n\x0c\x62lock_height\x18\x01 \x01(\rR\x0b\x62lockHeight\x12\x1d\n\nblock_time\x18\x02 \x01(\rR\tblockTime\x12\x39\n\x0btransaction\x18\x03 \x01(\x0b\x32\x17.pactus.TransactionInfoR\x0btransaction\"\x88\x01\n\x13\x43\x61lculateFeeRequest\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x36\n\x0cpayload_type\x18\x02 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12!\n\x0c\x66ixed_amount\x18\x03 \x01(\x08R\x0b\x66ixedAmount\"@\n\x14\x43\x61lculateFeeResponse\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x02 \x01(\x03R\x03\x66\x65\x65\"S\n\x1b\x42roadcastTransactionRequest\x12\x34\n\x16signed_raw_transaction\x18\x01 \x01(\tR\x14signedRawTransaction\".\n\x1c\x42roadcastTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xa0\x02\n\x18GetRawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x12\n\x04memo\x18\x02 \x01(\tR\x04memo\x12\x35\n\x08transfer\x18\x03 \x01(\x0b\x32\x17.pactus.TransferPayloadH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x04 \x01(\x0b\x32\x13.pactus.BondPayloadH\x00R\x04\x62ond\x12/\n\x06unbond\x18\x05 \x01(\x0b\x32\x15.pactus.UnbondPayloadH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\x06 \x01(\x0b\x32\x17.pactus.WithdrawPayloadH\x00R\x08withdrawB\t\n\x07payload\"\xb1\x01\n GetRawTransferTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"\xca\x01\n\x1cGetRawBondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x04 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x05 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x07 \x01(\tR\x04memo\"~\n\x1eGetRawUnbondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x03 \x01(\tR\x10validatorAddress\x12\x12\n\x04memo\x18\x04 \x01(\tR\x04memo\"\xd3\x01\n GetRawWithdrawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"o\n\x0fTransferPayload\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"\x88\x01\n\x0b\x42ondPayload\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x04 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\"<\n\rUnbondPayload\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\"\x91\x01\n\x0fWithdrawPayload\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x02 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"D\n\x19GetRawTransactionResponse\x12\'\n\x0fraw_transaction\x18\x01 \x01(\tR\x0erawTransaction\"]\n\x0fPayloadTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"W\n\x0bPayloadBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\"B\n\x10PayloadSortition\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x14\n\x05proof\x18\x02 \x01(\tR\x05proof\"-\n\rPayloadUnbond\x12\x1c\n\tvalidator\x18\x01 \x01(\tR\tvalidator\"M\n\x0fPayloadWithdraw\x12\x12\n\x04\x66rom\x18\x01 \x01(\tR\x04\x66rom\x12\x0e\n\x02to\x18\x02 \x01(\tR\x02to\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"\xac\x04\n\x0fTransactionInfo\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x18\n\x07version\x18\x03 \x01(\x05R\x07version\x12\x1b\n\tlock_time\x18\x04 \x01(\rR\x08lockTime\x12\x14\n\x05value\x18\x05 \x01(\x03R\x05value\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x36\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12\x35\n\x08transfer\x18\x1e \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x1f \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12\x38\n\tsortition\x18 \x01(\x0b\x32\x18.pactus.PayloadSortitionH\x00R\tsortition\x12/\n\x06unbond\x18! \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\" \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdraw\x12\x12\n\x04memo\x18\x08 \x01(\tR\x04memo\x12\x1d\n\npublic_key\x18\t \x01(\tR\tpublicKey\x12\x1c\n\tsignature\x18\n \x01(\tR\tsignatureB\t\n\x07payload*\x83\x01\n\x0bPayloadType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10TRANSFER_PAYLOAD\x10\x01\x12\x10\n\x0c\x42OND_PAYLOAD\x10\x02\x12\x15\n\x11SORTITION_PAYLOAD\x10\x03\x12\x12\n\x0eUNBOND_PAYLOAD\x10\x04\x12\x14\n\x10WITHDRAW_PAYLOAD\x10\x05*B\n\x14TransactionVerbosity\x12\x14\n\x10TRANSACTION_DATA\x10\x00\x12\x14\n\x10TRANSACTION_INFO\x10\x01\x32\x82\x06\n\x0bTransaction\x12O\n\x0eGetTransaction\x12\x1d.pactus.GetTransactionRequest\x1a\x1e.pactus.GetTransactionResponse\x12I\n\x0c\x43\x61lculateFee\x12\x1b.pactus.CalculateFeeRequest\x1a\x1c.pactus.CalculateFeeResponse\x12\x61\n\x14\x42roadcastTransaction\x12#.pactus.BroadcastTransactionRequest\x1a$.pactus.BroadcastTransactionResponse\x12X\n\x11GetRawTransaction\x12 .pactus.GetRawTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawTransferTransaction\x12(.pactus.GetRawTransferTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12`\n\x15GetRawBondTransaction\x12$.pactus.GetRawBondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12\x64\n\x17GetRawUnbondTransaction\x12&.pactus.GetRawUnbondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawWithdrawTransaction\x12(.pactus.GetRawWithdrawTransactionRequest\x1a!.pactus.GetRawTransactionResponseBF\n\x12pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'transaction_pb2', globals()) @@ -21,10 +21,10 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactus' - _PAYLOADTYPE._serialized_start=3080 - _PAYLOADTYPE._serialized_end=3211 - _TRANSACTIONVERBOSITY._serialized_start=3213 - _TRANSACTIONVERBOSITY._serialized_end=3279 + _PAYLOADTYPE._serialized_start=3108 + _PAYLOADTYPE._serialized_end=3239 + _TRANSACTIONVERBOSITY._serialized_start=3241 + _TRANSACTIONVERBOSITY._serialized_end=3307 _GETTRANSACTIONREQUEST._serialized_start=29 _GETTRANSACTIONREQUEST._serialized_end=128 _GETTRANSACTIONRESPONSE._serialized_start=131 @@ -38,37 +38,37 @@ _BROADCASTTRANSACTIONRESPONSE._serialized_start=572 _BROADCASTTRANSACTIONRESPONSE._serialized_end=618 _GETRAWTRANSACTIONREQUEST._serialized_start=621 - _GETRAWTRANSACTIONREQUEST._serialized_end=897 - _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_start=900 - _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_end=1077 - _GETRAWBONDTRANSACTIONREQUEST._serialized_start=1080 - _GETRAWBONDTRANSACTIONREQUEST._serialized_end=1282 - _GETRAWUNBONDTRANSACTIONREQUEST._serialized_start=1284 - _GETRAWUNBONDTRANSACTIONREQUEST._serialized_end=1410 - _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_start=1413 - _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_end=1624 - _RAWTRANSFER._serialized_start=1626 - _RAWTRANSFER._serialized_end=1733 - _RAWBOND._serialized_start=1736 - _RAWBOND._serialized_end=1868 - _RAWUNBOND._serialized_start=1870 - _RAWUNBOND._serialized_end=1926 - _RAWWITHDRAW._serialized_start=1929 - _RAWWITHDRAW._serialized_end=2070 - _GETRAWTRANSACTIONRESPONSE._serialized_start=2072 - _GETRAWTRANSACTIONRESPONSE._serialized_end=2140 - _PAYLOADTRANSFER._serialized_start=2142 - _PAYLOADTRANSFER._serialized_end=2235 - _PAYLOADBOND._serialized_start=2237 - _PAYLOADBOND._serialized_end=2324 - _PAYLOADSORTITION._serialized_start=2326 - _PAYLOADSORTITION._serialized_end=2392 - _PAYLOADUNBOND._serialized_start=2394 - _PAYLOADUNBOND._serialized_end=2439 - _PAYLOADWITHDRAW._serialized_start=2441 - _PAYLOADWITHDRAW._serialized_end=2518 - _TRANSACTIONINFO._serialized_start=2521 - _TRANSACTIONINFO._serialized_end=3077 - _TRANSACTION._serialized_start=3282 - _TRANSACTION._serialized_end=4052 + _GETRAWTRANSACTIONREQUEST._serialized_end=909 + _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_start=912 + _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_end=1089 + _GETRAWBONDTRANSACTIONREQUEST._serialized_start=1092 + _GETRAWBONDTRANSACTIONREQUEST._serialized_end=1294 + _GETRAWUNBONDTRANSACTIONREQUEST._serialized_start=1296 + _GETRAWUNBONDTRANSACTIONREQUEST._serialized_end=1422 + _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_start=1425 + _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_end=1636 + _TRANSFERPAYLOAD._serialized_start=1638 + _TRANSFERPAYLOAD._serialized_end=1749 + _BONDPAYLOAD._serialized_start=1752 + _BONDPAYLOAD._serialized_end=1888 + _UNBONDPAYLOAD._serialized_start=1890 + _UNBONDPAYLOAD._serialized_end=1950 + _WITHDRAWPAYLOAD._serialized_start=1953 + _WITHDRAWPAYLOAD._serialized_end=2098 + _GETRAWTRANSACTIONRESPONSE._serialized_start=2100 + _GETRAWTRANSACTIONRESPONSE._serialized_end=2168 + _PAYLOADTRANSFER._serialized_start=2170 + _PAYLOADTRANSFER._serialized_end=2263 + _PAYLOADBOND._serialized_start=2265 + _PAYLOADBOND._serialized_end=2352 + _PAYLOADSORTITION._serialized_start=2354 + _PAYLOADSORTITION._serialized_end=2420 + _PAYLOADUNBOND._serialized_start=2422 + _PAYLOADUNBOND._serialized_end=2467 + _PAYLOADWITHDRAW._serialized_start=2469 + _PAYLOADWITHDRAW._serialized_end=2546 + _TRANSACTIONINFO._serialized_start=2549 + _TRANSACTIONINFO._serialized_end=3105 + _TRANSACTION._serialized_start=3310 + _TRANSACTION._serialized_end=4080 # @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/transaction_pb2.pyi b/www/grpc/gen/python/transaction_pb2.pyi index a35724cb4..ea8d9dad7 100644 --- a/www/grpc/gen/python/transaction_pb2.pyi +++ b/www/grpc/gen/python/transaction_pb2.pyi @@ -85,11 +85,11 @@ class GetRawTransactionRequest(_message.Message): WITHDRAW_FIELD_NUMBER: _ClassVar[int] lock_time: int memo: str - transfer: RawTransfer - bond: RawBond - unbond: RawUnbond - withdraw: RawWithdraw - def __init__(self, lock_time: _Optional[int] = ..., memo: _Optional[str] = ..., transfer: _Optional[_Union[RawTransfer, _Mapping]] = ..., bond: _Optional[_Union[RawBond, _Mapping]] = ..., unbond: _Optional[_Union[RawUnbond, _Mapping]] = ..., withdraw: _Optional[_Union[RawWithdraw, _Mapping]] = ...) -> None: ... + transfer: TransferPayload + bond: BondPayload + unbond: UnbondPayload + withdraw: WithdrawPayload + def __init__(self, lock_time: _Optional[int] = ..., memo: _Optional[str] = ..., transfer: _Optional[_Union[TransferPayload, _Mapping]] = ..., bond: _Optional[_Union[BondPayload, _Mapping]] = ..., unbond: _Optional[_Union[UnbondPayload, _Mapping]] = ..., withdraw: _Optional[_Union[WithdrawPayload, _Mapping]] = ...) -> None: ... class GetRawTransferTransactionRequest(_message.Message): __slots__ = ("lock_time", "sender", "receiver", "amount", "fee", "memo") @@ -151,7 +151,7 @@ class GetRawWithdrawTransactionRequest(_message.Message): memo: str def __init__(self, lock_time: _Optional[int] = ..., validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ... -class RawTransfer(_message.Message): +class TransferPayload(_message.Message): __slots__ = ("sender", "receiver", "amount", "fee") SENDER_FIELD_NUMBER: _ClassVar[int] RECEIVER_FIELD_NUMBER: _ClassVar[int] @@ -163,7 +163,7 @@ class RawTransfer(_message.Message): fee: int def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... -class RawBond(_message.Message): +class BondPayload(_message.Message): __slots__ = ("sender", "receiver", "stake", "public_key", "fee") SENDER_FIELD_NUMBER: _ClassVar[int] RECEIVER_FIELD_NUMBER: _ClassVar[int] @@ -177,13 +177,13 @@ class RawBond(_message.Message): fee: int def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ..., fee: _Optional[int] = ...) -> None: ... -class RawUnbond(_message.Message): +class UnbondPayload(_message.Message): __slots__ = ("validator_address",) VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] validator_address: str def __init__(self, validator_address: _Optional[str] = ...) -> None: ... -class RawWithdraw(_message.Message): +class WithdrawPayload(_message.Message): __slots__ = ("validator_address", "account_address", "amount", "fee") VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int] diff --git a/www/grpc/gen/rust/pactus.rs b/www/grpc/gen/rust/pactus.rs index 033108426..203691bc7 100644 --- a/www/grpc/gen/rust/pactus.rs +++ b/www/grpc/gen/rust/pactus.rs @@ -76,22 +76,22 @@ pub struct GetRawTransactionRequest { /// A memo string for the transaction. #[prost(string, tag="2")] pub memo: ::prost::alloc::string::String, - #[prost(oneof="get_raw_transaction_request::Transaction", tags="3, 4, 5, 6")] - pub transaction: ::core::option::Option, + #[prost(oneof="get_raw_transaction_request::Payload", tags="3, 4, 5, 6")] + pub payload: ::core::option::Option, } /// Nested message and enum types in `GetRawTransactionRequest`. pub mod get_raw_transaction_request { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum Transaction { + pub enum Payload { #[prost(message, tag="3")] - Transfer(super::RawTransfer), + Transfer(super::TransferPayload), #[prost(message, tag="4")] - Bond(super::RawBond), + Bond(super::BondPayload), #[prost(message, tag="5")] - Unbond(super::RawUnbond), + Unbond(super::UnbondPayload), #[prost(message, tag="6")] - Withdraw(super::RawWithdraw), + Withdraw(super::WithdrawPayload), } } /// Request message for retrieving raw details of a transfer transaction. @@ -184,10 +184,10 @@ pub struct GetRawWithdrawTransactionRequest { #[prost(string, tag="6")] pub memo: ::prost::alloc::string::String, } -/// Request message for retrieving raw details of a transfer transaction. +/// Payload message for retrieving raw details of a transfer transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RawTransfer { +pub struct TransferPayload { /// The sender's account address. #[prost(string, tag="1")] pub sender: ::prost::alloc::string::String, @@ -201,10 +201,10 @@ pub struct RawTransfer { #[prost(int64, tag="4")] pub fee: i64, } -/// Request message for retrieving raw details of a bond transaction. +/// Payload message for retrieving raw details of a bond transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RawBond { +pub struct BondPayload { /// The sender's account address. #[prost(string, tag="1")] pub sender: ::prost::alloc::string::String, @@ -221,18 +221,18 @@ pub struct RawBond { #[prost(int64, tag="5")] pub fee: i64, } -/// Request message for retrieving raw details of an unbond transaction. +/// Payload message for retrieving raw details of an unbond transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RawUnbond { +pub struct UnbondPayload { /// The address of the validator to unbond from. #[prost(string, tag="1")] pub validator_address: ::prost::alloc::string::String, } -/// Request message for retrieving raw details of a withdraw transaction. +/// Payload message for retrieving raw details of a withdraw transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct RawWithdraw { +pub struct WithdrawPayload { /// The address of the validator to withdraw from. #[prost(string, tag="1")] pub validator_address: ::prost::alloc::string::String, diff --git a/www/grpc/gen/rust/pactus.serde.rs b/www/grpc/gen/rust/pactus.serde.rs index dd312d3fb..00055c1fb 100644 --- a/www/grpc/gen/rust/pactus.serde.rs +++ b/www/grpc/gen/rust/pactus.serde.rs @@ -625,6 +625,170 @@ impl<'de> serde::Deserialize<'de> for BlockVerbosity { deserializer.deserialize_any(GeneratedVisitor) } } +impl serde::Serialize for BondPayload { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.receiver.is_empty() { + len += 1; + } + if self.stake != 0 { + len += 1; + } + if !self.public_key.is_empty() { + len += 1; + } + if self.fee != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.BondPayload", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.receiver.is_empty() { + struct_ser.serialize_field("receiver", &self.receiver)?; + } + if self.stake != 0 { + struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; + } + if !self.public_key.is_empty() { + struct_ser.serialize_field("publicKey", &self.public_key)?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for BondPayload { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", + "receiver", + "stake", + "public_key", + "publicKey", + "fee", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Receiver, + Stake, + PublicKey, + Fee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "receiver" => Ok(GeneratedField::Receiver), + "stake" => Ok(GeneratedField::Stake), + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + "fee" => Ok(GeneratedField::Fee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = BondPayload; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.BondPayload") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut receiver__ = None; + let mut stake__ = None; + let mut public_key__ = None; + let mut fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::Receiver => { + if receiver__.is_some() { + return Err(serde::de::Error::duplicate_field("receiver")); + } + receiver__ = Some(map.next_value()?); + } + GeneratedField::Stake => { + if stake__.is_some() { + return Err(serde::de::Error::duplicate_field("stake")); + } + stake__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = Some(map.next_value()?); + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(BondPayload { + sender: sender__.unwrap_or_default(), + receiver: receiver__.unwrap_or_default(), + stake: stake__.unwrap_or_default(), + public_key: public_key__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.BondPayload", FIELDS, GeneratedVisitor) + } +} impl serde::Serialize for BroadcastTransactionRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -4600,7 +4764,7 @@ impl serde::Serialize for GetRawTransactionRequest { if !self.memo.is_empty() { len += 1; } - if self.transaction.is_some() { + if self.payload.is_some() { len += 1; } let mut struct_ser = serializer.serialize_struct("pactus.GetRawTransactionRequest", len)?; @@ -4610,18 +4774,18 @@ impl serde::Serialize for GetRawTransactionRequest { if !self.memo.is_empty() { struct_ser.serialize_field("memo", &self.memo)?; } - if let Some(v) = self.transaction.as_ref() { + if let Some(v) = self.payload.as_ref() { match v { - get_raw_transaction_request::Transaction::Transfer(v) => { + get_raw_transaction_request::Payload::Transfer(v) => { struct_ser.serialize_field("transfer", v)?; } - get_raw_transaction_request::Transaction::Bond(v) => { + get_raw_transaction_request::Payload::Bond(v) => { struct_ser.serialize_field("bond", v)?; } - get_raw_transaction_request::Transaction::Unbond(v) => { + get_raw_transaction_request::Payload::Unbond(v) => { struct_ser.serialize_field("unbond", v)?; } - get_raw_transaction_request::Transaction::Withdraw(v) => { + get_raw_transaction_request::Payload::Withdraw(v) => { struct_ser.serialize_field("withdraw", v)?; } } @@ -4701,7 +4865,7 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionRequest { { let mut lock_time__ = None; let mut memo__ = None; - let mut transaction__ = None; + let mut payload__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::LockTime => { @@ -4719,31 +4883,31 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionRequest { memo__ = Some(map.next_value()?); } GeneratedField::Transfer => { - if transaction__.is_some() { + if payload__.is_some() { return Err(serde::de::Error::duplicate_field("transfer")); } - transaction__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Transaction::Transfer) + payload__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Payload::Transfer) ; } GeneratedField::Bond => { - if transaction__.is_some() { + if payload__.is_some() { return Err(serde::de::Error::duplicate_field("bond")); } - transaction__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Transaction::Bond) + payload__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Payload::Bond) ; } GeneratedField::Unbond => { - if transaction__.is_some() { + if payload__.is_some() { return Err(serde::de::Error::duplicate_field("unbond")); } - transaction__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Transaction::Unbond) + payload__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Payload::Unbond) ; } GeneratedField::Withdraw => { - if transaction__.is_some() { + if payload__.is_some() { return Err(serde::de::Error::duplicate_field("withdraw")); } - transaction__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Transaction::Withdraw) + payload__ = map.next_value::<::std::option::Option<_>>()?.map(get_raw_transaction_request::Payload::Withdraw) ; } } @@ -4751,7 +4915,7 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionRequest { Ok(GetRawTransactionRequest { lock_time: lock_time__.unwrap_or_default(), memo: memo__.unwrap_or_default(), - transaction: transaction__, + payload: payload__, }) } } @@ -8213,7 +8377,7 @@ impl<'de> serde::Deserialize<'de> for Proposal { deserializer.deserialize_struct("pactus.Proposal", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for RawBond { +impl serde::Serialize for RestoreWalletRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where @@ -8221,62 +8385,46 @@ impl serde::Serialize for RawBond { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.receiver.is_empty() { - len += 1; - } - if self.stake != 0 { + if !self.wallet_name.is_empty() { len += 1; } - if !self.public_key.is_empty() { + if !self.mnemonic.is_empty() { len += 1; } - if self.fee != 0 { + if !self.password.is_empty() { len += 1; } - let mut struct_ser = serializer.serialize_struct("pactus.RawBond", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.receiver.is_empty() { - struct_ser.serialize_field("receiver", &self.receiver)?; - } - if self.stake != 0 { - struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; + let mut struct_ser = serializer.serialize_struct("pactus.RestoreWalletRequest", len)?; + if !self.wallet_name.is_empty() { + struct_ser.serialize_field("walletName", &self.wallet_name)?; } - if !self.public_key.is_empty() { - struct_ser.serialize_field("publicKey", &self.public_key)?; + if !self.mnemonic.is_empty() { + struct_ser.serialize_field("mnemonic", &self.mnemonic)?; } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + if !self.password.is_empty() { + struct_ser.serialize_field("password", &self.password)?; } struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for RawBond { +impl<'de> serde::Deserialize<'de> for RestoreWalletRequest { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "sender", - "receiver", - "stake", - "public_key", - "publicKey", - "fee", + "wallet_name", + "walletName", + "mnemonic", + "password", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - Sender, - Receiver, - Stake, - PublicKey, - Fee, + WalletName, + Mnemonic, + Password, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -8298,11 +8446,9 @@ impl<'de> serde::Deserialize<'de> for RawBond { E: serde::de::Error, { match value { - "sender" => Ok(GeneratedField::Sender), - "receiver" => Ok(GeneratedField::Receiver), - "stake" => Ok(GeneratedField::Stake), - "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - "fee" => Ok(GeneratedField::Fee), + "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), + "mnemonic" => Ok(GeneratedField::Mnemonic), + "password" => Ok(GeneratedField::Password), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -8312,562 +8458,30 @@ impl<'de> serde::Deserialize<'de> for RawBond { } struct GeneratedVisitor; impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RawBond; + type Value = RestoreWalletRequest; fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.RawBond") + formatter.write_str("struct pactus.RestoreWalletRequest") } - fn visit_map(self, mut map: V) -> std::result::Result + fn visit_map(self, mut map: V) -> std::result::Result where V: serde::de::MapAccess<'de>, { - let mut sender__ = None; - let mut receiver__ = None; - let mut stake__ = None; - let mut public_key__ = None; - let mut fee__ = None; + let mut wallet_name__ = None; + let mut mnemonic__ = None; + let mut password__ = None; while let Some(k) = map.next_key()? { match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); + GeneratedField::WalletName => { + if wallet_name__.is_some() { + return Err(serde::de::Error::duplicate_field("walletName")); } - sender__ = Some(map.next_value()?); + wallet_name__ = Some(map.next_value()?); } - GeneratedField::Receiver => { - if receiver__.is_some() { - return Err(serde::de::Error::duplicate_field("receiver")); - } - receiver__ = Some(map.next_value()?); - } - GeneratedField::Stake => { - if stake__.is_some() { - return Err(serde::de::Error::duplicate_field("stake")); - } - stake__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::PublicKey => { - if public_key__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKey")); - } - public_key__ = Some(map.next_value()?); - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(RawBond { - sender: sender__.unwrap_or_default(), - receiver: receiver__.unwrap_or_default(), - stake: stake__.unwrap_or_default(), - public_key: public_key__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.RawBond", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for RawTransfer { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.receiver.is_empty() { - len += 1; - } - if self.amount != 0 { - len += 1; - } - if self.fee != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.RawTransfer", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.receiver.is_empty() { - struct_ser.serialize_field("receiver", &self.receiver)?; - } - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RawTransfer { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sender", - "receiver", - "amount", - "fee", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Receiver, - Amount, - Fee, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sender" => Ok(GeneratedField::Sender), - "receiver" => Ok(GeneratedField::Receiver), - "amount" => Ok(GeneratedField::Amount), - "fee" => Ok(GeneratedField::Fee), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RawTransfer; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.RawTransfer") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sender__ = None; - let mut receiver__ = None; - let mut amount__ = None; - let mut fee__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map.next_value()?); - } - GeneratedField::Receiver => { - if receiver__.is_some() { - return Err(serde::de::Error::duplicate_field("receiver")); - } - receiver__ = Some(map.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(RawTransfer { - sender: sender__.unwrap_or_default(), - receiver: receiver__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.RawTransfer", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for RawUnbond { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.validator_address.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.RawUnbond", len)?; - if !self.validator_address.is_empty() { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RawUnbond { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator_address", - "validatorAddress", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ValidatorAddress, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RawUnbond; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.RawUnbond") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator_address__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map.next_value()?); - } - } - } - Ok(RawUnbond { - validator_address: validator_address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.RawUnbond", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for RawWithdraw { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.validator_address.is_empty() { - len += 1; - } - if !self.account_address.is_empty() { - len += 1; - } - if self.amount != 0 { - len += 1; - } - if self.fee != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.RawWithdraw", len)?; - if !self.validator_address.is_empty() { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if !self.account_address.is_empty() { - struct_ser.serialize_field("accountAddress", &self.account_address)?; - } - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RawWithdraw { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator_address", - "validatorAddress", - "account_address", - "accountAddress", - "amount", - "fee", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ValidatorAddress, - AccountAddress, - Amount, - Fee, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "accountAddress" | "account_address" => Ok(GeneratedField::AccountAddress), - "amount" => Ok(GeneratedField::Amount), - "fee" => Ok(GeneratedField::Fee), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RawWithdraw; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.RawWithdraw") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator_address__ = None; - let mut account_address__ = None; - let mut amount__ = None; - let mut fee__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map.next_value()?); - } - GeneratedField::AccountAddress => { - if account_address__.is_some() { - return Err(serde::de::Error::duplicate_field("accountAddress")); - } - account_address__ = Some(map.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(RawWithdraw { - validator_address: validator_address__.unwrap_or_default(), - account_address: account_address__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.RawWithdraw", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for RestoreWalletRequest { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.wallet_name.is_empty() { - len += 1; - } - if !self.mnemonic.is_empty() { - len += 1; - } - if !self.password.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.RestoreWalletRequest", len)?; - if !self.wallet_name.is_empty() { - struct_ser.serialize_field("walletName", &self.wallet_name)?; - } - if !self.mnemonic.is_empty() { - struct_ser.serialize_field("mnemonic", &self.mnemonic)?; - } - if !self.password.is_empty() { - struct_ser.serialize_field("password", &self.password)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for RestoreWalletRequest { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "wallet_name", - "walletName", - "mnemonic", - "password", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - WalletName, - Mnemonic, - Password, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "walletName" | "wallet_name" => Ok(GeneratedField::WalletName), - "mnemonic" => Ok(GeneratedField::Mnemonic), - "password" => Ok(GeneratedField::Password), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = RestoreWalletRequest; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.RestoreWalletRequest") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut wallet_name__ = None; - let mut mnemonic__ = None; - let mut password__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::WalletName => { - if wallet_name__.is_some() { - return Err(serde::de::Error::duplicate_field("walletName")); - } - wallet_name__ = Some(map.next_value()?); - } - GeneratedField::Mnemonic => { - if mnemonic__.is_some() { - return Err(serde::de::Error::duplicate_field("mnemonic")); + GeneratedField::Mnemonic => { + if mnemonic__.is_some() { + return Err(serde::de::Error::duplicate_field("mnemonic")); } mnemonic__ = Some(map.next_value()?); } @@ -9965,95 +9579,333 @@ impl<'de> serde::Deserialize<'de> for TransactionInfo { } } } - Ok(TransactionInfo { - id: id__.unwrap_or_default(), - data: data__.unwrap_or_default(), - version: version__.unwrap_or_default(), - lock_time: lock_time__.unwrap_or_default(), - value: value__.unwrap_or_default(), + Ok(TransactionInfo { + id: id__.unwrap_or_default(), + data: data__.unwrap_or_default(), + version: version__.unwrap_or_default(), + lock_time: lock_time__.unwrap_or_default(), + value: value__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + payload_type: payload_type__.unwrap_or_default(), + memo: memo__.unwrap_or_default(), + public_key: public_key__.unwrap_or_default(), + signature: signature__.unwrap_or_default(), + payload: payload__, + }) + } + } + deserializer.deserialize_struct("pactus.TransactionInfo", FIELDS, GeneratedVisitor) + } +} +impl serde::Serialize for TransactionVerbosity { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + let variant = match self { + Self::TransactionData => "TRANSACTION_DATA", + Self::TransactionInfo => "TRANSACTION_INFO", + }; + serializer.serialize_str(variant) + } +} +impl<'de> serde::Deserialize<'de> for TransactionVerbosity { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "TRANSACTION_DATA", + "TRANSACTION_INFO", + ]; + + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TransactionVerbosity; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + fn visit_i64(self, v: i64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(TransactionVerbosity::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) + }) + } + + fn visit_u64(self, v: u64) -> std::result::Result + where + E: serde::de::Error, + { + use std::convert::TryFrom; + i32::try_from(v) + .ok() + .and_then(TransactionVerbosity::from_i32) + .ok_or_else(|| { + serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) + }) + } + + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "TRANSACTION_DATA" => Ok(TransactionVerbosity::TransactionData), + "TRANSACTION_INFO" => Ok(TransactionVerbosity::TransactionInfo), + _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + } + } + } + deserializer.deserialize_any(GeneratedVisitor) + } +} +impl serde::Serialize for TransferPayload { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.sender.is_empty() { + len += 1; + } + if !self.receiver.is_empty() { + len += 1; + } + if self.amount != 0 { + len += 1; + } + if self.fee != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.TransferPayload", len)?; + if !self.sender.is_empty() { + struct_ser.serialize_field("sender", &self.sender)?; + } + if !self.receiver.is_empty() { + struct_ser.serialize_field("receiver", &self.receiver)?; + } + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for TransferPayload { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "sender", + "receiver", + "amount", + "fee", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + Sender, + Receiver, + Amount, + Fee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "sender" => Ok(GeneratedField::Sender), + "receiver" => Ok(GeneratedField::Receiver), + "amount" => Ok(GeneratedField::Amount), + "fee" => Ok(GeneratedField::Fee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = TransferPayload; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.TransferPayload") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut sender__ = None; + let mut receiver__ = None; + let mut amount__ = None; + let mut fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::Sender => { + if sender__.is_some() { + return Err(serde::de::Error::duplicate_field("sender")); + } + sender__ = Some(map.next_value()?); + } + GeneratedField::Receiver => { + if receiver__.is_some() { + return Err(serde::de::Error::duplicate_field("receiver")); + } + receiver__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(TransferPayload { + sender: sender__.unwrap_or_default(), + receiver: receiver__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), fee: fee__.unwrap_or_default(), - payload_type: payload_type__.unwrap_or_default(), - memo: memo__.unwrap_or_default(), - public_key: public_key__.unwrap_or_default(), - signature: signature__.unwrap_or_default(), - payload: payload__, }) } } - deserializer.deserialize_struct("pactus.TransactionInfo", FIELDS, GeneratedVisitor) + deserializer.deserialize_struct("pactus.TransferPayload", FIELDS, GeneratedVisitor) } } -impl serde::Serialize for TransactionVerbosity { +impl serde::Serialize for UnbondPayload { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result where S: serde::Serializer, { - let variant = match self { - Self::TransactionData => "TRANSACTION_DATA", - Self::TransactionInfo => "TRANSACTION_INFO", - }; - serializer.serialize_str(variant) + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.UnbondPayload", len)?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + struct_ser.end() } } -impl<'de> serde::Deserialize<'de> for TransactionVerbosity { +impl<'de> serde::Deserialize<'de> for UnbondPayload { #[allow(deprecated)] fn deserialize(deserializer: D) -> std::result::Result where D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "TRANSACTION_DATA", - "TRANSACTION_INFO", + "validator_address", + "validatorAddress", ]; - struct GeneratedVisitor; + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = TransactionVerbosity; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } - fn visit_i64(self, v: i64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(TransactionVerbosity::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self) - }) + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = UnbondPayload; - fn visit_u64(self, v: u64) -> std::result::Result - where - E: serde::de::Error, - { - use std::convert::TryFrom; - i32::try_from(v) - .ok() - .and_then(TransactionVerbosity::from_i32) - .ok_or_else(|| { - serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self) - }) + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.UnbondPayload") } - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, { - match value { - "TRANSACTION_DATA" => Ok(TransactionVerbosity::TransactionData), - "TRANSACTION_INFO" => Ok(TransactionVerbosity::TransactionInfo), - _ => Err(serde::de::Error::unknown_variant(value, FIELDS)), + let mut validator_address__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + } } + Ok(UnbondPayload { + validator_address: validator_address__.unwrap_or_default(), + }) } } - deserializer.deserialize_any(GeneratedVisitor) + deserializer.deserialize_struct("pactus.UnbondPayload", FIELDS, GeneratedVisitor) } } impl serde::Serialize for UnloadWalletRequest { @@ -10985,3 +10837,151 @@ impl<'de> serde::Deserialize<'de> for VoteType { deserializer.deserialize_any(GeneratedVisitor) } } +impl serde::Serialize for WithdrawPayload { + #[allow(deprecated)] + fn serialize(&self, serializer: S) -> std::result::Result + where + S: serde::Serializer, + { + use serde::ser::SerializeStruct; + let mut len = 0; + if !self.validator_address.is_empty() { + len += 1; + } + if !self.account_address.is_empty() { + len += 1; + } + if self.amount != 0 { + len += 1; + } + if self.fee != 0 { + len += 1; + } + let mut struct_ser = serializer.serialize_struct("pactus.WithdrawPayload", len)?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; + } + if !self.account_address.is_empty() { + struct_ser.serialize_field("accountAddress", &self.account_address)?; + } + if self.amount != 0 { + struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } + struct_ser.end() + } +} +impl<'de> serde::Deserialize<'de> for WithdrawPayload { + #[allow(deprecated)] + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + const FIELDS: &[&str] = &[ + "validator_address", + "validatorAddress", + "account_address", + "accountAddress", + "amount", + "fee", + ]; + + #[allow(clippy::enum_variant_names)] + enum GeneratedField { + ValidatorAddress, + AccountAddress, + Amount, + Fee, + } + impl<'de> serde::Deserialize<'de> for GeneratedField { + fn deserialize(deserializer: D) -> std::result::Result + where + D: serde::Deserializer<'de>, + { + struct GeneratedVisitor; + + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = GeneratedField; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(formatter, "expected one of: {:?}", &FIELDS) + } + + #[allow(unused_variables)] + fn visit_str(self, value: &str) -> std::result::Result + where + E: serde::de::Error, + { + match value { + "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), + "accountAddress" | "account_address" => Ok(GeneratedField::AccountAddress), + "amount" => Ok(GeneratedField::Amount), + "fee" => Ok(GeneratedField::Fee), + _ => Err(serde::de::Error::unknown_field(value, FIELDS)), + } + } + } + deserializer.deserialize_identifier(GeneratedVisitor) + } + } + struct GeneratedVisitor; + impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { + type Value = WithdrawPayload; + + fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + formatter.write_str("struct pactus.WithdrawPayload") + } + + fn visit_map(self, mut map: V) -> std::result::Result + where + V: serde::de::MapAccess<'de>, + { + let mut validator_address__ = None; + let mut account_address__ = None; + let mut amount__ = None; + let mut fee__ = None; + while let Some(k) = map.next_key()? { + match k { + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); + } + validator_address__ = Some(map.next_value()?); + } + GeneratedField::AccountAddress => { + if account_address__.is_some() { + return Err(serde::de::Error::duplicate_field("accountAddress")); + } + account_address__ = Some(map.next_value()?); + } + GeneratedField::Amount => { + if amount__.is_some() { + return Err(serde::de::Error::duplicate_field("amount")); + } + amount__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } + } + } + Ok(WithdrawPayload { + validator_address: validator_address__.unwrap_or_default(), + account_address: account_address__.unwrap_or_default(), + amount: amount__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), + }) + } + } + deserializer.deserialize_struct("pactus.WithdrawPayload", FIELDS, GeneratedVisitor) + } +} diff --git a/www/grpc/proto/transaction.proto b/www/grpc/proto/transaction.proto index e3855870c..904f9338d 100644 --- a/www/grpc/proto/transaction.proto +++ b/www/grpc/proto/transaction.proto @@ -95,11 +95,11 @@ message GetRawTransactionRequest { // A memo string for the transaction. string memo = 2; - oneof transaction { - RawTransfer transfer = 3; - RawBond bond = 4; - RawUnbond unbond = 5; - RawWithdraw withdraw = 6; + oneof payload { + TransferPayload transfer = 3; + BondPayload bond = 4; + UnbondPayload unbond = 5; + WithdrawPayload withdraw = 6; } } @@ -167,8 +167,8 @@ message GetRawWithdrawTransactionRequest { string memo = 6; } -// Request message for retrieving raw details of a transfer transaction. -message RawTransfer { +// Payload message for retrieving raw details of a transfer transaction. +message TransferPayload { // The sender's account address. string sender = 1; // The receiver's account address. @@ -179,8 +179,8 @@ message RawTransfer { int64 fee = 4; } -// Request message for retrieving raw details of a bond transaction. -message RawBond { +// Payload message for retrieving raw details of a bond transaction. +message BondPayload { // The sender's account address. string sender = 1; // The receiver's validator address. @@ -193,14 +193,14 @@ message RawBond { int64 fee = 5; } -// Request message for retrieving raw details of an unbond transaction. -message RawUnbond { +// Payload message for retrieving raw details of an unbond transaction. +message UnbondPayload { // The address of the validator to unbond from. string validator_address = 1; } -// Request message for retrieving raw details of a withdraw transaction. -message RawWithdraw { +// Payload message for retrieving raw details of a withdraw transaction. +message WithdrawPayload { // The address of the validator to withdraw from. string validator_address = 1; // The address of the account to withdraw to. diff --git a/www/grpc/swagger-ui/pactus.swagger.json b/www/grpc/swagger-ui/pactus.swagger.json index 9eb7952b0..37c5aba75 100644 --- a/www/grpc/swagger-ui/pactus.swagger.json +++ b/www/grpc/swagger-ui/pactus.swagger.json @@ -1256,6 +1256,34 @@ "default": "BLOCK_DATA", "description": "Enumeration for verbosity levels when requesting block information.\n\n - BLOCK_DATA: Request only block data.\n - BLOCK_INFO: Request block information and transaction IDs.\n - BLOCK_TRANSACTIONS: Request block information and detailed transaction data." }, + "pactusBondPayload": { + "type": "object", + "properties": { + "sender": { + "type": "string", + "description": "The sender's account address." + }, + "receiver": { + "type": "string", + "description": "The receiver's validator address." + }, + "stake": { + "type": "string", + "format": "int64", + "description": "The stake amount in NanoPAC. Must be greater than 0." + }, + "publicKey": { + "type": "string", + "description": "The public key of the validator." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." + } + }, + "description": "Payload message for retrieving raw details of a bond transaction." + }, "pactusBroadcastTransactionResponse": { "type": "object", "properties": { @@ -2032,92 +2060,6 @@ }, "description": "Message containing information about a proposal." }, - "pactusRawBond": { - "type": "object", - "properties": { - "sender": { - "type": "string", - "description": "The sender's account address." - }, - "receiver": { - "type": "string", - "description": "The receiver's validator address." - }, - "stake": { - "type": "string", - "format": "int64", - "description": "The stake amount in NanoPAC. Must be greater than 0." - }, - "publicKey": { - "type": "string", - "description": "The public key of the validator." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." - } - }, - "description": "Request message for retrieving raw details of a bond transaction." - }, - "pactusRawTransfer": { - "type": "object", - "properties": { - "sender": { - "type": "string", - "description": "The sender's account address." - }, - "receiver": { - "type": "string", - "description": "The receiver's account address." - }, - "amount": { - "type": "string", - "format": "int64", - "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." - } - }, - "description": "Request message for retrieving raw details of a transfer transaction." - }, - "pactusRawUnbond": { - "type": "object", - "properties": { - "validatorAddress": { - "type": "string", - "description": "The address of the validator to unbond from." - } - }, - "description": "Request message for retrieving raw details of an unbond transaction." - }, - "pactusRawWithdraw": { - "type": "object", - "properties": { - "validatorAddress": { - "type": "string", - "description": "The address of the validator to withdraw from." - }, - "accountAddress": { - "type": "string", - "description": "The address of the account to withdraw to." - }, - "amount": { - "type": "string", - "format": "int64", - "description": "The withdrawal amount in NanoPAC. Must be greater than 0." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." - } - }, - "description": "Request message for retrieving raw details of a withdraw transaction." - }, "pactusRestoreWalletResponse": { "type": "object", "properties": { @@ -2241,6 +2183,40 @@ "default": "TRANSACTION_DATA", "description": "Enumeration for verbosity levels when requesting transaction details.\n\n - TRANSACTION_DATA: Request transaction data only.\n - TRANSACTION_INFO: Request detailed transaction information." }, + "pactusTransferPayload": { + "type": "object", + "properties": { + "sender": { + "type": "string", + "description": "The sender's account address." + }, + "receiver": { + "type": "string", + "description": "The receiver's account address." + }, + "amount": { + "type": "string", + "format": "int64", + "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." + } + }, + "description": "Payload message for retrieving raw details of a transfer transaction." + }, + "pactusUnbondPayload": { + "type": "object", + "properties": { + "validatorAddress": { + "type": "string", + "description": "The address of the validator to unbond from." + } + }, + "description": "Payload message for retrieving raw details of an unbond transaction." + }, "pactusUnloadWalletResponse": { "type": "object", "properties": { @@ -2357,6 +2333,30 @@ "default": "VOTE_UNKNOWN", "description": "Enumeration for types of votes.\n\n - VOTE_UNKNOWN: Unknown vote type.\n - VOTE_PREPARE: Prepare vote type.\n - VOTE_PRECOMMIT: Precommit vote type.\n - VOTE_CHANGE_PROPOSER: Change proposer vote type." }, + "pactusWithdrawPayload": { + "type": "object", + "properties": { + "validatorAddress": { + "type": "string", + "description": "The address of the validator to withdraw from." + }, + "accountAddress": { + "type": "string", + "description": "The address of the account to withdraw to." + }, + "amount": { + "type": "string", + "format": "int64", + "description": "The withdrawal amount in NanoPAC. Must be greater than 0." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." + } + }, + "description": "Payload message for retrieving raw details of a withdraw transaction." + }, "protobufAny": { "type": "object", "properties": { diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index 0c42c8b48..7085830e1 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -109,7 +109,7 @@ func (s *transactionServer) GetRawTransaction(_ context.Context, ) (*pactus.GetRawTransactionResponse, error) { lockTime := s.getLockTime(req.LockTime) - switch r := req.Transaction.(type) { + switch r := req.Payload.(type) { case *pactus.GetRawTransactionRequest_Transfer: raw, err := s.handleRawTransfer(r, lockTime, req.Memo) diff --git a/www/grpc/transaction_test.go b/www/grpc/transaction_test.go index be85f17e8..3493c8c9c 100644 --- a/www/grpc/transaction_test.go +++ b/www/grpc/transaction_test.go @@ -130,8 +130,8 @@ func TestGetRawTransaction(t *testing.T) { amt := td.RandAmount() res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ - Transaction: &pactus.GetRawTransactionRequest_Transfer{ - Transfer: &pactus.RawTransfer{ + Payload: &pactus.GetRawTransactionRequest_Transfer{ + Transfer: &pactus.TransferPayload{ Sender: td.RandAccAddress().String(), Receiver: td.RandAccAddress().String(), Amount: amt.ToNanoPAC(), @@ -158,8 +158,8 @@ func TestGetRawTransaction(t *testing.T) { res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ - Transaction: &pactus.GetRawTransactionRequest_Bond{ - Bond: &pactus.RawBond{ + Payload: &pactus.GetRawTransactionRequest_Bond{ + Bond: &pactus.BondPayload{ Sender: td.RandAccAddress().String(), Receiver: td.RandValAddress().String(), Stake: amt.ToNanoPAC(), @@ -184,8 +184,8 @@ func TestGetRawTransaction(t *testing.T) { t.Run("Unbond", func(t *testing.T) { res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ - Transaction: &pactus.GetRawTransactionRequest_Unbond{ - Unbond: &pactus.RawUnbond{ + Payload: &pactus.GetRawTransactionRequest_Unbond{ + Unbond: &pactus.UnbondPayload{ ValidatorAddress: td.RandValAddress().String(), }, }, @@ -207,8 +207,8 @@ func TestGetRawTransaction(t *testing.T) { amt := td.RandAmount() res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ - Transaction: &pactus.GetRawTransactionRequest_Withdraw{ - Withdraw: &pactus.RawWithdraw{ + Payload: &pactus.GetRawTransactionRequest_Withdraw{ + Withdraw: &pactus.WithdrawPayload{ ValidatorAddress: td.RandValAddress().String(), AccountAddress: td.RandAccAddress().String(), Amount: amt.ToNanoPAC(), From 74139a461686d42274c185103a909afaa94836f1 Mon Sep 17 00:00:00 2001 From: Javad Date: Mon, 16 Sep 2024 08:46:07 +0330 Subject: [PATCH 10/17] fix: shell message link address --- cmd/shell/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/shell/main.go b/cmd/shell/main.go index e5461ea94..ed858be9c 100644 --- a/cmd/shell/main.go +++ b/cmd/shell/main.go @@ -59,7 +59,7 @@ func main() { sh.PreRun = func(_ *cobra.Command, _ []string) { cls() - cmd.PrintInfoMsgf("Welcome to PactusBlockchain shell\n\n- Home: https//pactus.org\n- " + + cmd.PrintInfoMsgf("Welcome to PactusBlockchain shell\n\n- Home: https://pactus.org\n- " + "Docs: https://docs.pactus.org") cmd.PrintLine() _prefix = fmt.Sprintf("pactus@%s > ", serverAddr) From 1f23ac3d2852e043a303f46657c125604b855ffb Mon Sep 17 00:00:00 2001 From: Javad Date: Sun, 22 Sep 2024 10:38:46 +0330 Subject: [PATCH 11/17] fix: remove duplicate payload for get raw transaction --- www/grpc/gen/dart/transaction.pb.dart | 456 +- www/grpc/gen/dart/transaction.pbjson.dart | 78 +- www/grpc/gen/docs/grpc.md | 116 +- www/grpc/gen/docs/json-rpc.md | 108 +- www/grpc/gen/go/transaction.cobra.pb.go | 26 +- www/grpc/gen/go/transaction.pb.go | 822 +-- .../transaction/TransactionOuterClass.java | 5042 +++-------------- www/grpc/gen/js/transaction_pb.js | 1182 +--- www/grpc/gen/python/transaction_pb2.py | 50 +- www/grpc/gen/python/transaction_pb2.pyi | 77 +- www/grpc/gen/rust/pactus.rs | 98 +- www/grpc/gen/rust/pactus.serde.rs | 675 +-- www/grpc/proto/transaction.proto | 76 +- www/grpc/swagger-ui/pactus.swagger.json | 129 +- www/grpc/transaction.go | 8 +- www/grpc/transaction_test.go | 10 +- www/http/transaction.go | 4 +- 17 files changed, 1886 insertions(+), 7071 deletions(-) diff --git a/www/grpc/gen/dart/transaction.pb.dart b/www/grpc/gen/dart/transaction.pb.dart index fedddc6bd..c0297be3c 100644 --- a/www/grpc/gen/dart/transaction.pb.dart +++ b/www/grpc/gen/dart/transaction.pb.dart @@ -403,10 +403,10 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { ..oo(0, [3, 4, 5, 6]) ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') - ..aOM(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: TransferPayload.create) - ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: BondPayload.create) - ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: UnbondPayload.create) - ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: WithdrawPayload.create) + ..aOM(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: PayloadTransfer.create) + ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: PayloadBond.create) + ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: PayloadUnbond.create) + ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: PayloadWithdraw.create) ..hasRequiredFields = false ; @@ -414,10 +414,10 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { factory GetRawTransactionRequest({ $core.int? lockTime, $core.String? memo, - TransferPayload? transfer, - BondPayload? bond, - UnbondPayload? unbond, - WithdrawPayload? withdraw, + PayloadTransfer? transfer, + PayloadBond? bond, + PayloadUnbond? unbond, + PayloadWithdraw? withdraw, }) { final _result = create(); if (lockTime != null) { @@ -483,48 +483,48 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { void clearMemo() => clearField(2); @$pb.TagNumber(3) - TransferPayload get transfer => $_getN(2); + PayloadTransfer get transfer => $_getN(2); @$pb.TagNumber(3) - set transfer(TransferPayload v) { setField(3, v); } + set transfer(PayloadTransfer v) { setField(3, v); } @$pb.TagNumber(3) $core.bool hasTransfer() => $_has(2); @$pb.TagNumber(3) void clearTransfer() => clearField(3); @$pb.TagNumber(3) - TransferPayload ensureTransfer() => $_ensure(2); + PayloadTransfer ensureTransfer() => $_ensure(2); @$pb.TagNumber(4) - BondPayload get bond => $_getN(3); + PayloadBond get bond => $_getN(3); @$pb.TagNumber(4) - set bond(BondPayload v) { setField(4, v); } + set bond(PayloadBond v) { setField(4, v); } @$pb.TagNumber(4) $core.bool hasBond() => $_has(3); @$pb.TagNumber(4) void clearBond() => clearField(4); @$pb.TagNumber(4) - BondPayload ensureBond() => $_ensure(3); + PayloadBond ensureBond() => $_ensure(3); @$pb.TagNumber(5) - UnbondPayload get unbond => $_getN(4); + PayloadUnbond get unbond => $_getN(4); @$pb.TagNumber(5) - set unbond(UnbondPayload v) { setField(5, v); } + set unbond(PayloadUnbond v) { setField(5, v); } @$pb.TagNumber(5) $core.bool hasUnbond() => $_has(4); @$pb.TagNumber(5) void clearUnbond() => clearField(5); @$pb.TagNumber(5) - UnbondPayload ensureUnbond() => $_ensure(4); + PayloadUnbond ensureUnbond() => $_ensure(4); @$pb.TagNumber(6) - WithdrawPayload get withdraw => $_getN(5); + PayloadWithdraw get withdraw => $_getN(5); @$pb.TagNumber(6) - set withdraw(WithdrawPayload v) { setField(6, v); } + set withdraw(PayloadWithdraw v) { setField(6, v); } @$pb.TagNumber(6) $core.bool hasWithdraw() => $_has(5); @$pb.TagNumber(6) void clearWithdraw() => clearField(6); @$pb.TagNumber(6) - WithdrawPayload ensureWithdraw() => $_ensure(5); + PayloadWithdraw ensureWithdraw() => $_ensure(5); } class GetRawTransferTransactionRequest extends $pb.GeneratedMessage { @@ -967,334 +967,6 @@ class GetRawWithdrawTransactionRequest extends $pb.GeneratedMessage { void clearMemo() => clearField(6); } -class TransferPayload extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'TransferPayload', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') - ..hasRequiredFields = false - ; - - TransferPayload._() : super(); - factory TransferPayload({ - $core.String? sender, - $core.String? receiver, - $fixnum.Int64? amount, - $fixnum.Int64? fee, - }) { - final _result = create(); - if (sender != null) { - _result.sender = sender; - } - if (receiver != null) { - _result.receiver = receiver; - } - if (amount != null) { - _result.amount = amount; - } - if (fee != null) { - _result.fee = fee; - } - return _result; - } - factory TransferPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory TransferPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - TransferPayload clone() => TransferPayload()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - TransferPayload copyWith(void Function(TransferPayload) updates) => super.copyWith((message) => updates(message as TransferPayload)) as TransferPayload; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static TransferPayload create() => TransferPayload._(); - TransferPayload createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static TransferPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static TransferPayload? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get sender => $_getSZ(0); - @$pb.TagNumber(1) - set sender($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasSender() => $_has(0); - @$pb.TagNumber(1) - void clearSender() => clearField(1); - - @$pb.TagNumber(2) - $core.String get receiver => $_getSZ(1); - @$pb.TagNumber(2) - set receiver($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasReceiver() => $_has(1); - @$pb.TagNumber(2) - void clearReceiver() => clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get amount => $_getI64(2); - @$pb.TagNumber(3) - set amount($fixnum.Int64 v) { $_setInt64(2, v); } - @$pb.TagNumber(3) - $core.bool hasAmount() => $_has(2); - @$pb.TagNumber(3) - void clearAmount() => clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get fee => $_getI64(3); - @$pb.TagNumber(4) - set fee($fixnum.Int64 v) { $_setInt64(3, v); } - @$pb.TagNumber(4) - $core.bool hasFee() => $_has(3); - @$pb.TagNumber(4) - void clearFee() => clearField(4); -} - -class BondPayload extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'BondPayload', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') - ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') - ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') - ..hasRequiredFields = false - ; - - BondPayload._() : super(); - factory BondPayload({ - $core.String? sender, - $core.String? receiver, - $fixnum.Int64? stake, - $core.String? publicKey, - $fixnum.Int64? fee, - }) { - final _result = create(); - if (sender != null) { - _result.sender = sender; - } - if (receiver != null) { - _result.receiver = receiver; - } - if (stake != null) { - _result.stake = stake; - } - if (publicKey != null) { - _result.publicKey = publicKey; - } - if (fee != null) { - _result.fee = fee; - } - return _result; - } - factory BondPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory BondPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - BondPayload clone() => BondPayload()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - BondPayload copyWith(void Function(BondPayload) updates) => super.copyWith((message) => updates(message as BondPayload)) as BondPayload; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static BondPayload create() => BondPayload._(); - BondPayload createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static BondPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static BondPayload? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get sender => $_getSZ(0); - @$pb.TagNumber(1) - set sender($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasSender() => $_has(0); - @$pb.TagNumber(1) - void clearSender() => clearField(1); - - @$pb.TagNumber(2) - $core.String get receiver => $_getSZ(1); - @$pb.TagNumber(2) - set receiver($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasReceiver() => $_has(1); - @$pb.TagNumber(2) - void clearReceiver() => clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get stake => $_getI64(2); - @$pb.TagNumber(3) - set stake($fixnum.Int64 v) { $_setInt64(2, v); } - @$pb.TagNumber(3) - $core.bool hasStake() => $_has(2); - @$pb.TagNumber(3) - void clearStake() => clearField(3); - - @$pb.TagNumber(4) - $core.String get publicKey => $_getSZ(3); - @$pb.TagNumber(4) - set publicKey($core.String v) { $_setString(3, v); } - @$pb.TagNumber(4) - $core.bool hasPublicKey() => $_has(3); - @$pb.TagNumber(4) - void clearPublicKey() => clearField(4); - - @$pb.TagNumber(5) - $fixnum.Int64 get fee => $_getI64(4); - @$pb.TagNumber(5) - set fee($fixnum.Int64 v) { $_setInt64(4, v); } - @$pb.TagNumber(5) - $core.bool hasFee() => $_has(4); - @$pb.TagNumber(5) - void clearFee() => clearField(5); -} - -class UnbondPayload extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UnbondPayload', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') - ..hasRequiredFields = false - ; - - UnbondPayload._() : super(); - factory UnbondPayload({ - $core.String? validatorAddress, - }) { - final _result = create(); - if (validatorAddress != null) { - _result.validatorAddress = validatorAddress; - } - return _result; - } - factory UnbondPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory UnbondPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - UnbondPayload clone() => UnbondPayload()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - UnbondPayload copyWith(void Function(UnbondPayload) updates) => super.copyWith((message) => updates(message as UnbondPayload)) as UnbondPayload; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static UnbondPayload create() => UnbondPayload._(); - UnbondPayload createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static UnbondPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static UnbondPayload? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get validatorAddress => $_getSZ(0); - @$pb.TagNumber(1) - set validatorAddress($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasValidatorAddress() => $_has(0); - @$pb.TagNumber(1) - void clearValidatorAddress() => clearField(1); -} - -class WithdrawPayload extends $pb.GeneratedMessage { - static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'WithdrawPayload', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'accountAddress') - ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') - ..hasRequiredFields = false - ; - - WithdrawPayload._() : super(); - factory WithdrawPayload({ - $core.String? validatorAddress, - $core.String? accountAddress, - $fixnum.Int64? amount, - $fixnum.Int64? fee, - }) { - final _result = create(); - if (validatorAddress != null) { - _result.validatorAddress = validatorAddress; - } - if (accountAddress != null) { - _result.accountAddress = accountAddress; - } - if (amount != null) { - _result.amount = amount; - } - if (fee != null) { - _result.fee = fee; - } - return _result; - } - factory WithdrawPayload.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); - factory WithdrawPayload.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' - 'Will be removed in next major version') - WithdrawPayload clone() => WithdrawPayload()..mergeFromMessage(this); - @$core.Deprecated( - 'Using this can add significant overhead to your binary. ' - 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' - 'Will be removed in next major version') - WithdrawPayload copyWith(void Function(WithdrawPayload) updates) => super.copyWith((message) => updates(message as WithdrawPayload)) as WithdrawPayload; // ignore: deprecated_member_use - $pb.BuilderInfo get info_ => _i; - @$core.pragma('dart2js:noInline') - static WithdrawPayload create() => WithdrawPayload._(); - WithdrawPayload createEmptyInstance() => create(); - static $pb.PbList createRepeated() => $pb.PbList(); - @$core.pragma('dart2js:noInline') - static WithdrawPayload getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static WithdrawPayload? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get validatorAddress => $_getSZ(0); - @$pb.TagNumber(1) - set validatorAddress($core.String v) { $_setString(0, v); } - @$pb.TagNumber(1) - $core.bool hasValidatorAddress() => $_has(0); - @$pb.TagNumber(1) - void clearValidatorAddress() => clearField(1); - - @$pb.TagNumber(2) - $core.String get accountAddress => $_getSZ(1); - @$pb.TagNumber(2) - set accountAddress($core.String v) { $_setString(1, v); } - @$pb.TagNumber(2) - $core.bool hasAccountAddress() => $_has(1); - @$pb.TagNumber(2) - void clearAccountAddress() => clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get amount => $_getI64(2); - @$pb.TagNumber(3) - set amount($fixnum.Int64 v) { $_setInt64(2, v); } - @$pb.TagNumber(3) - $core.bool hasAmount() => $_has(2); - @$pb.TagNumber(3) - void clearAmount() => clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get fee => $_getI64(3); - @$pb.TagNumber(4) - set fee($fixnum.Int64 v) { $_setInt64(3, v); } - @$pb.TagNumber(4) - $core.bool hasFee() => $_has(3); - @$pb.TagNumber(4) - void clearFee() => clearField(4); -} - class GetRawTransactionResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawTransactionResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'rawTransaction') @@ -1347,6 +1019,7 @@ class PayloadTransfer extends $pb.GeneratedMessage { ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') ..hasRequiredFields = false ; @@ -1355,6 +1028,7 @@ class PayloadTransfer extends $pb.GeneratedMessage { $core.String? sender, $core.String? receiver, $fixnum.Int64? amount, + $fixnum.Int64? fee, }) { final _result = create(); if (sender != null) { @@ -1366,6 +1040,9 @@ class PayloadTransfer extends $pb.GeneratedMessage { if (amount != null) { _result.amount = amount; } + if (fee != null) { + _result.fee = fee; + } return _result; } factory PayloadTransfer.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1415,6 +1092,15 @@ class PayloadTransfer extends $pb.GeneratedMessage { $core.bool hasAmount() => $_has(2); @$pb.TagNumber(3) void clearAmount() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get fee => $_getI64(3); + @$pb.TagNumber(4) + set fee($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasFee() => $_has(3); + @$pb.TagNumber(4) + void clearFee() => clearField(4); } class PayloadBond extends $pb.GeneratedMessage { @@ -1422,6 +1108,8 @@ class PayloadBond extends $pb.GeneratedMessage { ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') + ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') + ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') ..hasRequiredFields = false ; @@ -1430,6 +1118,8 @@ class PayloadBond extends $pb.GeneratedMessage { $core.String? sender, $core.String? receiver, $fixnum.Int64? stake, + $core.String? publicKey, + $fixnum.Int64? fee, }) { final _result = create(); if (sender != null) { @@ -1441,6 +1131,12 @@ class PayloadBond extends $pb.GeneratedMessage { if (stake != null) { _result.stake = stake; } + if (publicKey != null) { + _result.publicKey = publicKey; + } + if (fee != null) { + _result.fee = fee; + } return _result; } factory PayloadBond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1490,6 +1186,24 @@ class PayloadBond extends $pb.GeneratedMessage { $core.bool hasStake() => $_has(2); @$pb.TagNumber(3) void clearStake() => clearField(3); + + @$pb.TagNumber(4) + $core.String get publicKey => $_getSZ(3); + @$pb.TagNumber(4) + set publicKey($core.String v) { $_setString(3, v); } + @$pb.TagNumber(4) + $core.bool hasPublicKey() => $_has(3); + @$pb.TagNumber(4) + void clearPublicKey() => clearField(4); + + @$pb.TagNumber(5) + $fixnum.Int64 get fee => $_getI64(4); + @$pb.TagNumber(5) + set fee($fixnum.Int64 v) { $_setInt64(4, v); } + @$pb.TagNumber(5) + $core.bool hasFee() => $_has(4); + @$pb.TagNumber(5) + void clearFee() => clearField(5); } class PayloadSortition extends $pb.GeneratedMessage { @@ -1602,28 +1316,33 @@ class PayloadUnbond extends $pb.GeneratedMessage { class PayloadWithdraw extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'PayloadWithdraw', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'from') - ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'to') + ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'accountAddress') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') + ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') ..hasRequiredFields = false ; PayloadWithdraw._() : super(); factory PayloadWithdraw({ - $core.String? from, - $core.String? to, + $core.String? validatorAddress, + $core.String? accountAddress, $fixnum.Int64? amount, + $fixnum.Int64? fee, }) { final _result = create(); - if (from != null) { - _result.from = from; + if (validatorAddress != null) { + _result.validatorAddress = validatorAddress; } - if (to != null) { - _result.to = to; + if (accountAddress != null) { + _result.accountAddress = accountAddress; } if (amount != null) { _result.amount = amount; } + if (fee != null) { + _result.fee = fee; + } return _result; } factory PayloadWithdraw.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1648,22 +1367,22 @@ class PayloadWithdraw extends $pb.GeneratedMessage { static PayloadWithdraw? _defaultInstance; @$pb.TagNumber(1) - $core.String get from => $_getSZ(0); + $core.String get validatorAddress => $_getSZ(0); @$pb.TagNumber(1) - set from($core.String v) { $_setString(0, v); } + set validatorAddress($core.String v) { $_setString(0, v); } @$pb.TagNumber(1) - $core.bool hasFrom() => $_has(0); + $core.bool hasValidatorAddress() => $_has(0); @$pb.TagNumber(1) - void clearFrom() => clearField(1); + void clearValidatorAddress() => clearField(1); @$pb.TagNumber(2) - $core.String get to => $_getSZ(1); + $core.String get accountAddress => $_getSZ(1); @$pb.TagNumber(2) - set to($core.String v) { $_setString(1, v); } + set accountAddress($core.String v) { $_setString(1, v); } @$pb.TagNumber(2) - $core.bool hasTo() => $_has(1); + $core.bool hasAccountAddress() => $_has(1); @$pb.TagNumber(2) - void clearTo() => clearField(2); + void clearAccountAddress() => clearField(2); @$pb.TagNumber(3) $fixnum.Int64 get amount => $_getI64(2); @@ -1673,6 +1392,15 @@ class PayloadWithdraw extends $pb.GeneratedMessage { $core.bool hasAmount() => $_has(2); @$pb.TagNumber(3) void clearAmount() => clearField(3); + + @$pb.TagNumber(4) + $fixnum.Int64 get fee => $_getI64(3); + @$pb.TagNumber(4) + set fee($fixnum.Int64 v) { $_setInt64(3, v); } + @$pb.TagNumber(4) + $core.bool hasFee() => $_has(3); + @$pb.TagNumber(4) + void clearFee() => clearField(4); } enum TransactionInfo_Payload { diff --git a/www/grpc/gen/dart/transaction.pbjson.dart b/www/grpc/gen/dart/transaction.pbjson.dart index c7e7cfd05..1b0bb2c73 100644 --- a/www/grpc/gen/dart/transaction.pbjson.dart +++ b/www/grpc/gen/dart/transaction.pbjson.dart @@ -106,10 +106,10 @@ const GetRawTransactionRequest$json = const { '2': const [ const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, const {'1': 'memo', '3': 2, '4': 1, '5': 9, '10': 'memo'}, - const {'1': 'transfer', '3': 3, '4': 1, '5': 11, '6': '.pactus.TransferPayload', '9': 0, '10': 'transfer'}, - const {'1': 'bond', '3': 4, '4': 1, '5': 11, '6': '.pactus.BondPayload', '9': 0, '10': 'bond'}, - const {'1': 'unbond', '3': 5, '4': 1, '5': 11, '6': '.pactus.UnbondPayload', '9': 0, '10': 'unbond'}, - const {'1': 'withdraw', '3': 6, '4': 1, '5': 11, '6': '.pactus.WithdrawPayload', '9': 0, '10': 'withdraw'}, + const {'1': 'transfer', '3': 3, '4': 1, '5': 11, '6': '.pactus.PayloadTransfer', '9': 0, '10': 'transfer'}, + const {'1': 'bond', '3': 4, '4': 1, '5': 11, '6': '.pactus.PayloadBond', '9': 0, '10': 'bond'}, + const {'1': 'unbond', '3': 5, '4': 1, '5': 11, '6': '.pactus.PayloadUnbond', '9': 0, '10': 'unbond'}, + const {'1': 'withdraw', '3': 6, '4': 1, '5': 11, '6': '.pactus.PayloadWithdraw', '9': 0, '10': 'withdraw'}, ], '8': const [ const {'1': 'payload'}, @@ -117,7 +117,7 @@ const GetRawTransactionRequest$json = const { }; /// Descriptor for `GetRawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawTransactionRequestDescriptor = $convert.base64Decode('ChhHZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRISCgRtZW1vGAIgASgJUgRtZW1vEjUKCHRyYW5zZmVyGAMgASgLMhcucGFjdHVzLlRyYW5zZmVyUGF5bG9hZEgAUgh0cmFuc2ZlchIpCgRib25kGAQgASgLMhMucGFjdHVzLkJvbmRQYXlsb2FkSABSBGJvbmQSLwoGdW5ib25kGAUgASgLMhUucGFjdHVzLlVuYm9uZFBheWxvYWRIAFIGdW5ib25kEjUKCHdpdGhkcmF3GAYgASgLMhcucGFjdHVzLldpdGhkcmF3UGF5bG9hZEgAUgh3aXRoZHJhd0IJCgdwYXlsb2Fk'); +final $typed_data.Uint8List getRawTransactionRequestDescriptor = $convert.base64Decode('ChhHZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRISCgRtZW1vGAIgASgJUgRtZW1vEjUKCHRyYW5zZmVyGAMgASgLMhcucGFjdHVzLlBheWxvYWRUcmFuc2ZlckgAUgh0cmFuc2ZlchIpCgRib25kGAQgASgLMhMucGFjdHVzLlBheWxvYWRCb25kSABSBGJvbmQSLwoGdW5ib25kGAUgASgLMhUucGFjdHVzLlBheWxvYWRVbmJvbmRIAFIGdW5ib25kEjUKCHdpdGhkcmF3GAYgASgLMhcucGFjdHVzLlBheWxvYWRXaXRoZHJhd0gAUgh3aXRoZHJhd0IJCgdwYXlsb2Fk'); @$core.Deprecated('Use getRawTransferTransactionRequestDescriptor instead') const GetRawTransferTransactionRequest$json = const { '1': 'GetRawTransferTransactionRequest', @@ -176,56 +176,6 @@ const GetRawWithdrawTransactionRequest$json = const { /// Descriptor for `GetRawWithdrawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getRawWithdrawTransactionRequestDescriptor = $convert.base64Decode('CiBHZXRSYXdXaXRoZHJhd1RyYW5zYWN0aW9uUmVxdWVzdBIbCglsb2NrX3RpbWUYASABKA1SCGxvY2tUaW1lEisKEXZhbGlkYXRvcl9hZGRyZXNzGAIgASgJUhB2YWxpZGF0b3JBZGRyZXNzEicKD2FjY291bnRfYWRkcmVzcxgDIAEoCVIOYWNjb3VudEFkZHJlc3MSFgoGYW1vdW50GAQgASgDUgZhbW91bnQSEAoDZmVlGAUgASgDUgNmZWUSEgoEbWVtbxgGIAEoCVIEbWVtbw=='); -@$core.Deprecated('Use transferPayloadDescriptor instead') -const TransferPayload$json = const { - '1': 'TransferPayload', - '2': const [ - const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, - const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, - const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, - const {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'}, - ], -}; - -/// Descriptor for `TransferPayload`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List transferPayloadDescriptor = $convert.base64Decode('Cg9UcmFuc2ZlclBheWxvYWQSFgoGc2VuZGVyGAEgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAiABKAlSCHJlY2VpdmVyEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50EhAKA2ZlZRgEIAEoA1IDZmVl'); -@$core.Deprecated('Use bondPayloadDescriptor instead') -const BondPayload$json = const { - '1': 'BondPayload', - '2': const [ - const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, - const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, - const {'1': 'stake', '3': 3, '4': 1, '5': 3, '10': 'stake'}, - const {'1': 'public_key', '3': 4, '4': 1, '5': 9, '10': 'publicKey'}, - const {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'}, - ], -}; - -/// Descriptor for `BondPayload`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List bondPayloadDescriptor = $convert.base64Decode('CgtCb25kUGF5bG9hZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtlEh0KCnB1YmxpY19rZXkYBCABKAlSCXB1YmxpY0tleRIQCgNmZWUYBSABKANSA2ZlZQ=='); -@$core.Deprecated('Use unbondPayloadDescriptor instead') -const UnbondPayload$json = const { - '1': 'UnbondPayload', - '2': const [ - const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, - ], -}; - -/// Descriptor for `UnbondPayload`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List unbondPayloadDescriptor = $convert.base64Decode('Cg1VbmJvbmRQYXlsb2FkEisKEXZhbGlkYXRvcl9hZGRyZXNzGAEgASgJUhB2YWxpZGF0b3JBZGRyZXNz'); -@$core.Deprecated('Use withdrawPayloadDescriptor instead') -const WithdrawPayload$json = const { - '1': 'WithdrawPayload', - '2': const [ - const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, - const {'1': 'account_address', '3': 2, '4': 1, '5': 9, '10': 'accountAddress'}, - const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, - const {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'}, - ], -}; - -/// Descriptor for `WithdrawPayload`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List withdrawPayloadDescriptor = $convert.base64Decode('Cg9XaXRoZHJhd1BheWxvYWQSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvckFkZHJlc3MSJwoPYWNjb3VudF9hZGRyZXNzGAIgASgJUg5hY2NvdW50QWRkcmVzcxIWCgZhbW91bnQYAyABKANSBmFtb3VudBIQCgNmZWUYBCABKANSA2ZlZQ=='); @$core.Deprecated('Use getRawTransactionResponseDescriptor instead') const GetRawTransactionResponse$json = const { '1': 'GetRawTransactionResponse', @@ -243,11 +193,12 @@ const PayloadTransfer$json = const { const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, + const {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'}, ], }; /// Descriptor for `PayloadTransfer`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadTransferDescriptor = $convert.base64Decode('Cg9QYXlsb2FkVHJhbnNmZXISFgoGc2VuZGVyGAEgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAiABKAlSCHJlY2VpdmVyEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50'); +final $typed_data.Uint8List payloadTransferDescriptor = $convert.base64Decode('Cg9QYXlsb2FkVHJhbnNmZXISFgoGc2VuZGVyGAEgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAiABKAlSCHJlY2VpdmVyEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50EhAKA2ZlZRgEIAEoA1IDZmVl'); @$core.Deprecated('Use payloadBondDescriptor instead') const PayloadBond$json = const { '1': 'PayloadBond', @@ -255,11 +206,13 @@ const PayloadBond$json = const { const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, const {'1': 'stake', '3': 3, '4': 1, '5': 3, '10': 'stake'}, + const {'1': 'public_key', '3': 4, '4': 1, '5': 9, '10': 'publicKey'}, + const {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'}, ], }; /// Descriptor for `PayloadBond`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadBondDescriptor = $convert.base64Decode('CgtQYXlsb2FkQm9uZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtl'); +final $typed_data.Uint8List payloadBondDescriptor = $convert.base64Decode('CgtQYXlsb2FkQm9uZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtlEh0KCnB1YmxpY19rZXkYBCABKAlSCXB1YmxpY0tleRIQCgNmZWUYBSABKANSA2ZlZQ=='); @$core.Deprecated('Use payloadSortitionDescriptor instead') const PayloadSortition$json = const { '1': 'PayloadSortition', @@ -285,14 +238,15 @@ final $typed_data.Uint8List payloadUnbondDescriptor = $convert.base64Decode('Cg1 const PayloadWithdraw$json = const { '1': 'PayloadWithdraw', '2': const [ - const {'1': 'from', '3': 1, '4': 1, '5': 9, '10': 'from'}, - const {'1': 'to', '3': 2, '4': 1, '5': 9, '10': 'to'}, + const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, + const {'1': 'account_address', '3': 2, '4': 1, '5': 9, '10': 'accountAddress'}, const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, + const {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'}, ], }; /// Descriptor for `PayloadWithdraw`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadWithdrawDescriptor = $convert.base64Decode('Cg9QYXlsb2FkV2l0aGRyYXcSEgoEZnJvbRgBIAEoCVIEZnJvbRIOCgJ0bxgCIAEoCVICdG8SFgoGYW1vdW50GAMgASgDUgZhbW91bnQ='); +final $typed_data.Uint8List payloadWithdrawDescriptor = $convert.base64Decode('Cg9QYXlsb2FkV2l0aGRyYXcSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvckFkZHJlc3MSJwoPYWNjb3VudF9hZGRyZXNzGAIgASgJUg5hY2NvdW50QWRkcmVzcxIWCgZhbW91bnQYAyABKANSBmFtb3VudBIQCgNmZWUYBCABKANSA2ZlZQ=='); @$core.Deprecated('Use transactionInfoDescriptor instead') const TransactionInfo$json = const { '1': 'TransactionInfo', @@ -349,10 +303,6 @@ const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> Transactio '.pactus.BroadcastTransactionRequest': BroadcastTransactionRequest$json, '.pactus.BroadcastTransactionResponse': BroadcastTransactionResponse$json, '.pactus.GetRawTransactionRequest': GetRawTransactionRequest$json, - '.pactus.TransferPayload': TransferPayload$json, - '.pactus.BondPayload': BondPayload$json, - '.pactus.UnbondPayload': UnbondPayload$json, - '.pactus.WithdrawPayload': WithdrawPayload$json, '.pactus.GetRawTransactionResponse': GetRawTransactionResponse$json, '.pactus.GetRawTransferTransactionRequest': GetRawTransferTransactionRequest$json, '.pactus.GetRawBondTransactionRequest': GetRawBondTransactionRequest$json, diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md index 44d071944..08b2dd934 100644 --- a/www/grpc/gen/docs/grpc.md +++ b/www/grpc/gen/docs/grpc.md @@ -320,6 +320,13 @@ parameters.

    The amount to be transferred in NanoPAC. + + transaction.transfer.fee + int64 + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + transaction.bond PayloadBond @@ -348,6 +355,20 @@ parameters.

    The stake amount in NanoPAC. + + transaction.bond.public_key + string + + The public key of the validator. + + + + transaction.bond.fee + int64 + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + transaction.sortition PayloadSortition @@ -391,17 +412,17 @@ parameters.

    - transaction.withdraw.from + transaction.withdraw.validator_address string - The address to withdraw from. + The address of the validator to withdraw from. - transaction.withdraw.to + transaction.withdraw.account_address string - The address to withdraw to. + The address of the account to withdraw to. @@ -411,6 +432,13 @@ parameters.

    The withdrawal amount in NanoPAC. + + transaction.withdraw.fee + int64 + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + transaction.memo string @@ -567,28 +595,28 @@ height. transfer - TransferPayload + PayloadTransfer (OneOf) bond - BondPayload + PayloadBond (OneOf) unbond - UnbondPayload + PayloadUnbond (OneOf) withdraw - WithdrawPayload + PayloadWithdraw (OneOf) @@ -1139,6 +1167,13 @@ BLOCK_TRANSACTIONS. The amount to be transferred in NanoPAC. + + txs[].transfer.fee + int64 + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].bond PayloadBond @@ -1167,6 +1202,20 @@ BLOCK_TRANSACTIONS. The stake amount in NanoPAC. + + txs[].bond.public_key + string + + The public key of the validator. + + + + txs[].bond.fee + int64 + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].sortition PayloadSortition @@ -1210,17 +1259,17 @@ BLOCK_TRANSACTIONS. - txs[].withdraw.from + txs[].withdraw.validator_address string - The address to withdraw from. + The address of the validator to withdraw from. - txs[].withdraw.to + txs[].withdraw.account_address string - The address to withdraw to. + The address of the account to withdraw to. @@ -1230,6 +1279,13 @@ BLOCK_TRANSACTIONS. The withdrawal amount in NanoPAC. + + txs[].withdraw.fee + int64 + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].memo string @@ -2107,6 +2163,13 @@ types. The amount to be transferred in NanoPAC. + + txs[].transfer.fee + int64 + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].bond PayloadBond @@ -2135,6 +2198,20 @@ types. The stake amount in NanoPAC. + + txs[].bond.public_key + string + + The public key of the validator. + + + + txs[].bond.fee + int64 + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].sortition PayloadSortition @@ -2178,17 +2255,17 @@ types. - txs[].withdraw.from + txs[].withdraw.validator_address string - The address to withdraw from. + The address of the validator to withdraw from. - txs[].withdraw.to + txs[].withdraw.account_address string - The address to withdraw to. + The address of the account to withdraw to. @@ -2198,6 +2275,13 @@ types. The withdrawal amount in NanoPAC. + + txs[].withdraw.fee + int64 + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].memo string diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md index 6bde14217..2dfe84706 100644 --- a/www/grpc/gen/docs/json-rpc.md +++ b/www/grpc/gen/docs/json-rpc.md @@ -371,6 +371,13 @@ parameters.

    The amount to be transferred in NanoPAC. + + transaction.transfer.fee + numeric + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + transaction.bond object @@ -399,6 +406,20 @@ parameters.

    The stake amount in NanoPAC. + + transaction.bond.public_key + string + + The public key of the validator. + + + + transaction.bond.fee + numeric + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + transaction.sortition object @@ -442,17 +463,17 @@ parameters.

    - transaction.withdraw.from + transaction.withdraw.validator_address string - The address to withdraw from. + The address of the validator to withdraw from. - transaction.withdraw.to + transaction.withdraw.account_address string - The address to withdraw to. + The address of the account to withdraw to. @@ -462,6 +483,13 @@ parameters.

    The withdrawal amount in NanoPAC. + + transaction.withdraw.fee + numeric + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + transaction.memo string @@ -1190,6 +1218,13 @@ BLOCK_TRANSACTIONS. The amount to be transferred in NanoPAC. + + txs[].transfer.fee + numeric + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].bond object @@ -1218,6 +1253,20 @@ BLOCK_TRANSACTIONS. The stake amount in NanoPAC. + + txs[].bond.public_key + string + + The public key of the validator. + + + + txs[].bond.fee + numeric + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].sortition object @@ -1261,17 +1310,17 @@ BLOCK_TRANSACTIONS. - txs[].withdraw.from + txs[].withdraw.validator_address string - The address to withdraw from. + The address of the validator to withdraw from. - txs[].withdraw.to + txs[].withdraw.account_address string - The address to withdraw to. + The address of the account to withdraw to. @@ -1281,6 +1330,13 @@ BLOCK_TRANSACTIONS. The withdrawal amount in NanoPAC. + + txs[].withdraw.fee + numeric + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].memo string @@ -2158,6 +2214,13 @@ types. The amount to be transferred in NanoPAC. + + txs[].transfer.fee + numeric + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].bond object @@ -2186,6 +2249,20 @@ types. The stake amount in NanoPAC. + + txs[].bond.public_key + string + + The public key of the validator. + + + + txs[].bond.fee + numeric + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].sortition object @@ -2229,17 +2306,17 @@ types. - txs[].withdraw.from + txs[].withdraw.validator_address string - The address to withdraw from. + The address of the validator to withdraw from. - txs[].withdraw.to + txs[].withdraw.account_address string - The address to withdraw to. + The address of the account to withdraw to. @@ -2249,6 +2326,13 @@ types. The withdrawal amount in NanoPAC. + + txs[].withdraw.fee + numeric + + The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + + txs[].memo string diff --git a/www/grpc/gen/go/transaction.cobra.pb.go b/www/grpc/gen/go/transaction.cobra.pb.go index 4bc35bf63..1327f084e 100644 --- a/www/grpc/gen/go/transaction.cobra.pb.go +++ b/www/grpc/gen/go/transaction.cobra.pb.go @@ -200,43 +200,43 @@ func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") - _Transfer := &TransferPayload{} + _Transfer := &PayloadTransfer{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Transfer"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) - cmd.PersistentFlags().StringVar(&_Transfer.Sender, cfg.FlagNamer("Transfer Sender"), "", "The sender's account address.") + cmd.PersistentFlags().StringVar(&_Transfer.Sender, cfg.FlagNamer("Transfer Sender"), "", "The sender's address.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Sender"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) - cmd.PersistentFlags().StringVar(&_Transfer.Receiver, cfg.FlagNamer("Transfer Receiver"), "", "The receiver's account address.") + cmd.PersistentFlags().StringVar(&_Transfer.Receiver, cfg.FlagNamer("Transfer Receiver"), "", "The receiver's address.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Receiver"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) - cmd.PersistentFlags().Int64Var(&_Transfer.Amount, cfg.FlagNamer("Transfer Amount"), 0, "The amount to be transferred, specified in NanoPAC. Must be greater than 0.") + cmd.PersistentFlags().Int64Var(&_Transfer.Amount, cfg.FlagNamer("Transfer Amount"), 0, "The amount to be transferred in NanoPAC.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Amount"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) cmd.PersistentFlags().Int64Var(&_Transfer.Fee, cfg.FlagNamer("Transfer Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Fee"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) - _Bond := &BondPayload{} + _Bond := &PayloadBond{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Bond"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) - cmd.PersistentFlags().StringVar(&_Bond.Sender, cfg.FlagNamer("Bond Sender"), "", "The sender's account address.") + cmd.PersistentFlags().StringVar(&_Bond.Sender, cfg.FlagNamer("Bond Sender"), "", "The sender's address.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Sender"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) - cmd.PersistentFlags().StringVar(&_Bond.Receiver, cfg.FlagNamer("Bond Receiver"), "", "The receiver's validator address.") + cmd.PersistentFlags().StringVar(&_Bond.Receiver, cfg.FlagNamer("Bond Receiver"), "", "The receiver's address.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Receiver"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) - cmd.PersistentFlags().Int64Var(&_Bond.Stake, cfg.FlagNamer("Bond Stake"), 0, "The stake amount in NanoPAC. Must be greater than 0.") + cmd.PersistentFlags().Int64Var(&_Bond.Stake, cfg.FlagNamer("Bond Stake"), 0, "The stake amount in NanoPAC.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Stake"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) cmd.PersistentFlags().StringVar(&_Bond.PublicKey, cfg.FlagNamer("Bond PublicKey"), "", "The public key of the validator.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond PublicKey"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) cmd.PersistentFlags().Int64Var(&_Bond.Fee, cfg.FlagNamer("Bond Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Fee"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) - _Unbond := &UnbondPayload{} + _Unbond := &PayloadUnbond{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Unbond"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond"), func() { req.Payload = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) - cmd.PersistentFlags().StringVar(&_Unbond.ValidatorAddress, cfg.FlagNamer("Unbond ValidatorAddress"), "", "The address of the validator to unbond from.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond ValidatorAddress"), func() { req.Payload = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) - _Withdraw := &WithdrawPayload{} + cmd.PersistentFlags().StringVar(&_Unbond.Validator, cfg.FlagNamer("Unbond Validator"), "", "The address of the validator to unbond from.") + flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond Validator"), func() { req.Payload = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) + _Withdraw := &PayloadWithdraw{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Withdraw"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) cmd.PersistentFlags().StringVar(&_Withdraw.ValidatorAddress, cfg.FlagNamer("Withdraw ValidatorAddress"), "", "The address of the validator to withdraw from.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw ValidatorAddress"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) cmd.PersistentFlags().StringVar(&_Withdraw.AccountAddress, cfg.FlagNamer("Withdraw AccountAddress"), "", "The address of the account to withdraw to.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw AccountAddress"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) - cmd.PersistentFlags().Int64Var(&_Withdraw.Amount, cfg.FlagNamer("Withdraw Amount"), 0, "The withdrawal amount in NanoPAC. Must be greater than 0.") + cmd.PersistentFlags().Int64Var(&_Withdraw.Amount, cfg.FlagNamer("Withdraw Amount"), 0, "The withdrawal amount in NanoPAC.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Amount"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) cmd.PersistentFlags().Int64Var(&_Withdraw.Fee, cfg.FlagNamer("Withdraw Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Fee"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) diff --git a/www/grpc/gen/go/transaction.pb.go b/www/grpc/gen/go/transaction.pb.go index 9f46799c9..7817f09d5 100644 --- a/www/grpc/gen/go/transaction.pb.go +++ b/www/grpc/gen/go/transaction.pb.go @@ -555,28 +555,28 @@ func (m *GetRawTransactionRequest) GetPayload() isGetRawTransactionRequest_Paylo return nil } -func (x *GetRawTransactionRequest) GetTransfer() *TransferPayload { +func (x *GetRawTransactionRequest) GetTransfer() *PayloadTransfer { if x, ok := x.GetPayload().(*GetRawTransactionRequest_Transfer); ok { return x.Transfer } return nil } -func (x *GetRawTransactionRequest) GetBond() *BondPayload { +func (x *GetRawTransactionRequest) GetBond() *PayloadBond { if x, ok := x.GetPayload().(*GetRawTransactionRequest_Bond); ok { return x.Bond } return nil } -func (x *GetRawTransactionRequest) GetUnbond() *UnbondPayload { +func (x *GetRawTransactionRequest) GetUnbond() *PayloadUnbond { if x, ok := x.GetPayload().(*GetRawTransactionRequest_Unbond); ok { return x.Unbond } return nil } -func (x *GetRawTransactionRequest) GetWithdraw() *WithdrawPayload { +func (x *GetRawTransactionRequest) GetWithdraw() *PayloadWithdraw { if x, ok := x.GetPayload().(*GetRawTransactionRequest_Withdraw); ok { return x.Withdraw } @@ -588,19 +588,19 @@ type isGetRawTransactionRequest_Payload interface { } type GetRawTransactionRequest_Transfer struct { - Transfer *TransferPayload `protobuf:"bytes,3,opt,name=transfer,proto3,oneof"` + Transfer *PayloadTransfer `protobuf:"bytes,3,opt,name=transfer,proto3,oneof"` } type GetRawTransactionRequest_Bond struct { - Bond *BondPayload `protobuf:"bytes,4,opt,name=bond,proto3,oneof"` + Bond *PayloadBond `protobuf:"bytes,4,opt,name=bond,proto3,oneof"` } type GetRawTransactionRequest_Unbond struct { - Unbond *UnbondPayload `protobuf:"bytes,5,opt,name=unbond,proto3,oneof"` + Unbond *PayloadUnbond `protobuf:"bytes,5,opt,name=unbond,proto3,oneof"` } type GetRawTransactionRequest_Withdraw struct { - Withdraw *WithdrawPayload `protobuf:"bytes,6,opt,name=withdraw,proto3,oneof"` + Withdraw *PayloadWithdraw `protobuf:"bytes,6,opt,name=withdraw,proto3,oneof"` } func (*GetRawTransactionRequest_Transfer) isGetRawTransactionRequest_Payload() {} @@ -611,7 +611,7 @@ func (*GetRawTransactionRequest_Unbond) isGetRawTransactionRequest_Payload() {} func (*GetRawTransactionRequest_Withdraw) isGetRawTransactionRequest_Payload() {} -// Request message for retrieving raw details of a transfer transaction. +// Deprecated: Request message for retrieving raw details of a transfer transaction. type GetRawTransferTransactionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -706,7 +706,7 @@ func (x *GetRawTransferTransactionRequest) GetMemo() string { return "" } -// Request message for retrieving raw details of a bond transaction. +// Deprecated: Request message for retrieving raw details of a bond transaction. type GetRawBondTransactionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -810,7 +810,7 @@ func (x *GetRawBondTransactionRequest) GetMemo() string { return "" } -// Request message for retrieving raw details of an unbond transaction. +// Deprecated: Request message for retrieving raw details of an unbond transaction. type GetRawUnbondTransactionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -878,7 +878,7 @@ func (x *GetRawUnbondTransactionRequest) GetMemo() string { return "" } -// Request message for retrieving raw details of a withdraw transaction. +// Deprecated: Request message for retrieving raw details of a withdraw transaction. type GetRawWithdrawTransactionRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -973,292 +973,6 @@ func (x *GetRawWithdrawTransactionRequest) GetMemo() string { return "" } -// Payload message for retrieving raw details of a transfer transaction. -type TransferPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The sender's account address. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // The receiver's account address. - Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` - // The amount to be transferred, specified in NanoPAC. Must be greater than 0. - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` -} - -func (x *TransferPayload) Reset() { - *x = TransferPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransferPayload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransferPayload) ProtoMessage() {} - -func (x *TransferPayload) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[11] - 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 TransferPayload.ProtoReflect.Descriptor instead. -func (*TransferPayload) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{11} -} - -func (x *TransferPayload) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *TransferPayload) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -func (x *TransferPayload) GetAmount() int64 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *TransferPayload) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - -// Payload message for retrieving raw details of a bond transaction. -type BondPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The sender's account address. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // The receiver's validator address. - Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` - // The stake amount in NanoPAC. Must be greater than 0. - Stake int64 `protobuf:"varint,3,opt,name=stake,proto3" json:"stake,omitempty"` - // The public key of the validator. - PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` -} - -func (x *BondPayload) Reset() { - *x = BondPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BondPayload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BondPayload) ProtoMessage() {} - -func (x *BondPayload) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[12] - 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 BondPayload.ProtoReflect.Descriptor instead. -func (*BondPayload) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{12} -} - -func (x *BondPayload) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *BondPayload) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -func (x *BondPayload) GetStake() int64 { - if x != nil { - return x.Stake - } - return 0 -} - -func (x *BondPayload) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -func (x *BondPayload) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - -// Payload message for retrieving raw details of an unbond transaction. -type UnbondPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the validator to unbond from. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (x *UnbondPayload) Reset() { - *x = UnbondPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UnbondPayload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UnbondPayload) ProtoMessage() {} - -func (x *UnbondPayload) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[13] - 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 UnbondPayload.ProtoReflect.Descriptor instead. -func (*UnbondPayload) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{13} -} - -func (x *UnbondPayload) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -// Payload message for retrieving raw details of a withdraw transaction. -type WithdrawPayload struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address of the validator to withdraw from. - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - // The address of the account to withdraw to. - AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` - // The withdrawal amount in NanoPAC. Must be greater than 0. - Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` -} - -func (x *WithdrawPayload) Reset() { - *x = WithdrawPayload{} - if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *WithdrawPayload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WithdrawPayload) ProtoMessage() {} - -func (x *WithdrawPayload) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[14] - 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 WithdrawPayload.ProtoReflect.Descriptor instead. -func (*WithdrawPayload) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{14} -} - -func (x *WithdrawPayload) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *WithdrawPayload) GetAccountAddress() string { - if x != nil { - return x.AccountAddress - } - return "" -} - -func (x *WithdrawPayload) GetAmount() int64 { - if x != nil { - return x.Amount - } - return 0 -} - -func (x *WithdrawPayload) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - // Response message containing raw transaction data. type GetRawTransactionResponse struct { state protoimpl.MessageState @@ -1272,7 +986,7 @@ type GetRawTransactionResponse struct { func (x *GetRawTransactionResponse) Reset() { *x = GetRawTransactionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[15] + mi := &file_transaction_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1285,7 +999,7 @@ func (x *GetRawTransactionResponse) String() string { func (*GetRawTransactionResponse) ProtoMessage() {} func (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[15] + mi := &file_transaction_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1298,7 +1012,7 @@ func (x *GetRawTransactionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRawTransactionResponse.ProtoReflect.Descriptor instead. func (*GetRawTransactionResponse) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{15} + return file_transaction_proto_rawDescGZIP(), []int{11} } func (x *GetRawTransactionResponse) GetRawTransaction() string { @@ -1320,12 +1034,14 @@ type PayloadTransfer struct { Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // The amount to be transferred in NanoPAC. Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` } func (x *PayloadTransfer) Reset() { *x = PayloadTransfer{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[16] + mi := &file_transaction_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1338,7 +1054,7 @@ func (x *PayloadTransfer) String() string { func (*PayloadTransfer) ProtoMessage() {} func (x *PayloadTransfer) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[16] + mi := &file_transaction_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1351,7 +1067,7 @@ func (x *PayloadTransfer) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadTransfer.ProtoReflect.Descriptor instead. func (*PayloadTransfer) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{16} + return file_transaction_proto_rawDescGZIP(), []int{12} } func (x *PayloadTransfer) GetSender() string { @@ -1375,6 +1091,13 @@ func (x *PayloadTransfer) GetAmount() int64 { return 0 } +func (x *PayloadTransfer) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + // Payload for a bond transaction. type PayloadBond struct { state protoimpl.MessageState @@ -1387,12 +1110,16 @@ type PayloadBond struct { Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // The stake amount in NanoPAC. Stake int64 `protobuf:"varint,3,opt,name=stake,proto3" json:"stake,omitempty"` + // The public key of the validator. + PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` } func (x *PayloadBond) Reset() { *x = PayloadBond{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[17] + mi := &file_transaction_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1405,7 +1132,7 @@ func (x *PayloadBond) String() string { func (*PayloadBond) ProtoMessage() {} func (x *PayloadBond) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[17] + mi := &file_transaction_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1418,7 +1145,7 @@ func (x *PayloadBond) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadBond.ProtoReflect.Descriptor instead. func (*PayloadBond) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{17} + return file_transaction_proto_rawDescGZIP(), []int{13} } func (x *PayloadBond) GetSender() string { @@ -1442,6 +1169,20 @@ func (x *PayloadBond) GetStake() int64 { return 0 } +func (x *PayloadBond) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +func (x *PayloadBond) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + // Payload for a sortition transaction. type PayloadSortition struct { state protoimpl.MessageState @@ -1457,7 +1198,7 @@ type PayloadSortition struct { func (x *PayloadSortition) Reset() { *x = PayloadSortition{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[18] + mi := &file_transaction_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1470,7 +1211,7 @@ func (x *PayloadSortition) String() string { func (*PayloadSortition) ProtoMessage() {} func (x *PayloadSortition) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[18] + mi := &file_transaction_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1483,7 +1224,7 @@ func (x *PayloadSortition) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadSortition.ProtoReflect.Descriptor instead. func (*PayloadSortition) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{18} + return file_transaction_proto_rawDescGZIP(), []int{14} } func (x *PayloadSortition) GetAddress() string { @@ -1513,7 +1254,7 @@ type PayloadUnbond struct { func (x *PayloadUnbond) Reset() { *x = PayloadUnbond{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[19] + mi := &file_transaction_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1526,7 +1267,7 @@ func (x *PayloadUnbond) String() string { func (*PayloadUnbond) ProtoMessage() {} func (x *PayloadUnbond) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[19] + mi := &file_transaction_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1539,7 +1280,7 @@ func (x *PayloadUnbond) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadUnbond.ProtoReflect.Descriptor instead. func (*PayloadUnbond) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{19} + return file_transaction_proto_rawDescGZIP(), []int{15} } func (x *PayloadUnbond) GetValidator() string { @@ -1555,18 +1296,20 @@ type PayloadWithdraw struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The address to withdraw from. - From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` - // The address to withdraw to. - To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` + // The address of the validator to withdraw from. + ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` + // The address of the account to withdraw to. + AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // The withdrawal amount in NanoPAC. Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` } func (x *PayloadWithdraw) Reset() { *x = PayloadWithdraw{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[20] + mi := &file_transaction_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1579,7 +1322,7 @@ func (x *PayloadWithdraw) String() string { func (*PayloadWithdraw) ProtoMessage() {} func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[20] + mi := &file_transaction_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1592,19 +1335,19 @@ func (x *PayloadWithdraw) ProtoReflect() protoreflect.Message { // Deprecated: Use PayloadWithdraw.ProtoReflect.Descriptor instead. func (*PayloadWithdraw) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{20} + return file_transaction_proto_rawDescGZIP(), []int{16} } -func (x *PayloadWithdraw) GetFrom() string { +func (x *PayloadWithdraw) GetValidatorAddress() string { if x != nil { - return x.From + return x.ValidatorAddress } return "" } -func (x *PayloadWithdraw) GetTo() string { +func (x *PayloadWithdraw) GetAccountAddress() string { if x != nil { - return x.To + return x.AccountAddress } return "" } @@ -1616,6 +1359,13 @@ func (x *PayloadWithdraw) GetAmount() int64 { return 0 } +func (x *PayloadWithdraw) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + // Information about a transaction. type TransactionInfo struct { state protoimpl.MessageState @@ -1655,7 +1405,7 @@ type TransactionInfo struct { func (x *TransactionInfo) Reset() { *x = TransactionInfo{} if protoimpl.UnsafeEnabled { - mi := &file_transaction_proto_msgTypes[21] + mi := &file_transaction_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1668,7 +1418,7 @@ func (x *TransactionInfo) String() string { func (*TransactionInfo) ProtoMessage() {} func (x *TransactionInfo) ProtoReflect() protoreflect.Message { - mi := &file_transaction_proto_msgTypes[21] + mi := &file_transaction_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1681,7 +1431,7 @@ func (x *TransactionInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionInfo.ProtoReflect.Descriptor instead. func (*TransactionInfo) Descriptor() ([]byte, []int) { - return file_transaction_proto_rawDescGZIP(), []int{21} + return file_transaction_proto_rawDescGZIP(), []int{17} } func (x *TransactionInfo) GetId() string { @@ -1883,17 +1633,17 @@ var file_transaction_proto_rawDesc = []byte{ 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, + 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, + 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xb1, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, @@ -1940,164 +1690,144 @@ var file_transaction_proto_rawDesc = []byte{ 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x6f, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, - 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x0b, 0x42, 0x6f, 0x6e, 0x64, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, - 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, - 0x22, 0x3c, 0x0a, 0x0d, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x91, - 0x01, 0x0a, 0x0f, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, - 0x65, 0x65, 0x22, 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x27, 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, 0x77, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x0f, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x0b, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x57, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, - 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x22, 0x42, 0x0a, 0x10, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, - 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, - 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x22, 0x4d, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0xac, 0x04, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x1e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, - 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, - 0x6f, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x48, 0x00, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, - 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, - 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x2a, 0x83, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, - 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, - 0x41, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, - 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x4f, 0x52, 0x54, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, - 0x0e, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, - 0x04, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x5f, 0x50, 0x41, - 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x2a, 0x42, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, - 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, - 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x32, 0x82, 0x06, 0x0a, 0x0b, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, - 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1b, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, - 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, - 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x42, 0x72, 0x6f, 0x61, 0x64, - 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, - 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, - 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, - 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, - 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x64, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x46, 0x0a, 0x12, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, - 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x42, 0x0a, 0x10, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x91, 0x01, 0x0a, 0x0f, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x2b, 0x0a, + 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, + 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0xac, 0x04, + 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x66, 0x65, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x08, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x38, + 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x73, + 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, + 0x6e, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x48, + 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x83, 0x01, 0x0a, + 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, + 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, + 0x10, 0x0a, 0x0c, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, + 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x4f, 0x52, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, + 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x42, 0x4f, + 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, + 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, + 0x10, 0x05, 0x2a, 0x42, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x56, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, + 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, + 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x32, 0x82, 0x06, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x63, 0x75, + 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, + 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, + 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, + 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, + 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x46, 0x0a, 0x12, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, + 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2113,7 +1843,7 @@ func file_transaction_proto_rawDescGZIP() []byte { } var file_transaction_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_transaction_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_transaction_proto_goTypes = []any{ (PayloadType)(0), // 0: pactus.PayloadType (TransactionVerbosity)(0), // 1: pactus.TransactionVerbosity @@ -2128,32 +1858,28 @@ var file_transaction_proto_goTypes = []any{ (*GetRawBondTransactionRequest)(nil), // 10: pactus.GetRawBondTransactionRequest (*GetRawUnbondTransactionRequest)(nil), // 11: pactus.GetRawUnbondTransactionRequest (*GetRawWithdrawTransactionRequest)(nil), // 12: pactus.GetRawWithdrawTransactionRequest - (*TransferPayload)(nil), // 13: pactus.TransferPayload - (*BondPayload)(nil), // 14: pactus.BondPayload - (*UnbondPayload)(nil), // 15: pactus.UnbondPayload - (*WithdrawPayload)(nil), // 16: pactus.WithdrawPayload - (*GetRawTransactionResponse)(nil), // 17: pactus.GetRawTransactionResponse - (*PayloadTransfer)(nil), // 18: pactus.PayloadTransfer - (*PayloadBond)(nil), // 19: pactus.PayloadBond - (*PayloadSortition)(nil), // 20: pactus.PayloadSortition - (*PayloadUnbond)(nil), // 21: pactus.PayloadUnbond - (*PayloadWithdraw)(nil), // 22: pactus.PayloadWithdraw - (*TransactionInfo)(nil), // 23: pactus.TransactionInfo + (*GetRawTransactionResponse)(nil), // 13: pactus.GetRawTransactionResponse + (*PayloadTransfer)(nil), // 14: pactus.PayloadTransfer + (*PayloadBond)(nil), // 15: pactus.PayloadBond + (*PayloadSortition)(nil), // 16: pactus.PayloadSortition + (*PayloadUnbond)(nil), // 17: pactus.PayloadUnbond + (*PayloadWithdraw)(nil), // 18: pactus.PayloadWithdraw + (*TransactionInfo)(nil), // 19: pactus.TransactionInfo } var file_transaction_proto_depIdxs = []int32{ 1, // 0: pactus.GetTransactionRequest.verbosity:type_name -> pactus.TransactionVerbosity - 23, // 1: pactus.GetTransactionResponse.transaction:type_name -> pactus.TransactionInfo + 19, // 1: pactus.GetTransactionResponse.transaction:type_name -> pactus.TransactionInfo 0, // 2: pactus.CalculateFeeRequest.payload_type:type_name -> pactus.PayloadType - 13, // 3: pactus.GetRawTransactionRequest.transfer:type_name -> pactus.TransferPayload - 14, // 4: pactus.GetRawTransactionRequest.bond:type_name -> pactus.BondPayload - 15, // 5: pactus.GetRawTransactionRequest.unbond:type_name -> pactus.UnbondPayload - 16, // 6: pactus.GetRawTransactionRequest.withdraw:type_name -> pactus.WithdrawPayload + 14, // 3: pactus.GetRawTransactionRequest.transfer:type_name -> pactus.PayloadTransfer + 15, // 4: pactus.GetRawTransactionRequest.bond:type_name -> pactus.PayloadBond + 17, // 5: pactus.GetRawTransactionRequest.unbond:type_name -> pactus.PayloadUnbond + 18, // 6: pactus.GetRawTransactionRequest.withdraw:type_name -> pactus.PayloadWithdraw 0, // 7: pactus.TransactionInfo.payload_type:type_name -> pactus.PayloadType - 18, // 8: pactus.TransactionInfo.transfer:type_name -> pactus.PayloadTransfer - 19, // 9: pactus.TransactionInfo.bond:type_name -> pactus.PayloadBond - 20, // 10: pactus.TransactionInfo.sortition:type_name -> pactus.PayloadSortition - 21, // 11: pactus.TransactionInfo.unbond:type_name -> pactus.PayloadUnbond - 22, // 12: pactus.TransactionInfo.withdraw:type_name -> pactus.PayloadWithdraw + 14, // 8: pactus.TransactionInfo.transfer:type_name -> pactus.PayloadTransfer + 15, // 9: pactus.TransactionInfo.bond:type_name -> pactus.PayloadBond + 16, // 10: pactus.TransactionInfo.sortition:type_name -> pactus.PayloadSortition + 17, // 11: pactus.TransactionInfo.unbond:type_name -> pactus.PayloadUnbond + 18, // 12: pactus.TransactionInfo.withdraw:type_name -> pactus.PayloadWithdraw 2, // 13: pactus.Transaction.GetTransaction:input_type -> pactus.GetTransactionRequest 4, // 14: pactus.Transaction.CalculateFee:input_type -> pactus.CalculateFeeRequest 6, // 15: pactus.Transaction.BroadcastTransaction:input_type -> pactus.BroadcastTransactionRequest @@ -2165,11 +1891,11 @@ var file_transaction_proto_depIdxs = []int32{ 3, // 21: pactus.Transaction.GetTransaction:output_type -> pactus.GetTransactionResponse 5, // 22: pactus.Transaction.CalculateFee:output_type -> pactus.CalculateFeeResponse 7, // 23: pactus.Transaction.BroadcastTransaction:output_type -> pactus.BroadcastTransactionResponse - 17, // 24: pactus.Transaction.GetRawTransaction:output_type -> pactus.GetRawTransactionResponse - 17, // 25: pactus.Transaction.GetRawTransferTransaction:output_type -> pactus.GetRawTransactionResponse - 17, // 26: pactus.Transaction.GetRawBondTransaction:output_type -> pactus.GetRawTransactionResponse - 17, // 27: pactus.Transaction.GetRawUnbondTransaction:output_type -> pactus.GetRawTransactionResponse - 17, // 28: pactus.Transaction.GetRawWithdrawTransaction:output_type -> pactus.GetRawTransactionResponse + 13, // 24: pactus.Transaction.GetRawTransaction:output_type -> pactus.GetRawTransactionResponse + 13, // 25: pactus.Transaction.GetRawTransferTransaction:output_type -> pactus.GetRawTransactionResponse + 13, // 26: pactus.Transaction.GetRawBondTransaction:output_type -> pactus.GetRawTransactionResponse + 13, // 27: pactus.Transaction.GetRawUnbondTransaction:output_type -> pactus.GetRawTransactionResponse + 13, // 28: pactus.Transaction.GetRawWithdrawTransaction:output_type -> pactus.GetRawTransactionResponse 21, // [21:29] is the sub-list for method output_type 13, // [13:21] is the sub-list for method input_type 13, // [13:13] is the sub-list for extension type_name @@ -2316,54 +2042,6 @@ func file_transaction_proto_init() { } } file_transaction_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*TransferPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*BondPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*UnbondPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*WithdrawPayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_transaction_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*GetRawTransactionResponse); i { case 0: return &v.state @@ -2375,7 +2053,7 @@ func file_transaction_proto_init() { return nil } } - file_transaction_proto_msgTypes[16].Exporter = func(v any, i int) any { + file_transaction_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*PayloadTransfer); i { case 0: return &v.state @@ -2387,7 +2065,7 @@ func file_transaction_proto_init() { return nil } } - file_transaction_proto_msgTypes[17].Exporter = func(v any, i int) any { + file_transaction_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*PayloadBond); i { case 0: return &v.state @@ -2399,7 +2077,7 @@ func file_transaction_proto_init() { return nil } } - file_transaction_proto_msgTypes[18].Exporter = func(v any, i int) any { + file_transaction_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*PayloadSortition); i { case 0: return &v.state @@ -2411,7 +2089,7 @@ func file_transaction_proto_init() { return nil } } - file_transaction_proto_msgTypes[19].Exporter = func(v any, i int) any { + file_transaction_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*PayloadUnbond); i { case 0: return &v.state @@ -2423,7 +2101,7 @@ func file_transaction_proto_init() { return nil } } - file_transaction_proto_msgTypes[20].Exporter = func(v any, i int) any { + file_transaction_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*PayloadWithdraw); i { case 0: return &v.state @@ -2435,7 +2113,7 @@ func file_transaction_proto_init() { return nil } } - file_transaction_proto_msgTypes[21].Exporter = func(v any, i int) any { + file_transaction_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*TransactionInfo); i { case 0: return &v.state @@ -2454,7 +2132,7 @@ func file_transaction_proto_init() { (*GetRawTransactionRequest_Unbond)(nil), (*GetRawTransactionRequest_Withdraw)(nil), } - file_transaction_proto_msgTypes[21].OneofWrappers = []any{ + file_transaction_proto_msgTypes[17].OneofWrappers = []any{ (*TransactionInfo_Transfer)(nil), (*TransactionInfo_Bond)(nil), (*TransactionInfo_Sortition)(nil), @@ -2467,7 +2145,7 @@ func file_transaction_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_transaction_proto_rawDesc, NumEnums: 2, - NumMessages: 22, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java index 9d0a6a544..19423ffac 100644 --- a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java +++ b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java @@ -4462,64 +4462,64 @@ public interface GetRawTransactionRequestOrBuilder extends getMemoBytes(); /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; * @return Whether the transfer field is set. */ boolean hasTransfer(); /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; * @return The transfer. */ - pactus.transaction.TransactionOuterClass.TransferPayload getTransfer(); + pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer(); /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; */ - pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder getTransferOrBuilder(); + pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder(); /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; * @return Whether the bond field is set. */ boolean hasBond(); /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; * @return The bond. */ - pactus.transaction.TransactionOuterClass.BondPayload getBond(); + pactus.transaction.TransactionOuterClass.PayloadBond getBond(); /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; */ - pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder getBondOrBuilder(); + pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder(); /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; * @return Whether the unbond field is set. */ boolean hasUnbond(); /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; * @return The unbond. */ - pactus.transaction.TransactionOuterClass.UnbondPayload getUnbond(); + pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond(); /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; */ - pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder getUnbondOrBuilder(); + pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder(); /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; * @return Whether the withdraw field is set. */ boolean hasWithdraw(); /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; * @return The withdraw. */ - pactus.transaction.TransactionOuterClass.WithdrawPayload getWithdraw(); + pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw(); /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; */ - pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder getWithdrawOrBuilder(); + pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder(); public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest.PayloadCase getPayloadCase(); } @@ -4677,7 +4677,7 @@ public java.lang.String getMemo() { public static final int TRANSFER_FIELD_NUMBER = 3; /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; * @return Whether the transfer field is set. */ @java.lang.Override @@ -4685,30 +4685,30 @@ public boolean hasTransfer() { return payloadCase_ == 3; } /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; * @return The transfer. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransferPayload getTransfer() { + public pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer() { if (payloadCase_ == 3) { - return (pactus.transaction.TransactionOuterClass.TransferPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; } - return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder getTransferOrBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() { if (payloadCase_ == 3) { - return (pactus.transaction.TransactionOuterClass.TransferPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; } - return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } public static final int BOND_FIELD_NUMBER = 4; /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; * @return Whether the bond field is set. */ @java.lang.Override @@ -4716,30 +4716,30 @@ public boolean hasBond() { return payloadCase_ == 4; } /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; * @return The bond. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.BondPayload getBond() { + public pactus.transaction.TransactionOuterClass.PayloadBond getBond() { if (payloadCase_ == 4) { - return (pactus.transaction.TransactionOuterClass.BondPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; } - return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder getBondOrBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() { if (payloadCase_ == 4) { - return (pactus.transaction.TransactionOuterClass.BondPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; } - return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } public static final int UNBOND_FIELD_NUMBER = 5; /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; * @return Whether the unbond field is set. */ @java.lang.Override @@ -4747,30 +4747,30 @@ public boolean hasUnbond() { return payloadCase_ == 5; } /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; * @return The unbond. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.UnbondPayload getUnbond() { + public pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond() { if (payloadCase_ == 5) { - return (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; } - return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder getUnbondOrBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() { if (payloadCase_ == 5) { - return (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; } - return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } public static final int WITHDRAW_FIELD_NUMBER = 6; /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; * @return Whether the withdraw field is set. */ @java.lang.Override @@ -4778,25 +4778,25 @@ public boolean hasWithdraw() { return payloadCase_ == 6; } /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; * @return The withdraw. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.WithdrawPayload getWithdraw() { + public pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw() { if (payloadCase_ == 6) { - return (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; } - return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder getWithdrawOrBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() { if (payloadCase_ == 6) { - return (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; } - return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -4820,16 +4820,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) com.google.protobuf.GeneratedMessageV3.writeString(output, 2, memo_); } if (payloadCase_ == 3) { - output.writeMessage(3, (pactus.transaction.TransactionOuterClass.TransferPayload) payload_); + output.writeMessage(3, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); } if (payloadCase_ == 4) { - output.writeMessage(4, (pactus.transaction.TransactionOuterClass.BondPayload) payload_); + output.writeMessage(4, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); } if (payloadCase_ == 5) { - output.writeMessage(5, (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_); + output.writeMessage(5, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); } if (payloadCase_ == 6) { - output.writeMessage(6, (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_); + output.writeMessage(6, (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_); } getUnknownFields().writeTo(output); } @@ -4849,19 +4849,19 @@ public int getSerializedSize() { } if (payloadCase_ == 3) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (pactus.transaction.TransactionOuterClass.TransferPayload) payload_); + .computeMessageSize(3, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); } if (payloadCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (pactus.transaction.TransactionOuterClass.BondPayload) payload_); + .computeMessageSize(4, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); } if (payloadCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_); + .computeMessageSize(5, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); } if (payloadCase_ == 6) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_); + .computeMessageSize(6, (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -5459,9 +5459,9 @@ public Builder setMemoBytes( } private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransferPayload, pactus.transaction.TransactionOuterClass.TransferPayload.Builder, pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder> transferBuilder_; + pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder> transferBuilder_; /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; * @return Whether the transfer field is set. */ @java.lang.Override @@ -5469,27 +5469,27 @@ public boolean hasTransfer() { return payloadCase_ == 3; } /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; * @return The transfer. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransferPayload getTransfer() { + public pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer() { if (transferBuilder_ == null) { if (payloadCase_ == 3) { - return (pactus.transaction.TransactionOuterClass.TransferPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; } - return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } else { if (payloadCase_ == 3) { return transferBuilder_.getMessage(); } - return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } } /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; */ - public Builder setTransfer(pactus.transaction.TransactionOuterClass.TransferPayload value) { + public Builder setTransfer(pactus.transaction.TransactionOuterClass.PayloadTransfer value) { if (transferBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5503,10 +5503,10 @@ public Builder setTransfer(pactus.transaction.TransactionOuterClass.TransferPayl return this; } /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; */ public Builder setTransfer( - pactus.transaction.TransactionOuterClass.TransferPayload.Builder builderForValue) { + pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder builderForValue) { if (transferBuilder_ == null) { payload_ = builderForValue.build(); onChanged(); @@ -5517,13 +5517,13 @@ public Builder setTransfer( return this; } /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; */ - public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.TransferPayload value) { + public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.PayloadTransfer value) { if (transferBuilder_ == null) { if (payloadCase_ == 3 && - payload_ != pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance()) { - payload_ = pactus.transaction.TransactionOuterClass.TransferPayload.newBuilder((pactus.transaction.TransactionOuterClass.TransferPayload) payload_) + payload_ != pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance()) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadTransfer.newBuilder((pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_) .mergeFrom(value).buildPartial(); } else { payload_ = value; @@ -5540,7 +5540,7 @@ public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.TransferPa return this; } /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; */ public Builder clearTransfer() { if (transferBuilder_ == null) { @@ -5559,38 +5559,38 @@ public Builder clearTransfer() { return this; } /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; */ - public pactus.transaction.TransactionOuterClass.TransferPayload.Builder getTransferBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder getTransferBuilder() { return getTransferFieldBuilder().getBuilder(); } /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder getTransferOrBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() { if ((payloadCase_ == 3) && (transferBuilder_ != null)) { return transferBuilder_.getMessageOrBuilder(); } else { if (payloadCase_ == 3) { - return (pactus.transaction.TransactionOuterClass.TransferPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; } - return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } } /** - * .pactus.TransferPayload transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; */ private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransferPayload, pactus.transaction.TransactionOuterClass.TransferPayload.Builder, pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder> + pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder> getTransferFieldBuilder() { if (transferBuilder_ == null) { if (!(payloadCase_ == 3)) { - payload_ = pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance(); + payload_ = pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } transferBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.TransferPayload, pactus.transaction.TransactionOuterClass.TransferPayload.Builder, pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder>( - (pactus.transaction.TransactionOuterClass.TransferPayload) payload_, + pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder>( + (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_, getParentForChildren(), isClean()); payload_ = null; @@ -5601,9 +5601,9 @@ public pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder getTran } private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.BondPayload, pactus.transaction.TransactionOuterClass.BondPayload.Builder, pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder> bondBuilder_; + pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder> bondBuilder_; /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; * @return Whether the bond field is set. */ @java.lang.Override @@ -5611,27 +5611,27 @@ public boolean hasBond() { return payloadCase_ == 4; } /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; * @return The bond. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.BondPayload getBond() { + public pactus.transaction.TransactionOuterClass.PayloadBond getBond() { if (bondBuilder_ == null) { if (payloadCase_ == 4) { - return (pactus.transaction.TransactionOuterClass.BondPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; } - return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } else { if (payloadCase_ == 4) { return bondBuilder_.getMessage(); } - return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } } /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; */ - public Builder setBond(pactus.transaction.TransactionOuterClass.BondPayload value) { + public Builder setBond(pactus.transaction.TransactionOuterClass.PayloadBond value) { if (bondBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5645,10 +5645,10 @@ public Builder setBond(pactus.transaction.TransactionOuterClass.BondPayload valu return this; } /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; */ public Builder setBond( - pactus.transaction.TransactionOuterClass.BondPayload.Builder builderForValue) { + pactus.transaction.TransactionOuterClass.PayloadBond.Builder builderForValue) { if (bondBuilder_ == null) { payload_ = builderForValue.build(); onChanged(); @@ -5659,13 +5659,13 @@ public Builder setBond( return this; } /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; */ - public Builder mergeBond(pactus.transaction.TransactionOuterClass.BondPayload value) { + public Builder mergeBond(pactus.transaction.TransactionOuterClass.PayloadBond value) { if (bondBuilder_ == null) { if (payloadCase_ == 4 && - payload_ != pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance()) { - payload_ = pactus.transaction.TransactionOuterClass.BondPayload.newBuilder((pactus.transaction.TransactionOuterClass.BondPayload) payload_) + payload_ != pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance()) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadBond.newBuilder((pactus.transaction.TransactionOuterClass.PayloadBond) payload_) .mergeFrom(value).buildPartial(); } else { payload_ = value; @@ -5682,7 +5682,7 @@ public Builder mergeBond(pactus.transaction.TransactionOuterClass.BondPayload va return this; } /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; */ public Builder clearBond() { if (bondBuilder_ == null) { @@ -5701,38 +5701,38 @@ public Builder clearBond() { return this; } /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; */ - public pactus.transaction.TransactionOuterClass.BondPayload.Builder getBondBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadBond.Builder getBondBuilder() { return getBondFieldBuilder().getBuilder(); } /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder getBondOrBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() { if ((payloadCase_ == 4) && (bondBuilder_ != null)) { return bondBuilder_.getMessageOrBuilder(); } else { if (payloadCase_ == 4) { - return (pactus.transaction.TransactionOuterClass.BondPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; } - return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } } /** - * .pactus.BondPayload bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 4 [json_name = "bond"]; */ private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.BondPayload, pactus.transaction.TransactionOuterClass.BondPayload.Builder, pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder> + pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder> getBondFieldBuilder() { if (bondBuilder_ == null) { if (!(payloadCase_ == 4)) { - payload_ = pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance(); + payload_ = pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } bondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.BondPayload, pactus.transaction.TransactionOuterClass.BondPayload.Builder, pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder>( - (pactus.transaction.TransactionOuterClass.BondPayload) payload_, + pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder>( + (pactus.transaction.TransactionOuterClass.PayloadBond) payload_, getParentForChildren(), isClean()); payload_ = null; @@ -5743,9 +5743,9 @@ public pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder getBondOrBu } private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.UnbondPayload, pactus.transaction.TransactionOuterClass.UnbondPayload.Builder, pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder> unbondBuilder_; + pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder> unbondBuilder_; /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; * @return Whether the unbond field is set. */ @java.lang.Override @@ -5753,27 +5753,27 @@ public boolean hasUnbond() { return payloadCase_ == 5; } /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; * @return The unbond. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.UnbondPayload getUnbond() { + public pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond() { if (unbondBuilder_ == null) { if (payloadCase_ == 5) { - return (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; } - return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } else { if (payloadCase_ == 5) { return unbondBuilder_.getMessage(); } - return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } } /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; */ - public Builder setUnbond(pactus.transaction.TransactionOuterClass.UnbondPayload value) { + public Builder setUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbond value) { if (unbondBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5787,10 +5787,10 @@ public Builder setUnbond(pactus.transaction.TransactionOuterClass.UnbondPayload return this; } /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; */ public Builder setUnbond( - pactus.transaction.TransactionOuterClass.UnbondPayload.Builder builderForValue) { + pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder builderForValue) { if (unbondBuilder_ == null) { payload_ = builderForValue.build(); onChanged(); @@ -5801,13 +5801,13 @@ public Builder setUnbond( return this; } /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; */ - public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.UnbondPayload value) { + public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbond value) { if (unbondBuilder_ == null) { if (payloadCase_ == 5 && - payload_ != pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance()) { - payload_ = pactus.transaction.TransactionOuterClass.UnbondPayload.newBuilder((pactus.transaction.TransactionOuterClass.UnbondPayload) payload_) + payload_ != pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance()) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadUnbond.newBuilder((pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_) .mergeFrom(value).buildPartial(); } else { payload_ = value; @@ -5824,7 +5824,7 @@ public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.UnbondPayloa return this; } /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; */ public Builder clearUnbond() { if (unbondBuilder_ == null) { @@ -5843,38 +5843,38 @@ public Builder clearUnbond() { return this; } /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; */ - public pactus.transaction.TransactionOuterClass.UnbondPayload.Builder getUnbondBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder getUnbondBuilder() { return getUnbondFieldBuilder().getBuilder(); } /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder getUnbondOrBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() { if ((payloadCase_ == 5) && (unbondBuilder_ != null)) { return unbondBuilder_.getMessageOrBuilder(); } else { if (payloadCase_ == 5) { - return (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; } - return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } } /** - * .pactus.UnbondPayload unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; */ private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.UnbondPayload, pactus.transaction.TransactionOuterClass.UnbondPayload.Builder, pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder> + pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder> getUnbondFieldBuilder() { if (unbondBuilder_ == null) { if (!(payloadCase_ == 5)) { - payload_ = pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance(); + payload_ = pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } unbondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.UnbondPayload, pactus.transaction.TransactionOuterClass.UnbondPayload.Builder, pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder>( - (pactus.transaction.TransactionOuterClass.UnbondPayload) payload_, + pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder>( + (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_, getParentForChildren(), isClean()); payload_ = null; @@ -5885,9 +5885,9 @@ public pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder getUnbond } private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.WithdrawPayload, pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder, pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder> withdrawBuilder_; + pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder> withdrawBuilder_; /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; * @return Whether the withdraw field is set. */ @java.lang.Override @@ -5895,27 +5895,27 @@ public boolean hasWithdraw() { return payloadCase_ == 6; } /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; * @return The withdraw. */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.WithdrawPayload getWithdraw() { + public pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw() { if (withdrawBuilder_ == null) { if (payloadCase_ == 6) { - return (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; } - return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } else { if (payloadCase_ == 6) { return withdrawBuilder_.getMessage(); } - return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } } /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; */ - public Builder setWithdraw(pactus.transaction.TransactionOuterClass.WithdrawPayload value) { + public Builder setWithdraw(pactus.transaction.TransactionOuterClass.PayloadWithdraw value) { if (withdrawBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -5929,10 +5929,10 @@ public Builder setWithdraw(pactus.transaction.TransactionOuterClass.WithdrawPayl return this; } /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; */ public Builder setWithdraw( - pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder builderForValue) { + pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder builderForValue) { if (withdrawBuilder_ == null) { payload_ = builderForValue.build(); onChanged(); @@ -5943,13 +5943,13 @@ public Builder setWithdraw( return this; } /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; */ - public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.WithdrawPayload value) { + public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.PayloadWithdraw value) { if (withdrawBuilder_ == null) { if (payloadCase_ == 6 && - payload_ != pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance()) { - payload_ = pactus.transaction.TransactionOuterClass.WithdrawPayload.newBuilder((pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_) + payload_ != pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance()) { + payload_ = pactus.transaction.TransactionOuterClass.PayloadWithdraw.newBuilder((pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_) .mergeFrom(value).buildPartial(); } else { payload_ = value; @@ -5966,7 +5966,7 @@ public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.WithdrawPa return this; } /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; */ public Builder clearWithdraw() { if (withdrawBuilder_ == null) { @@ -5985,38 +5985,38 @@ public Builder clearWithdraw() { return this; } /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; */ - public pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder getWithdrawBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder getWithdrawBuilder() { return getWithdrawFieldBuilder().getBuilder(); } /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; */ @java.lang.Override - public pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder getWithdrawOrBuilder() { + public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() { if ((payloadCase_ == 6) && (withdrawBuilder_ != null)) { return withdrawBuilder_.getMessageOrBuilder(); } else { if (payloadCase_ == 6) { - return (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_; + return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; } - return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance(); + return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } } /** - * .pactus.WithdrawPayload withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; */ private com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.WithdrawPayload, pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder, pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder> + pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder> getWithdrawFieldBuilder() { if (withdrawBuilder_ == null) { if (!(payloadCase_ == 6)) { - payload_ = pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance(); + payload_ = pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } withdrawBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - pactus.transaction.TransactionOuterClass.WithdrawPayload, pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder, pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder>( - (pactus.transaction.TransactionOuterClass.WithdrawPayload) payload_, + pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder>( + (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_, getParentForChildren(), isClean()); payload_ = null; @@ -6186,7 +6186,7 @@ public interface GetRawTransferTransactionRequestOrBuilder extends } /** *
    -   * Request message for retrieving raw details of a transfer transaction.
    +   * Deprecated: Request message for retrieving raw details of a transfer transaction.
        * 
    * * Protobuf type {@code pactus.GetRawTransferTransactionRequest} @@ -6626,7 +6626,7 @@ protected Builder newBuilderForType( } /** *
    -     * Request message for retrieving raw details of a transfer transaction.
    +     * Deprecated: Request message for retrieving raw details of a transfer transaction.
          * 
    * * Protobuf type {@code pactus.GetRawTransferTransactionRequest} @@ -7446,7 +7446,7 @@ public interface GetRawBondTransactionRequestOrBuilder extends } /** *
    -   * Request message for retrieving raw details of a bond transaction.
    +   * Deprecated: Request message for retrieving raw details of a bond transaction.
        * 
    * * Protobuf type {@code pactus.GetRawBondTransactionRequest} @@ -7943,7 +7943,7 @@ protected Builder newBuilderForType( } /** *
    -     * Request message for retrieving raw details of a bond transaction.
    +     * Deprecated: Request message for retrieving raw details of a bond transaction.
          * 
    * * Protobuf type {@code pactus.GetRawBondTransactionRequest} @@ -8811,7 +8811,7 @@ public interface GetRawUnbondTransactionRequestOrBuilder extends } /** *
    -   * Request message for retrieving raw details of an unbond transaction.
    +   * Deprecated: Request message for retrieving raw details of an unbond transaction.
        * 
    * * Protobuf type {@code pactus.GetRawUnbondTransactionRequest} @@ -9140,7 +9140,7 @@ protected Builder newBuilderForType( } /** *
    -     * Request message for retrieving raw details of an unbond transaction.
    +     * Deprecated: Request message for retrieving raw details of an unbond transaction.
          * 
    * * Protobuf type {@code pactus.GetRawUnbondTransactionRequest} @@ -9724,7 +9724,7 @@ public interface GetRawWithdrawTransactionRequestOrBuilder extends } /** *
    -   * Request message for retrieving raw details of a withdraw transaction.
    +   * Deprecated: Request message for retrieving raw details of a withdraw transaction.
        * 
    * * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest} @@ -10164,7 +10164,7 @@ protected Builder newBuilderForType( } /** *
    -     * Request message for retrieving raw details of a withdraw transaction.
    +     * Deprecated: Request message for retrieving raw details of a withdraw transaction.
          * 
    * * Protobuf type {@code pactus.GetRawWithdrawTransactionRequest} @@ -10867,96 +10867,55 @@ public pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest } - public interface TransferPayloadOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.TransferPayload) + public interface GetRawTransactionResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pactus.GetRawTransactionResponse) com.google.protobuf.MessageOrBuilder { /** *
    -     * The sender's account address.
    -     * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - java.lang.String getSender(); - /** - *
    -     * The sender's account address.
    -     * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - com.google.protobuf.ByteString - getSenderBytes(); - - /** - *
    -     * The receiver's account address.
    +     * The raw transaction data.
          * 
    * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return The rawTransaction. */ - java.lang.String getReceiver(); + java.lang.String getRawTransaction(); /** *
    -     * The receiver's account address.
    +     * The raw transaction data.
          * 
    * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return The bytes for rawTransaction. */ com.google.protobuf.ByteString - getReceiverBytes(); - - /** - *
    -     * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
    -     * 
    - * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - long getAmount(); - - /** - *
    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -     * 
    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); + getRawTransactionBytes(); } /** *
    -   * Payload message for retrieving raw details of a transfer transaction.
    +   * Response message containing raw transaction data.
        * 
    * - * Protobuf type {@code pactus.TransferPayload} + * Protobuf type {@code pactus.GetRawTransactionResponse} */ - public static final class TransferPayload extends + public static final class GetRawTransactionResponse extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.TransferPayload) - TransferPayloadOrBuilder { + // @@protoc_insertion_point(message_implements:pactus.GetRawTransactionResponse) + GetRawTransactionResponseOrBuilder { private static final long serialVersionUID = 0L; - // Use TransferPayload.newBuilder() to construct. - private TransferPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use GetRawTransactionResponse.newBuilder() to construct. + private GetRawTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private TransferPayload() { - sender_ = ""; - receiver_ = ""; + private GetRawTransactionResponse() { + rawTransaction_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new TransferPayload(); + return new GetRawTransactionResponse(); } @java.lang.Override @@ -10966,3700 +10925,83 @@ protected java.lang.Object newInstance( } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransferPayload_descriptor; + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransferPayload_fieldAccessorTable + return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.TransferPayload.class, pactus.transaction.TransactionOuterClass.TransferPayload.Builder.class); + pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.Builder.class); } - public static final int SENDER_FIELD_NUMBER = 1; - private volatile java.lang.Object sender_; + public static final int RAW_TRANSACTION_FIELD_NUMBER = 1; + private volatile java.lang.Object rawTransaction_; /** *
    -     * The sender's account address.
    +     * The raw transaction data.
          * 
    * - * string sender = 1 [json_name = "sender"]; - * @return The sender. + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return The rawTransaction. */ @java.lang.Override - public java.lang.String getSender() { - java.lang.Object ref = sender_; + public java.lang.String getRawTransaction() { + java.lang.Object ref = rawTransaction_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - sender_ = s; + rawTransaction_ = s; return s; } } /** *
    -     * The sender's account address.
    +     * The raw transaction data.
          * 
    * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. + * string raw_transaction = 1 [json_name = "rawTransaction"]; + * @return The bytes for rawTransaction. */ @java.lang.Override public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; + getRawTransactionBytes() { + java.lang.Object ref = rawTransaction_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - sender_ = b; + rawTransaction_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int RECEIVER_FIELD_NUMBER = 2; - private volatile java.lang.Object receiver_; - /** - *
    -     * The receiver's account address.
    -     * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ + private byte memoizedIsInitialized = -1; @java.lang.Override - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rawTransaction_); } + getUnknownFields().writeTo(output); } - /** - *
    -     * The receiver's account address.
    -     * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AMOUNT_FIELD_NUMBER = 3; - private long amount_; - /** - *
    -     * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
    -     * 
    - * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - - public static final int FEE_FIELD_NUMBER = 4; - private long fee_; - /** - *
    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -     * 
    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_); - } - if (amount_ != 0L) { - output.writeInt64(3, amount_); - } - if (fee_ != 0L) { - output.writeInt64(4, fee_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_); - } - if (amount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, amount_); - } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, fee_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.TransferPayload)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.TransferPayload other = (pactus.transaction.TransactionOuterClass.TransferPayload) obj; - - if (!getSender() - .equals(other.getSender())) return false; - if (!getReceiver() - .equals(other.getReceiver())) return false; - if (getAmount() - != other.getAmount()) return false; - if (getFee() - != other.getFee()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SENDER_FIELD_NUMBER; - hash = (53 * hash) + getSender().hashCode(); - hash = (37 * hash) + RECEIVER_FIELD_NUMBER; - hash = (53 * hash) + getReceiver().hashCode(); - hash = (37 * hash) + AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAmount()); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.TransferPayload parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.TransferPayload prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
    -     * Payload message for retrieving raw details of a transfer transaction.
    -     * 
    - * - * Protobuf type {@code pactus.TransferPayload} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.TransferPayload) - pactus.transaction.TransactionOuterClass.TransferPayloadOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransferPayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransferPayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.TransferPayload.class, pactus.transaction.TransactionOuterClass.TransferPayload.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.TransferPayload.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - sender_ = ""; - - receiver_ = ""; - - amount_ = 0L; - - fee_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_TransferPayload_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransferPayload getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransferPayload build() { - pactus.transaction.TransactionOuterClass.TransferPayload result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransferPayload buildPartial() { - pactus.transaction.TransactionOuterClass.TransferPayload result = new pactus.transaction.TransactionOuterClass.TransferPayload(this); - result.sender_ = sender_; - result.receiver_ = receiver_; - result.amount_ = amount_; - result.fee_ = fee_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.TransferPayload) { - return mergeFrom((pactus.transaction.TransactionOuterClass.TransferPayload)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.TransferPayload other) { - if (other == pactus.transaction.TransactionOuterClass.TransferPayload.getDefaultInstance()) return this; - if (!other.getSender().isEmpty()) { - sender_ = other.sender_; - onChanged(); - } - if (!other.getReceiver().isEmpty()) { - receiver_ = other.receiver_; - onChanged(); - } - if (other.getAmount() != 0L) { - setAmount(other.getAmount()); - } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - sender_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - receiver_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: { - amount_ = input.readInt64(); - - break; - } // case 24 - case 32: { - fee_ = input.readInt64(); - - break; - } // case 32 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object sender_ = ""; - /** - *
    -       * The sender's account address.
    -       * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -       * The sender's account address.
    -       * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -       * The sender's account address.
    -       * 
    - * - * string sender = 1 [json_name = "sender"]; - * @param value The sender to set. - * @return This builder for chaining. - */ - public Builder setSender( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sender_ = value; - onChanged(); - return this; - } - /** - *
    -       * The sender's account address.
    -       * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return This builder for chaining. - */ - public Builder clearSender() { - - sender_ = getDefaultInstance().getSender(); - onChanged(); - return this; - } - /** - *
    -       * The sender's account address.
    -       * 
    - * - * string sender = 1 [json_name = "sender"]; - * @param value The bytes for sender to set. - * @return This builder for chaining. - */ - public Builder setSenderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sender_ = value; - onChanged(); - return this; - } - - private java.lang.Object receiver_ = ""; - /** - *
    -       * The receiver's account address.
    -       * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -       * The receiver's account address.
    -       * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -       * The receiver's account address.
    -       * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @param value The receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiver( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - receiver_ = value; - onChanged(); - return this; - } - /** - *
    -       * The receiver's account address.
    -       * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return This builder for chaining. - */ - public Builder clearReceiver() { - - receiver_ = getDefaultInstance().getReceiver(); - onChanged(); - return this; - } - /** - *
    -       * The receiver's account address.
    -       * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @param value The bytes for receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiverBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - receiver_ = value; - onChanged(); - return this; - } - - private long amount_ ; - /** - *
    -       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
    -       * 
    - * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - /** - *
    -       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
    -       * 
    - * - * int64 amount = 3 [json_name = "amount"]; - * @param value The amount to set. - * @return This builder for chaining. - */ - public Builder setAmount(long value) { - - amount_ = value; - onChanged(); - return this; - } - /** - *
    -       * The amount to be transferred, specified in NanoPAC. Must be greater than 0.
    -       * 
    - * - * int64 amount = 3 [json_name = "amount"]; - * @return This builder for chaining. - */ - public Builder clearAmount() { - - amount_ = 0L; - onChanged(); - return this; - } - - private long fee_ ; - /** - *
    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -       * 
    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -       * 
    - * - * int64 fee = 4 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -       * 
    - * - * int64 fee = 4 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.TransferPayload) - } - - // @@protoc_insertion_point(class_scope:pactus.TransferPayload) - private static final pactus.transaction.TransactionOuterClass.TransferPayload DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.TransferPayload(); - } - - public static pactus.transaction.TransactionOuterClass.TransferPayload getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TransferPayload parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.TransferPayload getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface BondPayloadOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.BondPayload) - com.google.protobuf.MessageOrBuilder { - - /** - *
    -     * The sender's account address.
    -     * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - java.lang.String getSender(); - /** - *
    -     * The sender's account address.
    -     * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - com.google.protobuf.ByteString - getSenderBytes(); - - /** - *
    -     * The receiver's validator address.
    -     * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ - java.lang.String getReceiver(); - /** - *
    -     * The receiver's validator address.
    -     * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - com.google.protobuf.ByteString - getReceiverBytes(); - - /** - *
    -     * The stake amount in NanoPAC. Must be greater than 0.
    -     * 
    - * - * int64 stake = 3 [json_name = "stake"]; - * @return The stake. - */ - long getStake(); - - /** - *
    -     * The public key of the validator.
    -     * 
    - * - * string public_key = 4 [json_name = "publicKey"]; - * @return The publicKey. - */ - java.lang.String getPublicKey(); - /** - *
    -     * The public key of the validator.
    -     * 
    - * - * string public_key = 4 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - com.google.protobuf.ByteString - getPublicKeyBytes(); - - /** - *
    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -     * 
    - * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); - } - /** - *
    -   * Payload message for retrieving raw details of a bond transaction.
    -   * 
    - * - * Protobuf type {@code pactus.BondPayload} - */ - public static final class BondPayload extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.BondPayload) - BondPayloadOrBuilder { - private static final long serialVersionUID = 0L; - // Use BondPayload.newBuilder() to construct. - private BondPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private BondPayload() { - sender_ = ""; - receiver_ = ""; - publicKey_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new BondPayload(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BondPayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BondPayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.BondPayload.class, pactus.transaction.TransactionOuterClass.BondPayload.Builder.class); - } - - public static final int SENDER_FIELD_NUMBER = 1; - private volatile java.lang.Object sender_; - /** - *
    -     * The sender's account address.
    -     * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - @java.lang.Override - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } - } - /** - *
    -     * The sender's account address.
    -     * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RECEIVER_FIELD_NUMBER = 2; - private volatile java.lang.Object receiver_; - /** - *
    -     * The receiver's validator address.
    -     * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ - @java.lang.Override - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } - } - /** - *
    -     * The receiver's validator address.
    -     * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STAKE_FIELD_NUMBER = 3; - private long stake_; - /** - *
    -     * The stake amount in NanoPAC. Must be greater than 0.
    -     * 
    - * - * int64 stake = 3 [json_name = "stake"]; - * @return The stake. - */ - @java.lang.Override - public long getStake() { - return stake_; - } - - public static final int PUBLIC_KEY_FIELD_NUMBER = 4; - private volatile java.lang.Object publicKey_; - /** - *
    -     * The public key of the validator.
    -     * 
    - * - * string public_key = 4 [json_name = "publicKey"]; - * @return The publicKey. - */ - @java.lang.Override - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } - } - /** - *
    -     * The public key of the validator.
    -     * 
    - * - * string public_key = 4 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEE_FIELD_NUMBER = 5; - private long fee_; - /** - *
    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -     * 
    - * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, receiver_); - } - if (stake_ != 0L) { - output.writeInt64(3, stake_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, publicKey_); - } - if (fee_ != 0L) { - output.writeInt64(5, fee_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sender_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sender_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(receiver_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, receiver_); - } - if (stake_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, stake_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, publicKey_); - } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, fee_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.BondPayload)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.BondPayload other = (pactus.transaction.TransactionOuterClass.BondPayload) obj; - - if (!getSender() - .equals(other.getSender())) return false; - if (!getReceiver() - .equals(other.getReceiver())) return false; - if (getStake() - != other.getStake()) return false; - if (!getPublicKey() - .equals(other.getPublicKey())) return false; - if (getFee() - != other.getFee()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SENDER_FIELD_NUMBER; - hash = (53 * hash) + getSender().hashCode(); - hash = (37 * hash) + RECEIVER_FIELD_NUMBER; - hash = (53 * hash) + getReceiver().hashCode(); - hash = (37 * hash) + STAKE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getStake()); - hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPublicKey().hashCode(); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.BondPayload parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.BondPayload prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
    -     * Payload message for retrieving raw details of a bond transaction.
    -     * 
    - * - * Protobuf type {@code pactus.BondPayload} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.BondPayload) - pactus.transaction.TransactionOuterClass.BondPayloadOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BondPayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BondPayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.BondPayload.class, pactus.transaction.TransactionOuterClass.BondPayload.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.BondPayload.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - sender_ = ""; - - receiver_ = ""; - - stake_ = 0L; - - publicKey_ = ""; - - fee_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_BondPayload_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BondPayload getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BondPayload build() { - pactus.transaction.TransactionOuterClass.BondPayload result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BondPayload buildPartial() { - pactus.transaction.TransactionOuterClass.BondPayload result = new pactus.transaction.TransactionOuterClass.BondPayload(this); - result.sender_ = sender_; - result.receiver_ = receiver_; - result.stake_ = stake_; - result.publicKey_ = publicKey_; - result.fee_ = fee_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.BondPayload) { - return mergeFrom((pactus.transaction.TransactionOuterClass.BondPayload)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.BondPayload other) { - if (other == pactus.transaction.TransactionOuterClass.BondPayload.getDefaultInstance()) return this; - if (!other.getSender().isEmpty()) { - sender_ = other.sender_; - onChanged(); - } - if (!other.getReceiver().isEmpty()) { - receiver_ = other.receiver_; - onChanged(); - } - if (other.getStake() != 0L) { - setStake(other.getStake()); - } - if (!other.getPublicKey().isEmpty()) { - publicKey_ = other.publicKey_; - onChanged(); - } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - sender_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - receiver_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: { - stake_ = input.readInt64(); - - break; - } // case 24 - case 34: { - publicKey_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 40: { - fee_ = input.readInt64(); - - break; - } // case 40 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object sender_ = ""; - /** - *
    -       * The sender's account address.
    -       * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return The sender. - */ - public java.lang.String getSender() { - java.lang.Object ref = sender_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sender_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -       * The sender's account address.
    -       * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return The bytes for sender. - */ - public com.google.protobuf.ByteString - getSenderBytes() { - java.lang.Object ref = sender_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - sender_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -       * The sender's account address.
    -       * 
    - * - * string sender = 1 [json_name = "sender"]; - * @param value The sender to set. - * @return This builder for chaining. - */ - public Builder setSender( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sender_ = value; - onChanged(); - return this; - } - /** - *
    -       * The sender's account address.
    -       * 
    - * - * string sender = 1 [json_name = "sender"]; - * @return This builder for chaining. - */ - public Builder clearSender() { - - sender_ = getDefaultInstance().getSender(); - onChanged(); - return this; - } - /** - *
    -       * The sender's account address.
    -       * 
    - * - * string sender = 1 [json_name = "sender"]; - * @param value The bytes for sender to set. - * @return This builder for chaining. - */ - public Builder setSenderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sender_ = value; - onChanged(); - return this; - } - - private java.lang.Object receiver_ = ""; - /** - *
    -       * The receiver's validator address.
    -       * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return The receiver. - */ - public java.lang.String getReceiver() { - java.lang.Object ref = receiver_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - receiver_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -       * The receiver's validator address.
    -       * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return The bytes for receiver. - */ - public com.google.protobuf.ByteString - getReceiverBytes() { - java.lang.Object ref = receiver_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - receiver_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -       * The receiver's validator address.
    -       * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @param value The receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiver( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - receiver_ = value; - onChanged(); - return this; - } - /** - *
    -       * The receiver's validator address.
    -       * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @return This builder for chaining. - */ - public Builder clearReceiver() { - - receiver_ = getDefaultInstance().getReceiver(); - onChanged(); - return this; - } - /** - *
    -       * The receiver's validator address.
    -       * 
    - * - * string receiver = 2 [json_name = "receiver"]; - * @param value The bytes for receiver to set. - * @return This builder for chaining. - */ - public Builder setReceiverBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - receiver_ = value; - onChanged(); - return this; - } - - private long stake_ ; - /** - *
    -       * The stake amount in NanoPAC. Must be greater than 0.
    -       * 
    - * - * int64 stake = 3 [json_name = "stake"]; - * @return The stake. - */ - @java.lang.Override - public long getStake() { - return stake_; - } - /** - *
    -       * The stake amount in NanoPAC. Must be greater than 0.
    -       * 
    - * - * int64 stake = 3 [json_name = "stake"]; - * @param value The stake to set. - * @return This builder for chaining. - */ - public Builder setStake(long value) { - - stake_ = value; - onChanged(); - return this; - } - /** - *
    -       * The stake amount in NanoPAC. Must be greater than 0.
    -       * 
    - * - * int64 stake = 3 [json_name = "stake"]; - * @return This builder for chaining. - */ - public Builder clearStake() { - - stake_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object publicKey_ = ""; - /** - *
    -       * The public key of the validator.
    -       * 
    - * - * string public_key = 4 [json_name = "publicKey"]; - * @return The publicKey. - */ - public java.lang.String getPublicKey() { - java.lang.Object ref = publicKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKey_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -       * The public key of the validator.
    -       * 
    - * - * string public_key = 4 [json_name = "publicKey"]; - * @return The bytes for publicKey. - */ - public com.google.protobuf.ByteString - getPublicKeyBytes() { - java.lang.Object ref = publicKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - publicKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -       * The public key of the validator.
    -       * 
    - * - * string public_key = 4 [json_name = "publicKey"]; - * @param value The publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - publicKey_ = value; - onChanged(); - return this; - } - /** - *
    -       * The public key of the validator.
    -       * 
    - * - * string public_key = 4 [json_name = "publicKey"]; - * @return This builder for chaining. - */ - public Builder clearPublicKey() { - - publicKey_ = getDefaultInstance().getPublicKey(); - onChanged(); - return this; - } - /** - *
    -       * The public key of the validator.
    -       * 
    - * - * string public_key = 4 [json_name = "publicKey"]; - * @param value The bytes for publicKey to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - publicKey_ = value; - onChanged(); - return this; - } - - private long fee_ ; - /** - *
    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -       * 
    - * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -       * 
    - * - * int64 fee = 5 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -       * 
    - * - * int64 fee = 5 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.BondPayload) - } - - // @@protoc_insertion_point(class_scope:pactus.BondPayload) - private static final pactus.transaction.TransactionOuterClass.BondPayload DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.BondPayload(); - } - - public static pactus.transaction.TransactionOuterClass.BondPayload getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BondPayload parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.BondPayload getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface UnbondPayloadOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.UnbondPayload) - com.google.protobuf.MessageOrBuilder { - - /** - *
    -     * The address of the validator to unbond from.
    -     * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - java.lang.String getValidatorAddress(); - /** - *
    -     * The address of the validator to unbond from.
    -     * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - com.google.protobuf.ByteString - getValidatorAddressBytes(); - } - /** - *
    -   * Payload message for retrieving raw details of an unbond transaction.
    -   * 
    - * - * Protobuf type {@code pactus.UnbondPayload} - */ - public static final class UnbondPayload extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.UnbondPayload) - UnbondPayloadOrBuilder { - private static final long serialVersionUID = 0L; - // Use UnbondPayload.newBuilder() to construct. - private UnbondPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UnbondPayload() { - validatorAddress_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UnbondPayload(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_UnbondPayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_UnbondPayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.UnbondPayload.class, pactus.transaction.TransactionOuterClass.UnbondPayload.Builder.class); - } - - public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object validatorAddress_; - /** - *
    -     * The address of the validator to unbond from.
    -     * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - @java.lang.Override - public java.lang.String getValidatorAddress() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - validatorAddress_ = s; - return s; - } - } - /** - *
    -     * The address of the validator to unbond from.
    -     * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValidatorAddressBytes() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - validatorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, validatorAddress_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, validatorAddress_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.UnbondPayload)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.UnbondPayload other = (pactus.transaction.TransactionOuterClass.UnbondPayload) obj; - - if (!getValidatorAddress() - .equals(other.getValidatorAddress())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getValidatorAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.UnbondPayload parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.UnbondPayload prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
    -     * Payload message for retrieving raw details of an unbond transaction.
    -     * 
    - * - * Protobuf type {@code pactus.UnbondPayload} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.UnbondPayload) - pactus.transaction.TransactionOuterClass.UnbondPayloadOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_UnbondPayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_UnbondPayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.UnbondPayload.class, pactus.transaction.TransactionOuterClass.UnbondPayload.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.UnbondPayload.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - validatorAddress_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_UnbondPayload_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.UnbondPayload getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.UnbondPayload build() { - pactus.transaction.TransactionOuterClass.UnbondPayload result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.UnbondPayload buildPartial() { - pactus.transaction.TransactionOuterClass.UnbondPayload result = new pactus.transaction.TransactionOuterClass.UnbondPayload(this); - result.validatorAddress_ = validatorAddress_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.UnbondPayload) { - return mergeFrom((pactus.transaction.TransactionOuterClass.UnbondPayload)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.UnbondPayload other) { - if (other == pactus.transaction.TransactionOuterClass.UnbondPayload.getDefaultInstance()) return this; - if (!other.getValidatorAddress().isEmpty()) { - validatorAddress_ = other.validatorAddress_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - validatorAddress_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object validatorAddress_ = ""; - /** - *
    -       * The address of the validator to unbond from.
    -       * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - public java.lang.String getValidatorAddress() { - java.lang.Object ref = validatorAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - validatorAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -       * The address of the validator to unbond from.
    -       * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - public com.google.protobuf.ByteString - getValidatorAddressBytes() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - validatorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -       * The address of the validator to unbond from.
    -       * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @param value The validatorAddress to set. - * @return This builder for chaining. - */ - public Builder setValidatorAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - validatorAddress_ = value; - onChanged(); - return this; - } - /** - *
    -       * The address of the validator to unbond from.
    -       * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return This builder for chaining. - */ - public Builder clearValidatorAddress() { - - validatorAddress_ = getDefaultInstance().getValidatorAddress(); - onChanged(); - return this; - } - /** - *
    -       * The address of the validator to unbond from.
    -       * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @param value The bytes for validatorAddress to set. - * @return This builder for chaining. - */ - public Builder setValidatorAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - validatorAddress_ = value; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.UnbondPayload) - } - - // @@protoc_insertion_point(class_scope:pactus.UnbondPayload) - private static final pactus.transaction.TransactionOuterClass.UnbondPayload DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.UnbondPayload(); - } - - public static pactus.transaction.TransactionOuterClass.UnbondPayload getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UnbondPayload parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.UnbondPayload getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface WithdrawPayloadOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.WithdrawPayload) - com.google.protobuf.MessageOrBuilder { - - /** - *
    -     * The address of the validator to withdraw from.
    -     * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - java.lang.String getValidatorAddress(); - /** - *
    -     * The address of the validator to withdraw from.
    -     * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - com.google.protobuf.ByteString - getValidatorAddressBytes(); - - /** - *
    -     * The address of the account to withdraw to.
    -     * 
    - * - * string account_address = 2 [json_name = "accountAddress"]; - * @return The accountAddress. - */ - java.lang.String getAccountAddress(); - /** - *
    -     * The address of the account to withdraw to.
    -     * 
    - * - * string account_address = 2 [json_name = "accountAddress"]; - * @return The bytes for accountAddress. - */ - com.google.protobuf.ByteString - getAccountAddressBytes(); - - /** - *
    -     * The withdrawal amount in NanoPAC. Must be greater than 0.
    -     * 
    - * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - long getAmount(); - - /** - *
    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -     * 
    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); - } - /** - *
    -   * Payload message for retrieving raw details of a withdraw transaction.
    -   * 
    - * - * Protobuf type {@code pactus.WithdrawPayload} - */ - public static final class WithdrawPayload extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.WithdrawPayload) - WithdrawPayloadOrBuilder { - private static final long serialVersionUID = 0L; - // Use WithdrawPayload.newBuilder() to construct. - private WithdrawPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private WithdrawPayload() { - validatorAddress_ = ""; - accountAddress_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new WithdrawPayload(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_WithdrawPayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_WithdrawPayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.WithdrawPayload.class, pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder.class); - } - - public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object validatorAddress_; - /** - *
    -     * The address of the validator to withdraw from.
    -     * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - @java.lang.Override - public java.lang.String getValidatorAddress() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - validatorAddress_ = s; - return s; - } - } - /** - *
    -     * The address of the validator to withdraw from.
    -     * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getValidatorAddressBytes() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - validatorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACCOUNT_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object accountAddress_; - /** - *
    -     * The address of the account to withdraw to.
    -     * 
    - * - * string account_address = 2 [json_name = "accountAddress"]; - * @return The accountAddress. - */ - @java.lang.Override - public java.lang.String getAccountAddress() { - java.lang.Object ref = accountAddress_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accountAddress_ = s; - return s; - } - } - /** - *
    -     * The address of the account to withdraw to.
    -     * 
    - * - * string account_address = 2 [json_name = "accountAddress"]; - * @return The bytes for accountAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAccountAddressBytes() { - java.lang.Object ref = accountAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - accountAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AMOUNT_FIELD_NUMBER = 3; - private long amount_; - /** - *
    -     * The withdrawal amount in NanoPAC. Must be greater than 0.
    -     * 
    - * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - - public static final int FEE_FIELD_NUMBER = 4; - private long fee_; - /** - *
    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -     * 
    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, validatorAddress_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accountAddress_); - } - if (amount_ != 0L) { - output.writeInt64(3, amount_); - } - if (fee_ != 0L) { - output.writeInt64(4, fee_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, validatorAddress_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accountAddress_); - } - if (amount_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, amount_); - } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, fee_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof pactus.transaction.TransactionOuterClass.WithdrawPayload)) { - return super.equals(obj); - } - pactus.transaction.TransactionOuterClass.WithdrawPayload other = (pactus.transaction.TransactionOuterClass.WithdrawPayload) obj; - - if (!getValidatorAddress() - .equals(other.getValidatorAddress())) return false; - if (!getAccountAddress() - .equals(other.getAccountAddress())) return false; - if (getAmount() - != other.getAmount()) return false; - if (getFee() - != other.getFee()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getValidatorAddress().hashCode(); - hash = (37 * hash) + ACCOUNT_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getAccountAddress().hashCode(); - hash = (37 * hash) + AMOUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getAmount()); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static pactus.transaction.TransactionOuterClass.WithdrawPayload parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(pactus.transaction.TransactionOuterClass.WithdrawPayload prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
    -     * Payload message for retrieving raw details of a withdraw transaction.
    -     * 
    - * - * Protobuf type {@code pactus.WithdrawPayload} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:pactus.WithdrawPayload) - pactus.transaction.TransactionOuterClass.WithdrawPayloadOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_WithdrawPayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_WithdrawPayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.WithdrawPayload.class, pactus.transaction.TransactionOuterClass.WithdrawPayload.Builder.class); - } - - // Construct using pactus.transaction.TransactionOuterClass.WithdrawPayload.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - validatorAddress_ = ""; - - accountAddress_ = ""; - - amount_ = 0L; - - fee_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_WithdrawPayload_descriptor; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.WithdrawPayload getDefaultInstanceForType() { - return pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance(); - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.WithdrawPayload build() { - pactus.transaction.TransactionOuterClass.WithdrawPayload result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.WithdrawPayload buildPartial() { - pactus.transaction.TransactionOuterClass.WithdrawPayload result = new pactus.transaction.TransactionOuterClass.WithdrawPayload(this); - result.validatorAddress_ = validatorAddress_; - result.accountAddress_ = accountAddress_; - result.amount_ = amount_; - result.fee_ = fee_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof pactus.transaction.TransactionOuterClass.WithdrawPayload) { - return mergeFrom((pactus.transaction.TransactionOuterClass.WithdrawPayload)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(pactus.transaction.TransactionOuterClass.WithdrawPayload other) { - if (other == pactus.transaction.TransactionOuterClass.WithdrawPayload.getDefaultInstance()) return this; - if (!other.getValidatorAddress().isEmpty()) { - validatorAddress_ = other.validatorAddress_; - onChanged(); - } - if (!other.getAccountAddress().isEmpty()) { - accountAddress_ = other.accountAddress_; - onChanged(); - } - if (other.getAmount() != 0L) { - setAmount(other.getAmount()); - } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - validatorAddress_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: { - accountAddress_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: { - amount_ = input.readInt64(); - - break; - } // case 24 - case 32: { - fee_ = input.readInt64(); - - break; - } // case 32 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object validatorAddress_ = ""; - /** - *
    -       * The address of the validator to withdraw from.
    -       * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The validatorAddress. - */ - public java.lang.String getValidatorAddress() { - java.lang.Object ref = validatorAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - validatorAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -       * The address of the validator to withdraw from.
    -       * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return The bytes for validatorAddress. - */ - public com.google.protobuf.ByteString - getValidatorAddressBytes() { - java.lang.Object ref = validatorAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - validatorAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -       * The address of the validator to withdraw from.
    -       * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @param value The validatorAddress to set. - * @return This builder for chaining. - */ - public Builder setValidatorAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - validatorAddress_ = value; - onChanged(); - return this; - } - /** - *
    -       * The address of the validator to withdraw from.
    -       * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @return This builder for chaining. - */ - public Builder clearValidatorAddress() { - - validatorAddress_ = getDefaultInstance().getValidatorAddress(); - onChanged(); - return this; - } - /** - *
    -       * The address of the validator to withdraw from.
    -       * 
    - * - * string validator_address = 1 [json_name = "validatorAddress"]; - * @param value The bytes for validatorAddress to set. - * @return This builder for chaining. - */ - public Builder setValidatorAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - validatorAddress_ = value; - onChanged(); - return this; - } - - private java.lang.Object accountAddress_ = ""; - /** - *
    -       * The address of the account to withdraw to.
    -       * 
    - * - * string account_address = 2 [json_name = "accountAddress"]; - * @return The accountAddress. - */ - public java.lang.String getAccountAddress() { - java.lang.Object ref = accountAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accountAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -       * The address of the account to withdraw to.
    -       * 
    - * - * string account_address = 2 [json_name = "accountAddress"]; - * @return The bytes for accountAddress. - */ - public com.google.protobuf.ByteString - getAccountAddressBytes() { - java.lang.Object ref = accountAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - accountAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -       * The address of the account to withdraw to.
    -       * 
    - * - * string account_address = 2 [json_name = "accountAddress"]; - * @param value The accountAddress to set. - * @return This builder for chaining. - */ - public Builder setAccountAddress( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - accountAddress_ = value; - onChanged(); - return this; - } - /** - *
    -       * The address of the account to withdraw to.
    -       * 
    - * - * string account_address = 2 [json_name = "accountAddress"]; - * @return This builder for chaining. - */ - public Builder clearAccountAddress() { - - accountAddress_ = getDefaultInstance().getAccountAddress(); - onChanged(); - return this; - } - /** - *
    -       * The address of the account to withdraw to.
    -       * 
    - * - * string account_address = 2 [json_name = "accountAddress"]; - * @param value The bytes for accountAddress to set. - * @return This builder for chaining. - */ - public Builder setAccountAddressBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - accountAddress_ = value; - onChanged(); - return this; - } - - private long amount_ ; - /** - *
    -       * The withdrawal amount in NanoPAC. Must be greater than 0.
    -       * 
    - * - * int64 amount = 3 [json_name = "amount"]; - * @return The amount. - */ - @java.lang.Override - public long getAmount() { - return amount_; - } - /** - *
    -       * The withdrawal amount in NanoPAC. Must be greater than 0.
    -       * 
    - * - * int64 amount = 3 [json_name = "amount"]; - * @param value The amount to set. - * @return This builder for chaining. - */ - public Builder setAmount(long value) { - - amount_ = value; - onChanged(); - return this; - } - /** - *
    -       * The withdrawal amount in NanoPAC. Must be greater than 0.
    -       * 
    - * - * int64 amount = 3 [json_name = "amount"]; - * @return This builder for chaining. - */ - public Builder clearAmount() { - - amount_ = 0L; - onChanged(); - return this; - } - - private long fee_ ; - /** - *
    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -       * 
    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -       * 
    - * - * int64 fee = 4 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    -       * 
    - * - * int64 fee = 4 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:pactus.WithdrawPayload) - } - - // @@protoc_insertion_point(class_scope:pactus.WithdrawPayload) - private static final pactus.transaction.TransactionOuterClass.WithdrawPayload DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new pactus.transaction.TransactionOuterClass.WithdrawPayload(); - } - - public static pactus.transaction.TransactionOuterClass.WithdrawPayload getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public WithdrawPayload parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public pactus.transaction.TransactionOuterClass.WithdrawPayload getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface GetRawTransactionResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:pactus.GetRawTransactionResponse) - com.google.protobuf.MessageOrBuilder { - - /** - *
    -     * The raw transaction data.
    -     * 
    - * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return The rawTransaction. - */ - java.lang.String getRawTransaction(); - /** - *
    -     * The raw transaction data.
    -     * 
    - * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return The bytes for rawTransaction. - */ - com.google.protobuf.ByteString - getRawTransactionBytes(); - } - /** - *
    -   * Response message containing raw transaction data.
    -   * 
    - * - * Protobuf type {@code pactus.GetRawTransactionResponse} - */ - public static final class GetRawTransactionResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:pactus.GetRawTransactionResponse) - GetRawTransactionResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetRawTransactionResponse.newBuilder() to construct. - private GetRawTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetRawTransactionResponse() { - rawTransaction_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetRawTransactionResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return pactus.transaction.TransactionOuterClass.internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.class, pactus.transaction.TransactionOuterClass.GetRawTransactionResponse.Builder.class); - } - - public static final int RAW_TRANSACTION_FIELD_NUMBER = 1; - private volatile java.lang.Object rawTransaction_; - /** - *
    -     * The raw transaction data.
    -     * 
    - * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return The rawTransaction. - */ - @java.lang.Override - public java.lang.String getRawTransaction() { - java.lang.Object ref = rawTransaction_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - rawTransaction_ = s; - return s; - } - } - /** - *
    -     * The raw transaction data.
    -     * 
    - * - * string raw_transaction = 1 [json_name = "rawTransaction"]; - * @return The bytes for rawTransaction. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getRawTransactionBytes() { - java.lang.Object ref = rawTransaction_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - rawTransaction_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rawTransaction_); - } - getUnknownFields().writeTo(output); - } - + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; @@ -15171,6 +11513,16 @@ public interface PayloadTransferOrBuilder extends * @return The amount. */ long getAmount(); + + /** + *
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); } /** *
    @@ -15325,6 +11677,21 @@ public long getAmount() {
           return amount_;
         }
     
    +    public static final int FEE_FIELD_NUMBER = 4;
    +    private long fee_;
    +    /**
    +     * 
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -15348,6 +11715,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (amount_ != 0L) { output.writeInt64(3, amount_); } + if (fee_ != 0L) { + output.writeInt64(4, fee_); + } getUnknownFields().writeTo(output); } @@ -15367,6 +11737,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, amount_); } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, fee_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -15388,6 +11762,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getReceiver())) return false; if (getAmount() != other.getAmount()) return false; + if (getFee() + != other.getFee()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -15406,6 +11782,9 @@ public int hashCode() { hash = (37 * hash) + AMOUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAmount()); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -15544,6 +11923,8 @@ public Builder clear() { amount_ = 0L; + fee_ = 0L; + return this; } @@ -15573,6 +11954,7 @@ public pactus.transaction.TransactionOuterClass.PayloadTransfer buildPartial() { result.sender_ = sender_; result.receiver_ = receiver_; result.amount_ = amount_; + result.fee_ = fee_; onBuilt(); return result; } @@ -15632,6 +12014,9 @@ public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadTransfe if (other.getAmount() != 0L) { setAmount(other.getAmount()); } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -15673,6 +12058,11 @@ public Builder mergeFrom( break; } // case 24 + case 32: { + fee_ = input.readInt64(); + + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -15923,6 +12313,49 @@ public Builder clearAmount() { onChanged(); return this; } + + private long fee_ ; + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 4 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 4 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -16029,17 +12462,47 @@ public interface PayloadBondOrBuilder extends * @return The bytes for receiver. */ com.google.protobuf.ByteString - getReceiverBytes(); + getReceiverBytes(); + + /** + *
    +     * The stake amount in NanoPAC.
    +     * 
    + * + * int64 stake = 3 [json_name = "stake"]; + * @return The stake. + */ + long getStake(); + + /** + *
    +     * The public key of the validator.
    +     * 
    + * + * string public_key = 4 [json_name = "publicKey"]; + * @return The publicKey. + */ + java.lang.String getPublicKey(); + /** + *
    +     * The public key of the validator.
    +     * 
    + * + * string public_key = 4 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + com.google.protobuf.ByteString + getPublicKeyBytes(); /** *
    -     * The stake amount in NanoPAC.
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
          * 
    * - * int64 stake = 3 [json_name = "stake"]; - * @return The stake. + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. */ - long getStake(); + long getFee(); } /** *
    @@ -16060,6 +12523,7 @@ private PayloadBond(com.google.protobuf.GeneratedMessageV3.Builder builder) {
         private PayloadBond() {
           sender_ = "";
           receiver_ = "";
    +      publicKey_ = "";
         }
     
         @java.lang.Override
    @@ -16194,6 +12658,67 @@ public long getStake() {
           return stake_;
         }
     
    +    public static final int PUBLIC_KEY_FIELD_NUMBER = 4;
    +    private volatile java.lang.Object publicKey_;
    +    /**
    +     * 
    +     * The public key of the validator.
    +     * 
    + * + * string public_key = 4 [json_name = "publicKey"]; + * @return The publicKey. + */ + @java.lang.Override + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } + } + /** + *
    +     * The public key of the validator.
    +     * 
    + * + * string public_key = 4 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FEE_FIELD_NUMBER = 5; + private long fee_; + /** + *
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -16217,6 +12742,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (stake_ != 0L) { output.writeInt64(3, stake_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, publicKey_); + } + if (fee_ != 0L) { + output.writeInt64(5, fee_); + } getUnknownFields().writeTo(output); } @@ -16236,6 +12767,13 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, stake_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, publicKey_); + } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, fee_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -16257,6 +12795,10 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getReceiver())) return false; if (getStake() != other.getStake()) return false; + if (!getPublicKey() + .equals(other.getPublicKey())) return false; + if (getFee() + != other.getFee()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -16275,6 +12817,11 @@ public int hashCode() { hash = (37 * hash) + STAKE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStake()); + hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPublicKey().hashCode(); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -16413,6 +12960,10 @@ public Builder clear() { stake_ = 0L; + publicKey_ = ""; + + fee_ = 0L; + return this; } @@ -16442,6 +12993,8 @@ public pactus.transaction.TransactionOuterClass.PayloadBond buildPartial() { result.sender_ = sender_; result.receiver_ = receiver_; result.stake_ = stake_; + result.publicKey_ = publicKey_; + result.fee_ = fee_; onBuilt(); return result; } @@ -16501,6 +13054,13 @@ public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadBond ot if (other.getStake() != 0L) { setStake(other.getStake()); } + if (!other.getPublicKey().isEmpty()) { + publicKey_ = other.publicKey_; + onChanged(); + } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -16542,6 +13102,16 @@ public Builder mergeFrom( break; } // case 24 + case 34: { + publicKey_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: { + fee_ = input.readInt64(); + + break; + } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -16788,7 +13358,146 @@ public Builder setStake(long value) { */ public Builder clearStake() { - stake_ = 0L; + stake_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object publicKey_ = ""; + /** + *
    +       * The public key of the validator.
    +       * 
    + * + * string public_key = 4 [json_name = "publicKey"]; + * @return The publicKey. + */ + public java.lang.String getPublicKey() { + java.lang.Object ref = publicKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +       * The public key of the validator.
    +       * 
    + * + * string public_key = 4 [json_name = "publicKey"]; + * @return The bytes for publicKey. + */ + public com.google.protobuf.ByteString + getPublicKeyBytes() { + java.lang.Object ref = publicKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + publicKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +       * The public key of the validator.
    +       * 
    + * + * string public_key = 4 [json_name = "publicKey"]; + * @param value The publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKey_ = value; + onChanged(); + return this; + } + /** + *
    +       * The public key of the validator.
    +       * 
    + * + * string public_key = 4 [json_name = "publicKey"]; + * @return This builder for chaining. + */ + public Builder clearPublicKey() { + + publicKey_ = getDefaultInstance().getPublicKey(); + onChanged(); + return this; + } + /** + *
    +       * The public key of the validator.
    +       * 
    + * + * string public_key = 4 [json_name = "publicKey"]; + * @param value The bytes for publicKey to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKey_ = value; + onChanged(); + return this; + } + + private long fee_ ; + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 5 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; onChanged(); return this; } @@ -18233,43 +14942,43 @@ public interface PayloadWithdrawOrBuilder extends /** *
    -     * The address to withdraw from.
    +     * The address of the validator to withdraw from.
          * 
    * - * string from = 1 [json_name = "from"]; - * @return The from. + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The validatorAddress. */ - java.lang.String getFrom(); + java.lang.String getValidatorAddress(); /** *
    -     * The address to withdraw from.
    +     * The address of the validator to withdraw from.
          * 
    * - * string from = 1 [json_name = "from"]; - * @return The bytes for from. + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. */ com.google.protobuf.ByteString - getFromBytes(); + getValidatorAddressBytes(); /** *
    -     * The address to withdraw to.
    +     * The address of the account to withdraw to.
          * 
    * - * string to = 2 [json_name = "to"]; - * @return The to. + * string account_address = 2 [json_name = "accountAddress"]; + * @return The accountAddress. */ - java.lang.String getTo(); + java.lang.String getAccountAddress(); /** *
    -     * The address to withdraw to.
    +     * The address of the account to withdraw to.
          * 
    * - * string to = 2 [json_name = "to"]; - * @return The bytes for to. + * string account_address = 2 [json_name = "accountAddress"]; + * @return The bytes for accountAddress. */ com.google.protobuf.ByteString - getToBytes(); + getAccountAddressBytes(); /** *
    @@ -18280,6 +14989,16 @@ public interface PayloadWithdrawOrBuilder extends
          * @return The amount.
          */
         long getAmount();
    +
    +    /**
    +     * 
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); } /** *
    @@ -18298,8 +15017,8 @@ private PayloadWithdraw(com.google.protobuf.GeneratedMessageV3.Builder builde
           super(builder);
         }
         private PayloadWithdraw() {
    -      from_ = "";
    -      to_ = "";
    +      validatorAddress_ = "";
    +      accountAddress_ = "";
         }
     
         @java.lang.Override
    @@ -18327,92 +15046,92 @@ protected java.lang.Object newInstance(
                   pactus.transaction.TransactionOuterClass.PayloadWithdraw.class, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder.class);
         }
     
    -    public static final int FROM_FIELD_NUMBER = 1;
    -    private volatile java.lang.Object from_;
    +    public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 1;
    +    private volatile java.lang.Object validatorAddress_;
         /**
          * 
    -     * The address to withdraw from.
    +     * The address of the validator to withdraw from.
          * 
    * - * string from = 1 [json_name = "from"]; - * @return The from. + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The validatorAddress. */ @java.lang.Override - public java.lang.String getFrom() { - java.lang.Object ref = from_; + public java.lang.String getValidatorAddress() { + java.lang.Object ref = validatorAddress_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - from_ = s; + validatorAddress_ = s; return s; } } /** *
    -     * The address to withdraw from.
    +     * The address of the validator to withdraw from.
          * 
    * - * string from = 1 [json_name = "from"]; - * @return The bytes for from. + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. */ @java.lang.Override public com.google.protobuf.ByteString - getFromBytes() { - java.lang.Object ref = from_; + getValidatorAddressBytes() { + java.lang.Object ref = validatorAddress_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - from_ = b; + validatorAddress_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int TO_FIELD_NUMBER = 2; - private volatile java.lang.Object to_; + public static final int ACCOUNT_ADDRESS_FIELD_NUMBER = 2; + private volatile java.lang.Object accountAddress_; /** *
    -     * The address to withdraw to.
    +     * The address of the account to withdraw to.
          * 
    * - * string to = 2 [json_name = "to"]; - * @return The to. + * string account_address = 2 [json_name = "accountAddress"]; + * @return The accountAddress. */ @java.lang.Override - public java.lang.String getTo() { - java.lang.Object ref = to_; + public java.lang.String getAccountAddress() { + java.lang.Object ref = accountAddress_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - to_ = s; + accountAddress_ = s; return s; } } /** *
    -     * The address to withdraw to.
    +     * The address of the account to withdraw to.
          * 
    * - * string to = 2 [json_name = "to"]; - * @return The bytes for to. + * string account_address = 2 [json_name = "accountAddress"]; + * @return The bytes for accountAddress. */ @java.lang.Override public com.google.protobuf.ByteString - getToBytes() { - java.lang.Object ref = to_; + getAccountAddressBytes() { + java.lang.Object ref = accountAddress_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - to_ = b; + accountAddress_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -18434,6 +15153,21 @@ public long getAmount() { return amount_; } + public static final int FEE_FIELD_NUMBER = 4; + private long fee_; + /** + *
    +     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +     * 
    + * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -18448,15 +15182,18 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(from_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, from_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, validatorAddress_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(to_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, to_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountAddress_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accountAddress_); } if (amount_ != 0L) { output.writeInt64(3, amount_); } + if (fee_ != 0L) { + output.writeInt64(4, fee_); + } getUnknownFields().writeTo(output); } @@ -18466,16 +15203,20 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(from_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, from_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(validatorAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, validatorAddress_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(to_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, to_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountAddress_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accountAddress_); } if (amount_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, amount_); } + if (fee_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, fee_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -18491,12 +15232,14 @@ public boolean equals(final java.lang.Object obj) { } pactus.transaction.TransactionOuterClass.PayloadWithdraw other = (pactus.transaction.TransactionOuterClass.PayloadWithdraw) obj; - if (!getFrom() - .equals(other.getFrom())) return false; - if (!getTo() - .equals(other.getTo())) return false; + if (!getValidatorAddress() + .equals(other.getValidatorAddress())) return false; + if (!getAccountAddress() + .equals(other.getAccountAddress())) return false; if (getAmount() != other.getAmount()) return false; + if (getFee() + != other.getFee()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -18508,13 +15251,16 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + FROM_FIELD_NUMBER; - hash = (53 * hash) + getFrom().hashCode(); - hash = (37 * hash) + TO_FIELD_NUMBER; - hash = (53 * hash) + getTo().hashCode(); + hash = (37 * hash) + VALIDATOR_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getValidatorAddress().hashCode(); + hash = (37 * hash) + ACCOUNT_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAccountAddress().hashCode(); hash = (37 * hash) + AMOUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAmount()); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -18647,12 +15393,14 @@ private Builder( @java.lang.Override public Builder clear() { super.clear(); - from_ = ""; + validatorAddress_ = ""; - to_ = ""; + accountAddress_ = ""; amount_ = 0L; + fee_ = 0L; + return this; } @@ -18679,9 +15427,10 @@ public pactus.transaction.TransactionOuterClass.PayloadWithdraw build() { @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadWithdraw buildPartial() { pactus.transaction.TransactionOuterClass.PayloadWithdraw result = new pactus.transaction.TransactionOuterClass.PayloadWithdraw(this); - result.from_ = from_; - result.to_ = to_; + result.validatorAddress_ = validatorAddress_; + result.accountAddress_ = accountAddress_; result.amount_ = amount_; + result.fee_ = fee_; onBuilt(); return result; } @@ -18730,17 +15479,20 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadWithdraw other) { if (other == pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance()) return this; - if (!other.getFrom().isEmpty()) { - from_ = other.from_; + if (!other.getValidatorAddress().isEmpty()) { + validatorAddress_ = other.validatorAddress_; onChanged(); } - if (!other.getTo().isEmpty()) { - to_ = other.to_; + if (!other.getAccountAddress().isEmpty()) { + accountAddress_ = other.accountAddress_; onChanged(); } if (other.getAmount() != 0L) { setAmount(other.getAmount()); } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -18768,12 +15520,12 @@ public Builder mergeFrom( done = true; break; case 10: { - from_ = input.readStringRequireUtf8(); + validatorAddress_ = input.readStringRequireUtf8(); break; } // case 10 case 18: { - to_ = input.readStringRequireUtf8(); + accountAddress_ = input.readStringRequireUtf8(); break; } // case 18 @@ -18782,6 +15534,11 @@ public Builder mergeFrom( break; } // case 24 + case 32: { + fee_ = input.readInt64(); + + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -18798,22 +15555,22 @@ public Builder mergeFrom( return this; } - private java.lang.Object from_ = ""; + private java.lang.Object validatorAddress_ = ""; /** *
    -       * The address to withdraw from.
    +       * The address of the validator to withdraw from.
            * 
    * - * string from = 1 [json_name = "from"]; - * @return The from. + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The validatorAddress. */ - public java.lang.String getFrom() { - java.lang.Object ref = from_; + public java.lang.String getValidatorAddress() { + java.lang.Object ref = validatorAddress_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - from_ = s; + validatorAddress_ = s; return s; } else { return (java.lang.String) ref; @@ -18821,20 +15578,20 @@ public java.lang.String getFrom() { } /** *
    -       * The address to withdraw from.
    +       * The address of the validator to withdraw from.
            * 
    * - * string from = 1 [json_name = "from"]; - * @return The bytes for from. + * string validator_address = 1 [json_name = "validatorAddress"]; + * @return The bytes for validatorAddress. */ public com.google.protobuf.ByteString - getFromBytes() { - java.lang.Object ref = from_; + getValidatorAddressBytes() { + java.lang.Object ref = validatorAddress_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - from_ = b; + validatorAddress_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -18842,74 +15599,74 @@ public java.lang.String getFrom() { } /** *
    -       * The address to withdraw from.
    +       * The address of the validator to withdraw from.
            * 
    * - * string from = 1 [json_name = "from"]; - * @param value The from to set. + * string validator_address = 1 [json_name = "validatorAddress"]; + * @param value The validatorAddress to set. * @return This builder for chaining. */ - public Builder setFrom( + public Builder setValidatorAddress( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - from_ = value; + validatorAddress_ = value; onChanged(); return this; } /** *
    -       * The address to withdraw from.
    +       * The address of the validator to withdraw from.
            * 
    * - * string from = 1 [json_name = "from"]; + * string validator_address = 1 [json_name = "validatorAddress"]; * @return This builder for chaining. */ - public Builder clearFrom() { + public Builder clearValidatorAddress() { - from_ = getDefaultInstance().getFrom(); + validatorAddress_ = getDefaultInstance().getValidatorAddress(); onChanged(); return this; } /** *
    -       * The address to withdraw from.
    +       * The address of the validator to withdraw from.
            * 
    * - * string from = 1 [json_name = "from"]; - * @param value The bytes for from to set. + * string validator_address = 1 [json_name = "validatorAddress"]; + * @param value The bytes for validatorAddress to set. * @return This builder for chaining. */ - public Builder setFromBytes( + public Builder setValidatorAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - from_ = value; + validatorAddress_ = value; onChanged(); return this; } - private java.lang.Object to_ = ""; + private java.lang.Object accountAddress_ = ""; /** *
    -       * The address to withdraw to.
    +       * The address of the account to withdraw to.
            * 
    * - * string to = 2 [json_name = "to"]; - * @return The to. + * string account_address = 2 [json_name = "accountAddress"]; + * @return The accountAddress. */ - public java.lang.String getTo() { - java.lang.Object ref = to_; + public java.lang.String getAccountAddress() { + java.lang.Object ref = accountAddress_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - to_ = s; + accountAddress_ = s; return s; } else { return (java.lang.String) ref; @@ -18917,20 +15674,20 @@ public java.lang.String getTo() { } /** *
    -       * The address to withdraw to.
    +       * The address of the account to withdraw to.
            * 
    * - * string to = 2 [json_name = "to"]; - * @return The bytes for to. + * string account_address = 2 [json_name = "accountAddress"]; + * @return The bytes for accountAddress. */ public com.google.protobuf.ByteString - getToBytes() { - java.lang.Object ref = to_; + getAccountAddressBytes() { + java.lang.Object ref = accountAddress_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - to_ = b; + accountAddress_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -18938,54 +15695,54 @@ public java.lang.String getTo() { } /** *
    -       * The address to withdraw to.
    +       * The address of the account to withdraw to.
            * 
    * - * string to = 2 [json_name = "to"]; - * @param value The to to set. + * string account_address = 2 [json_name = "accountAddress"]; + * @param value The accountAddress to set. * @return This builder for chaining. */ - public Builder setTo( + public Builder setAccountAddress( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - to_ = value; + accountAddress_ = value; onChanged(); return this; } /** *
    -       * The address to withdraw to.
    +       * The address of the account to withdraw to.
            * 
    * - * string to = 2 [json_name = "to"]; + * string account_address = 2 [json_name = "accountAddress"]; * @return This builder for chaining. */ - public Builder clearTo() { + public Builder clearAccountAddress() { - to_ = getDefaultInstance().getTo(); + accountAddress_ = getDefaultInstance().getAccountAddress(); onChanged(); return this; } /** *
    -       * The address to withdraw to.
    +       * The address of the account to withdraw to.
            * 
    * - * string to = 2 [json_name = "to"]; - * @param value The bytes for to to set. + * string account_address = 2 [json_name = "accountAddress"]; + * @param value The bytes for accountAddress to set. * @return This builder for chaining. */ - public Builder setToBytes( + public Builder setAccountAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - to_ = value; + accountAddress_ = value; onChanged(); return this; } @@ -19032,6 +15789,49 @@ public Builder clearAmount() { onChanged(); return this; } + + private long fee_ ; + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 4 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 4 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
    +       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
    +       * 
    + * + * int64 fee = 4 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -22489,26 +19289,6 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_pactus_GetRawWithdrawTransactionRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_TransferPayload_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_TransferPayload_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_BondPayload_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_BondPayload_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_UnbondPayload_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_UnbondPayload_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_pactus_WithdrawPayload_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_pactus_WithdrawPayload_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_pactus_GetRawTransactionResponse_descriptor; private static final @@ -22571,11 +19351,11 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan "se\022\016\n\002id\030\001 \001(\tR\002id\"\240\002\n\030GetRawTransaction" + "Request\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022\022\n\004" + "memo\030\002 \001(\tR\004memo\0225\n\010transfer\030\003 \001(\0132\027.pac" + - "tus.TransferPayloadH\000R\010transfer\022)\n\004bond\030" + - "\004 \001(\0132\023.pactus.BondPayloadH\000R\004bond\022/\n\006un" + - "bond\030\005 \001(\0132\025.pactus.UnbondPayloadH\000R\006unb" + - "ond\0225\n\010withdraw\030\006 \001(\0132\027.pactus.WithdrawP" + - "ayloadH\000R\010withdrawB\t\n\007payload\"\261\001\n GetRaw" + + "tus.PayloadTransferH\000R\010transfer\022)\n\004bond\030" + + "\004 \001(\0132\023.pactus.PayloadBondH\000R\004bond\022/\n\006un" + + "bond\030\005 \001(\0132\025.pactus.PayloadUnbondH\000R\006unb" + + "ond\0225\n\010withdraw\030\006 \001(\0132\027.pactus.PayloadWi" + + "thdrawH\000R\010withdrawB\t\n\007payload\"\261\001\n GetRaw" + "TransferTransactionRequest\022\033\n\tlock_time\030" + "\001 \001(\rR\010lockTime\022\026\n\006sender\030\002 \001(\tR\006sender\022" + "\032\n\010receiver\030\003 \001(\tR\010receiver\022\026\n\006amount\030\004 " + @@ -22593,70 +19373,62 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan "lockTime\022+\n\021validator_address\030\002 \001(\tR\020val" + "idatorAddress\022\'\n\017account_address\030\003 \001(\tR\016" + "accountAddress\022\026\n\006amount\030\004 \001(\003R\006amount\022\020" + - "\n\003fee\030\005 \001(\003R\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"o\n\017" + - "TransferPayload\022\026\n\006sender\030\001 \001(\tR\006sender\022" + - "\032\n\010receiver\030\002 \001(\tR\010receiver\022\026\n\006amount\030\003 " + - "\001(\003R\006amount\022\020\n\003fee\030\004 \001(\003R\003fee\"\210\001\n\013BondPa" + - "yload\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receive" + - "r\030\002 \001(\tR\010receiver\022\024\n\005stake\030\003 \001(\003R\005stake\022" + - "\035\n\npublic_key\030\004 \001(\tR\tpublicKey\022\020\n\003fee\030\005 " + - "\001(\003R\003fee\"<\n\rUnbondPayload\022+\n\021validator_a" + - "ddress\030\001 \001(\tR\020validatorAddress\"\221\001\n\017Withd" + - "rawPayload\022+\n\021validator_address\030\001 \001(\tR\020v" + - "alidatorAddress\022\'\n\017account_address\030\002 \001(\t" + - "R\016accountAddress\022\026\n\006amount\030\003 \001(\003R\006amount" + - "\022\020\n\003fee\030\004 \001(\003R\003fee\"D\n\031GetRawTransactionR" + - "esponse\022\'\n\017raw_transaction\030\001 \001(\tR\016rawTra" + - "nsaction\"]\n\017PayloadTransfer\022\026\n\006sender\030\001 " + - "\001(\tR\006sender\022\032\n\010receiver\030\002 \001(\tR\010receiver\022" + - "\026\n\006amount\030\003 \001(\003R\006amount\"W\n\013PayloadBond\022\026" + - "\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 \001(\t" + - "R\010receiver\022\024\n\005stake\030\003 \001(\003R\005stake\"B\n\020Payl" + - "oadSortition\022\030\n\007address\030\001 \001(\tR\007address\022\024" + - "\n\005proof\030\002 \001(\tR\005proof\"-\n\rPayloadUnbond\022\034\n" + - "\tvalidator\030\001 \001(\tR\tvalidator\"M\n\017PayloadWi" + - "thdraw\022\022\n\004from\030\001 \001(\tR\004from\022\016\n\002to\030\002 \001(\tR\002" + - "to\022\026\n\006amount\030\003 \001(\003R\006amount\"\254\004\n\017Transacti" + - "onInfo\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004data\030\002 \001(\tR\004da" + - "ta\022\030\n\007version\030\003 \001(\005R\007version\022\033\n\tlock_tim" + - "e\030\004 \001(\rR\010lockTime\022\024\n\005value\030\005 \001(\003R\005value\022" + - "\020\n\003fee\030\006 \001(\003R\003fee\0226\n\014payload_type\030\007 \001(\0162" + - "\023.pactus.PayloadTypeR\013payloadType\0225\n\010tra" + - "nsfer\030\036 \001(\0132\027.pactus.PayloadTransferH\000R\010" + - "transfer\022)\n\004bond\030\037 \001(\0132\023.pactus.PayloadB" + - "ondH\000R\004bond\0228\n\tsortition\030 \001(\0132\030.pactus." + - "PayloadSortitionH\000R\tsortition\022/\n\006unbond\030" + - "! \001(\0132\025.pactus.PayloadUnbondH\000R\006unbond\0225" + - "\n\010withdraw\030\" \001(\0132\027.pactus.PayloadWithdra" + - "wH\000R\010withdraw\022\022\n\004memo\030\010 \001(\tR\004memo\022\035\n\npub" + - "lic_key\030\t \001(\tR\tpublicKey\022\034\n\tsignature\030\n " + - "\001(\tR\tsignatureB\t\n\007payload*\203\001\n\013PayloadTyp" + - "e\022\013\n\007UNKNOWN\020\000\022\024\n\020TRANSFER_PAYLOAD\020\001\022\020\n\014" + - "BOND_PAYLOAD\020\002\022\025\n\021SORTITION_PAYLOAD\020\003\022\022\n" + - "\016UNBOND_PAYLOAD\020\004\022\024\n\020WITHDRAW_PAYLOAD\020\005*" + - "B\n\024TransactionVerbosity\022\024\n\020TRANSACTION_D" + - "ATA\020\000\022\024\n\020TRANSACTION_INFO\020\0012\202\006\n\013Transact" + - "ion\022O\n\016GetTransaction\022\035.pactus.GetTransa" + - "ctionRequest\032\036.pactus.GetTransactionResp" + - "onse\022I\n\014CalculateFee\022\033.pactus.CalculateF" + - "eeRequest\032\034.pactus.CalculateFeeResponse\022" + - "a\n\024BroadcastTransaction\022#.pactus.Broadca" + - "stTransactionRequest\032$.pactus.BroadcastT" + - "ransactionResponse\022X\n\021GetRawTransaction\022" + - " .pactus.GetRawTransactionRequest\032!.pact" + - "us.GetRawTransactionResponse\022h\n\031GetRawTr" + - "ansferTransaction\022(.pactus.GetRawTransfe" + - "rTransactionRequest\032!.pactus.GetRawTrans" + - "actionResponse\022`\n\025GetRawBondTransaction\022" + - "$.pactus.GetRawBondTransactionRequest\032!." + - "pactus.GetRawTransactionResponse\022d\n\027GetR" + - "awUnbondTransaction\022&.pactus.GetRawUnbon" + - "dTransactionRequest\032!.pactus.GetRawTrans" + - "actionResponse\022h\n\031GetRawWithdrawTransact" + - "ion\022(.pactus.GetRawWithdrawTransactionRe" + - "quest\032!.pactus.GetRawTransactionResponse" + - "BF\n\022pactus.transactionZ0github.com/pactu" + - "s-project/pactus/www/grpc/pactusb\006proto3" + "\n\003fee\030\005 \001(\003R\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"D\n\031" + + "GetRawTransactionResponse\022\'\n\017raw_transac" + + "tion\030\001 \001(\tR\016rawTransaction\"o\n\017PayloadTra" + + "nsfer\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receive" + + "r\030\002 \001(\tR\010receiver\022\026\n\006amount\030\003 \001(\003R\006amoun" + + "t\022\020\n\003fee\030\004 \001(\003R\003fee\"\210\001\n\013PayloadBond\022\026\n\006s" + + "ender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 \001(\tR\010r" + + "eceiver\022\024\n\005stake\030\003 \001(\003R\005stake\022\035\n\npublic_" + + "key\030\004 \001(\tR\tpublicKey\022\020\n\003fee\030\005 \001(\003R\003fee\"B" + + "\n\020PayloadSortition\022\030\n\007address\030\001 \001(\tR\007add" + + "ress\022\024\n\005proof\030\002 \001(\tR\005proof\"-\n\rPayloadUnb" + + "ond\022\034\n\tvalidator\030\001 \001(\tR\tvalidator\"\221\001\n\017Pa" + + "yloadWithdraw\022+\n\021validator_address\030\001 \001(\t" + + "R\020validatorAddress\022\'\n\017account_address\030\002 " + + "\001(\tR\016accountAddress\022\026\n\006amount\030\003 \001(\003R\006amo" + + "unt\022\020\n\003fee\030\004 \001(\003R\003fee\"\254\004\n\017TransactionInf" + + "o\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004data\030\002 \001(\tR\004data\022\030\n" + + "\007version\030\003 \001(\005R\007version\022\033\n\tlock_time\030\004 \001" + + "(\rR\010lockTime\022\024\n\005value\030\005 \001(\003R\005value\022\020\n\003fe" + + "e\030\006 \001(\003R\003fee\0226\n\014payload_type\030\007 \001(\0162\023.pac" + + "tus.PayloadTypeR\013payloadType\0225\n\010transfer" + + "\030\036 \001(\0132\027.pactus.PayloadTransferH\000R\010trans" + + "fer\022)\n\004bond\030\037 \001(\0132\023.pactus.PayloadBondH\000" + + "R\004bond\0228\n\tsortition\030 \001(\0132\030.pactus.Paylo" + + "adSortitionH\000R\tsortition\022/\n\006unbond\030! \001(\013" + + "2\025.pactus.PayloadUnbondH\000R\006unbond\0225\n\010wit" + + "hdraw\030\" \001(\0132\027.pactus.PayloadWithdrawH\000R\010" + + "withdraw\022\022\n\004memo\030\010 \001(\tR\004memo\022\035\n\npublic_k" + + "ey\030\t \001(\tR\tpublicKey\022\034\n\tsignature\030\n \001(\tR\t" + + "signatureB\t\n\007payload*\203\001\n\013PayloadType\022\013\n\007" + + "UNKNOWN\020\000\022\024\n\020TRANSFER_PAYLOAD\020\001\022\020\n\014BOND_" + + "PAYLOAD\020\002\022\025\n\021SORTITION_PAYLOAD\020\003\022\022\n\016UNBO" + + "ND_PAYLOAD\020\004\022\024\n\020WITHDRAW_PAYLOAD\020\005*B\n\024Tr" + + "ansactionVerbosity\022\024\n\020TRANSACTION_DATA\020\000" + + "\022\024\n\020TRANSACTION_INFO\020\0012\202\006\n\013Transaction\022O" + + "\n\016GetTransaction\022\035.pactus.GetTransaction" + + "Request\032\036.pactus.GetTransactionResponse\022" + + "I\n\014CalculateFee\022\033.pactus.CalculateFeeReq" + + "uest\032\034.pactus.CalculateFeeResponse\022a\n\024Br" + + "oadcastTransaction\022#.pactus.BroadcastTra" + + "nsactionRequest\032$.pactus.BroadcastTransa" + + "ctionResponse\022X\n\021GetRawTransaction\022 .pac" + + "tus.GetRawTransactionRequest\032!.pactus.Ge" + + "tRawTransactionResponse\022h\n\031GetRawTransfe" + + "rTransaction\022(.pactus.GetRawTransferTran" + + "sactionRequest\032!.pactus.GetRawTransactio" + + "nResponse\022`\n\025GetRawBondTransaction\022$.pac" + + "tus.GetRawBondTransactionRequest\032!.pactu" + + "s.GetRawTransactionResponse\022d\n\027GetRawUnb" + + "ondTransaction\022&.pactus.GetRawUnbondTran" + + "sactionRequest\032!.pactus.GetRawTransactio" + + "nResponse\022h\n\031GetRawWithdrawTransaction\022(" + + ".pactus.GetRawWithdrawTransactionRequest" + + "\032!.pactus.GetRawTransactionResponseBF\n\022p" + + "actus.transactionZ0github.com/pactus-pro" + + "ject/pactus/www/grpc/pactusb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -22728,68 +19500,44 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawWithdrawTransactionRequest_descriptor, new java.lang.String[] { "LockTime", "ValidatorAddress", "AccountAddress", "Amount", "Fee", "Memo", }); - internal_static_pactus_TransferPayload_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_pactus_TransferPayload_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_TransferPayload_descriptor, - new java.lang.String[] { "Sender", "Receiver", "Amount", "Fee", }); - internal_static_pactus_BondPayload_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_pactus_BondPayload_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_BondPayload_descriptor, - new java.lang.String[] { "Sender", "Receiver", "Stake", "PublicKey", "Fee", }); - internal_static_pactus_UnbondPayload_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_pactus_UnbondPayload_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_UnbondPayload_descriptor, - new java.lang.String[] { "ValidatorAddress", }); - internal_static_pactus_WithdrawPayload_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_pactus_WithdrawPayload_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_pactus_WithdrawPayload_descriptor, - new java.lang.String[] { "ValidatorAddress", "AccountAddress", "Amount", "Fee", }); internal_static_pactus_GetRawTransactionResponse_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(11); internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawTransactionResponse_descriptor, new java.lang.String[] { "RawTransaction", }); internal_static_pactus_PayloadTransfer_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(12); internal_static_pactus_PayloadTransfer_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadTransfer_descriptor, - new java.lang.String[] { "Sender", "Receiver", "Amount", }); + new java.lang.String[] { "Sender", "Receiver", "Amount", "Fee", }); internal_static_pactus_PayloadBond_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(13); internal_static_pactus_PayloadBond_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadBond_descriptor, - new java.lang.String[] { "Sender", "Receiver", "Stake", }); + new java.lang.String[] { "Sender", "Receiver", "Stake", "PublicKey", "Fee", }); internal_static_pactus_PayloadSortition_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(14); internal_static_pactus_PayloadSortition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadSortition_descriptor, new java.lang.String[] { "Address", "Proof", }); internal_static_pactus_PayloadUnbond_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(15); internal_static_pactus_PayloadUnbond_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadUnbond_descriptor, new java.lang.String[] { "Validator", }); internal_static_pactus_PayloadWithdraw_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(16); internal_static_pactus_PayloadWithdraw_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadWithdraw_descriptor, - new java.lang.String[] { "From", "To", "Amount", }); + new java.lang.String[] { "ValidatorAddress", "AccountAddress", "Amount", "Fee", }); internal_static_pactus_TransactionInfo_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(17); internal_static_pactus_TransactionInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_TransactionInfo_descriptor, diff --git a/www/grpc/gen/js/transaction_pb.js b/www/grpc/gen/js/transaction_pb.js index 6ee2a8700..c0287b2f8 100644 --- a/www/grpc/gen/js/transaction_pb.js +++ b/www/grpc/gen/js/transaction_pb.js @@ -21,7 +21,6 @@ var global = (function () { return this; }).call(null) || Function('return this')(); -goog.exportSymbol('proto.pactus.BondPayload', null, global); goog.exportSymbol('proto.pactus.BroadcastTransactionRequest', null, global); goog.exportSymbol('proto.pactus.BroadcastTransactionResponse', null, global); goog.exportSymbol('proto.pactus.CalculateFeeRequest', null, global); @@ -44,9 +43,6 @@ goog.exportSymbol('proto.pactus.PayloadWithdraw', null, global); goog.exportSymbol('proto.pactus.TransactionInfo', null, global); goog.exportSymbol('proto.pactus.TransactionInfo.PayloadCase', null, global); goog.exportSymbol('proto.pactus.TransactionVerbosity', null, global); -goog.exportSymbol('proto.pactus.TransferPayload', null, global); -goog.exportSymbol('proto.pactus.UnbondPayload', null, global); -goog.exportSymbol('proto.pactus.WithdrawPayload', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -278,90 +274,6 @@ if (goog.DEBUG && !COMPILED) { */ proto.pactus.GetRawWithdrawTransactionRequest.displayName = 'proto.pactus.GetRawWithdrawTransactionRequest'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.TransferPayload = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.TransferPayload, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.TransferPayload.displayName = 'proto.pactus.TransferPayload'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.BondPayload = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.BondPayload, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.BondPayload.displayName = 'proto.pactus.BondPayload'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.UnbondPayload = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.UnbondPayload, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.UnbondPayload.displayName = 'proto.pactus.UnbondPayload'; -} -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.pactus.WithdrawPayload = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.pactus.WithdrawPayload, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.pactus.WithdrawPayload.displayName = 'proto.pactus.WithdrawPayload'; -} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -1552,10 +1464,10 @@ proto.pactus.GetRawTransactionRequest.toObject = function(includeInstance, msg) var f, obj = { lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), memo: jspb.Message.getFieldWithDefault(msg, 2, ""), - transfer: (f = msg.getTransfer()) && proto.pactus.TransferPayload.toObject(includeInstance, f), - bond: (f = msg.getBond()) && proto.pactus.BondPayload.toObject(includeInstance, f), - unbond: (f = msg.getUnbond()) && proto.pactus.UnbondPayload.toObject(includeInstance, f), - withdraw: (f = msg.getWithdraw()) && proto.pactus.WithdrawPayload.toObject(includeInstance, f) + transfer: (f = msg.getTransfer()) && proto.pactus.PayloadTransfer.toObject(includeInstance, f), + bond: (f = msg.getBond()) && proto.pactus.PayloadBond.toObject(includeInstance, f), + unbond: (f = msg.getUnbond()) && proto.pactus.PayloadUnbond.toObject(includeInstance, f), + withdraw: (f = msg.getWithdraw()) && proto.pactus.PayloadWithdraw.toObject(includeInstance, f) }; if (includeInstance) { @@ -1601,23 +1513,23 @@ proto.pactus.GetRawTransactionRequest.deserializeBinaryFromReader = function(msg msg.setMemo(value); break; case 3: - var value = new proto.pactus.TransferPayload; - reader.readMessage(value,proto.pactus.TransferPayload.deserializeBinaryFromReader); + var value = new proto.pactus.PayloadTransfer; + reader.readMessage(value,proto.pactus.PayloadTransfer.deserializeBinaryFromReader); msg.setTransfer(value); break; case 4: - var value = new proto.pactus.BondPayload; - reader.readMessage(value,proto.pactus.BondPayload.deserializeBinaryFromReader); + var value = new proto.pactus.PayloadBond; + reader.readMessage(value,proto.pactus.PayloadBond.deserializeBinaryFromReader); msg.setBond(value); break; case 5: - var value = new proto.pactus.UnbondPayload; - reader.readMessage(value,proto.pactus.UnbondPayload.deserializeBinaryFromReader); + var value = new proto.pactus.PayloadUnbond; + reader.readMessage(value,proto.pactus.PayloadUnbond.deserializeBinaryFromReader); msg.setUnbond(value); break; case 6: - var value = new proto.pactus.WithdrawPayload; - reader.readMessage(value,proto.pactus.WithdrawPayload.deserializeBinaryFromReader); + var value = new proto.pactus.PayloadWithdraw; + reader.readMessage(value,proto.pactus.PayloadWithdraw.deserializeBinaryFromReader); msg.setWithdraw(value); break; default: @@ -1668,7 +1580,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 3, f, - proto.pactus.TransferPayload.serializeBinaryToWriter + proto.pactus.PayloadTransfer.serializeBinaryToWriter ); } f = message.getBond(); @@ -1676,7 +1588,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 4, f, - proto.pactus.BondPayload.serializeBinaryToWriter + proto.pactus.PayloadBond.serializeBinaryToWriter ); } f = message.getUnbond(); @@ -1684,7 +1596,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 5, f, - proto.pactus.UnbondPayload.serializeBinaryToWriter + proto.pactus.PayloadUnbond.serializeBinaryToWriter ); } f = message.getWithdraw(); @@ -1692,7 +1604,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message writer.writeMessage( 6, f, - proto.pactus.WithdrawPayload.serializeBinaryToWriter + proto.pactus.PayloadWithdraw.serializeBinaryToWriter ); } }; @@ -1735,17 +1647,17 @@ proto.pactus.GetRawTransactionRequest.prototype.setMemo = function(value) { /** - * optional TransferPayload transfer = 3; - * @return {?proto.pactus.TransferPayload} + * optional PayloadTransfer transfer = 3; + * @return {?proto.pactus.PayloadTransfer} */ proto.pactus.GetRawTransactionRequest.prototype.getTransfer = function() { - return /** @type{?proto.pactus.TransferPayload} */ ( - jspb.Message.getWrapperField(this, proto.pactus.TransferPayload, 3)); + return /** @type{?proto.pactus.PayloadTransfer} */ ( + jspb.Message.getWrapperField(this, proto.pactus.PayloadTransfer, 3)); }; /** - * @param {?proto.pactus.TransferPayload|undefined} value + * @param {?proto.pactus.PayloadTransfer|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setTransfer = function(value) { @@ -1772,17 +1684,17 @@ proto.pactus.GetRawTransactionRequest.prototype.hasTransfer = function() { /** - * optional BondPayload bond = 4; - * @return {?proto.pactus.BondPayload} + * optional PayloadBond bond = 4; + * @return {?proto.pactus.PayloadBond} */ proto.pactus.GetRawTransactionRequest.prototype.getBond = function() { - return /** @type{?proto.pactus.BondPayload} */ ( - jspb.Message.getWrapperField(this, proto.pactus.BondPayload, 4)); + return /** @type{?proto.pactus.PayloadBond} */ ( + jspb.Message.getWrapperField(this, proto.pactus.PayloadBond, 4)); }; /** - * @param {?proto.pactus.BondPayload|undefined} value + * @param {?proto.pactus.PayloadBond|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setBond = function(value) { @@ -1809,17 +1721,17 @@ proto.pactus.GetRawTransactionRequest.prototype.hasBond = function() { /** - * optional UnbondPayload unbond = 5; - * @return {?proto.pactus.UnbondPayload} + * optional PayloadUnbond unbond = 5; + * @return {?proto.pactus.PayloadUnbond} */ proto.pactus.GetRawTransactionRequest.prototype.getUnbond = function() { - return /** @type{?proto.pactus.UnbondPayload} */ ( - jspb.Message.getWrapperField(this, proto.pactus.UnbondPayload, 5)); + return /** @type{?proto.pactus.PayloadUnbond} */ ( + jspb.Message.getWrapperField(this, proto.pactus.PayloadUnbond, 5)); }; /** - * @param {?proto.pactus.UnbondPayload|undefined} value + * @param {?proto.pactus.PayloadUnbond|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setUnbond = function(value) { @@ -1846,17 +1758,17 @@ proto.pactus.GetRawTransactionRequest.prototype.hasUnbond = function() { /** - * optional WithdrawPayload withdraw = 6; - * @return {?proto.pactus.WithdrawPayload} + * optional PayloadWithdraw withdraw = 6; + * @return {?proto.pactus.PayloadWithdraw} */ proto.pactus.GetRawTransactionRequest.prototype.getWithdraw = function() { - return /** @type{?proto.pactus.WithdrawPayload} */ ( - jspb.Message.getWrapperField(this, proto.pactus.WithdrawPayload, 6)); + return /** @type{?proto.pactus.PayloadWithdraw} */ ( + jspb.Message.getWrapperField(this, proto.pactus.PayloadWithdraw, 6)); }; /** - * @param {?proto.pactus.WithdrawPayload|undefined} value + * @param {?proto.pactus.PayloadWithdraw|undefined} value * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setWithdraw = function(value) { @@ -2958,8 +2870,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.pactus.TransferPayload.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.TransferPayload.toObject(opt_includeInstance, this); +proto.pactus.GetRawTransactionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.GetRawTransactionResponse.toObject(opt_includeInstance, this); }; @@ -2968,16 +2880,13 @@ proto.pactus.TransferPayload.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.pactus.TransferPayload} msg The msg instance to transform. + * @param {!proto.pactus.GetRawTransactionResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.TransferPayload.toObject = function(includeInstance, msg) { +proto.pactus.GetRawTransactionResponse.toObject = function(includeInstance, msg) { var f, obj = { - sender: jspb.Message.getFieldWithDefault(msg, 1, ""), - receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 4, 0) + rawTransaction: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -2991,23 +2900,23 @@ proto.pactus.TransferPayload.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.TransferPayload} + * @return {!proto.pactus.GetRawTransactionResponse} */ -proto.pactus.TransferPayload.deserializeBinary = function(bytes) { +proto.pactus.GetRawTransactionResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.TransferPayload; - return proto.pactus.TransferPayload.deserializeBinaryFromReader(msg, reader); + var msg = new proto.pactus.GetRawTransactionResponse; + return proto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.pactus.TransferPayload} msg The message object to deserialize into. + * @param {!proto.pactus.GetRawTransactionResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.TransferPayload} + * @return {!proto.pactus.GetRawTransactionResponse} */ -proto.pactus.TransferPayload.deserializeBinaryFromReader = function(msg, reader) { +proto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3016,19 +2925,7 @@ proto.pactus.TransferPayload.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setSender(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setReceiver(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); + msg.setRawTransaction(value); break; default: reader.skipField(); @@ -3043,9 +2940,9 @@ proto.pactus.TransferPayload.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.pactus.TransferPayload.prototype.serializeBinary = function() { +proto.pactus.GetRawTransactionResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.pactus.TransferPayload.serializeBinaryToWriter(this, writer); + proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3053,115 +2950,40 @@ proto.pactus.TransferPayload.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.pactus.TransferPayload} message + * @param {!proto.pactus.GetRawTransactionResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.TransferPayload.serializeBinaryToWriter = function(message, writer) { +proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSender(); + f = message.getRawTransaction(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getReceiver(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } }; /** - * optional string sender = 1; + * optional string raw_transaction = 1; * @return {string} */ -proto.pactus.TransferPayload.prototype.getSender = function() { +proto.pactus.GetRawTransactionResponse.prototype.getRawTransaction = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.pactus.TransferPayload} returns this + * @return {!proto.pactus.GetRawTransactionResponse} returns this */ -proto.pactus.TransferPayload.prototype.setSender = function(value) { +proto.pactus.GetRawTransactionResponse.prototype.setRawTransaction = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional string receiver = 2; - * @return {string} - */ -proto.pactus.TransferPayload.prototype.getReceiver = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.TransferPayload} returns this - */ -proto.pactus.TransferPayload.prototype.setReceiver = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.pactus.TransferPayload.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.TransferPayload} returns this - */ -proto.pactus.TransferPayload.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 fee = 4; - * @return {number} - */ -proto.pactus.TransferPayload.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.TransferPayload} returns this - */ -proto.pactus.TransferPayload.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - @@ -3178,8 +3000,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.pactus.BondPayload.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.BondPayload.toObject(opt_includeInstance, this); +proto.pactus.PayloadTransfer.prototype.toObject = function(opt_includeInstance) { + return proto.pactus.PayloadTransfer.toObject(opt_includeInstance, this); }; @@ -3188,17 +3010,16 @@ proto.pactus.BondPayload.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.pactus.BondPayload} msg The msg instance to transform. + * @param {!proto.pactus.PayloadTransfer} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.BondPayload.toObject = function(includeInstance, msg) { +proto.pactus.PayloadTransfer.toObject = function(includeInstance, msg) { var f, obj = { sender: jspb.Message.getFieldWithDefault(msg, 1, ""), receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), - stake: jspb.Message.getFieldWithDefault(msg, 3, 0), - publicKey: jspb.Message.getFieldWithDefault(msg, 4, ""), - fee: jspb.Message.getFieldWithDefault(msg, 5, 0) + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + fee: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -3212,23 +3033,23 @@ proto.pactus.BondPayload.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.BondPayload} + * @return {!proto.pactus.PayloadTransfer} */ -proto.pactus.BondPayload.deserializeBinary = function(bytes) { +proto.pactus.PayloadTransfer.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.BondPayload; - return proto.pactus.BondPayload.deserializeBinaryFromReader(msg, reader); + var msg = new proto.pactus.PayloadTransfer; + return proto.pactus.PayloadTransfer.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.pactus.BondPayload} msg The message object to deserialize into. + * @param {!proto.pactus.PayloadTransfer} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.BondPayload} + * @return {!proto.pactus.PayloadTransfer} */ -proto.pactus.BondPayload.deserializeBinaryFromReader = function(msg, reader) { +proto.pactus.PayloadTransfer.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3245,13 +3066,9 @@ proto.pactus.BondPayload.deserializeBinaryFromReader = function(msg, reader) { break; case 3: var value = /** @type {number} */ (reader.readInt64()); - msg.setStake(value); + msg.setAmount(value); break; case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPublicKey(value); - break; - case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setFee(value); break; @@ -3268,9 +3085,9 @@ proto.pactus.BondPayload.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.pactus.BondPayload.prototype.serializeBinary = function() { +proto.pactus.PayloadTransfer.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.pactus.BondPayload.serializeBinaryToWriter(this, writer); + proto.pactus.PayloadTransfer.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3278,11 +3095,11 @@ proto.pactus.BondPayload.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.pactus.BondPayload} message + * @param {!proto.pactus.PayloadTransfer} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.pactus.BondPayload.serializeBinaryToWriter = function(message, writer) { +proto.pactus.PayloadTransfer.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSender(); if (f.length > 0) { @@ -3298,24 +3115,17 @@ proto.pactus.BondPayload.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getStake(); + f = message.getAmount(); if (f !== 0) { writer.writeInt64( 3, f ); } - f = message.getPublicKey(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } f = message.getFee(); if (f !== 0) { writer.writeInt64( - 5, + 4, f ); } @@ -3326,16 +3136,16 @@ proto.pactus.BondPayload.serializeBinaryToWriter = function(message, writer) { * optional string sender = 1; * @return {string} */ -proto.pactus.BondPayload.prototype.getSender = function() { +proto.pactus.PayloadTransfer.prototype.getSender = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.pactus.BondPayload} returns this + * @return {!proto.pactus.PayloadTransfer} returns this */ -proto.pactus.BondPayload.prototype.setSender = function(value) { +proto.pactus.PayloadTransfer.prototype.setSender = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3344,732 +3154,44 @@ proto.pactus.BondPayload.prototype.setSender = function(value) { * optional string receiver = 2; * @return {string} */ -proto.pactus.BondPayload.prototype.getReceiver = function() { +proto.pactus.PayloadTransfer.prototype.getReceiver = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.pactus.BondPayload} returns this + * @return {!proto.pactus.PayloadTransfer} returns this */ -proto.pactus.BondPayload.prototype.setReceiver = function(value) { +proto.pactus.PayloadTransfer.prototype.setReceiver = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional int64 stake = 3; + * optional int64 amount = 3; * @return {number} */ -proto.pactus.BondPayload.prototype.getStake = function() { +proto.pactus.PayloadTransfer.prototype.getAmount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.pactus.BondPayload} returns this + * @return {!proto.pactus.PayloadTransfer} returns this */ -proto.pactus.BondPayload.prototype.setStake = function(value) { +proto.pactus.PayloadTransfer.prototype.setAmount = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional string public_key = 4; - * @return {string} - */ -proto.pactus.BondPayload.prototype.getPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.BondPayload} returns this - */ -proto.pactus.BondPayload.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional int64 fee = 5; - * @return {number} - */ -proto.pactus.BondPayload.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.BondPayload} returns this - */ -proto.pactus.BondPayload.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.UnbondPayload.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.UnbondPayload.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.UnbondPayload} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.UnbondPayload.toObject = function(includeInstance, msg) { - var f, obj = { - validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.UnbondPayload} - */ -proto.pactus.UnbondPayload.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.UnbondPayload; - return proto.pactus.UnbondPayload.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.UnbondPayload} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.UnbondPayload} - */ -proto.pactus.UnbondPayload.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setValidatorAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.UnbondPayload.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.UnbondPayload.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.UnbondPayload} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.UnbondPayload.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValidatorAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string validator_address = 1; - * @return {string} - */ -proto.pactus.UnbondPayload.prototype.getValidatorAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.UnbondPayload} returns this - */ -proto.pactus.UnbondPayload.prototype.setValidatorAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.WithdrawPayload.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.WithdrawPayload.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.WithdrawPayload} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.WithdrawPayload.toObject = function(includeInstance, msg) { - var f, obj = { - validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - accountAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.WithdrawPayload} - */ -proto.pactus.WithdrawPayload.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.WithdrawPayload; - return proto.pactus.WithdrawPayload.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.WithdrawPayload} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.WithdrawPayload} - */ -proto.pactus.WithdrawPayload.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setValidatorAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAccountAddress(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.WithdrawPayload.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.WithdrawPayload.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.WithdrawPayload} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.WithdrawPayload.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getValidatorAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAccountAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } -}; - - -/** - * optional string validator_address = 1; - * @return {string} - */ -proto.pactus.WithdrawPayload.prototype.getValidatorAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.WithdrawPayload} returns this - */ -proto.pactus.WithdrawPayload.prototype.setValidatorAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string account_address = 2; - * @return {string} - */ -proto.pactus.WithdrawPayload.prototype.getAccountAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.WithdrawPayload} returns this - */ -proto.pactus.WithdrawPayload.prototype.setAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; - * @return {number} - */ -proto.pactus.WithdrawPayload.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.WithdrawPayload} returns this - */ -proto.pactus.WithdrawPayload.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int64 fee = 4; - * @return {number} - */ -proto.pactus.WithdrawPayload.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.WithdrawPayload} returns this - */ -proto.pactus.WithdrawPayload.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.GetRawTransactionResponse.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.GetRawTransactionResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.GetRawTransactionResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawTransactionResponse.toObject = function(includeInstance, msg) { - var f, obj = { - rawTransaction: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.GetRawTransactionResponse} - */ -proto.pactus.GetRawTransactionResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.GetRawTransactionResponse; - return proto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.GetRawTransactionResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.GetRawTransactionResponse} - */ -proto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setRawTransaction(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.GetRawTransactionResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.GetRawTransactionResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getRawTransaction(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string raw_transaction = 1; - * @return {string} - */ -proto.pactus.GetRawTransactionResponse.prototype.getRawTransaction = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.GetRawTransactionResponse} returns this - */ -proto.pactus.GetRawTransactionResponse.prototype.setRawTransaction = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.pactus.PayloadTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.pactus.PayloadTransfer.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.pactus.PayloadTransfer} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadTransfer.toObject = function(includeInstance, msg) { - var f, obj = { - sender: jspb.Message.getFieldWithDefault(msg, 1, ""), - receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.pactus.PayloadTransfer} - */ -proto.pactus.PayloadTransfer.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.pactus.PayloadTransfer; - return proto.pactus.PayloadTransfer.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.pactus.PayloadTransfer} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.pactus.PayloadTransfer} - */ -proto.pactus.PayloadTransfer.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSender(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setReceiver(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.pactus.PayloadTransfer.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.pactus.PayloadTransfer.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.pactus.PayloadTransfer} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.pactus.PayloadTransfer.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSender(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getReceiver(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } -}; - - -/** - * optional string sender = 1; - * @return {string} - */ -proto.pactus.PayloadTransfer.prototype.getSender = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadTransfer} returns this - */ -proto.pactus.PayloadTransfer.prototype.setSender = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string receiver = 2; - * @return {string} - */ -proto.pactus.PayloadTransfer.prototype.getReceiver = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.pactus.PayloadTransfer} returns this - */ -proto.pactus.PayloadTransfer.prototype.setReceiver = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int64 amount = 3; + * optional int64 fee = 4; * @return {number} */ -proto.pactus.PayloadTransfer.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.pactus.PayloadTransfer.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; @@ -4077,8 +3199,8 @@ proto.pactus.PayloadTransfer.prototype.getAmount = function() { * @param {number} value * @return {!proto.pactus.PayloadTransfer} returns this */ -proto.pactus.PayloadTransfer.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.pactus.PayloadTransfer.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -4116,7 +3238,9 @@ proto.pactus.PayloadBond.toObject = function(includeInstance, msg) { var f, obj = { sender: jspb.Message.getFieldWithDefault(msg, 1, ""), receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), - stake: jspb.Message.getFieldWithDefault(msg, 3, 0) + stake: jspb.Message.getFieldWithDefault(msg, 3, 0), + publicKey: jspb.Message.getFieldWithDefault(msg, 4, ""), + fee: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -4165,6 +3289,14 @@ proto.pactus.PayloadBond.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {number} */ (reader.readInt64()); msg.setStake(value); break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicKey(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; default: reader.skipField(); break; @@ -4215,6 +3347,20 @@ proto.pactus.PayloadBond.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getPublicKey(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } }; @@ -4272,6 +3418,42 @@ proto.pactus.PayloadBond.prototype.setStake = function(value) { }; +/** + * optional string public_key = 4; + * @return {string} + */ +proto.pactus.PayloadBond.prototype.getPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.PayloadBond} returns this + */ +proto.pactus.PayloadBond.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 fee = 5; + * @return {number} + */ +proto.pactus.PayloadBond.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PayloadBond} returns this + */ +proto.pactus.PayloadBond.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + @@ -4594,9 +3776,10 @@ proto.pactus.PayloadWithdraw.prototype.toObject = function(opt_includeInstance) */ proto.pactus.PayloadWithdraw.toObject = function(includeInstance, msg) { var f, obj = { - from: jspb.Message.getFieldWithDefault(msg, 1, ""), - to: jspb.Message.getFieldWithDefault(msg, 2, ""), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0) + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + accountAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + amount: jspb.Message.getFieldWithDefault(msg, 3, 0), + fee: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -4635,16 +3818,20 @@ proto.pactus.PayloadWithdraw.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setFrom(value); + msg.setValidatorAddress(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setTo(value); + msg.setAccountAddress(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setAmount(value); break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; default: reader.skipField(); break; @@ -4674,14 +3861,14 @@ proto.pactus.PayloadWithdraw.prototype.serializeBinary = function() { */ proto.pactus.PayloadWithdraw.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFrom(); + f = message.getValidatorAddress(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getTo(); + f = message.getAccountAddress(); if (f.length > 0) { writer.writeString( 2, @@ -4695,14 +3882,21 @@ proto.pactus.PayloadWithdraw.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } }; /** - * optional string from = 1; + * optional string validator_address = 1; * @return {string} */ -proto.pactus.PayloadWithdraw.prototype.getFrom = function() { +proto.pactus.PayloadWithdraw.prototype.getValidatorAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -4711,16 +3905,16 @@ proto.pactus.PayloadWithdraw.prototype.getFrom = function() { * @param {string} value * @return {!proto.pactus.PayloadWithdraw} returns this */ -proto.pactus.PayloadWithdraw.prototype.setFrom = function(value) { +proto.pactus.PayloadWithdraw.prototype.setValidatorAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string to = 2; + * optional string account_address = 2; * @return {string} */ -proto.pactus.PayloadWithdraw.prototype.getTo = function() { +proto.pactus.PayloadWithdraw.prototype.getAccountAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -4729,7 +3923,7 @@ proto.pactus.PayloadWithdraw.prototype.getTo = function() { * @param {string} value * @return {!proto.pactus.PayloadWithdraw} returns this */ -proto.pactus.PayloadWithdraw.prototype.setTo = function(value) { +proto.pactus.PayloadWithdraw.prototype.setAccountAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -4752,6 +3946,24 @@ proto.pactus.PayloadWithdraw.prototype.setAmount = function(value) { }; +/** + * optional int64 fee = 4; + * @return {number} + */ +proto.pactus.PayloadWithdraw.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.PayloadWithdraw} returns this + */ +proto.pactus.PayloadWithdraw.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + /** * Oneof group definitions for this message. Each group defines the field diff --git a/www/grpc/gen/python/transaction_pb2.py b/www/grpc/gen/python/transaction_pb2.py index 5b2122dfc..3cfb8ed32 100644 --- a/www/grpc/gen/python/transaction_pb2.py +++ b/www/grpc/gen/python/transaction_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11transaction.proto\x12\x06pactus\"c\n\x15GetTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tverbosity\x18\x02 \x01(\x0e\x32\x1c.pactus.TransactionVerbosityR\tverbosity\"\x95\x01\n\x16GetTransactionResponse\x12!\n\x0c\x62lock_height\x18\x01 \x01(\rR\x0b\x62lockHeight\x12\x1d\n\nblock_time\x18\x02 \x01(\rR\tblockTime\x12\x39\n\x0btransaction\x18\x03 \x01(\x0b\x32\x17.pactus.TransactionInfoR\x0btransaction\"\x88\x01\n\x13\x43\x61lculateFeeRequest\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x36\n\x0cpayload_type\x18\x02 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12!\n\x0c\x66ixed_amount\x18\x03 \x01(\x08R\x0b\x66ixedAmount\"@\n\x14\x43\x61lculateFeeResponse\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x02 \x01(\x03R\x03\x66\x65\x65\"S\n\x1b\x42roadcastTransactionRequest\x12\x34\n\x16signed_raw_transaction\x18\x01 \x01(\tR\x14signedRawTransaction\".\n\x1c\x42roadcastTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xa0\x02\n\x18GetRawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x12\n\x04memo\x18\x02 \x01(\tR\x04memo\x12\x35\n\x08transfer\x18\x03 \x01(\x0b\x32\x17.pactus.TransferPayloadH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x04 \x01(\x0b\x32\x13.pactus.BondPayloadH\x00R\x04\x62ond\x12/\n\x06unbond\x18\x05 \x01(\x0b\x32\x15.pactus.UnbondPayloadH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\x06 \x01(\x0b\x32\x17.pactus.WithdrawPayloadH\x00R\x08withdrawB\t\n\x07payload\"\xb1\x01\n GetRawTransferTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"\xca\x01\n\x1cGetRawBondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x04 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x05 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x07 \x01(\tR\x04memo\"~\n\x1eGetRawUnbondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x03 \x01(\tR\x10validatorAddress\x12\x12\n\x04memo\x18\x04 \x01(\tR\x04memo\"\xd3\x01\n GetRawWithdrawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"o\n\x0fTransferPayload\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"\x88\x01\n\x0b\x42ondPayload\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x04 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\"<\n\rUnbondPayload\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\"\x91\x01\n\x0fWithdrawPayload\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x02 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"D\n\x19GetRawTransactionResponse\x12\'\n\x0fraw_transaction\x18\x01 \x01(\tR\x0erawTransaction\"]\n\x0fPayloadTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"W\n\x0bPayloadBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\"B\n\x10PayloadSortition\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x14\n\x05proof\x18\x02 \x01(\tR\x05proof\"-\n\rPayloadUnbond\x12\x1c\n\tvalidator\x18\x01 \x01(\tR\tvalidator\"M\n\x0fPayloadWithdraw\x12\x12\n\x04\x66rom\x18\x01 \x01(\tR\x04\x66rom\x12\x0e\n\x02to\x18\x02 \x01(\tR\x02to\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"\xac\x04\n\x0fTransactionInfo\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x18\n\x07version\x18\x03 \x01(\x05R\x07version\x12\x1b\n\tlock_time\x18\x04 \x01(\rR\x08lockTime\x12\x14\n\x05value\x18\x05 \x01(\x03R\x05value\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x36\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12\x35\n\x08transfer\x18\x1e \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x1f \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12\x38\n\tsortition\x18 \x01(\x0b\x32\x18.pactus.PayloadSortitionH\x00R\tsortition\x12/\n\x06unbond\x18! \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\" \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdraw\x12\x12\n\x04memo\x18\x08 \x01(\tR\x04memo\x12\x1d\n\npublic_key\x18\t \x01(\tR\tpublicKey\x12\x1c\n\tsignature\x18\n \x01(\tR\tsignatureB\t\n\x07payload*\x83\x01\n\x0bPayloadType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10TRANSFER_PAYLOAD\x10\x01\x12\x10\n\x0c\x42OND_PAYLOAD\x10\x02\x12\x15\n\x11SORTITION_PAYLOAD\x10\x03\x12\x12\n\x0eUNBOND_PAYLOAD\x10\x04\x12\x14\n\x10WITHDRAW_PAYLOAD\x10\x05*B\n\x14TransactionVerbosity\x12\x14\n\x10TRANSACTION_DATA\x10\x00\x12\x14\n\x10TRANSACTION_INFO\x10\x01\x32\x82\x06\n\x0bTransaction\x12O\n\x0eGetTransaction\x12\x1d.pactus.GetTransactionRequest\x1a\x1e.pactus.GetTransactionResponse\x12I\n\x0c\x43\x61lculateFee\x12\x1b.pactus.CalculateFeeRequest\x1a\x1c.pactus.CalculateFeeResponse\x12\x61\n\x14\x42roadcastTransaction\x12#.pactus.BroadcastTransactionRequest\x1a$.pactus.BroadcastTransactionResponse\x12X\n\x11GetRawTransaction\x12 .pactus.GetRawTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawTransferTransaction\x12(.pactus.GetRawTransferTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12`\n\x15GetRawBondTransaction\x12$.pactus.GetRawBondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12\x64\n\x17GetRawUnbondTransaction\x12&.pactus.GetRawUnbondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawWithdrawTransaction\x12(.pactus.GetRawWithdrawTransactionRequest\x1a!.pactus.GetRawTransactionResponseBF\n\x12pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11transaction.proto\x12\x06pactus\"c\n\x15GetTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tverbosity\x18\x02 \x01(\x0e\x32\x1c.pactus.TransactionVerbosityR\tverbosity\"\x95\x01\n\x16GetTransactionResponse\x12!\n\x0c\x62lock_height\x18\x01 \x01(\rR\x0b\x62lockHeight\x12\x1d\n\nblock_time\x18\x02 \x01(\rR\tblockTime\x12\x39\n\x0btransaction\x18\x03 \x01(\x0b\x32\x17.pactus.TransactionInfoR\x0btransaction\"\x88\x01\n\x13\x43\x61lculateFeeRequest\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x36\n\x0cpayload_type\x18\x02 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12!\n\x0c\x66ixed_amount\x18\x03 \x01(\x08R\x0b\x66ixedAmount\"@\n\x14\x43\x61lculateFeeResponse\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x02 \x01(\x03R\x03\x66\x65\x65\"S\n\x1b\x42roadcastTransactionRequest\x12\x34\n\x16signed_raw_transaction\x18\x01 \x01(\tR\x14signedRawTransaction\".\n\x1c\x42roadcastTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xa0\x02\n\x18GetRawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x12\n\x04memo\x18\x02 \x01(\tR\x04memo\x12\x35\n\x08transfer\x18\x03 \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x04 \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12/\n\x06unbond\x18\x05 \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\x06 \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdrawB\t\n\x07payload\"\xb1\x01\n GetRawTransferTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"\xca\x01\n\x1cGetRawBondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x04 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x05 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x07 \x01(\tR\x04memo\"~\n\x1eGetRawUnbondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x03 \x01(\tR\x10validatorAddress\x12\x12\n\x04memo\x18\x04 \x01(\tR\x04memo\"\xd3\x01\n GetRawWithdrawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"D\n\x19GetRawTransactionResponse\x12\'\n\x0fraw_transaction\x18\x01 \x01(\tR\x0erawTransaction\"o\n\x0fPayloadTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"\x88\x01\n\x0bPayloadBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x04 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\"B\n\x10PayloadSortition\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x14\n\x05proof\x18\x02 \x01(\tR\x05proof\"-\n\rPayloadUnbond\x12\x1c\n\tvalidator\x18\x01 \x01(\tR\tvalidator\"\x91\x01\n\x0fPayloadWithdraw\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x02 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"\xac\x04\n\x0fTransactionInfo\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x18\n\x07version\x18\x03 \x01(\x05R\x07version\x12\x1b\n\tlock_time\x18\x04 \x01(\rR\x08lockTime\x12\x14\n\x05value\x18\x05 \x01(\x03R\x05value\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x36\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12\x35\n\x08transfer\x18\x1e \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x1f \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12\x38\n\tsortition\x18 \x01(\x0b\x32\x18.pactus.PayloadSortitionH\x00R\tsortition\x12/\n\x06unbond\x18! \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\" \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdraw\x12\x12\n\x04memo\x18\x08 \x01(\tR\x04memo\x12\x1d\n\npublic_key\x18\t \x01(\tR\tpublicKey\x12\x1c\n\tsignature\x18\n \x01(\tR\tsignatureB\t\n\x07payload*\x83\x01\n\x0bPayloadType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10TRANSFER_PAYLOAD\x10\x01\x12\x10\n\x0c\x42OND_PAYLOAD\x10\x02\x12\x15\n\x11SORTITION_PAYLOAD\x10\x03\x12\x12\n\x0eUNBOND_PAYLOAD\x10\x04\x12\x14\n\x10WITHDRAW_PAYLOAD\x10\x05*B\n\x14TransactionVerbosity\x12\x14\n\x10TRANSACTION_DATA\x10\x00\x12\x14\n\x10TRANSACTION_INFO\x10\x01\x32\x82\x06\n\x0bTransaction\x12O\n\x0eGetTransaction\x12\x1d.pactus.GetTransactionRequest\x1a\x1e.pactus.GetTransactionResponse\x12I\n\x0c\x43\x61lculateFee\x12\x1b.pactus.CalculateFeeRequest\x1a\x1c.pactus.CalculateFeeResponse\x12\x61\n\x14\x42roadcastTransaction\x12#.pactus.BroadcastTransactionRequest\x1a$.pactus.BroadcastTransactionResponse\x12X\n\x11GetRawTransaction\x12 .pactus.GetRawTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawTransferTransaction\x12(.pactus.GetRawTransferTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12`\n\x15GetRawBondTransaction\x12$.pactus.GetRawBondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12\x64\n\x17GetRawUnbondTransaction\x12&.pactus.GetRawUnbondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawWithdrawTransaction\x12(.pactus.GetRawWithdrawTransactionRequest\x1a!.pactus.GetRawTransactionResponseBF\n\x12pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'transaction_pb2', globals()) @@ -21,10 +21,10 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactus' - _PAYLOADTYPE._serialized_start=3108 - _PAYLOADTYPE._serialized_end=3239 - _TRANSACTIONVERBOSITY._serialized_start=3241 - _TRANSACTIONVERBOSITY._serialized_end=3307 + _PAYLOADTYPE._serialized_start=2783 + _PAYLOADTYPE._serialized_end=2914 + _TRANSACTIONVERBOSITY._serialized_start=2916 + _TRANSACTIONVERBOSITY._serialized_end=2982 _GETTRANSACTIONREQUEST._serialized_start=29 _GETTRANSACTIONREQUEST._serialized_end=128 _GETTRANSACTIONRESPONSE._serialized_start=131 @@ -47,28 +47,20 @@ _GETRAWUNBONDTRANSACTIONREQUEST._serialized_end=1422 _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_start=1425 _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_end=1636 - _TRANSFERPAYLOAD._serialized_start=1638 - _TRANSFERPAYLOAD._serialized_end=1749 - _BONDPAYLOAD._serialized_start=1752 - _BONDPAYLOAD._serialized_end=1888 - _UNBONDPAYLOAD._serialized_start=1890 - _UNBONDPAYLOAD._serialized_end=1950 - _WITHDRAWPAYLOAD._serialized_start=1953 - _WITHDRAWPAYLOAD._serialized_end=2098 - _GETRAWTRANSACTIONRESPONSE._serialized_start=2100 - _GETRAWTRANSACTIONRESPONSE._serialized_end=2168 - _PAYLOADTRANSFER._serialized_start=2170 - _PAYLOADTRANSFER._serialized_end=2263 - _PAYLOADBOND._serialized_start=2265 - _PAYLOADBOND._serialized_end=2352 - _PAYLOADSORTITION._serialized_start=2354 - _PAYLOADSORTITION._serialized_end=2420 - _PAYLOADUNBOND._serialized_start=2422 - _PAYLOADUNBOND._serialized_end=2467 - _PAYLOADWITHDRAW._serialized_start=2469 - _PAYLOADWITHDRAW._serialized_end=2546 - _TRANSACTIONINFO._serialized_start=2549 - _TRANSACTIONINFO._serialized_end=3105 - _TRANSACTION._serialized_start=3310 - _TRANSACTION._serialized_end=4080 + _GETRAWTRANSACTIONRESPONSE._serialized_start=1638 + _GETRAWTRANSACTIONRESPONSE._serialized_end=1706 + _PAYLOADTRANSFER._serialized_start=1708 + _PAYLOADTRANSFER._serialized_end=1819 + _PAYLOADBOND._serialized_start=1822 + _PAYLOADBOND._serialized_end=1958 + _PAYLOADSORTITION._serialized_start=1960 + _PAYLOADSORTITION._serialized_end=2026 + _PAYLOADUNBOND._serialized_start=2028 + _PAYLOADUNBOND._serialized_end=2073 + _PAYLOADWITHDRAW._serialized_start=2076 + _PAYLOADWITHDRAW._serialized_end=2221 + _TRANSACTIONINFO._serialized_start=2224 + _TRANSACTIONINFO._serialized_end=2780 + _TRANSACTION._serialized_start=2985 + _TRANSACTION._serialized_end=3755 # @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/transaction_pb2.pyi b/www/grpc/gen/python/transaction_pb2.pyi index ea8d9dad7..b3c9ce5ec 100644 --- a/www/grpc/gen/python/transaction_pb2.pyi +++ b/www/grpc/gen/python/transaction_pb2.pyi @@ -85,11 +85,11 @@ class GetRawTransactionRequest(_message.Message): WITHDRAW_FIELD_NUMBER: _ClassVar[int] lock_time: int memo: str - transfer: TransferPayload - bond: BondPayload - unbond: UnbondPayload - withdraw: WithdrawPayload - def __init__(self, lock_time: _Optional[int] = ..., memo: _Optional[str] = ..., transfer: _Optional[_Union[TransferPayload, _Mapping]] = ..., bond: _Optional[_Union[BondPayload, _Mapping]] = ..., unbond: _Optional[_Union[UnbondPayload, _Mapping]] = ..., withdraw: _Optional[_Union[WithdrawPayload, _Mapping]] = ...) -> None: ... + transfer: PayloadTransfer + bond: PayloadBond + unbond: PayloadUnbond + withdraw: PayloadWithdraw + def __init__(self, lock_time: _Optional[int] = ..., memo: _Optional[str] = ..., transfer: _Optional[_Union[PayloadTransfer, _Mapping]] = ..., bond: _Optional[_Union[PayloadBond, _Mapping]] = ..., unbond: _Optional[_Union[PayloadUnbond, _Mapping]] = ..., withdraw: _Optional[_Union[PayloadWithdraw, _Mapping]] = ...) -> None: ... class GetRawTransferTransactionRequest(_message.Message): __slots__ = ("lock_time", "sender", "receiver", "amount", "fee", "memo") @@ -151,7 +151,13 @@ class GetRawWithdrawTransactionRequest(_message.Message): memo: str def __init__(self, lock_time: _Optional[int] = ..., validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ... -class TransferPayload(_message.Message): +class GetRawTransactionResponse(_message.Message): + __slots__ = ("raw_transaction",) + RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] + raw_transaction: str + def __init__(self, raw_transaction: _Optional[str] = ...) -> None: ... + +class PayloadTransfer(_message.Message): __slots__ = ("sender", "receiver", "amount", "fee") SENDER_FIELD_NUMBER: _ClassVar[int] RECEIVER_FIELD_NUMBER: _ClassVar[int] @@ -163,7 +169,7 @@ class TransferPayload(_message.Message): fee: int def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... -class BondPayload(_message.Message): +class PayloadBond(_message.Message): __slots__ = ("sender", "receiver", "stake", "public_key", "fee") SENDER_FIELD_NUMBER: _ClassVar[int] RECEIVER_FIELD_NUMBER: _ClassVar[int] @@ -177,50 +183,6 @@ class BondPayload(_message.Message): fee: int def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ..., fee: _Optional[int] = ...) -> None: ... -class UnbondPayload(_message.Message): - __slots__ = ("validator_address",) - VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] - validator_address: str - def __init__(self, validator_address: _Optional[str] = ...) -> None: ... - -class WithdrawPayload(_message.Message): - __slots__ = ("validator_address", "account_address", "amount", "fee") - VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] - ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int] - AMOUNT_FIELD_NUMBER: _ClassVar[int] - FEE_FIELD_NUMBER: _ClassVar[int] - validator_address: str - account_address: str - amount: int - fee: int - def __init__(self, validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... - -class GetRawTransactionResponse(_message.Message): - __slots__ = ("raw_transaction",) - RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] - raw_transaction: str - def __init__(self, raw_transaction: _Optional[str] = ...) -> None: ... - -class PayloadTransfer(_message.Message): - __slots__ = ("sender", "receiver", "amount") - SENDER_FIELD_NUMBER: _ClassVar[int] - RECEIVER_FIELD_NUMBER: _ClassVar[int] - AMOUNT_FIELD_NUMBER: _ClassVar[int] - sender: str - receiver: str - amount: int - def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ... - -class PayloadBond(_message.Message): - __slots__ = ("sender", "receiver", "stake") - SENDER_FIELD_NUMBER: _ClassVar[int] - RECEIVER_FIELD_NUMBER: _ClassVar[int] - STAKE_FIELD_NUMBER: _ClassVar[int] - sender: str - receiver: str - stake: int - def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ...) -> None: ... - class PayloadSortition(_message.Message): __slots__ = ("address", "proof") ADDRESS_FIELD_NUMBER: _ClassVar[int] @@ -236,13 +198,16 @@ class PayloadUnbond(_message.Message): def __init__(self, validator: _Optional[str] = ...) -> None: ... class PayloadWithdraw(_message.Message): - __slots__ = ("to", "amount") - FROM_FIELD_NUMBER: _ClassVar[int] - TO_FIELD_NUMBER: _ClassVar[int] + __slots__ = ("validator_address", "account_address", "amount", "fee") + VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] + ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int] AMOUNT_FIELD_NUMBER: _ClassVar[int] - to: str + FEE_FIELD_NUMBER: _ClassVar[int] + validator_address: str + account_address: str amount: int - def __init__(self, to: _Optional[str] = ..., amount: _Optional[int] = ..., **kwargs) -> None: ... + fee: int + def __init__(self, validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... class TransactionInfo(_message.Message): __slots__ = ("id", "data", "version", "lock_time", "value", "fee", "payload_type", "transfer", "bond", "sortition", "unbond", "withdraw", "memo", "public_key", "signature") diff --git a/www/grpc/gen/rust/pactus.rs b/www/grpc/gen/rust/pactus.rs index 203691bc7..fa8167bc2 100644 --- a/www/grpc/gen/rust/pactus.rs +++ b/www/grpc/gen/rust/pactus.rs @@ -85,16 +85,16 @@ pub mod get_raw_transaction_request { #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Payload { #[prost(message, tag="3")] - Transfer(super::TransferPayload), + Transfer(super::PayloadTransfer), #[prost(message, tag="4")] - Bond(super::BondPayload), + Bond(super::PayloadBond), #[prost(message, tag="5")] - Unbond(super::UnbondPayload), + Unbond(super::PayloadUnbond), #[prost(message, tag="6")] - Withdraw(super::WithdrawPayload), + Withdraw(super::PayloadWithdraw), } } -/// Request message for retrieving raw details of a transfer transaction. +/// Deprecated: Request message for retrieving raw details of a transfer transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRawTransferTransactionRequest { @@ -118,7 +118,7 @@ pub struct GetRawTransferTransactionRequest { #[prost(string, tag="6")] pub memo: ::prost::alloc::string::String, } -/// Request message for retrieving raw details of a bond transaction. +/// Deprecated: Request message for retrieving raw details of a bond transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRawBondTransactionRequest { @@ -145,7 +145,7 @@ pub struct GetRawBondTransactionRequest { #[prost(string, tag="7")] pub memo: ::prost::alloc::string::String, } -/// Request message for retrieving raw details of an unbond transaction. +/// Deprecated: Request message for retrieving raw details of an unbond transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRawUnbondTransactionRequest { @@ -160,7 +160,7 @@ pub struct GetRawUnbondTransactionRequest { #[prost(string, tag="4")] pub memo: ::prost::alloc::string::String, } -/// Request message for retrieving raw details of a withdraw transaction. +/// Deprecated: Request message for retrieving raw details of a withdraw transaction. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRawWithdrawTransactionRequest { @@ -184,68 +184,6 @@ pub struct GetRawWithdrawTransactionRequest { #[prost(string, tag="6")] pub memo: ::prost::alloc::string::String, } -/// Payload message for retrieving raw details of a transfer transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct TransferPayload { - /// The sender's account address. - #[prost(string, tag="1")] - pub sender: ::prost::alloc::string::String, - /// The receiver's account address. - #[prost(string, tag="2")] - pub receiver: ::prost::alloc::string::String, - /// The amount to be transferred, specified in NanoPAC. Must be greater than 0. - #[prost(int64, tag="3")] - pub amount: i64, - /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - #[prost(int64, tag="4")] - pub fee: i64, -} -/// Payload message for retrieving raw details of a bond transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct BondPayload { - /// The sender's account address. - #[prost(string, tag="1")] - pub sender: ::prost::alloc::string::String, - /// The receiver's validator address. - #[prost(string, tag="2")] - pub receiver: ::prost::alloc::string::String, - /// The stake amount in NanoPAC. Must be greater than 0. - #[prost(int64, tag="3")] - pub stake: i64, - /// The public key of the validator. - #[prost(string, tag="4")] - pub public_key: ::prost::alloc::string::String, - /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - #[prost(int64, tag="5")] - pub fee: i64, -} -/// Payload message for retrieving raw details of an unbond transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct UnbondPayload { - /// The address of the validator to unbond from. - #[prost(string, tag="1")] - pub validator_address: ::prost::alloc::string::String, -} -/// Payload message for retrieving raw details of a withdraw transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct WithdrawPayload { - /// The address of the validator to withdraw from. - #[prost(string, tag="1")] - pub validator_address: ::prost::alloc::string::String, - /// The address of the account to withdraw to. - #[prost(string, tag="2")] - pub account_address: ::prost::alloc::string::String, - /// The withdrawal amount in NanoPAC. Must be greater than 0. - #[prost(int64, tag="3")] - pub amount: i64, - /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - #[prost(int64, tag="4")] - pub fee: i64, -} /// Response message containing raw transaction data. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -267,6 +205,9 @@ pub struct PayloadTransfer { /// The amount to be transferred in NanoPAC. #[prost(int64, tag="3")] pub amount: i64, + /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + #[prost(int64, tag="4")] + pub fee: i64, } /// Payload for a bond transaction. #[allow(clippy::derive_partial_eq_without_eq)] @@ -281,6 +222,12 @@ pub struct PayloadBond { /// The stake amount in NanoPAC. #[prost(int64, tag="3")] pub stake: i64, + /// The public key of the validator. + #[prost(string, tag="4")] + pub public_key: ::prost::alloc::string::String, + /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + #[prost(int64, tag="5")] + pub fee: i64, } /// Payload for a sortition transaction. #[allow(clippy::derive_partial_eq_without_eq)] @@ -305,15 +252,18 @@ pub struct PayloadUnbond { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PayloadWithdraw { - /// The address to withdraw from. + /// The address of the validator to withdraw from. #[prost(string, tag="1")] - pub from: ::prost::alloc::string::String, - /// The address to withdraw to. + pub validator_address: ::prost::alloc::string::String, + /// The address of the account to withdraw to. #[prost(string, tag="2")] - pub to: ::prost::alloc::string::String, + pub account_address: ::prost::alloc::string::String, /// The withdrawal amount in NanoPAC. #[prost(int64, tag="3")] pub amount: i64, + /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + #[prost(int64, tag="4")] + pub fee: i64, } /// Information about a transaction. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/www/grpc/gen/rust/pactus.serde.rs b/www/grpc/gen/rust/pactus.serde.rs index 00055c1fb..87ffce2dd 100644 --- a/www/grpc/gen/rust/pactus.serde.rs +++ b/www/grpc/gen/rust/pactus.serde.rs @@ -625,170 +625,6 @@ impl<'de> serde::Deserialize<'de> for BlockVerbosity { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for BondPayload { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.receiver.is_empty() { - len += 1; - } - if self.stake != 0 { - len += 1; - } - if !self.public_key.is_empty() { - len += 1; - } - if self.fee != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.BondPayload", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.receiver.is_empty() { - struct_ser.serialize_field("receiver", &self.receiver)?; - } - if self.stake != 0 { - struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; - } - if !self.public_key.is_empty() { - struct_ser.serialize_field("publicKey", &self.public_key)?; - } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for BondPayload { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sender", - "receiver", - "stake", - "public_key", - "publicKey", - "fee", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Receiver, - Stake, - PublicKey, - Fee, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sender" => Ok(GeneratedField::Sender), - "receiver" => Ok(GeneratedField::Receiver), - "stake" => Ok(GeneratedField::Stake), - "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - "fee" => Ok(GeneratedField::Fee), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = BondPayload; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.BondPayload") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sender__ = None; - let mut receiver__ = None; - let mut stake__ = None; - let mut public_key__ = None; - let mut fee__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map.next_value()?); - } - GeneratedField::Receiver => { - if receiver__.is_some() { - return Err(serde::de::Error::duplicate_field("receiver")); - } - receiver__ = Some(map.next_value()?); - } - GeneratedField::Stake => { - if stake__.is_some() { - return Err(serde::de::Error::duplicate_field("stake")); - } - stake__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::PublicKey => { - if public_key__.is_some() { - return Err(serde::de::Error::duplicate_field("publicKey")); - } - public_key__ = Some(map.next_value()?); - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(BondPayload { - sender: sender__.unwrap_or_default(), - receiver: receiver__.unwrap_or_default(), - stake: stake__.unwrap_or_default(), - public_key: public_key__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.BondPayload", FIELDS, GeneratedVisitor) - } -} impl serde::Serialize for BroadcastTransactionRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -7127,6 +6963,12 @@ impl serde::Serialize for PayloadBond { if self.stake != 0 { len += 1; } + if !self.public_key.is_empty() { + len += 1; + } + if self.fee != 0 { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.PayloadBond", len)?; if !self.sender.is_empty() { struct_ser.serialize_field("sender", &self.sender)?; @@ -7137,6 +6979,12 @@ impl serde::Serialize for PayloadBond { if self.stake != 0 { struct_ser.serialize_field("stake", ToString::to_string(&self.stake).as_str())?; } + if !self.public_key.is_empty() { + struct_ser.serialize_field("publicKey", &self.public_key)?; + } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } struct_ser.end() } } @@ -7150,6 +6998,9 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { "sender", "receiver", "stake", + "public_key", + "publicKey", + "fee", ]; #[allow(clippy::enum_variant_names)] @@ -7157,6 +7008,8 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { Sender, Receiver, Stake, + PublicKey, + Fee, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7181,6 +7034,8 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { "sender" => Ok(GeneratedField::Sender), "receiver" => Ok(GeneratedField::Receiver), "stake" => Ok(GeneratedField::Stake), + "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), + "fee" => Ok(GeneratedField::Fee), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7203,6 +7058,8 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { let mut sender__ = None; let mut receiver__ = None; let mut stake__ = None; + let mut public_key__ = None; + let mut fee__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Sender => { @@ -7225,12 +7082,28 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } + GeneratedField::PublicKey => { + if public_key__.is_some() { + return Err(serde::de::Error::duplicate_field("publicKey")); + } + public_key__ = Some(map.next_value()?); + } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } } } Ok(PayloadBond { sender: sender__.unwrap_or_default(), receiver: receiver__.unwrap_or_default(), stake: stake__.unwrap_or_default(), + public_key: public_key__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), }) } } @@ -7362,6 +7235,9 @@ impl serde::Serialize for PayloadTransfer { if self.amount != 0 { len += 1; } + if self.fee != 0 { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.PayloadTransfer", len)?; if !self.sender.is_empty() { struct_ser.serialize_field("sender", &self.sender)?; @@ -7372,6 +7248,9 @@ impl serde::Serialize for PayloadTransfer { if self.amount != 0 { struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } struct_ser.end() } } @@ -7385,6 +7264,7 @@ impl<'de> serde::Deserialize<'de> for PayloadTransfer { "sender", "receiver", "amount", + "fee", ]; #[allow(clippy::enum_variant_names)] @@ -7392,6 +7272,7 @@ impl<'de> serde::Deserialize<'de> for PayloadTransfer { Sender, Receiver, Amount, + Fee, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7416,6 +7297,7 @@ impl<'de> serde::Deserialize<'de> for PayloadTransfer { "sender" => Ok(GeneratedField::Sender), "receiver" => Ok(GeneratedField::Receiver), "amount" => Ok(GeneratedField::Amount), + "fee" => Ok(GeneratedField::Fee), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7438,6 +7320,7 @@ impl<'de> serde::Deserialize<'de> for PayloadTransfer { let mut sender__ = None; let mut receiver__ = None; let mut amount__ = None; + let mut fee__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Sender => { @@ -7460,12 +7343,21 @@ impl<'de> serde::Deserialize<'de> for PayloadTransfer { Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } } } Ok(PayloadTransfer { sender: sender__.unwrap_or_default(), receiver: receiver__.unwrap_or_default(), amount: amount__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), }) } } @@ -7656,25 +7548,31 @@ impl serde::Serialize for PayloadWithdraw { { use serde::ser::SerializeStruct; let mut len = 0; - if !self.from.is_empty() { + if !self.validator_address.is_empty() { len += 1; } - if !self.to.is_empty() { + if !self.account_address.is_empty() { len += 1; } if self.amount != 0 { len += 1; } + if self.fee != 0 { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.PayloadWithdraw", len)?; - if !self.from.is_empty() { - struct_ser.serialize_field("from", &self.from)?; + if !self.validator_address.is_empty() { + struct_ser.serialize_field("validatorAddress", &self.validator_address)?; } - if !self.to.is_empty() { - struct_ser.serialize_field("to", &self.to)?; + if !self.account_address.is_empty() { + struct_ser.serialize_field("accountAddress", &self.account_address)?; } if self.amount != 0 { struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } struct_ser.end() } } @@ -7685,16 +7583,20 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { D: serde::Deserializer<'de>, { const FIELDS: &[&str] = &[ - "from", - "to", + "validator_address", + "validatorAddress", + "account_address", + "accountAddress", "amount", + "fee", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { - From, - To, + ValidatorAddress, + AccountAddress, Amount, + Fee, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7716,9 +7618,10 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { E: serde::de::Error, { match value { - "from" => Ok(GeneratedField::From), - "to" => Ok(GeneratedField::To), + "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), + "accountAddress" | "account_address" => Ok(GeneratedField::AccountAddress), "amount" => Ok(GeneratedField::Amount), + "fee" => Ok(GeneratedField::Fee), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7738,22 +7641,23 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { where V: serde::de::MapAccess<'de>, { - let mut from__ = None; - let mut to__ = None; + let mut validator_address__ = None; + let mut account_address__ = None; let mut amount__ = None; + let mut fee__ = None; while let Some(k) = map.next_key()? { match k { - GeneratedField::From => { - if from__.is_some() { - return Err(serde::de::Error::duplicate_field("from")); + GeneratedField::ValidatorAddress => { + if validator_address__.is_some() { + return Err(serde::de::Error::duplicate_field("validatorAddress")); } - from__ = Some(map.next_value()?); + validator_address__ = Some(map.next_value()?); } - GeneratedField::To => { - if to__.is_some() { - return Err(serde::de::Error::duplicate_field("to")); + GeneratedField::AccountAddress => { + if account_address__.is_some() { + return Err(serde::de::Error::duplicate_field("accountAddress")); } - to__ = Some(map.next_value()?); + account_address__ = Some(map.next_value()?); } GeneratedField::Amount => { if amount__.is_some() { @@ -7763,12 +7667,21 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } } } Ok(PayloadWithdraw { - from: from__.unwrap_or_default(), - to: to__.unwrap_or_default(), + validator_address: validator_address__.unwrap_or_default(), + account_address: account_address__.unwrap_or_default(), amount: amount__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), }) } } @@ -9670,244 +9583,6 @@ impl<'de> serde::Deserialize<'de> for TransactionVerbosity { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for TransferPayload { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.sender.is_empty() { - len += 1; - } - if !self.receiver.is_empty() { - len += 1; - } - if self.amount != 0 { - len += 1; - } - if self.fee != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.TransferPayload", len)?; - if !self.sender.is_empty() { - struct_ser.serialize_field("sender", &self.sender)?; - } - if !self.receiver.is_empty() { - struct_ser.serialize_field("receiver", &self.receiver)?; - } - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for TransferPayload { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "sender", - "receiver", - "amount", - "fee", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - Sender, - Receiver, - Amount, - Fee, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "sender" => Ok(GeneratedField::Sender), - "receiver" => Ok(GeneratedField::Receiver), - "amount" => Ok(GeneratedField::Amount), - "fee" => Ok(GeneratedField::Fee), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = TransferPayload; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.TransferPayload") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut sender__ = None; - let mut receiver__ = None; - let mut amount__ = None; - let mut fee__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::Sender => { - if sender__.is_some() { - return Err(serde::de::Error::duplicate_field("sender")); - } - sender__ = Some(map.next_value()?); - } - GeneratedField::Receiver => { - if receiver__.is_some() { - return Err(serde::de::Error::duplicate_field("receiver")); - } - receiver__ = Some(map.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(TransferPayload { - sender: sender__.unwrap_or_default(), - receiver: receiver__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.TransferPayload", FIELDS, GeneratedVisitor) - } -} -impl serde::Serialize for UnbondPayload { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.validator_address.is_empty() { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.UnbondPayload", len)?; - if !self.validator_address.is_empty() { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for UnbondPayload { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator_address", - "validatorAddress", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ValidatorAddress, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = UnbondPayload; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.UnbondPayload") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator_address__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map.next_value()?); - } - } - } - Ok(UnbondPayload { - validator_address: validator_address__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.UnbondPayload", FIELDS, GeneratedVisitor) - } -} impl serde::Serialize for UnloadWalletRequest { #[allow(deprecated)] fn serialize(&self, serializer: S) -> std::result::Result @@ -10837,151 +10512,3 @@ impl<'de> serde::Deserialize<'de> for VoteType { deserializer.deserialize_any(GeneratedVisitor) } } -impl serde::Serialize for WithdrawPayload { - #[allow(deprecated)] - fn serialize(&self, serializer: S) -> std::result::Result - where - S: serde::Serializer, - { - use serde::ser::SerializeStruct; - let mut len = 0; - if !self.validator_address.is_empty() { - len += 1; - } - if !self.account_address.is_empty() { - len += 1; - } - if self.amount != 0 { - len += 1; - } - if self.fee != 0 { - len += 1; - } - let mut struct_ser = serializer.serialize_struct("pactus.WithdrawPayload", len)?; - if !self.validator_address.is_empty() { - struct_ser.serialize_field("validatorAddress", &self.validator_address)?; - } - if !self.account_address.is_empty() { - struct_ser.serialize_field("accountAddress", &self.account_address)?; - } - if self.amount != 0 { - struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; - } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } - struct_ser.end() - } -} -impl<'de> serde::Deserialize<'de> for WithdrawPayload { - #[allow(deprecated)] - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - const FIELDS: &[&str] = &[ - "validator_address", - "validatorAddress", - "account_address", - "accountAddress", - "amount", - "fee", - ]; - - #[allow(clippy::enum_variant_names)] - enum GeneratedField { - ValidatorAddress, - AccountAddress, - Amount, - Fee, - } - impl<'de> serde::Deserialize<'de> for GeneratedField { - fn deserialize(deserializer: D) -> std::result::Result - where - D: serde::Deserializer<'de>, - { - struct GeneratedVisitor; - - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = GeneratedField; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(formatter, "expected one of: {:?}", &FIELDS) - } - - #[allow(unused_variables)] - fn visit_str(self, value: &str) -> std::result::Result - where - E: serde::de::Error, - { - match value { - "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), - "accountAddress" | "account_address" => Ok(GeneratedField::AccountAddress), - "amount" => Ok(GeneratedField::Amount), - "fee" => Ok(GeneratedField::Fee), - _ => Err(serde::de::Error::unknown_field(value, FIELDS)), - } - } - } - deserializer.deserialize_identifier(GeneratedVisitor) - } - } - struct GeneratedVisitor; - impl<'de> serde::de::Visitor<'de> for GeneratedVisitor { - type Value = WithdrawPayload; - - fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - formatter.write_str("struct pactus.WithdrawPayload") - } - - fn visit_map(self, mut map: V) -> std::result::Result - where - V: serde::de::MapAccess<'de>, - { - let mut validator_address__ = None; - let mut account_address__ = None; - let mut amount__ = None; - let mut fee__ = None; - while let Some(k) = map.next_key()? { - match k { - GeneratedField::ValidatorAddress => { - if validator_address__.is_some() { - return Err(serde::de::Error::duplicate_field("validatorAddress")); - } - validator_address__ = Some(map.next_value()?); - } - GeneratedField::AccountAddress => { - if account_address__.is_some() { - return Err(serde::de::Error::duplicate_field("accountAddress")); - } - account_address__ = Some(map.next_value()?); - } - GeneratedField::Amount => { - if amount__.is_some() { - return Err(serde::de::Error::duplicate_field("amount")); - } - amount__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } - } - } - Ok(WithdrawPayload { - validator_address: validator_address__.unwrap_or_default(), - account_address: account_address__.unwrap_or_default(), - amount: amount__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), - }) - } - } - deserializer.deserialize_struct("pactus.WithdrawPayload", FIELDS, GeneratedVisitor) - } -} diff --git a/www/grpc/proto/transaction.proto b/www/grpc/proto/transaction.proto index 904f9338d..c2278f8b1 100644 --- a/www/grpc/proto/transaction.proto +++ b/www/grpc/proto/transaction.proto @@ -96,14 +96,14 @@ message GetRawTransactionRequest { string memo = 2; oneof payload { - TransferPayload transfer = 3; - BondPayload bond = 4; - UnbondPayload unbond = 5; - WithdrawPayload withdraw = 6; + PayloadTransfer transfer = 3; + PayloadBond bond = 4; + PayloadUnbond unbond = 5; + PayloadWithdraw withdraw = 6; } } -// Request message for retrieving raw details of a transfer transaction. +// Deprecated: Request message for retrieving raw details of a transfer transaction. message GetRawTransferTransactionRequest { // The lock time for the transaction. If not set, defaults to the last block // height. @@ -120,7 +120,7 @@ message GetRawTransferTransactionRequest { string memo = 6; } -// Request message for retrieving raw details of a bond transaction. +// Deprecated: Request message for retrieving raw details of a bond transaction. message GetRawBondTransactionRequest { // The lock time for the transaction. If not set, defaults to the last block // height. @@ -139,7 +139,7 @@ message GetRawBondTransactionRequest { string memo = 7; } -// Request message for retrieving raw details of an unbond transaction. +// Deprecated: Request message for retrieving raw details of an unbond transaction. message GetRawUnbondTransactionRequest { // The lock time for the transaction. If not set, defaults to the last block // height. @@ -150,7 +150,7 @@ message GetRawUnbondTransactionRequest { string memo = 4; } -// Request message for retrieving raw details of a withdraw transaction. +// Deprecated: Request message for retrieving raw details of a withdraw transaction. message GetRawWithdrawTransactionRequest { // The lock time for the transaction. If not set, defaults to the last block // height. @@ -167,50 +167,6 @@ message GetRawWithdrawTransactionRequest { string memo = 6; } -// Payload message for retrieving raw details of a transfer transaction. -message TransferPayload { - // The sender's account address. - string sender = 1; - // The receiver's account address. - string receiver = 2; - // The amount to be transferred, specified in NanoPAC. Must be greater than 0. - int64 amount = 3; - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - int64 fee = 4; -} - -// Payload message for retrieving raw details of a bond transaction. -message BondPayload { - // The sender's account address. - string sender = 1; - // The receiver's validator address. - string receiver = 2; - // The stake amount in NanoPAC. Must be greater than 0. - int64 stake = 3; - // The public key of the validator. - string public_key = 4; - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - int64 fee = 5; -} - -// Payload message for retrieving raw details of an unbond transaction. -message UnbondPayload { - // The address of the validator to unbond from. - string validator_address = 1; -} - -// Payload message for retrieving raw details of a withdraw transaction. -message WithdrawPayload { - // The address of the validator to withdraw from. - string validator_address = 1; - // The address of the account to withdraw to. - string account_address = 2; - // The withdrawal amount in NanoPAC. Must be greater than 0. - int64 amount = 3; - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - int64 fee = 4; -} - // Response message containing raw transaction data. message GetRawTransactionResponse { // The raw transaction data. @@ -225,6 +181,8 @@ message PayloadTransfer { string receiver = 2; // The amount to be transferred in NanoPAC. int64 amount = 3; + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + int64 fee = 4; } // Payload for a bond transaction. @@ -235,6 +193,10 @@ message PayloadBond { string receiver = 2; // The stake amount in NanoPAC. int64 stake = 3; + // The public key of the validator. + string public_key = 4; + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + int64 fee = 5; } // Payload for a sortition transaction. @@ -253,12 +215,14 @@ message PayloadUnbond { // Payload for a withdraw transaction. message PayloadWithdraw { - // The address to withdraw from. - string from = 1; - // The address to withdraw to. - string to = 2; + // The address of the validator to withdraw from. + string validator_address = 1; + // The address of the account to withdraw to. + string account_address = 2; // The withdrawal amount in NanoPAC. int64 amount = 3; + // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. + int64 fee = 4; } // Information about a transaction. diff --git a/www/grpc/swagger-ui/pactus.swagger.json b/www/grpc/swagger-ui/pactus.swagger.json index 37c5aba75..e91c29326 100644 --- a/www/grpc/swagger-ui/pactus.swagger.json +++ b/www/grpc/swagger-ui/pactus.swagger.json @@ -632,21 +632,21 @@ }, { "name": "transfer.sender", - "description": "The sender's account address.", + "description": "The sender's address.", "in": "query", "required": false, "type": "string" }, { "name": "transfer.receiver", - "description": "The receiver's account address.", + "description": "The receiver's address.", "in": "query", "required": false, "type": "string" }, { "name": "transfer.amount", - "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0.", + "description": "The amount to be transferred in NanoPAC.", "in": "query", "required": false, "type": "string", @@ -662,21 +662,21 @@ }, { "name": "bond.sender", - "description": "The sender's account address.", + "description": "The sender's address.", "in": "query", "required": false, "type": "string" }, { "name": "bond.receiver", - "description": "The receiver's validator address.", + "description": "The receiver's address.", "in": "query", "required": false, "type": "string" }, { "name": "bond.stake", - "description": "The stake amount in NanoPAC. Must be greater than 0.", + "description": "The stake amount in NanoPAC.", "in": "query", "required": false, "type": "string", @@ -698,7 +698,7 @@ "format": "int64" }, { - "name": "unbond.validatorAddress", + "name": "unbond.validator", "description": "The address of the validator to unbond from.", "in": "query", "required": false, @@ -720,7 +720,7 @@ }, { "name": "withdraw.amount", - "description": "The withdrawal amount in NanoPAC. Must be greater than 0.", + "description": "The withdrawal amount in NanoPAC.", "in": "query", "required": false, "type": "string", @@ -1256,34 +1256,6 @@ "default": "BLOCK_DATA", "description": "Enumeration for verbosity levels when requesting block information.\n\n - BLOCK_DATA: Request only block data.\n - BLOCK_INFO: Request block information and transaction IDs.\n - BLOCK_TRANSACTIONS: Request block information and detailed transaction data." }, - "pactusBondPayload": { - "type": "object", - "properties": { - "sender": { - "type": "string", - "description": "The sender's account address." - }, - "receiver": { - "type": "string", - "description": "The receiver's validator address." - }, - "stake": { - "type": "string", - "format": "int64", - "description": "The stake amount in NanoPAC. Must be greater than 0." - }, - "publicKey": { - "type": "string", - "description": "The public key of the validator." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." - } - }, - "description": "Payload message for retrieving raw details of a bond transaction." - }, "pactusBroadcastTransactionResponse": { "type": "object", "properties": { @@ -1845,6 +1817,15 @@ "type": "string", "format": "int64", "description": "The stake amount in NanoPAC." + }, + "publicKey": { + "type": "string", + "description": "The public key of the validator." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." } }, "description": "Payload for a bond transaction." @@ -1878,6 +1859,11 @@ "type": "string", "format": "int64", "description": "The amount to be transferred in NanoPAC." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." } }, "description": "Payload for a transfer transaction." @@ -1908,18 +1894,23 @@ "pactusPayloadWithdraw": { "type": "object", "properties": { - "from": { + "validatorAddress": { "type": "string", - "description": "The address to withdraw from." + "description": "The address of the validator to withdraw from." }, - "to": { + "accountAddress": { "type": "string", - "description": "The address to withdraw to." + "description": "The address of the account to withdraw to." }, "amount": { "type": "string", "format": "int64", "description": "The withdrawal amount in NanoPAC." + }, + "fee": { + "type": "string", + "format": "int64", + "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." } }, "description": "Payload for a withdraw transaction." @@ -2183,40 +2174,6 @@ "default": "TRANSACTION_DATA", "description": "Enumeration for verbosity levels when requesting transaction details.\n\n - TRANSACTION_DATA: Request transaction data only.\n - TRANSACTION_INFO: Request detailed transaction information." }, - "pactusTransferPayload": { - "type": "object", - "properties": { - "sender": { - "type": "string", - "description": "The sender's account address." - }, - "receiver": { - "type": "string", - "description": "The receiver's account address." - }, - "amount": { - "type": "string", - "format": "int64", - "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." - } - }, - "description": "Payload message for retrieving raw details of a transfer transaction." - }, - "pactusUnbondPayload": { - "type": "object", - "properties": { - "validatorAddress": { - "type": "string", - "description": "The address of the validator to unbond from." - } - }, - "description": "Payload message for retrieving raw details of an unbond transaction." - }, "pactusUnloadWalletResponse": { "type": "object", "properties": { @@ -2333,30 +2290,6 @@ "default": "VOTE_UNKNOWN", "description": "Enumeration for types of votes.\n\n - VOTE_UNKNOWN: Unknown vote type.\n - VOTE_PREPARE: Prepare vote type.\n - VOTE_PRECOMMIT: Precommit vote type.\n - VOTE_CHANGE_PROPOSER: Change proposer vote type." }, - "pactusWithdrawPayload": { - "type": "object", - "properties": { - "validatorAddress": { - "type": "string", - "description": "The address of the validator to withdraw from." - }, - "accountAddress": { - "type": "string", - "description": "The address of the account to withdraw to." - }, - "amount": { - "type": "string", - "format": "int64", - "description": "The withdrawal amount in NanoPAC. Must be greater than 0." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." - } - }, - "description": "Payload message for retrieving raw details of a withdraw transaction." - }, "protobufAny": { "type": "object", "properties": { diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index 7085830e1..fd1ea0f04 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -316,7 +316,7 @@ func (*transactionServer) handleRawUnBond(r *pactus.GetRawTransactionRequest_Unb lockTime uint32, memo string, ) ([]byte, error) { - validatorAddr, err := crypto.AddressFromString(r.Unbond.ValidatorAddress) + validatorAddr, err := crypto.AddressFromString(r.Unbond.Validator) if err != nil { return nil, err } @@ -422,9 +422,9 @@ func transactionToProto(trx *tx.Tx) *pactus.TransactionInfo { pld := trx.Payload().(*payload.WithdrawPayload) transaction.Payload = &pactus.TransactionInfo_Withdraw{ Withdraw: &pactus.PayloadWithdraw{ - From: pld.From.String(), - To: pld.To.String(), - Amount: pld.Amount.ToNanoPAC(), + ValidatorAddress: pld.From.String(), + AccountAddress: pld.To.String(), + Amount: pld.Amount.ToNanoPAC(), }, } default: diff --git a/www/grpc/transaction_test.go b/www/grpc/transaction_test.go index 3493c8c9c..0e0ee30dd 100644 --- a/www/grpc/transaction_test.go +++ b/www/grpc/transaction_test.go @@ -131,7 +131,7 @@ func TestGetRawTransaction(t *testing.T) { res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ Payload: &pactus.GetRawTransactionRequest_Transfer{ - Transfer: &pactus.TransferPayload{ + Transfer: &pactus.PayloadTransfer{ Sender: td.RandAccAddress().String(), Receiver: td.RandAccAddress().String(), Amount: amt.ToNanoPAC(), @@ -159,7 +159,7 @@ func TestGetRawTransaction(t *testing.T) { res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ Payload: &pactus.GetRawTransactionRequest_Bond{ - Bond: &pactus.BondPayload{ + Bond: &pactus.PayloadBond{ Sender: td.RandAccAddress().String(), Receiver: td.RandValAddress().String(), Stake: amt.ToNanoPAC(), @@ -185,8 +185,8 @@ func TestGetRawTransaction(t *testing.T) { res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ Payload: &pactus.GetRawTransactionRequest_Unbond{ - Unbond: &pactus.UnbondPayload{ - ValidatorAddress: td.RandValAddress().String(), + Unbond: &pactus.PayloadUnbond{ + Validator: td.RandValAddress().String(), }, }, Memo: td.RandString(32), @@ -208,7 +208,7 @@ func TestGetRawTransaction(t *testing.T) { res, err := client.GetRawTransaction(context.Background(), &pactus.GetRawTransactionRequest{ Payload: &pactus.GetRawTransactionRequest_Withdraw{ - Withdraw: &pactus.WithdrawPayload{ + Withdraw: &pactus.PayloadWithdraw{ ValidatorAddress: td.RandValAddress().String(), AccountAddress: td.RandAccAddress().String(), Amount: amt.ToNanoPAC(), diff --git a/www/http/transaction.go b/www/http/transaction.go index 1f4890b9b..ee666fe4f 100644 --- a/www/http/transaction.go +++ b/www/http/transaction.go @@ -65,8 +65,8 @@ func txToTable(trx *pactus.TransactionInfo, tm *tableMaker) { case pactus.PayloadType_WITHDRAW_PAYLOAD: pld := trx.Payload.(*pactus.TransactionInfo_Withdraw).Withdraw - tm.addRowValAddress("Sender", pld.From) - tm.addRowAccAddress("Receiver", pld.To) + tm.addRowValAddress("Sender", pld.ValidatorAddress) + tm.addRowAccAddress("Receiver", pld.AccountAddress) tm.addRowAmount("Amount", amount.Amount(pld.Amount)) case pactus.PayloadType_UNKNOWN: From bdc4e689324ff9a0f5ec00af21d3d7fbe04dbfb2 Mon Sep 17 00:00:00 2001 From: Javad Date: Mon, 23 Sep 2024 15:36:32 +0330 Subject: [PATCH 12/17] fix: change variable name r to payload --- www/grpc/transaction.go | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index fd1ea0f04..71314b635 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -258,45 +258,45 @@ func (s *transactionServer) GetRawWithdrawTransaction(_ context.Context, }, nil } -func (s *transactionServer) handleRawTransfer(r *pactus.GetRawTransactionRequest_Transfer, +func (s *transactionServer) handleRawTransfer(payload *pactus.GetRawTransactionRequest_Transfer, lockTime uint32, memo string, ) ([]byte, error) { - sender, err := crypto.AddressFromString(r.Transfer.Sender) + sender, err := crypto.AddressFromString(payload.Transfer.Sender) if err != nil { return nil, err } - receiver, err := crypto.AddressFromString(r.Transfer.Receiver) + receiver, err := crypto.AddressFromString(payload.Transfer.Receiver) if err != nil { return nil, err } - amt := amount.Amount(r.Transfer.Amount) - fee := s.getFee(r.Transfer.Fee, amt) + amt := amount.Amount(payload.Transfer.Amount) + fee := s.getFee(payload.Transfer.Fee, amt) transferTx := tx.NewTransferTx(lockTime, sender, receiver, amt, fee, tx.WithMemo(memo)) return transferTx.Bytes() } -func (s *transactionServer) handleRawBond(r *pactus.GetRawTransactionRequest_Bond, +func (s *transactionServer) handleRawBond(payload *pactus.GetRawTransactionRequest_Bond, lockTime uint32, memo string, ) ([]byte, error) { - sender, err := crypto.AddressFromString(r.Bond.Sender) + sender, err := crypto.AddressFromString(payload.Bond.Sender) if err != nil { return nil, err } - receiver, err := crypto.AddressFromString(r.Bond.Receiver) + receiver, err := crypto.AddressFromString(payload.Bond.Receiver) if err != nil { return nil, err } var publicKey *bls.PublicKey - if r.Bond.PublicKey != "" { - publicKey, err = bls.PublicKeyFromString(r.Bond.PublicKey) + if payload.Bond.PublicKey != "" { + publicKey, err = bls.PublicKeyFromString(payload.Bond.PublicKey) if err != nil { return nil, err } @@ -304,19 +304,19 @@ func (s *transactionServer) handleRawBond(r *pactus.GetRawTransactionRequest_Bon publicKey = nil } - amt := amount.Amount(r.Bond.Stake) - fee := s.getFee(r.Bond.Fee, amt) + amt := amount.Amount(payload.Bond.Stake) + fee := s.getFee(payload.Bond.Fee, amt) bondTx := tx.NewBondTx(lockTime, sender, receiver, publicKey, amt, fee, tx.WithMemo(memo)) return bondTx.Bytes() } -func (*transactionServer) handleRawUnBond(r *pactus.GetRawTransactionRequest_Unbond, +func (*transactionServer) handleRawUnBond(payload *pactus.GetRawTransactionRequest_Unbond, lockTime uint32, memo string, ) ([]byte, error) { - validatorAddr, err := crypto.AddressFromString(r.Unbond.Validator) + validatorAddr, err := crypto.AddressFromString(payload.Unbond.Validator) if err != nil { return nil, err } @@ -326,22 +326,22 @@ func (*transactionServer) handleRawUnBond(r *pactus.GetRawTransactionRequest_Unb return unbondTx.Bytes() } -func (s *transactionServer) handleRawWithdraw(r *pactus.GetRawTransactionRequest_Withdraw, +func (s *transactionServer) handleRawWithdraw(payload *pactus.GetRawTransactionRequest_Withdraw, lockTime uint32, memo string, ) ([]byte, error) { - validatorAddr, err := crypto.AddressFromString(r.Withdraw.ValidatorAddress) + validatorAddr, err := crypto.AddressFromString(payload.Withdraw.ValidatorAddress) if err != nil { return nil, err } - accountAddr, err := crypto.AddressFromString(r.Withdraw.AccountAddress) + accountAddr, err := crypto.AddressFromString(payload.Withdraw.AccountAddress) if err != nil { return nil, err } - amt := amount.Amount(r.Withdraw.Amount) - fee := s.getFee(r.Withdraw.Fee, amt) + amt := amount.Amount(payload.Withdraw.Amount) + fee := s.getFee(payload.Withdraw.Fee, amt) withdrawTx := tx.NewWithdrawTx(lockTime, validatorAddr, accountAddr, amt, fee, tx.WithMemo(memo)) From ff114f08cc3012244fe49fc11e8ee0871c53f7e9 Mon Sep 17 00:00:00 2001 From: Mostafa Date: Mon, 23 Sep 2024 19:51:32 +0800 Subject: [PATCH 13/17] fix(proto): define fee as transaction field --- www/grpc/gen/dart/transaction.pb.dart | 130 +- www/grpc/gen/dart/transaction.pbjson.dart | 23 +- www/grpc/gen/docs/grpc.md | 108 +- www/grpc/gen/docs/json-rpc.md | 126 +- www/grpc/gen/go/transaction.cobra.pb.go | 9 +- www/grpc/gen/go/transaction.pb.go | 431 ++++--- .../transaction/TransactionOuterClass.java | 1088 ++++++++--------- www/grpc/gen/js/transaction_pb.js | 214 ++-- www/grpc/gen/python/transaction_pb2.py | 60 +- www/grpc/gen/python/transaction_pb2.pyi | 30 +- www/grpc/gen/rust/pactus.rs | 28 +- www/grpc/gen/rust/pactus.serde.rs | 93 +- www/grpc/proto/transaction.proto | 27 +- www/grpc/swagger-ui/pactus.swagger.json | 53 +- www/grpc/transaction.go | 110 +- 15 files changed, 1181 insertions(+), 1349 deletions(-) diff --git a/www/grpc/gen/dart/transaction.pb.dart b/www/grpc/gen/dart/transaction.pb.dart index c0297be3c..18ee320da 100644 --- a/www/grpc/gen/dart/transaction.pb.dart +++ b/www/grpc/gen/dart/transaction.pb.dart @@ -393,20 +393,21 @@ enum GetRawTransactionRequest_Payload { class GetRawTransactionRequest extends $pb.GeneratedMessage { static const $core.Map<$core.int, GetRawTransactionRequest_Payload> _GetRawTransactionRequest_PayloadByTag = { - 3 : GetRawTransactionRequest_Payload.transfer, - 4 : GetRawTransactionRequest_Payload.bond, - 5 : GetRawTransactionRequest_Payload.unbond, - 6 : GetRawTransactionRequest_Payload.withdraw, + 4 : GetRawTransactionRequest_Payload.transfer, + 5 : GetRawTransactionRequest_Payload.bond, + 6 : GetRawTransactionRequest_Payload.unbond, + 7 : GetRawTransactionRequest_Payload.withdraw, 0 : GetRawTransactionRequest_Payload.notSet }; static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) - ..oo(0, [3, 4, 5, 6]) + ..oo(0, [4, 5, 6, 7]) ..a<$core.int>(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'lockTime', $pb.PbFieldType.OU3) ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'memo') - ..aOM(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: PayloadTransfer.create) - ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: PayloadBond.create) - ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: PayloadUnbond.create) - ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: PayloadWithdraw.create) + ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') + ..aOM(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'transfer', subBuilder: PayloadTransfer.create) + ..aOM(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'bond', subBuilder: PayloadBond.create) + ..aOM(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'unbond', subBuilder: PayloadUnbond.create) + ..aOM(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'withdraw', subBuilder: PayloadWithdraw.create) ..hasRequiredFields = false ; @@ -414,6 +415,7 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { factory GetRawTransactionRequest({ $core.int? lockTime, $core.String? memo, + $fixnum.Int64? fee, PayloadTransfer? transfer, PayloadBond? bond, PayloadUnbond? unbond, @@ -426,6 +428,9 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { if (memo != null) { _result.memo = memo; } + if (fee != null) { + _result.fee = fee; + } if (transfer != null) { _result.transfer = transfer; } @@ -483,48 +488,57 @@ class GetRawTransactionRequest extends $pb.GeneratedMessage { void clearMemo() => clearField(2); @$pb.TagNumber(3) - PayloadTransfer get transfer => $_getN(2); + $fixnum.Int64 get fee => $_getI64(2); @$pb.TagNumber(3) - set transfer(PayloadTransfer v) { setField(3, v); } + set fee($fixnum.Int64 v) { $_setInt64(2, v); } @$pb.TagNumber(3) - $core.bool hasTransfer() => $_has(2); + $core.bool hasFee() => $_has(2); @$pb.TagNumber(3) - void clearTransfer() => clearField(3); - @$pb.TagNumber(3) - PayloadTransfer ensureTransfer() => $_ensure(2); + void clearFee() => clearField(3); @$pb.TagNumber(4) - PayloadBond get bond => $_getN(3); + PayloadTransfer get transfer => $_getN(3); @$pb.TagNumber(4) - set bond(PayloadBond v) { setField(4, v); } + set transfer(PayloadTransfer v) { setField(4, v); } @$pb.TagNumber(4) - $core.bool hasBond() => $_has(3); + $core.bool hasTransfer() => $_has(3); @$pb.TagNumber(4) - void clearBond() => clearField(4); + void clearTransfer() => clearField(4); @$pb.TagNumber(4) - PayloadBond ensureBond() => $_ensure(3); + PayloadTransfer ensureTransfer() => $_ensure(3); @$pb.TagNumber(5) - PayloadUnbond get unbond => $_getN(4); + PayloadBond get bond => $_getN(4); @$pb.TagNumber(5) - set unbond(PayloadUnbond v) { setField(5, v); } + set bond(PayloadBond v) { setField(5, v); } @$pb.TagNumber(5) - $core.bool hasUnbond() => $_has(4); + $core.bool hasBond() => $_has(4); @$pb.TagNumber(5) - void clearUnbond() => clearField(5); + void clearBond() => clearField(5); @$pb.TagNumber(5) - PayloadUnbond ensureUnbond() => $_ensure(4); + PayloadBond ensureBond() => $_ensure(4); @$pb.TagNumber(6) - PayloadWithdraw get withdraw => $_getN(5); + PayloadUnbond get unbond => $_getN(5); @$pb.TagNumber(6) - set withdraw(PayloadWithdraw v) { setField(6, v); } + set unbond(PayloadUnbond v) { setField(6, v); } @$pb.TagNumber(6) - $core.bool hasWithdraw() => $_has(5); + $core.bool hasUnbond() => $_has(5); @$pb.TagNumber(6) - void clearWithdraw() => clearField(6); + void clearUnbond() => clearField(6); @$pb.TagNumber(6) - PayloadWithdraw ensureWithdraw() => $_ensure(5); + PayloadUnbond ensureUnbond() => $_ensure(5); + + @$pb.TagNumber(7) + PayloadWithdraw get withdraw => $_getN(6); + @$pb.TagNumber(7) + set withdraw(PayloadWithdraw v) { setField(7, v); } + @$pb.TagNumber(7) + $core.bool hasWithdraw() => $_has(6); + @$pb.TagNumber(7) + void clearWithdraw() => clearField(7); + @$pb.TagNumber(7) + PayloadWithdraw ensureWithdraw() => $_ensure(6); } class GetRawTransferTransactionRequest extends $pb.GeneratedMessage { @@ -970,17 +984,22 @@ class GetRawWithdrawTransactionRequest extends $pb.GeneratedMessage { class GetRawTransactionResponse extends $pb.GeneratedMessage { static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetRawTransactionResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create) ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'rawTransaction') + ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id') ..hasRequiredFields = false ; GetRawTransactionResponse._() : super(); factory GetRawTransactionResponse({ $core.String? rawTransaction, + $core.String? id, }) { final _result = create(); if (rawTransaction != null) { _result.rawTransaction = rawTransaction; } + if (id != null) { + _result.id = id; + } return _result; } factory GetRawTransactionResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1012,6 +1031,15 @@ class GetRawTransactionResponse extends $pb.GeneratedMessage { $core.bool hasRawTransaction() => $_has(0); @$pb.TagNumber(1) void clearRawTransaction() => clearField(1); + + @$pb.TagNumber(2) + $core.String get id => $_getSZ(1); + @$pb.TagNumber(2) + set id($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasId() => $_has(1); + @$pb.TagNumber(2) + void clearId() => clearField(2); } class PayloadTransfer extends $pb.GeneratedMessage { @@ -1019,7 +1047,6 @@ class PayloadTransfer extends $pb.GeneratedMessage { ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'sender') ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') ..hasRequiredFields = false ; @@ -1028,7 +1055,6 @@ class PayloadTransfer extends $pb.GeneratedMessage { $core.String? sender, $core.String? receiver, $fixnum.Int64? amount, - $fixnum.Int64? fee, }) { final _result = create(); if (sender != null) { @@ -1040,9 +1066,6 @@ class PayloadTransfer extends $pb.GeneratedMessage { if (amount != null) { _result.amount = amount; } - if (fee != null) { - _result.fee = fee; - } return _result; } factory PayloadTransfer.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1092,15 +1115,6 @@ class PayloadTransfer extends $pb.GeneratedMessage { $core.bool hasAmount() => $_has(2); @$pb.TagNumber(3) void clearAmount() => clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get fee => $_getI64(3); - @$pb.TagNumber(4) - set fee($fixnum.Int64 v) { $_setInt64(3, v); } - @$pb.TagNumber(4) - $core.bool hasFee() => $_has(3); - @$pb.TagNumber(4) - void clearFee() => clearField(4); } class PayloadBond extends $pb.GeneratedMessage { @@ -1109,7 +1123,6 @@ class PayloadBond extends $pb.GeneratedMessage { ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'receiver') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'stake') ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey') - ..aInt64(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') ..hasRequiredFields = false ; @@ -1119,7 +1132,6 @@ class PayloadBond extends $pb.GeneratedMessage { $core.String? receiver, $fixnum.Int64? stake, $core.String? publicKey, - $fixnum.Int64? fee, }) { final _result = create(); if (sender != null) { @@ -1134,9 +1146,6 @@ class PayloadBond extends $pb.GeneratedMessage { if (publicKey != null) { _result.publicKey = publicKey; } - if (fee != null) { - _result.fee = fee; - } return _result; } factory PayloadBond.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1195,15 +1204,6 @@ class PayloadBond extends $pb.GeneratedMessage { $core.bool hasPublicKey() => $_has(3); @$pb.TagNumber(4) void clearPublicKey() => clearField(4); - - @$pb.TagNumber(5) - $fixnum.Int64 get fee => $_getI64(4); - @$pb.TagNumber(5) - set fee($fixnum.Int64 v) { $_setInt64(4, v); } - @$pb.TagNumber(5) - $core.bool hasFee() => $_has(4); - @$pb.TagNumber(5) - void clearFee() => clearField(5); } class PayloadSortition extends $pb.GeneratedMessage { @@ -1319,7 +1319,6 @@ class PayloadWithdraw extends $pb.GeneratedMessage { ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'validatorAddress') ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'accountAddress') ..aInt64(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'amount') - ..aInt64(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'fee') ..hasRequiredFields = false ; @@ -1328,7 +1327,6 @@ class PayloadWithdraw extends $pb.GeneratedMessage { $core.String? validatorAddress, $core.String? accountAddress, $fixnum.Int64? amount, - $fixnum.Int64? fee, }) { final _result = create(); if (validatorAddress != null) { @@ -1340,9 +1338,6 @@ class PayloadWithdraw extends $pb.GeneratedMessage { if (amount != null) { _result.amount = amount; } - if (fee != null) { - _result.fee = fee; - } return _result; } factory PayloadWithdraw.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -1392,15 +1387,6 @@ class PayloadWithdraw extends $pb.GeneratedMessage { $core.bool hasAmount() => $_has(2); @$pb.TagNumber(3) void clearAmount() => clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get fee => $_getI64(3); - @$pb.TagNumber(4) - set fee($fixnum.Int64 v) { $_setInt64(3, v); } - @$pb.TagNumber(4) - $core.bool hasFee() => $_has(3); - @$pb.TagNumber(4) - void clearFee() => clearField(4); } enum TransactionInfo_Payload { diff --git a/www/grpc/gen/dart/transaction.pbjson.dart b/www/grpc/gen/dart/transaction.pbjson.dart index 1b0bb2c73..a733bf608 100644 --- a/www/grpc/gen/dart/transaction.pbjson.dart +++ b/www/grpc/gen/dart/transaction.pbjson.dart @@ -106,10 +106,11 @@ const GetRawTransactionRequest$json = const { '2': const [ const {'1': 'lock_time', '3': 1, '4': 1, '5': 13, '10': 'lockTime'}, const {'1': 'memo', '3': 2, '4': 1, '5': 9, '10': 'memo'}, - const {'1': 'transfer', '3': 3, '4': 1, '5': 11, '6': '.pactus.PayloadTransfer', '9': 0, '10': 'transfer'}, - const {'1': 'bond', '3': 4, '4': 1, '5': 11, '6': '.pactus.PayloadBond', '9': 0, '10': 'bond'}, - const {'1': 'unbond', '3': 5, '4': 1, '5': 11, '6': '.pactus.PayloadUnbond', '9': 0, '10': 'unbond'}, - const {'1': 'withdraw', '3': 6, '4': 1, '5': 11, '6': '.pactus.PayloadWithdraw', '9': 0, '10': 'withdraw'}, + const {'1': 'fee', '3': 3, '4': 1, '5': 3, '10': 'fee'}, + const {'1': 'transfer', '3': 4, '4': 1, '5': 11, '6': '.pactus.PayloadTransfer', '9': 0, '10': 'transfer'}, + const {'1': 'bond', '3': 5, '4': 1, '5': 11, '6': '.pactus.PayloadBond', '9': 0, '10': 'bond'}, + const {'1': 'unbond', '3': 6, '4': 1, '5': 11, '6': '.pactus.PayloadUnbond', '9': 0, '10': 'unbond'}, + const {'1': 'withdraw', '3': 7, '4': 1, '5': 11, '6': '.pactus.PayloadWithdraw', '9': 0, '10': 'withdraw'}, ], '8': const [ const {'1': 'payload'}, @@ -117,7 +118,7 @@ const GetRawTransactionRequest$json = const { }; /// Descriptor for `GetRawTransactionRequest`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawTransactionRequestDescriptor = $convert.base64Decode('ChhHZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRISCgRtZW1vGAIgASgJUgRtZW1vEjUKCHRyYW5zZmVyGAMgASgLMhcucGFjdHVzLlBheWxvYWRUcmFuc2ZlckgAUgh0cmFuc2ZlchIpCgRib25kGAQgASgLMhMucGFjdHVzLlBheWxvYWRCb25kSABSBGJvbmQSLwoGdW5ib25kGAUgASgLMhUucGFjdHVzLlBheWxvYWRVbmJvbmRIAFIGdW5ib25kEjUKCHdpdGhkcmF3GAYgASgLMhcucGFjdHVzLlBheWxvYWRXaXRoZHJhd0gAUgh3aXRoZHJhd0IJCgdwYXlsb2Fk'); +final $typed_data.Uint8List getRawTransactionRequestDescriptor = $convert.base64Decode('ChhHZXRSYXdUcmFuc2FjdGlvblJlcXVlc3QSGwoJbG9ja190aW1lGAEgASgNUghsb2NrVGltZRISCgRtZW1vGAIgASgJUgRtZW1vEhAKA2ZlZRgDIAEoA1IDZmVlEjUKCHRyYW5zZmVyGAQgASgLMhcucGFjdHVzLlBheWxvYWRUcmFuc2ZlckgAUgh0cmFuc2ZlchIpCgRib25kGAUgASgLMhMucGFjdHVzLlBheWxvYWRCb25kSABSBGJvbmQSLwoGdW5ib25kGAYgASgLMhUucGFjdHVzLlBheWxvYWRVbmJvbmRIAFIGdW5ib25kEjUKCHdpdGhkcmF3GAcgASgLMhcucGFjdHVzLlBheWxvYWRXaXRoZHJhd0gAUgh3aXRoZHJhd0IJCgdwYXlsb2Fk'); @$core.Deprecated('Use getRawTransferTransactionRequestDescriptor instead') const GetRawTransferTransactionRequest$json = const { '1': 'GetRawTransferTransactionRequest', @@ -181,11 +182,12 @@ const GetRawTransactionResponse$json = const { '1': 'GetRawTransactionResponse', '2': const [ const {'1': 'raw_transaction', '3': 1, '4': 1, '5': 9, '10': 'rawTransaction'}, + const {'1': 'id', '3': 2, '4': 1, '5': 9, '10': 'id'}, ], }; /// Descriptor for `GetRawTransactionResponse`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List getRawTransactionResponseDescriptor = $convert.base64Decode('ChlHZXRSYXdUcmFuc2FjdGlvblJlc3BvbnNlEicKD3Jhd190cmFuc2FjdGlvbhgBIAEoCVIOcmF3VHJhbnNhY3Rpb24='); +final $typed_data.Uint8List getRawTransactionResponseDescriptor = $convert.base64Decode('ChlHZXRSYXdUcmFuc2FjdGlvblJlc3BvbnNlEicKD3Jhd190cmFuc2FjdGlvbhgBIAEoCVIOcmF3VHJhbnNhY3Rpb24SDgoCaWQYAiABKAlSAmlk'); @$core.Deprecated('Use payloadTransferDescriptor instead') const PayloadTransfer$json = const { '1': 'PayloadTransfer', @@ -193,12 +195,11 @@ const PayloadTransfer$json = const { const {'1': 'sender', '3': 1, '4': 1, '5': 9, '10': 'sender'}, const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, - const {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'}, ], }; /// Descriptor for `PayloadTransfer`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadTransferDescriptor = $convert.base64Decode('Cg9QYXlsb2FkVHJhbnNmZXISFgoGc2VuZGVyGAEgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAiABKAlSCHJlY2VpdmVyEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50EhAKA2ZlZRgEIAEoA1IDZmVl'); +final $typed_data.Uint8List payloadTransferDescriptor = $convert.base64Decode('Cg9QYXlsb2FkVHJhbnNmZXISFgoGc2VuZGVyGAEgASgJUgZzZW5kZXISGgoIcmVjZWl2ZXIYAiABKAlSCHJlY2VpdmVyEhYKBmFtb3VudBgDIAEoA1IGYW1vdW50'); @$core.Deprecated('Use payloadBondDescriptor instead') const PayloadBond$json = const { '1': 'PayloadBond', @@ -207,12 +208,11 @@ const PayloadBond$json = const { const {'1': 'receiver', '3': 2, '4': 1, '5': 9, '10': 'receiver'}, const {'1': 'stake', '3': 3, '4': 1, '5': 3, '10': 'stake'}, const {'1': 'public_key', '3': 4, '4': 1, '5': 9, '10': 'publicKey'}, - const {'1': 'fee', '3': 5, '4': 1, '5': 3, '10': 'fee'}, ], }; /// Descriptor for `PayloadBond`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadBondDescriptor = $convert.base64Decode('CgtQYXlsb2FkQm9uZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtlEh0KCnB1YmxpY19rZXkYBCABKAlSCXB1YmxpY0tleRIQCgNmZWUYBSABKANSA2ZlZQ=='); +final $typed_data.Uint8List payloadBondDescriptor = $convert.base64Decode('CgtQYXlsb2FkQm9uZBIWCgZzZW5kZXIYASABKAlSBnNlbmRlchIaCghyZWNlaXZlchgCIAEoCVIIcmVjZWl2ZXISFAoFc3Rha2UYAyABKANSBXN0YWtlEh0KCnB1YmxpY19rZXkYBCABKAlSCXB1YmxpY0tleQ=='); @$core.Deprecated('Use payloadSortitionDescriptor instead') const PayloadSortition$json = const { '1': 'PayloadSortition', @@ -241,12 +241,11 @@ const PayloadWithdraw$json = const { const {'1': 'validator_address', '3': 1, '4': 1, '5': 9, '10': 'validatorAddress'}, const {'1': 'account_address', '3': 2, '4': 1, '5': 9, '10': 'accountAddress'}, const {'1': 'amount', '3': 3, '4': 1, '5': 3, '10': 'amount'}, - const {'1': 'fee', '3': 4, '4': 1, '5': 3, '10': 'fee'}, ], }; /// Descriptor for `PayloadWithdraw`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List payloadWithdrawDescriptor = $convert.base64Decode('Cg9QYXlsb2FkV2l0aGRyYXcSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvckFkZHJlc3MSJwoPYWNjb3VudF9hZGRyZXNzGAIgASgJUg5hY2NvdW50QWRkcmVzcxIWCgZhbW91bnQYAyABKANSBmFtb3VudBIQCgNmZWUYBCABKANSA2ZlZQ=='); +final $typed_data.Uint8List payloadWithdrawDescriptor = $convert.base64Decode('Cg9QYXlsb2FkV2l0aGRyYXcSKwoRdmFsaWRhdG9yX2FkZHJlc3MYASABKAlSEHZhbGlkYXRvckFkZHJlc3MSJwoPYWNjb3VudF9hZGRyZXNzGAIgASgJUg5hY2NvdW50QWRkcmVzcxIWCgZhbW91bnQYAyABKANSBmFtb3VudA=='); @$core.Deprecated('Use transactionInfoDescriptor instead') const TransactionInfo$json = const { '1': 'TransactionInfo', diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md index 08b2dd934..365a27b46 100644 --- a/www/grpc/gen/docs/grpc.md +++ b/www/grpc/gen/docs/grpc.md @@ -320,13 +320,6 @@ parameters.

    The amount to be transferred in NanoPAC. - - transaction.transfer.fee - int64 - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - transaction.bond PayloadBond @@ -362,13 +355,6 @@ parameters.

    The public key of the validator. - - transaction.bond.fee - int64 - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - transaction.sortition PayloadSortition @@ -432,13 +418,6 @@ parameters.

    The withdrawal amount in NanoPAC. - - transaction.withdraw.fee - int64 - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - transaction.memo string @@ -582,8 +561,7 @@ and payload type.

    lock_time uint32 - The lock time for the transaction. If not set, defaults to the last block -height. + The lock time for the transaction. If not set, defaults to the last block height. @@ -593,6 +571,13 @@ height. A memo string for the transaction. + + fee + int64 + + The fee for the transaction in NanoPAC. + + transfer PayloadTransfer @@ -636,6 +621,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -709,6 +701,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -789,6 +788,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -841,6 +847,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -914,6 +927,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -1167,13 +1187,6 @@ BLOCK_TRANSACTIONS. The amount to be transferred in NanoPAC. - - txs[].transfer.fee - int64 - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].bond PayloadBond @@ -1209,13 +1222,6 @@ BLOCK_TRANSACTIONS. The public key of the validator. - - txs[].bond.fee - int64 - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].sortition PayloadSortition @@ -1279,13 +1285,6 @@ BLOCK_TRANSACTIONS. The withdrawal amount in NanoPAC. - - txs[].withdraw.fee - int64 - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].memo string @@ -2163,13 +2162,6 @@ types. The amount to be transferred in NanoPAC. - - txs[].transfer.fee - int64 - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].bond PayloadBond @@ -2205,13 +2197,6 @@ types. The public key of the validator. - - txs[].bond.fee - int64 - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].sortition PayloadSortition @@ -2275,13 +2260,6 @@ types. The withdrawal amount in NanoPAC. - - txs[].withdraw.fee - int64 - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].memo string diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md index 2dfe84706..45bfd1fe2 100644 --- a/www/grpc/gen/docs/json-rpc.md +++ b/www/grpc/gen/docs/json-rpc.md @@ -247,7 +247,7 @@ parameters.

    verbosity - string + numeric (Enum) The verbosity level for transaction details.
    Available values:
      @@ -330,7 +330,7 @@ parameters.

      transaction.payload_type - string + numeric (Enum) The type of transaction payload.
      Available values:
        @@ -371,13 +371,6 @@ parameters.

        The amount to be transferred in NanoPAC. - - transaction.transfer.fee - numeric - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - transaction.bond object @@ -413,13 +406,6 @@ parameters.

        The public key of the validator. - - transaction.bond.fee - numeric - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - transaction.sortition object @@ -483,13 +469,6 @@ parameters.

        The withdrawal amount in NanoPAC. - - transaction.withdraw.fee - numeric - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - transaction.memo string @@ -535,7 +514,7 @@ and payload type.

        payload_type - string + numeric (Enum) The type of transaction payload.
        Available values:
          @@ -633,8 +612,7 @@ and payload type.

          lock_time numeric - The lock time for the transaction. If not set, defaults to the last block -height. + The lock time for the transaction. If not set, defaults to the last block height. @@ -644,6 +622,13 @@ height. A memo string for the transaction. + + fee + numeric + + The fee for the transaction in NanoPAC. + + transfer object @@ -687,6 +672,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -760,6 +752,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -840,6 +839,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -892,6 +898,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -965,6 +978,13 @@ height. The raw transaction data. + + + id + string + + The unique ID of the transaction. + @@ -994,7 +1014,7 @@ parameters.

          verbosity - string + numeric (Enum) The verbosity level for block information.
          Available values:
            @@ -1177,7 +1197,7 @@ BLOCK_TRANSACTIONS. txs[].payload_type - string + numeric (Enum) The type of transaction payload.
            Available values:
              @@ -1218,13 +1238,6 @@ BLOCK_TRANSACTIONS. The amount to be transferred in NanoPAC. - - txs[].transfer.fee - numeric - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].bond object @@ -1260,13 +1273,6 @@ BLOCK_TRANSACTIONS. The public key of the validator. - - txs[].bond.fee - numeric - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].sortition object @@ -1330,13 +1336,6 @@ BLOCK_TRANSACTIONS. The withdrawal amount in NanoPAC. - - txs[].withdraw.fee - numeric - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].memo string @@ -1686,7 +1685,7 @@ committee. instances[].votes[].type - string + numeric (Enum) The type of the vote.
              Available values:
                @@ -2099,7 +2098,7 @@ address.

                payload_type - string + numeric (Enum) The type of transactions to retrieve from the transaction pool. 0 means all types. @@ -2173,7 +2172,7 @@ types. txs[].payload_type - string + numeric (Enum) The type of transaction payload.
                Available values:
                  @@ -2214,13 +2213,6 @@ types. The amount to be transferred in NanoPAC. - - txs[].transfer.fee - numeric - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].bond object @@ -2256,13 +2248,6 @@ types. The public key of the validator. - - txs[].bond.fee - numeric - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].sortition object @@ -2326,13 +2311,6 @@ types. The withdrawal amount in NanoPAC. - - txs[].withdraw.fee - numeric - - The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - - txs[].memo string @@ -3128,7 +3106,7 @@ public key.

                  address_type - string + numeric (Enum) The type of address to generate.
                  Available values:
                    diff --git a/www/grpc/gen/go/transaction.cobra.pb.go b/www/grpc/gen/go/transaction.cobra.pb.go index 1327f084e..b23b8abe0 100644 --- a/www/grpc/gen/go/transaction.cobra.pb.go +++ b/www/grpc/gen/go/transaction.cobra.pb.go @@ -198,8 +198,9 @@ func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { }, } - cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block\n height.") + cmd.PersistentFlags().Uint32Var(&req.LockTime, cfg.FlagNamer("LockTime"), 0, "The lock time for the transaction. If not set, defaults to the last block height.") cmd.PersistentFlags().StringVar(&req.Memo, cfg.FlagNamer("Memo"), "", "A memo string for the transaction.") + cmd.PersistentFlags().Int64Var(&req.Fee, cfg.FlagNamer("Fee"), 0, "The fee for the transaction in NanoPAC.") _Transfer := &PayloadTransfer{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Transfer"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) @@ -209,8 +210,6 @@ func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Receiver"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) cmd.PersistentFlags().Int64Var(&_Transfer.Amount, cfg.FlagNamer("Transfer Amount"), 0, "The amount to be transferred in NanoPAC.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Amount"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) - cmd.PersistentFlags().Int64Var(&_Transfer.Fee, cfg.FlagNamer("Transfer Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Transfer Fee"), func() { req.Payload = &GetRawTransactionRequest_Transfer{Transfer: _Transfer} }) _Bond := &PayloadBond{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Bond"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) @@ -222,8 +221,6 @@ func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Stake"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) cmd.PersistentFlags().StringVar(&_Bond.PublicKey, cfg.FlagNamer("Bond PublicKey"), "", "The public key of the validator.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond PublicKey"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) - cmd.PersistentFlags().Int64Var(&_Bond.Fee, cfg.FlagNamer("Bond Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Bond Fee"), func() { req.Payload = &GetRawTransactionRequest_Bond{Bond: _Bond} }) _Unbond := &PayloadUnbond{} cmd.PersistentFlags().Bool(cfg.FlagNamer("Unbond"), false, "") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Unbond"), func() { req.Payload = &GetRawTransactionRequest_Unbond{Unbond: _Unbond} }) @@ -238,8 +235,6 @@ func _TransactionGetRawTransactionCommand(cfg *client.Config) *cobra.Command { flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw AccountAddress"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) cmd.PersistentFlags().Int64Var(&_Withdraw.Amount, cfg.FlagNamer("Withdraw Amount"), 0, "The withdrawal amount in NanoPAC.") flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Amount"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) - cmd.PersistentFlags().Int64Var(&_Withdraw.Fee, cfg.FlagNamer("Withdraw Fee"), 0, "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.") - flag.WithPostSetHook(cmd.PersistentFlags(), cfg.FlagNamer("Withdraw Fee"), func() { req.Payload = &GetRawTransactionRequest_Withdraw{Withdraw: _Withdraw} }) return cmd } diff --git a/www/grpc/gen/go/transaction.pb.go b/www/grpc/gen/go/transaction.pb.go index 7817f09d5..d6ba91849 100644 --- a/www/grpc/gen/go/transaction.pb.go +++ b/www/grpc/gen/go/transaction.pb.go @@ -488,11 +488,12 @@ type GetRawTransactionRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The lock time for the transaction. If not set, defaults to the last block - // height. + // The lock time for the transaction. If not set, defaults to the last block height. LockTime uint32 `protobuf:"varint,1,opt,name=lock_time,json=lockTime,proto3" json:"lock_time,omitempty"` // A memo string for the transaction. Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` + // The fee for the transaction in NanoPAC. + Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` // Types that are assignable to Payload: // // *GetRawTransactionRequest_Transfer @@ -548,6 +549,13 @@ func (x *GetRawTransactionRequest) GetMemo() string { return "" } +func (x *GetRawTransactionRequest) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + func (m *GetRawTransactionRequest) GetPayload() isGetRawTransactionRequest_Payload { if m != nil { return m.Payload @@ -588,19 +596,19 @@ type isGetRawTransactionRequest_Payload interface { } type GetRawTransactionRequest_Transfer struct { - Transfer *PayloadTransfer `protobuf:"bytes,3,opt,name=transfer,proto3,oneof"` + Transfer *PayloadTransfer `protobuf:"bytes,4,opt,name=transfer,proto3,oneof"` } type GetRawTransactionRequest_Bond struct { - Bond *PayloadBond `protobuf:"bytes,4,opt,name=bond,proto3,oneof"` + Bond *PayloadBond `protobuf:"bytes,5,opt,name=bond,proto3,oneof"` } type GetRawTransactionRequest_Unbond struct { - Unbond *PayloadUnbond `protobuf:"bytes,5,opt,name=unbond,proto3,oneof"` + Unbond *PayloadUnbond `protobuf:"bytes,6,opt,name=unbond,proto3,oneof"` } type GetRawTransactionRequest_Withdraw struct { - Withdraw *PayloadWithdraw `protobuf:"bytes,6,opt,name=withdraw,proto3,oneof"` + Withdraw *PayloadWithdraw `protobuf:"bytes,7,opt,name=withdraw,proto3,oneof"` } func (*GetRawTransactionRequest_Transfer) isGetRawTransactionRequest_Payload() {} @@ -981,6 +989,8 @@ type GetRawTransactionResponse struct { // The raw transaction data. RawTransaction string `protobuf:"bytes,1,opt,name=raw_transaction,json=rawTransaction,proto3" json:"raw_transaction,omitempty"` + // The unique ID of the transaction. + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` } func (x *GetRawTransactionResponse) Reset() { @@ -1022,6 +1032,13 @@ func (x *GetRawTransactionResponse) GetRawTransaction() string { return "" } +func (x *GetRawTransactionResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + // Payload for a transfer transaction. type PayloadTransfer struct { state protoimpl.MessageState @@ -1034,8 +1051,6 @@ type PayloadTransfer struct { Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // The amount to be transferred in NanoPAC. Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` } func (x *PayloadTransfer) Reset() { @@ -1091,13 +1106,6 @@ func (x *PayloadTransfer) GetAmount() int64 { return 0 } -func (x *PayloadTransfer) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - // Payload for a bond transaction. type PayloadBond struct { state protoimpl.MessageState @@ -1112,8 +1120,6 @@ type PayloadBond struct { Stake int64 `protobuf:"varint,3,opt,name=stake,proto3" json:"stake,omitempty"` // The public key of the validator. PublicKey string `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,5,opt,name=fee,proto3" json:"fee,omitempty"` } func (x *PayloadBond) Reset() { @@ -1176,13 +1182,6 @@ func (x *PayloadBond) GetPublicKey() string { return "" } -func (x *PayloadBond) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - // Payload for a sortition transaction. type PayloadSortition struct { state protoimpl.MessageState @@ -1302,8 +1301,6 @@ type PayloadWithdraw struct { AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // The withdrawal amount in NanoPAC. Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,omitempty"` } func (x *PayloadWithdraw) Reset() { @@ -1359,13 +1356,6 @@ func (x *PayloadWithdraw) GetAmount() int64 { return 0 } -func (x *PayloadWithdraw) GetFee() int64 { - if x != nil { - return x.Fee - } - return 0 -} - // Information about a transaction. type TransactionInfo struct { state protoimpl.MessageState @@ -1626,208 +1616,207 @@ var file_transaction_proto_rawDesc = []byte{ 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2e, 0x0a, 0x1c, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xa0, 0x02, 0x0a, 0x18, 0x47, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xb2, 0x02, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, - 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, - 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0xb1, 0x01, - 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x12, 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x42, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x2f, 0x0a, 0x06, + 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, + 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, 0x0a, + 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, + 0xb1, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, + 0x65, 0x6d, 0x6f, 0x22, 0xca, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, + 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, + 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, + 0x22, 0x7e, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, + 0x22, 0xd3, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, + 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x54, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, + 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5d, 0x0a, 0x0f, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, - 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, - 0x6f, 0x22, 0xca, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, - 0x6d, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x7e, - 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, - 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, - 0x6d, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0xd3, - 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, - 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6d, 0x65, 0x6d, 0x6f, 0x22, 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, + 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x76, 0x0a, 0x0b, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x4b, 0x65, 0x79, 0x22, 0x42, 0x0a, 0x10, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x7f, 0x0a, 0x0f, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xac, 0x04, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, + 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x12, 0x36, + 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x29, 0x0a, + 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, + 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x38, 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x61, + 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x21, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, + 0x6f, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, + 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, + 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, + 0x6d, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x83, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, + 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x4f, 0x4e, + 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, + 0x4f, 0x52, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, + 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, + 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, + 0x41, 0x57, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x2a, 0x42, 0x0a, 0x14, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x62, 0x6f, + 0x73, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, + 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, + 0x32, 0x82, 0x06, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x61, 0x77, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, 0x77, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x0f, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, - 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x0b, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0x42, 0x0a, 0x10, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x22, 0x2d, 0x0a, 0x0d, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x91, 0x01, 0x0a, 0x0f, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x2b, 0x0a, - 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x66, - 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x66, 0x65, 0x65, 0x22, 0xac, 0x04, - 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x65, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x03, 0x66, 0x65, 0x65, 0x12, 0x36, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x08, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x42, 0x6f, 0x6e, 0x64, 0x48, 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x38, - 0x0a, 0x09, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x20, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x53, 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x73, - 0x6f, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x48, - 0x00, 0x52, 0x06, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x12, 0x35, 0x0a, 0x08, 0x77, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x42, 0x09, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x83, 0x01, 0x0a, - 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, - 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, - 0x10, 0x0a, 0x0c, 0x42, 0x4f, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, - 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x4f, 0x52, 0x54, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, - 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x42, 0x4f, - 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, - 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, - 0x10, 0x05, 0x2a, 0x42, 0x0a, 0x14, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x56, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, - 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x10, 0x00, - 0x12, 0x14, 0x0a, 0x10, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x32, 0x82, 0x06, 0x0a, 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x63, 0x75, - 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, - 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, - 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, - 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, + 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, + 0x65, 0x12, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, + 0x6c, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, + 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x61, 0x0a, 0x14, + 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x72, + 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, + 0x75, 0x73, 0x2e, 0x42, 0x72, 0x6f, 0x61, 0x64, 0x63, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x15, 0x47, 0x65, 0x74, - 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x17, 0x47, - 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, - 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, 0x65, 0x74, + 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, + 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x70, + 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x42, 0x6f, 0x6e, 0x64, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x55, + 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x26, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, + 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x46, 0x0a, 0x12, 0x70, - 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, - 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, - 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x19, 0x47, + 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, + 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x46, 0x0a, 0x12, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5a, 0x30, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x2f, 0x77, 0x77, + 0x77, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x61, 0x63, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java index 19423ffac..41f86be26 100644 --- a/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java +++ b/www/grpc/gen/java/pactus/transaction/TransactionOuterClass.java @@ -4432,8 +4432,7 @@ public interface GetRawTransactionRequestOrBuilder extends /** *
                    -     * The lock time for the transaction. If not set, defaults to the last block
                    -     * height.
                    +     * The lock time for the transaction. If not set, defaults to the last block height.
                          * 
                    * * uint32 lock_time = 1 [json_name = "lockTime"]; @@ -4462,62 +4461,72 @@ public interface GetRawTransactionRequestOrBuilder extends getMemoBytes(); /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + *
                    +     * The fee for the transaction in NanoPAC.
                    +     * 
                    + * + * int64 fee = 3 [json_name = "fee"]; + * @return The fee. + */ + long getFee(); + + /** + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; * @return Whether the transfer field is set. */ boolean hasTransfer(); /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; * @return The transfer. */ pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer(); /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; */ pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder(); /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; * @return Whether the bond field is set. */ boolean hasBond(); /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; * @return The bond. */ pactus.transaction.TransactionOuterClass.PayloadBond getBond(); /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; */ pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder(); /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; * @return Whether the unbond field is set. */ boolean hasUnbond(); /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; * @return The unbond. */ pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond(); /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; */ pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder(); /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; * @return Whether the withdraw field is set. */ boolean hasWithdraw(); /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; * @return The withdraw. */ pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw(); /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; */ pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder(); @@ -4573,10 +4582,10 @@ protected java.lang.Object newInstance( public enum PayloadCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { - TRANSFER(3), - BOND(4), - UNBOND(5), - WITHDRAW(6), + TRANSFER(4), + BOND(5), + UNBOND(6), + WITHDRAW(7), PAYLOAD_NOT_SET(0); private final int value; private PayloadCase(int value) { @@ -4594,10 +4603,10 @@ public static PayloadCase valueOf(int value) { public static PayloadCase forNumber(int value) { switch (value) { - case 3: return TRANSFER; - case 4: return BOND; - case 5: return UNBOND; - case 6: return WITHDRAW; + case 4: return TRANSFER; + case 5: return BOND; + case 6: return UNBOND; + case 7: return WITHDRAW; case 0: return PAYLOAD_NOT_SET; default: return null; } @@ -4617,8 +4626,7 @@ public int getNumber() { private int lockTime_; /** *
                    -     * The lock time for the transaction. If not set, defaults to the last block
                    -     * height.
                    +     * The lock time for the transaction. If not set, defaults to the last block height.
                          * 
                    * * uint32 lock_time = 1 [json_name = "lockTime"]; @@ -4675,125 +4683,140 @@ public java.lang.String getMemo() { } } - public static final int TRANSFER_FIELD_NUMBER = 3; + public static final int FEE_FIELD_NUMBER = 3; + private long fee_; + /** + *
                    +     * The fee for the transaction in NanoPAC.
                    +     * 
                    + * + * int64 fee = 3 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + + public static final int TRANSFER_FIELD_NUMBER = 4; /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; * @return Whether the transfer field is set. */ @java.lang.Override public boolean hasTransfer() { - return payloadCase_ == 3; + return payloadCase_ == 4; } /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; * @return The transfer. */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer() { - if (payloadCase_ == 3) { + if (payloadCase_ == 4) { return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; } return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() { - if (payloadCase_ == 3) { + if (payloadCase_ == 4) { return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; } return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } - public static final int BOND_FIELD_NUMBER = 4; + public static final int BOND_FIELD_NUMBER = 5; /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; * @return Whether the bond field is set. */ @java.lang.Override public boolean hasBond() { - return payloadCase_ == 4; + return payloadCase_ == 5; } /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; * @return The bond. */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadBond getBond() { - if (payloadCase_ == 4) { + if (payloadCase_ == 5) { return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; } return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() { - if (payloadCase_ == 4) { + if (payloadCase_ == 5) { return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; } return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } - public static final int UNBOND_FIELD_NUMBER = 5; + public static final int UNBOND_FIELD_NUMBER = 6; /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; * @return Whether the unbond field is set. */ @java.lang.Override public boolean hasUnbond() { - return payloadCase_ == 5; + return payloadCase_ == 6; } /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; * @return The unbond. */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond() { - if (payloadCase_ == 5) { + if (payloadCase_ == 6) { return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; } return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() { - if (payloadCase_ == 5) { + if (payloadCase_ == 6) { return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; } return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } - public static final int WITHDRAW_FIELD_NUMBER = 6; + public static final int WITHDRAW_FIELD_NUMBER = 7; /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; * @return Whether the withdraw field is set. */ @java.lang.Override public boolean hasWithdraw() { - return payloadCase_ == 6; + return payloadCase_ == 7; } /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; * @return The withdraw. */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw() { - if (payloadCase_ == 6) { + if (payloadCase_ == 7) { return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; } return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() { - if (payloadCase_ == 6) { + if (payloadCase_ == 7) { return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; } return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); @@ -4819,17 +4842,20 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, memo_); } - if (payloadCase_ == 3) { - output.writeMessage(3, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); + if (fee_ != 0L) { + output.writeInt64(3, fee_); } if (payloadCase_ == 4) { - output.writeMessage(4, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); + output.writeMessage(4, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); } if (payloadCase_ == 5) { - output.writeMessage(5, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); + output.writeMessage(5, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); } if (payloadCase_ == 6) { - output.writeMessage(6, (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_); + output.writeMessage(6, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); + } + if (payloadCase_ == 7) { + output.writeMessage(7, (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_); } getUnknownFields().writeTo(output); } @@ -4847,21 +4873,25 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(memo_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, memo_); } - if (payloadCase_ == 3) { + if (fee_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); + .computeInt64Size(3, fee_); } if (payloadCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); + .computeMessageSize(4, (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_); } if (payloadCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); + .computeMessageSize(5, (pactus.transaction.TransactionOuterClass.PayloadBond) payload_); } if (payloadCase_ == 6) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_); + .computeMessageSize(6, (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_); + } + if (payloadCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -4882,21 +4912,23 @@ public boolean equals(final java.lang.Object obj) { != other.getLockTime()) return false; if (!getMemo() .equals(other.getMemo())) return false; + if (getFee() + != other.getFee()) return false; if (!getPayloadCase().equals(other.getPayloadCase())) return false; switch (payloadCase_) { - case 3: + case 4: if (!getTransfer() .equals(other.getTransfer())) return false; break; - case 4: + case 5: if (!getBond() .equals(other.getBond())) return false; break; - case 5: + case 6: if (!getUnbond() .equals(other.getUnbond())) return false; break; - case 6: + case 7: if (!getWithdraw() .equals(other.getWithdraw())) return false; break; @@ -4918,20 +4950,23 @@ public int hashCode() { hash = (53 * hash) + getLockTime(); hash = (37 * hash) + MEMO_FIELD_NUMBER; hash = (53 * hash) + getMemo().hashCode(); + hash = (37 * hash) + FEE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFee()); switch (payloadCase_) { - case 3: + case 4: hash = (37 * hash) + TRANSFER_FIELD_NUMBER; hash = (53 * hash) + getTransfer().hashCode(); break; - case 4: + case 5: hash = (37 * hash) + BOND_FIELD_NUMBER; hash = (53 * hash) + getBond().hashCode(); break; - case 5: + case 6: hash = (37 * hash) + UNBOND_FIELD_NUMBER; hash = (53 * hash) + getUnbond().hashCode(); break; - case 6: + case 7: hash = (37 * hash) + WITHDRAW_FIELD_NUMBER; hash = (53 * hash) + getWithdraw().hashCode(); break; @@ -5074,6 +5109,8 @@ public Builder clear() { memo_ = ""; + fee_ = 0L; + if (transferBuilder_ != null) { transferBuilder_.clear(); } @@ -5116,28 +5153,29 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionRequest buildPa pactus.transaction.TransactionOuterClass.GetRawTransactionRequest result = new pactus.transaction.TransactionOuterClass.GetRawTransactionRequest(this); result.lockTime_ = lockTime_; result.memo_ = memo_; - if (payloadCase_ == 3) { + result.fee_ = fee_; + if (payloadCase_ == 4) { if (transferBuilder_ == null) { result.payload_ = payload_; } else { result.payload_ = transferBuilder_.build(); } } - if (payloadCase_ == 4) { + if (payloadCase_ == 5) { if (bondBuilder_ == null) { result.payload_ = payload_; } else { result.payload_ = bondBuilder_.build(); } } - if (payloadCase_ == 5) { + if (payloadCase_ == 6) { if (unbondBuilder_ == null) { result.payload_ = payload_; } else { result.payload_ = unbondBuilder_.build(); } } - if (payloadCase_ == 6) { + if (payloadCase_ == 7) { if (withdrawBuilder_ == null) { result.payload_ = payload_; } else { @@ -5200,6 +5238,9 @@ public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransact memo_ = other.memo_; onChanged(); } + if (other.getFee() != 0L) { + setFee(other.getFee()); + } switch (other.getPayloadCase()) { case TRANSFER: { mergeTransfer(other.getTransfer()); @@ -5257,34 +5298,39 @@ public Builder mergeFrom( break; } // case 18 - case 26: { - input.readMessage( - getTransferFieldBuilder().getBuilder(), - extensionRegistry); - payloadCase_ = 3; + case 24: { + fee_ = input.readInt64(); + break; - } // case 26 + } // case 24 case 34: { input.readMessage( - getBondFieldBuilder().getBuilder(), + getTransferFieldBuilder().getBuilder(), extensionRegistry); payloadCase_ = 4; break; } // case 34 case 42: { input.readMessage( - getUnbondFieldBuilder().getBuilder(), + getBondFieldBuilder().getBuilder(), extensionRegistry); payloadCase_ = 5; break; } // case 42 case 50: { input.readMessage( - getWithdrawFieldBuilder().getBuilder(), + getUnbondFieldBuilder().getBuilder(), extensionRegistry); payloadCase_ = 6; break; } // case 50 + case 58: { + input.readMessage( + getWithdrawFieldBuilder().getBuilder(), + extensionRegistry); + payloadCase_ = 7; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -5319,8 +5365,7 @@ public Builder clearPayload() { private int lockTime_ ; /** *
                    -       * The lock time for the transaction. If not set, defaults to the last block
                    -       * height.
                    +       * The lock time for the transaction. If not set, defaults to the last block height.
                            * 
                    * * uint32 lock_time = 1 [json_name = "lockTime"]; @@ -5332,8 +5377,7 @@ public int getLockTime() { } /** *
                    -       * The lock time for the transaction. If not set, defaults to the last block
                    -       * height.
                    +       * The lock time for the transaction. If not set, defaults to the last block height.
                            * 
                    * * uint32 lock_time = 1 [json_name = "lockTime"]; @@ -5348,8 +5392,7 @@ public Builder setLockTime(int value) { } /** *
                    -       * The lock time for the transaction. If not set, defaults to the last block
                    -       * height.
                    +       * The lock time for the transaction. If not set, defaults to the last block height.
                            * 
                    * * uint32 lock_time = 1 [json_name = "lockTime"]; @@ -5458,36 +5501,79 @@ public Builder setMemoBytes( return this; } + private long fee_ ; + /** + *
                    +       * The fee for the transaction in NanoPAC.
                    +       * 
                    + * + * int64 fee = 3 [json_name = "fee"]; + * @return The fee. + */ + @java.lang.Override + public long getFee() { + return fee_; + } + /** + *
                    +       * The fee for the transaction in NanoPAC.
                    +       * 
                    + * + * int64 fee = 3 [json_name = "fee"]; + * @param value The fee to set. + * @return This builder for chaining. + */ + public Builder setFee(long value) { + + fee_ = value; + onChanged(); + return this; + } + /** + *
                    +       * The fee for the transaction in NanoPAC.
                    +       * 
                    + * + * int64 fee = 3 [json_name = "fee"]; + * @return This builder for chaining. + */ + public Builder clearFee() { + + fee_ = 0L; + onChanged(); + return this; + } + private com.google.protobuf.SingleFieldBuilderV3< pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder> transferBuilder_; /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; * @return Whether the transfer field is set. */ @java.lang.Override public boolean hasTransfer() { - return payloadCase_ == 3; + return payloadCase_ == 4; } /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; * @return The transfer. */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadTransfer getTransfer() { if (transferBuilder_ == null) { - if (payloadCase_ == 3) { + if (payloadCase_ == 4) { return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; } return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } else { - if (payloadCase_ == 3) { + if (payloadCase_ == 4) { return transferBuilder_.getMessage(); } return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } } /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; */ public Builder setTransfer(pactus.transaction.TransactionOuterClass.PayloadTransfer value) { if (transferBuilder_ == null) { @@ -5499,11 +5585,11 @@ public Builder setTransfer(pactus.transaction.TransactionOuterClass.PayloadTrans } else { transferBuilder_.setMessage(value); } - payloadCase_ = 3; + payloadCase_ = 4; return this; } /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; */ public Builder setTransfer( pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder builderForValue) { @@ -5513,15 +5599,15 @@ public Builder setTransfer( } else { transferBuilder_.setMessage(builderForValue.build()); } - payloadCase_ = 3; + payloadCase_ = 4; return this; } /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; */ public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.PayloadTransfer value) { if (transferBuilder_ == null) { - if (payloadCase_ == 3 && + if (payloadCase_ == 4 && payload_ != pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance()) { payload_ = pactus.transaction.TransactionOuterClass.PayloadTransfer.newBuilder((pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_) .mergeFrom(value).buildPartial(); @@ -5530,27 +5616,27 @@ public Builder mergeTransfer(pactus.transaction.TransactionOuterClass.PayloadTra } onChanged(); } else { - if (payloadCase_ == 3) { + if (payloadCase_ == 4) { transferBuilder_.mergeFrom(value); } else { transferBuilder_.setMessage(value); } } - payloadCase_ = 3; + payloadCase_ = 4; return this; } /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; */ public Builder clearTransfer() { if (transferBuilder_ == null) { - if (payloadCase_ == 3) { + if (payloadCase_ == 4) { payloadCase_ = 0; payload_ = null; onChanged(); } } else { - if (payloadCase_ == 3) { + if (payloadCase_ == 4) { payloadCase_ = 0; payload_ = null; } @@ -5559,33 +5645,33 @@ public Builder clearTransfer() { return this; } /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; */ public pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder getTransferBuilder() { return getTransferFieldBuilder().getBuilder(); } /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTransferOrBuilder() { - if ((payloadCase_ == 3) && (transferBuilder_ != null)) { + if ((payloadCase_ == 4) && (transferBuilder_ != null)) { return transferBuilder_.getMessageOrBuilder(); } else { - if (payloadCase_ == 3) { + if (payloadCase_ == 4) { return (pactus.transaction.TransactionOuterClass.PayloadTransfer) payload_; } return pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } } /** - * .pactus.PayloadTransfer transfer = 3 [json_name = "transfer"]; + * .pactus.PayloadTransfer transfer = 4 [json_name = "transfer"]; */ private com.google.protobuf.SingleFieldBuilderV3< pactus.transaction.TransactionOuterClass.PayloadTransfer, pactus.transaction.TransactionOuterClass.PayloadTransfer.Builder, pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder> getTransferFieldBuilder() { if (transferBuilder_ == null) { - if (!(payloadCase_ == 3)) { + if (!(payloadCase_ == 4)) { payload_ = pactus.transaction.TransactionOuterClass.PayloadTransfer.getDefaultInstance(); } transferBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< @@ -5595,7 +5681,7 @@ public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTran isClean()); payload_ = null; } - payloadCase_ = 3; + payloadCase_ = 4; onChanged();; return transferBuilder_; } @@ -5603,33 +5689,33 @@ public pactus.transaction.TransactionOuterClass.PayloadTransferOrBuilder getTran private com.google.protobuf.SingleFieldBuilderV3< pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder> bondBuilder_; /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; * @return Whether the bond field is set. */ @java.lang.Override public boolean hasBond() { - return payloadCase_ == 4; + return payloadCase_ == 5; } /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; * @return The bond. */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadBond getBond() { if (bondBuilder_ == null) { - if (payloadCase_ == 4) { + if (payloadCase_ == 5) { return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; } return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } else { - if (payloadCase_ == 4) { + if (payloadCase_ == 5) { return bondBuilder_.getMessage(); } return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } } /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; */ public Builder setBond(pactus.transaction.TransactionOuterClass.PayloadBond value) { if (bondBuilder_ == null) { @@ -5641,11 +5727,11 @@ public Builder setBond(pactus.transaction.TransactionOuterClass.PayloadBond valu } else { bondBuilder_.setMessage(value); } - payloadCase_ = 4; + payloadCase_ = 5; return this; } /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; */ public Builder setBond( pactus.transaction.TransactionOuterClass.PayloadBond.Builder builderForValue) { @@ -5655,15 +5741,15 @@ public Builder setBond( } else { bondBuilder_.setMessage(builderForValue.build()); } - payloadCase_ = 4; + payloadCase_ = 5; return this; } /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; */ public Builder mergeBond(pactus.transaction.TransactionOuterClass.PayloadBond value) { if (bondBuilder_ == null) { - if (payloadCase_ == 4 && + if (payloadCase_ == 5 && payload_ != pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance()) { payload_ = pactus.transaction.TransactionOuterClass.PayloadBond.newBuilder((pactus.transaction.TransactionOuterClass.PayloadBond) payload_) .mergeFrom(value).buildPartial(); @@ -5672,27 +5758,27 @@ public Builder mergeBond(pactus.transaction.TransactionOuterClass.PayloadBond va } onChanged(); } else { - if (payloadCase_ == 4) { + if (payloadCase_ == 5) { bondBuilder_.mergeFrom(value); } else { bondBuilder_.setMessage(value); } } - payloadCase_ = 4; + payloadCase_ = 5; return this; } /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; */ public Builder clearBond() { if (bondBuilder_ == null) { - if (payloadCase_ == 4) { + if (payloadCase_ == 5) { payloadCase_ = 0; payload_ = null; onChanged(); } } else { - if (payloadCase_ == 4) { + if (payloadCase_ == 5) { payloadCase_ = 0; payload_ = null; } @@ -5701,33 +5787,33 @@ public Builder clearBond() { return this; } /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; */ public pactus.transaction.TransactionOuterClass.PayloadBond.Builder getBondBuilder() { return getBondFieldBuilder().getBuilder(); } /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBuilder() { - if ((payloadCase_ == 4) && (bondBuilder_ != null)) { + if ((payloadCase_ == 5) && (bondBuilder_ != null)) { return bondBuilder_.getMessageOrBuilder(); } else { - if (payloadCase_ == 4) { + if (payloadCase_ == 5) { return (pactus.transaction.TransactionOuterClass.PayloadBond) payload_; } return pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } } /** - * .pactus.PayloadBond bond = 4 [json_name = "bond"]; + * .pactus.PayloadBond bond = 5 [json_name = "bond"]; */ private com.google.protobuf.SingleFieldBuilderV3< pactus.transaction.TransactionOuterClass.PayloadBond, pactus.transaction.TransactionOuterClass.PayloadBond.Builder, pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder> getBondFieldBuilder() { if (bondBuilder_ == null) { - if (!(payloadCase_ == 4)) { + if (!(payloadCase_ == 5)) { payload_ = pactus.transaction.TransactionOuterClass.PayloadBond.getDefaultInstance(); } bondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< @@ -5737,7 +5823,7 @@ public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBu isClean()); payload_ = null; } - payloadCase_ = 4; + payloadCase_ = 5; onChanged();; return bondBuilder_; } @@ -5745,33 +5831,33 @@ public pactus.transaction.TransactionOuterClass.PayloadBondOrBuilder getBondOrBu private com.google.protobuf.SingleFieldBuilderV3< pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder> unbondBuilder_; /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; * @return Whether the unbond field is set. */ @java.lang.Override public boolean hasUnbond() { - return payloadCase_ == 5; + return payloadCase_ == 6; } /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; * @return The unbond. */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadUnbond getUnbond() { if (unbondBuilder_ == null) { - if (payloadCase_ == 5) { + if (payloadCase_ == 6) { return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; } return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } else { - if (payloadCase_ == 5) { + if (payloadCase_ == 6) { return unbondBuilder_.getMessage(); } return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } } /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; */ public Builder setUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbond value) { if (unbondBuilder_ == null) { @@ -5783,11 +5869,11 @@ public Builder setUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbond } else { unbondBuilder_.setMessage(value); } - payloadCase_ = 5; + payloadCase_ = 6; return this; } /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; */ public Builder setUnbond( pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder builderForValue) { @@ -5797,15 +5883,15 @@ public Builder setUnbond( } else { unbondBuilder_.setMessage(builderForValue.build()); } - payloadCase_ = 5; + payloadCase_ = 6; return this; } /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; */ public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbond value) { if (unbondBuilder_ == null) { - if (payloadCase_ == 5 && + if (payloadCase_ == 6 && payload_ != pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance()) { payload_ = pactus.transaction.TransactionOuterClass.PayloadUnbond.newBuilder((pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_) .mergeFrom(value).buildPartial(); @@ -5814,27 +5900,27 @@ public Builder mergeUnbond(pactus.transaction.TransactionOuterClass.PayloadUnbon } onChanged(); } else { - if (payloadCase_ == 5) { + if (payloadCase_ == 6) { unbondBuilder_.mergeFrom(value); } else { unbondBuilder_.setMessage(value); } } - payloadCase_ = 5; + payloadCase_ = 6; return this; } /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; */ public Builder clearUnbond() { if (unbondBuilder_ == null) { - if (payloadCase_ == 5) { + if (payloadCase_ == 6) { payloadCase_ = 0; payload_ = null; onChanged(); } } else { - if (payloadCase_ == 5) { + if (payloadCase_ == 6) { payloadCase_ = 0; payload_ = null; } @@ -5843,33 +5929,33 @@ public Builder clearUnbond() { return this; } /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; */ public pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder getUnbondBuilder() { return getUnbondFieldBuilder().getBuilder(); } /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbondOrBuilder() { - if ((payloadCase_ == 5) && (unbondBuilder_ != null)) { + if ((payloadCase_ == 6) && (unbondBuilder_ != null)) { return unbondBuilder_.getMessageOrBuilder(); } else { - if (payloadCase_ == 5) { + if (payloadCase_ == 6) { return (pactus.transaction.TransactionOuterClass.PayloadUnbond) payload_; } return pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } } /** - * .pactus.PayloadUnbond unbond = 5 [json_name = "unbond"]; + * .pactus.PayloadUnbond unbond = 6 [json_name = "unbond"]; */ private com.google.protobuf.SingleFieldBuilderV3< pactus.transaction.TransactionOuterClass.PayloadUnbond, pactus.transaction.TransactionOuterClass.PayloadUnbond.Builder, pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder> getUnbondFieldBuilder() { if (unbondBuilder_ == null) { - if (!(payloadCase_ == 5)) { + if (!(payloadCase_ == 6)) { payload_ = pactus.transaction.TransactionOuterClass.PayloadUnbond.getDefaultInstance(); } unbondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< @@ -5879,7 +5965,7 @@ public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbond isClean()); payload_ = null; } - payloadCase_ = 5; + payloadCase_ = 6; onChanged();; return unbondBuilder_; } @@ -5887,33 +5973,33 @@ public pactus.transaction.TransactionOuterClass.PayloadUnbondOrBuilder getUnbond private com.google.protobuf.SingleFieldBuilderV3< pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder> withdrawBuilder_; /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; * @return Whether the withdraw field is set. */ @java.lang.Override public boolean hasWithdraw() { - return payloadCase_ == 6; + return payloadCase_ == 7; } /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; * @return The withdraw. */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadWithdraw getWithdraw() { if (withdrawBuilder_ == null) { - if (payloadCase_ == 6) { + if (payloadCase_ == 7) { return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; } return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } else { - if (payloadCase_ == 6) { + if (payloadCase_ == 7) { return withdrawBuilder_.getMessage(); } return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } } /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; */ public Builder setWithdraw(pactus.transaction.TransactionOuterClass.PayloadWithdraw value) { if (withdrawBuilder_ == null) { @@ -5925,11 +6011,11 @@ public Builder setWithdraw(pactus.transaction.TransactionOuterClass.PayloadWithd } else { withdrawBuilder_.setMessage(value); } - payloadCase_ = 6; + payloadCase_ = 7; return this; } /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; */ public Builder setWithdraw( pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder builderForValue) { @@ -5939,15 +6025,15 @@ public Builder setWithdraw( } else { withdrawBuilder_.setMessage(builderForValue.build()); } - payloadCase_ = 6; + payloadCase_ = 7; return this; } /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; */ public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.PayloadWithdraw value) { if (withdrawBuilder_ == null) { - if (payloadCase_ == 6 && + if (payloadCase_ == 7 && payload_ != pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance()) { payload_ = pactus.transaction.TransactionOuterClass.PayloadWithdraw.newBuilder((pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_) .mergeFrom(value).buildPartial(); @@ -5956,27 +6042,27 @@ public Builder mergeWithdraw(pactus.transaction.TransactionOuterClass.PayloadWit } onChanged(); } else { - if (payloadCase_ == 6) { + if (payloadCase_ == 7) { withdrawBuilder_.mergeFrom(value); } else { withdrawBuilder_.setMessage(value); } } - payloadCase_ = 6; + payloadCase_ = 7; return this; } /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; */ public Builder clearWithdraw() { if (withdrawBuilder_ == null) { - if (payloadCase_ == 6) { + if (payloadCase_ == 7) { payloadCase_ = 0; payload_ = null; onChanged(); } } else { - if (payloadCase_ == 6) { + if (payloadCase_ == 7) { payloadCase_ = 0; payload_ = null; } @@ -5985,33 +6071,33 @@ public Builder clearWithdraw() { return this; } /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; */ public pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder getWithdrawBuilder() { return getWithdrawFieldBuilder().getBuilder(); } /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; */ @java.lang.Override public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWithdrawOrBuilder() { - if ((payloadCase_ == 6) && (withdrawBuilder_ != null)) { + if ((payloadCase_ == 7) && (withdrawBuilder_ != null)) { return withdrawBuilder_.getMessageOrBuilder(); } else { - if (payloadCase_ == 6) { + if (payloadCase_ == 7) { return (pactus.transaction.TransactionOuterClass.PayloadWithdraw) payload_; } return pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } } /** - * .pactus.PayloadWithdraw withdraw = 6 [json_name = "withdraw"]; + * .pactus.PayloadWithdraw withdraw = 7 [json_name = "withdraw"]; */ private com.google.protobuf.SingleFieldBuilderV3< pactus.transaction.TransactionOuterClass.PayloadWithdraw, pactus.transaction.TransactionOuterClass.PayloadWithdraw.Builder, pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder> getWithdrawFieldBuilder() { if (withdrawBuilder_ == null) { - if (!(payloadCase_ == 6)) { + if (!(payloadCase_ == 7)) { payload_ = pactus.transaction.TransactionOuterClass.PayloadWithdraw.getDefaultInstance(); } withdrawBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< @@ -6021,7 +6107,7 @@ public pactus.transaction.TransactionOuterClass.PayloadWithdrawOrBuilder getWith isClean()); payload_ = null; } - payloadCase_ = 6; + payloadCase_ = 7; onChanged();; return withdrawBuilder_; } @@ -10890,6 +10976,26 @@ public interface GetRawTransactionResponseOrBuilder extends */ com.google.protobuf.ByteString getRawTransactionBytes(); + + /** + *
                    +     * The unique ID of the transaction.
                    +     * 
                    + * + * string id = 2 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
                    +     * The unique ID of the transaction.
                    +     * 
                    + * + * string id = 2 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); } /** *
                    @@ -10909,6 +11015,7 @@ private GetRawTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder
                         }
                         private GetRawTransactionResponse() {
                           rawTransaction_ = "";
                    +      id_ = "";
                         }
                     
                         @java.lang.Override
                    @@ -10982,13 +11089,59 @@ public java.lang.String getRawTransaction() {
                           }
                         }
                     
                    -    private byte memoizedIsInitialized = -1;
                    +    public static final int ID_FIELD_NUMBER = 2;
                    +    private volatile java.lang.Object id_;
                    +    /**
                    +     * 
                    +     * The unique ID of the transaction.
                    +     * 
                    + * + * string id = 2 [json_name = "id"]; + * @return The id. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
                    +     * The unique ID of the transaction.
                    +     * 
                    + * + * string id = 2 [json_name = "id"]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + memoizedIsInitialized = 1; return true; } @@ -10999,6 +11152,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rawTransaction_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } getUnknownFields().writeTo(output); } @@ -11011,6 +11167,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawTransaction_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rawTransaction_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -11028,6 +11187,8 @@ public boolean equals(final java.lang.Object obj) { if (!getRawTransaction() .equals(other.getRawTransaction())) return false; + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11041,6 +11202,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + RAW_TRANSACTION_FIELD_NUMBER; hash = (53 * hash) + getRawTransaction().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -11175,6 +11338,8 @@ public Builder clear() { super.clear(); rawTransaction_ = ""; + id_ = ""; + return this; } @@ -11202,6 +11367,7 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse build( public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse buildPartial() { pactus.transaction.TransactionOuterClass.GetRawTransactionResponse result = new pactus.transaction.TransactionOuterClass.GetRawTransactionResponse(this); result.rawTransaction_ = rawTransaction_; + result.id_ = id_; onBuilt(); return result; } @@ -11254,6 +11420,10 @@ public Builder mergeFrom(pactus.transaction.TransactionOuterClass.GetRawTransact rawTransaction_ = other.rawTransaction_; onChanged(); } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -11285,6 +11455,11 @@ public Builder mergeFrom( break; } // case 10 + case 18: { + id_ = input.readStringRequireUtf8(); + + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -11396,6 +11571,102 @@ public Builder setRawTransactionBytes( onChanged(); return this; } + + private java.lang.Object id_ = ""; + /** + *
                    +       * The unique ID of the transaction.
                    +       * 
                    + * + * string id = 2 [json_name = "id"]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
                    +       * The unique ID of the transaction.
                    +       * 
                    + * + * string id = 2 [json_name = "id"]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
                    +       * The unique ID of the transaction.
                    +       * 
                    + * + * string id = 2 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + *
                    +       * The unique ID of the transaction.
                    +       * 
                    + * + * string id = 2 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + *
                    +       * The unique ID of the transaction.
                    +       * 
                    + * + * string id = 2 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -11513,16 +11784,6 @@ public interface PayloadTransferOrBuilder extends * @return The amount. */ long getAmount(); - - /** - *
                    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -     * 
                    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); } /** *
                    @@ -11677,21 +11938,6 @@ public long getAmount() {
                           return amount_;
                         }
                     
                    -    public static final int FEE_FIELD_NUMBER = 4;
                    -    private long fee_;
                    -    /**
                    -     * 
                    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -     * 
                    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -11715,9 +11961,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (amount_ != 0L) { output.writeInt64(3, amount_); } - if (fee_ != 0L) { - output.writeInt64(4, fee_); - } getUnknownFields().writeTo(output); } @@ -11737,10 +11980,6 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, amount_); } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, fee_); - } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -11762,8 +12001,6 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getReceiver())) return false; if (getAmount() != other.getAmount()) return false; - if (getFee() - != other.getFee()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11782,9 +12019,6 @@ public int hashCode() { hash = (37 * hash) + AMOUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAmount()); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -11923,8 +12157,6 @@ public Builder clear() { amount_ = 0L; - fee_ = 0L; - return this; } @@ -11954,7 +12186,6 @@ public pactus.transaction.TransactionOuterClass.PayloadTransfer buildPartial() { result.sender_ = sender_; result.receiver_ = receiver_; result.amount_ = amount_; - result.fee_ = fee_; onBuilt(); return result; } @@ -12014,9 +12245,6 @@ public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadTransfe if (other.getAmount() != 0L) { setAmount(other.getAmount()); } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -12058,11 +12286,6 @@ public Builder mergeFrom( break; } // case 24 - case 32: { - fee_ = input.readInt64(); - - break; - } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -12313,49 +12536,6 @@ public Builder clearAmount() { onChanged(); return this; } - - private long fee_ ; - /** - *
                    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -       * 
                    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
                    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -       * 
                    - * - * int64 fee = 4 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
                    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -       * 
                    - * - * int64 fee = 4 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -12493,16 +12673,6 @@ public interface PayloadBondOrBuilder extends */ com.google.protobuf.ByteString getPublicKeyBytes(); - - /** - *
                    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -     * 
                    - * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); } /** *
                    @@ -12704,21 +12874,6 @@ public java.lang.String getPublicKey() {
                           }
                         }
                     
                    -    public static final int FEE_FIELD_NUMBER = 5;
                    -    private long fee_;
                    -    /**
                    -     * 
                    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -     * 
                    - * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -12745,9 +12900,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, publicKey_); } - if (fee_ != 0L) { - output.writeInt64(5, fee_); - } getUnknownFields().writeTo(output); } @@ -12770,10 +12922,6 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKey_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, publicKey_); } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, fee_); - } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -12797,8 +12945,6 @@ public boolean equals(final java.lang.Object obj) { != other.getStake()) return false; if (!getPublicKey() .equals(other.getPublicKey())) return false; - if (getFee() - != other.getFee()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -12819,9 +12965,6 @@ public int hashCode() { getStake()); hash = (37 * hash) + PUBLIC_KEY_FIELD_NUMBER; hash = (53 * hash) + getPublicKey().hashCode(); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -12962,8 +13105,6 @@ public Builder clear() { publicKey_ = ""; - fee_ = 0L; - return this; } @@ -12994,7 +13135,6 @@ public pactus.transaction.TransactionOuterClass.PayloadBond buildPartial() { result.receiver_ = receiver_; result.stake_ = stake_; result.publicKey_ = publicKey_; - result.fee_ = fee_; onBuilt(); return result; } @@ -13058,9 +13198,6 @@ public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadBond ot publicKey_ = other.publicKey_; onChanged(); } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -13107,11 +13244,6 @@ public Builder mergeFrom( break; } // case 34 - case 40: { - fee_ = input.readInt64(); - - break; - } // case 40 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -13458,49 +13590,6 @@ public Builder setPublicKeyBytes( onChanged(); return this; } - - private long fee_ ; - /** - *
                    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -       * 
                    - * - * int64 fee = 5 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
                    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -       * 
                    - * - * int64 fee = 5 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
                    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -       * 
                    - * - * int64 fee = 5 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -14989,16 +15078,6 @@ public interface PayloadWithdrawOrBuilder extends * @return The amount. */ long getAmount(); - - /** - *
                    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -     * 
                    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - long getFee(); } /** *
                    @@ -15153,21 +15232,6 @@ public long getAmount() {
                           return amount_;
                         }
                     
                    -    public static final int FEE_FIELD_NUMBER = 4;
                    -    private long fee_;
                    -    /**
                    -     * 
                    -     * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -     * 
                    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -15191,9 +15255,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (amount_ != 0L) { output.writeInt64(3, amount_); } - if (fee_ != 0L) { - output.writeInt64(4, fee_); - } getUnknownFields().writeTo(output); } @@ -15213,10 +15274,6 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, amount_); } - if (fee_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, fee_); - } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -15238,8 +15295,6 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getAccountAddress())) return false; if (getAmount() != other.getAmount()) return false; - if (getFee() - != other.getFee()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -15258,9 +15313,6 @@ public int hashCode() { hash = (37 * hash) + AMOUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAmount()); - hash = (37 * hash) + FEE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getFee()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -15399,8 +15451,6 @@ public Builder clear() { amount_ = 0L; - fee_ = 0L; - return this; } @@ -15430,7 +15480,6 @@ public pactus.transaction.TransactionOuterClass.PayloadWithdraw buildPartial() { result.validatorAddress_ = validatorAddress_; result.accountAddress_ = accountAddress_; result.amount_ = amount_; - result.fee_ = fee_; onBuilt(); return result; } @@ -15490,9 +15539,6 @@ public Builder mergeFrom(pactus.transaction.TransactionOuterClass.PayloadWithdra if (other.getAmount() != 0L) { setAmount(other.getAmount()); } - if (other.getFee() != 0L) { - setFee(other.getFee()); - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -15534,11 +15580,6 @@ public Builder mergeFrom( break; } // case 24 - case 32: { - fee_ = input.readInt64(); - - break; - } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -15789,49 +15830,6 @@ public Builder clearAmount() { onChanged(); return this; } - - private long fee_ ; - /** - *
                    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -       * 
                    - * - * int64 fee = 4 [json_name = "fee"]; - * @return The fee. - */ - @java.lang.Override - public long getFee() { - return fee_; - } - /** - *
                    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -       * 
                    - * - * int64 fee = 4 [json_name = "fee"]; - * @param value The fee to set. - * @return This builder for chaining. - */ - public Builder setFee(long value) { - - fee_ = value; - onChanged(); - return this; - } - /** - *
                    -       * The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
                    -       * 
                    - * - * int64 fee = 4 [json_name = "fee"]; - * @return This builder for chaining. - */ - public Builder clearFee() { - - fee_ = 0L; - onChanged(); - return this; - } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -19348,87 +19346,87 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan "R\003fee\"S\n\033BroadcastTransactionRequest\0224\n\026" + "signed_raw_transaction\030\001 \001(\tR\024signedRawT" + "ransaction\".\n\034BroadcastTransactionRespon" + - "se\022\016\n\002id\030\001 \001(\tR\002id\"\240\002\n\030GetRawTransaction" + + "se\022\016\n\002id\030\001 \001(\tR\002id\"\262\002\n\030GetRawTransaction" + "Request\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022\022\n\004" + - "memo\030\002 \001(\tR\004memo\0225\n\010transfer\030\003 \001(\0132\027.pac" + - "tus.PayloadTransferH\000R\010transfer\022)\n\004bond\030" + - "\004 \001(\0132\023.pactus.PayloadBondH\000R\004bond\022/\n\006un" + - "bond\030\005 \001(\0132\025.pactus.PayloadUnbondH\000R\006unb" + - "ond\0225\n\010withdraw\030\006 \001(\0132\027.pactus.PayloadWi" + - "thdrawH\000R\010withdrawB\t\n\007payload\"\261\001\n GetRaw" + - "TransferTransactionRequest\022\033\n\tlock_time\030" + - "\001 \001(\rR\010lockTime\022\026\n\006sender\030\002 \001(\tR\006sender\022" + - "\032\n\010receiver\030\003 \001(\tR\010receiver\022\026\n\006amount\030\004 " + - "\001(\003R\006amount\022\020\n\003fee\030\005 \001(\003R\003fee\022\022\n\004memo\030\006 " + - "\001(\tR\004memo\"\312\001\n\034GetRawBondTransactionReque" + - "st\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022\026\n\006sende" + - "r\030\002 \001(\tR\006sender\022\032\n\010receiver\030\003 \001(\tR\010recei" + - "ver\022\024\n\005stake\030\004 \001(\003R\005stake\022\035\n\npublic_key\030" + - "\005 \001(\tR\tpublicKey\022\020\n\003fee\030\006 \001(\003R\003fee\022\022\n\004me" + - "mo\030\007 \001(\tR\004memo\"~\n\036GetRawUnbondTransactio" + - "nRequest\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022+\n" + - "\021validator_address\030\003 \001(\tR\020validatorAddre" + - "ss\022\022\n\004memo\030\004 \001(\tR\004memo\"\323\001\n GetRawWithdra" + - "wTransactionRequest\022\033\n\tlock_time\030\001 \001(\rR\010" + - "lockTime\022+\n\021validator_address\030\002 \001(\tR\020val" + - "idatorAddress\022\'\n\017account_address\030\003 \001(\tR\016" + - "accountAddress\022\026\n\006amount\030\004 \001(\003R\006amount\022\020" + - "\n\003fee\030\005 \001(\003R\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"D\n\031" + - "GetRawTransactionResponse\022\'\n\017raw_transac" + - "tion\030\001 \001(\tR\016rawTransaction\"o\n\017PayloadTra" + - "nsfer\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receive" + - "r\030\002 \001(\tR\010receiver\022\026\n\006amount\030\003 \001(\003R\006amoun" + - "t\022\020\n\003fee\030\004 \001(\003R\003fee\"\210\001\n\013PayloadBond\022\026\n\006s" + - "ender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 \001(\tR\010r" + - "eceiver\022\024\n\005stake\030\003 \001(\003R\005stake\022\035\n\npublic_" + - "key\030\004 \001(\tR\tpublicKey\022\020\n\003fee\030\005 \001(\003R\003fee\"B" + - "\n\020PayloadSortition\022\030\n\007address\030\001 \001(\tR\007add" + - "ress\022\024\n\005proof\030\002 \001(\tR\005proof\"-\n\rPayloadUnb" + - "ond\022\034\n\tvalidator\030\001 \001(\tR\tvalidator\"\221\001\n\017Pa" + - "yloadWithdraw\022+\n\021validator_address\030\001 \001(\t" + - "R\020validatorAddress\022\'\n\017account_address\030\002 " + - "\001(\tR\016accountAddress\022\026\n\006amount\030\003 \001(\003R\006amo" + - "unt\022\020\n\003fee\030\004 \001(\003R\003fee\"\254\004\n\017TransactionInf" + - "o\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004data\030\002 \001(\tR\004data\022\030\n" + - "\007version\030\003 \001(\005R\007version\022\033\n\tlock_time\030\004 \001" + - "(\rR\010lockTime\022\024\n\005value\030\005 \001(\003R\005value\022\020\n\003fe" + - "e\030\006 \001(\003R\003fee\0226\n\014payload_type\030\007 \001(\0162\023.pac" + - "tus.PayloadTypeR\013payloadType\0225\n\010transfer" + - "\030\036 \001(\0132\027.pactus.PayloadTransferH\000R\010trans" + - "fer\022)\n\004bond\030\037 \001(\0132\023.pactus.PayloadBondH\000" + - "R\004bond\0228\n\tsortition\030 \001(\0132\030.pactus.Paylo" + - "adSortitionH\000R\tsortition\022/\n\006unbond\030! \001(\013" + - "2\025.pactus.PayloadUnbondH\000R\006unbond\0225\n\010wit" + - "hdraw\030\" \001(\0132\027.pactus.PayloadWithdrawH\000R\010" + - "withdraw\022\022\n\004memo\030\010 \001(\tR\004memo\022\035\n\npublic_k" + - "ey\030\t \001(\tR\tpublicKey\022\034\n\tsignature\030\n \001(\tR\t" + - "signatureB\t\n\007payload*\203\001\n\013PayloadType\022\013\n\007" + - "UNKNOWN\020\000\022\024\n\020TRANSFER_PAYLOAD\020\001\022\020\n\014BOND_" + - "PAYLOAD\020\002\022\025\n\021SORTITION_PAYLOAD\020\003\022\022\n\016UNBO" + - "ND_PAYLOAD\020\004\022\024\n\020WITHDRAW_PAYLOAD\020\005*B\n\024Tr" + - "ansactionVerbosity\022\024\n\020TRANSACTION_DATA\020\000" + - "\022\024\n\020TRANSACTION_INFO\020\0012\202\006\n\013Transaction\022O" + - "\n\016GetTransaction\022\035.pactus.GetTransaction" + - "Request\032\036.pactus.GetTransactionResponse\022" + - "I\n\014CalculateFee\022\033.pactus.CalculateFeeReq" + - "uest\032\034.pactus.CalculateFeeResponse\022a\n\024Br" + - "oadcastTransaction\022#.pactus.BroadcastTra" + - "nsactionRequest\032$.pactus.BroadcastTransa" + - "ctionResponse\022X\n\021GetRawTransaction\022 .pac" + - "tus.GetRawTransactionRequest\032!.pactus.Ge" + - "tRawTransactionResponse\022h\n\031GetRawTransfe" + - "rTransaction\022(.pactus.GetRawTransferTran" + - "sactionRequest\032!.pactus.GetRawTransactio" + - "nResponse\022`\n\025GetRawBondTransaction\022$.pac" + - "tus.GetRawBondTransactionRequest\032!.pactu" + - "s.GetRawTransactionResponse\022d\n\027GetRawUnb" + - "ondTransaction\022&.pactus.GetRawUnbondTran" + - "sactionRequest\032!.pactus.GetRawTransactio" + - "nResponse\022h\n\031GetRawWithdrawTransaction\022(" + - ".pactus.GetRawWithdrawTransactionRequest" + - "\032!.pactus.GetRawTransactionResponseBF\n\022p" + - "actus.transactionZ0github.com/pactus-pro" + - "ject/pactus/www/grpc/pactusb\006proto3" + "memo\030\002 \001(\tR\004memo\022\020\n\003fee\030\003 \001(\003R\003fee\0225\n\010tr" + + "ansfer\030\004 \001(\0132\027.pactus.PayloadTransferH\000R" + + "\010transfer\022)\n\004bond\030\005 \001(\0132\023.pactus.Payload" + + "BondH\000R\004bond\022/\n\006unbond\030\006 \001(\0132\025.pactus.Pa" + + "yloadUnbondH\000R\006unbond\0225\n\010withdraw\030\007 \001(\0132" + + "\027.pactus.PayloadWithdrawH\000R\010withdrawB\t\n\007" + + "payload\"\261\001\n GetRawTransferTransactionReq" + + "uest\022\033\n\tlock_time\030\001 \001(\rR\010lockTime\022\026\n\006sen" + + "der\030\002 \001(\tR\006sender\022\032\n\010receiver\030\003 \001(\tR\010rec" + + "eiver\022\026\n\006amount\030\004 \001(\003R\006amount\022\020\n\003fee\030\005 \001" + + "(\003R\003fee\022\022\n\004memo\030\006 \001(\tR\004memo\"\312\001\n\034GetRawBo" + + "ndTransactionRequest\022\033\n\tlock_time\030\001 \001(\rR" + + "\010lockTime\022\026\n\006sender\030\002 \001(\tR\006sender\022\032\n\010rec" + + "eiver\030\003 \001(\tR\010receiver\022\024\n\005stake\030\004 \001(\003R\005st" + + "ake\022\035\n\npublic_key\030\005 \001(\tR\tpublicKey\022\020\n\003fe" + + "e\030\006 \001(\003R\003fee\022\022\n\004memo\030\007 \001(\tR\004memo\"~\n\036GetR" + + "awUnbondTransactionRequest\022\033\n\tlock_time\030" + + "\001 \001(\rR\010lockTime\022+\n\021validator_address\030\003 \001" + + "(\tR\020validatorAddress\022\022\n\004memo\030\004 \001(\tR\004memo" + + "\"\323\001\n GetRawWithdrawTransactionRequest\022\033\n" + + "\tlock_time\030\001 \001(\rR\010lockTime\022+\n\021validator_" + + "address\030\002 \001(\tR\020validatorAddress\022\'\n\017accou" + + "nt_address\030\003 \001(\tR\016accountAddress\022\026\n\006amou" + + "nt\030\004 \001(\003R\006amount\022\020\n\003fee\030\005 \001(\003R\003fee\022\022\n\004me" + + "mo\030\006 \001(\tR\004memo\"T\n\031GetRawTransactionRespo" + + "nse\022\'\n\017raw_transaction\030\001 \001(\tR\016rawTransac" + + "tion\022\016\n\002id\030\002 \001(\tR\002id\"]\n\017PayloadTransfer\022" + + "\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010receiver\030\002 \001(" + + "\tR\010receiver\022\026\n\006amount\030\003 \001(\003R\006amount\"v\n\013P" + + "ayloadBond\022\026\n\006sender\030\001 \001(\tR\006sender\022\032\n\010re" + + "ceiver\030\002 \001(\tR\010receiver\022\024\n\005stake\030\003 \001(\003R\005s" + + "take\022\035\n\npublic_key\030\004 \001(\tR\tpublicKey\"B\n\020P" + + "ayloadSortition\022\030\n\007address\030\001 \001(\tR\007addres" + + "s\022\024\n\005proof\030\002 \001(\tR\005proof\"-\n\rPayloadUnbond" + + "\022\034\n\tvalidator\030\001 \001(\tR\tvalidator\"\177\n\017Payloa" + + "dWithdraw\022+\n\021validator_address\030\001 \001(\tR\020va" + + "lidatorAddress\022\'\n\017account_address\030\002 \001(\tR" + + "\016accountAddress\022\026\n\006amount\030\003 \001(\003R\006amount\"" + + "\254\004\n\017TransactionInfo\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004d" + + "ata\030\002 \001(\tR\004data\022\030\n\007version\030\003 \001(\005R\007versio" + + "n\022\033\n\tlock_time\030\004 \001(\rR\010lockTime\022\024\n\005value\030" + + "\005 \001(\003R\005value\022\020\n\003fee\030\006 \001(\003R\003fee\0226\n\014payloa" + + "d_type\030\007 \001(\0162\023.pactus.PayloadTypeR\013paylo" + + "adType\0225\n\010transfer\030\036 \001(\0132\027.pactus.Payloa" + + "dTransferH\000R\010transfer\022)\n\004bond\030\037 \001(\0132\023.pa" + + "ctus.PayloadBondH\000R\004bond\0228\n\tsortition\030 " + + "\001(\0132\030.pactus.PayloadSortitionH\000R\tsortiti" + + "on\022/\n\006unbond\030! \001(\0132\025.pactus.PayloadUnbon" + + "dH\000R\006unbond\0225\n\010withdraw\030\" \001(\0132\027.pactus.P" + + "ayloadWithdrawH\000R\010withdraw\022\022\n\004memo\030\010 \001(\t" + + "R\004memo\022\035\n\npublic_key\030\t \001(\tR\tpublicKey\022\034\n" + + "\tsignature\030\n \001(\tR\tsignatureB\t\n\007payload*\203" + + "\001\n\013PayloadType\022\013\n\007UNKNOWN\020\000\022\024\n\020TRANSFER_" + + "PAYLOAD\020\001\022\020\n\014BOND_PAYLOAD\020\002\022\025\n\021SORTITION" + + "_PAYLOAD\020\003\022\022\n\016UNBOND_PAYLOAD\020\004\022\024\n\020WITHDR" + + "AW_PAYLOAD\020\005*B\n\024TransactionVerbosity\022\024\n\020" + + "TRANSACTION_DATA\020\000\022\024\n\020TRANSACTION_INFO\020\001" + + "2\202\006\n\013Transaction\022O\n\016GetTransaction\022\035.pac" + + "tus.GetTransactionRequest\032\036.pactus.GetTr" + + "ansactionResponse\022I\n\014CalculateFee\022\033.pact" + + "us.CalculateFeeRequest\032\034.pactus.Calculat" + + "eFeeResponse\022a\n\024BroadcastTransaction\022#.p" + + "actus.BroadcastTransactionRequest\032$.pact" + + "us.BroadcastTransactionResponse\022X\n\021GetRa" + + "wTransaction\022 .pactus.GetRawTransactionR" + + "equest\032!.pactus.GetRawTransactionRespons" + + "e\022h\n\031GetRawTransferTransaction\022(.pactus." + + "GetRawTransferTransactionRequest\032!.pactu" + + "s.GetRawTransactionResponse\022`\n\025GetRawBon" + + "dTransaction\022$.pactus.GetRawBondTransact" + + "ionRequest\032!.pactus.GetRawTransactionRes" + + "ponse\022d\n\027GetRawUnbondTransaction\022&.pactu" + + "s.GetRawUnbondTransactionRequest\032!.pactu" + + "s.GetRawTransactionResponse\022h\n\031GetRawWit" + + "hdrawTransaction\022(.pactus.GetRawWithdraw" + + "TransactionRequest\032!.pactus.GetRawTransa" + + "ctionResponseBF\n\022pactus.transactionZ0git" + + "hub.com/pactus-project/pactus/www/grpc/p" + + "actusb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -19475,7 +19473,7 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan internal_static_pactus_GetRawTransactionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawTransactionRequest_descriptor, - new java.lang.String[] { "LockTime", "Memo", "Transfer", "Bond", "Unbond", "Withdraw", "Payload", }); + new java.lang.String[] { "LockTime", "Memo", "Fee", "Transfer", "Bond", "Unbond", "Withdraw", "Payload", }); internal_static_pactus_GetRawTransferTransactionRequest_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_pactus_GetRawTransferTransactionRequest_fieldAccessorTable = new @@ -19505,19 +19503,19 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan internal_static_pactus_GetRawTransactionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_GetRawTransactionResponse_descriptor, - new java.lang.String[] { "RawTransaction", }); + new java.lang.String[] { "RawTransaction", "Id", }); internal_static_pactus_PayloadTransfer_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_pactus_PayloadTransfer_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadTransfer_descriptor, - new java.lang.String[] { "Sender", "Receiver", "Amount", "Fee", }); + new java.lang.String[] { "Sender", "Receiver", "Amount", }); internal_static_pactus_PayloadBond_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_pactus_PayloadBond_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadBond_descriptor, - new java.lang.String[] { "Sender", "Receiver", "Stake", "PublicKey", "Fee", }); + new java.lang.String[] { "Sender", "Receiver", "Stake", "PublicKey", }); internal_static_pactus_PayloadSortition_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_pactus_PayloadSortition_fieldAccessorTable = new @@ -19535,7 +19533,7 @@ public pactus.transaction.TransactionOuterClass.TransactionInfo getDefaultInstan internal_static_pactus_PayloadWithdraw_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_pactus_PayloadWithdraw_descriptor, - new java.lang.String[] { "ValidatorAddress", "AccountAddress", "Amount", "Fee", }); + new java.lang.String[] { "ValidatorAddress", "AccountAddress", "Amount", }); internal_static_pactus_TransactionInfo_descriptor = getDescriptor().getMessageTypes().get(17); internal_static_pactus_TransactionInfo_fieldAccessorTable = new diff --git a/www/grpc/gen/js/transaction_pb.js b/www/grpc/gen/js/transaction_pb.js index c0287b2f8..e1df38aea 100644 --- a/www/grpc/gen/js/transaction_pb.js +++ b/www/grpc/gen/js/transaction_pb.js @@ -1411,17 +1411,17 @@ proto.pactus.BroadcastTransactionResponse.prototype.setId = function(value) { * @private {!Array>} * @const */ -proto.pactus.GetRawTransactionRequest.oneofGroups_ = [[3,4,5,6]]; +proto.pactus.GetRawTransactionRequest.oneofGroups_ = [[4,5,6,7]]; /** * @enum {number} */ proto.pactus.GetRawTransactionRequest.PayloadCase = { PAYLOAD_NOT_SET: 0, - TRANSFER: 3, - BOND: 4, - UNBOND: 5, - WITHDRAW: 6 + TRANSFER: 4, + BOND: 5, + UNBOND: 6, + WITHDRAW: 7 }; /** @@ -1464,6 +1464,7 @@ proto.pactus.GetRawTransactionRequest.toObject = function(includeInstance, msg) var f, obj = { lockTime: jspb.Message.getFieldWithDefault(msg, 1, 0), memo: jspb.Message.getFieldWithDefault(msg, 2, ""), + fee: jspb.Message.getFieldWithDefault(msg, 3, 0), transfer: (f = msg.getTransfer()) && proto.pactus.PayloadTransfer.toObject(includeInstance, f), bond: (f = msg.getBond()) && proto.pactus.PayloadBond.toObject(includeInstance, f), unbond: (f = msg.getUnbond()) && proto.pactus.PayloadUnbond.toObject(includeInstance, f), @@ -1513,21 +1514,25 @@ proto.pactus.GetRawTransactionRequest.deserializeBinaryFromReader = function(msg msg.setMemo(value); break; case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setFee(value); + break; + case 4: var value = new proto.pactus.PayloadTransfer; reader.readMessage(value,proto.pactus.PayloadTransfer.deserializeBinaryFromReader); msg.setTransfer(value); break; - case 4: + case 5: var value = new proto.pactus.PayloadBond; reader.readMessage(value,proto.pactus.PayloadBond.deserializeBinaryFromReader); msg.setBond(value); break; - case 5: + case 6: var value = new proto.pactus.PayloadUnbond; reader.readMessage(value,proto.pactus.PayloadUnbond.deserializeBinaryFromReader); msg.setUnbond(value); break; - case 6: + case 7: var value = new proto.pactus.PayloadWithdraw; reader.readMessage(value,proto.pactus.PayloadWithdraw.deserializeBinaryFromReader); msg.setWithdraw(value); @@ -1575,10 +1580,17 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message f ); } + f = message.getFee(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } f = message.getTransfer(); if (f != null) { writer.writeMessage( - 3, + 4, f, proto.pactus.PayloadTransfer.serializeBinaryToWriter ); @@ -1586,7 +1598,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message f = message.getBond(); if (f != null) { writer.writeMessage( - 4, + 5, f, proto.pactus.PayloadBond.serializeBinaryToWriter ); @@ -1594,7 +1606,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message f = message.getUnbond(); if (f != null) { writer.writeMessage( - 5, + 6, f, proto.pactus.PayloadUnbond.serializeBinaryToWriter ); @@ -1602,7 +1614,7 @@ proto.pactus.GetRawTransactionRequest.serializeBinaryToWriter = function(message f = message.getWithdraw(); if (f != null) { writer.writeMessage( - 6, + 7, f, proto.pactus.PayloadWithdraw.serializeBinaryToWriter ); @@ -1647,12 +1659,30 @@ proto.pactus.GetRawTransactionRequest.prototype.setMemo = function(value) { /** - * optional PayloadTransfer transfer = 3; + * optional int64 fee = 3; + * @return {number} + */ +proto.pactus.GetRawTransactionRequest.prototype.getFee = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pactus.GetRawTransactionRequest} returns this + */ +proto.pactus.GetRawTransactionRequest.prototype.setFee = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional PayloadTransfer transfer = 4; * @return {?proto.pactus.PayloadTransfer} */ proto.pactus.GetRawTransactionRequest.prototype.getTransfer = function() { return /** @type{?proto.pactus.PayloadTransfer} */ ( - jspb.Message.getWrapperField(this, proto.pactus.PayloadTransfer, 3)); + jspb.Message.getWrapperField(this, proto.pactus.PayloadTransfer, 4)); }; @@ -1661,7 +1691,7 @@ proto.pactus.GetRawTransactionRequest.prototype.getTransfer = function() { * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setTransfer = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 4, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); }; @@ -1679,17 +1709,17 @@ proto.pactus.GetRawTransactionRequest.prototype.clearTransfer = function() { * @return {boolean} */ proto.pactus.GetRawTransactionRequest.prototype.hasTransfer = function() { - return jspb.Message.getField(this, 3) != null; + return jspb.Message.getField(this, 4) != null; }; /** - * optional PayloadBond bond = 4; + * optional PayloadBond bond = 5; * @return {?proto.pactus.PayloadBond} */ proto.pactus.GetRawTransactionRequest.prototype.getBond = function() { return /** @type{?proto.pactus.PayloadBond} */ ( - jspb.Message.getWrapperField(this, proto.pactus.PayloadBond, 4)); + jspb.Message.getWrapperField(this, proto.pactus.PayloadBond, 5)); }; @@ -1698,7 +1728,7 @@ proto.pactus.GetRawTransactionRequest.prototype.getBond = function() { * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setBond = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 5, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); }; @@ -1716,17 +1746,17 @@ proto.pactus.GetRawTransactionRequest.prototype.clearBond = function() { * @return {boolean} */ proto.pactus.GetRawTransactionRequest.prototype.hasBond = function() { - return jspb.Message.getField(this, 4) != null; + return jspb.Message.getField(this, 5) != null; }; /** - * optional PayloadUnbond unbond = 5; + * optional PayloadUnbond unbond = 6; * @return {?proto.pactus.PayloadUnbond} */ proto.pactus.GetRawTransactionRequest.prototype.getUnbond = function() { return /** @type{?proto.pactus.PayloadUnbond} */ ( - jspb.Message.getWrapperField(this, proto.pactus.PayloadUnbond, 5)); + jspb.Message.getWrapperField(this, proto.pactus.PayloadUnbond, 6)); }; @@ -1735,7 +1765,7 @@ proto.pactus.GetRawTransactionRequest.prototype.getUnbond = function() { * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setUnbond = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 6, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); }; @@ -1753,17 +1783,17 @@ proto.pactus.GetRawTransactionRequest.prototype.clearUnbond = function() { * @return {boolean} */ proto.pactus.GetRawTransactionRequest.prototype.hasUnbond = function() { - return jspb.Message.getField(this, 5) != null; + return jspb.Message.getField(this, 6) != null; }; /** - * optional PayloadWithdraw withdraw = 6; + * optional PayloadWithdraw withdraw = 7; * @return {?proto.pactus.PayloadWithdraw} */ proto.pactus.GetRawTransactionRequest.prototype.getWithdraw = function() { return /** @type{?proto.pactus.PayloadWithdraw} */ ( - jspb.Message.getWrapperField(this, proto.pactus.PayloadWithdraw, 6)); + jspb.Message.getWrapperField(this, proto.pactus.PayloadWithdraw, 7)); }; @@ -1772,7 +1802,7 @@ proto.pactus.GetRawTransactionRequest.prototype.getWithdraw = function() { * @return {!proto.pactus.GetRawTransactionRequest} returns this */ proto.pactus.GetRawTransactionRequest.prototype.setWithdraw = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 7, proto.pactus.GetRawTransactionRequest.oneofGroups_[0], value); }; @@ -1790,7 +1820,7 @@ proto.pactus.GetRawTransactionRequest.prototype.clearWithdraw = function() { * @return {boolean} */ proto.pactus.GetRawTransactionRequest.prototype.hasWithdraw = function() { - return jspb.Message.getField(this, 6) != null; + return jspb.Message.getField(this, 7) != null; }; @@ -2886,7 +2916,8 @@ proto.pactus.GetRawTransactionResponse.prototype.toObject = function(opt_include */ proto.pactus.GetRawTransactionResponse.toObject = function(includeInstance, msg) { var f, obj = { - rawTransaction: jspb.Message.getFieldWithDefault(msg, 1, "") + rawTransaction: jspb.Message.getFieldWithDefault(msg, 1, ""), + id: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -2927,6 +2958,10 @@ proto.pactus.GetRawTransactionResponse.deserializeBinaryFromReader = function(ms var value = /** @type {string} */ (reader.readString()); msg.setRawTransaction(value); break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; default: reader.skipField(); break; @@ -2963,6 +2998,13 @@ proto.pactus.GetRawTransactionResponse.serializeBinaryToWriter = function(messag f ); } + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; @@ -2984,6 +3026,24 @@ proto.pactus.GetRawTransactionResponse.prototype.setRawTransaction = function(va }; +/** + * optional string id = 2; + * @return {string} + */ +proto.pactus.GetRawTransactionResponse.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pactus.GetRawTransactionResponse} returns this + */ +proto.pactus.GetRawTransactionResponse.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + @@ -3018,8 +3078,7 @@ proto.pactus.PayloadTransfer.toObject = function(includeInstance, msg) { var f, obj = { sender: jspb.Message.getFieldWithDefault(msg, 1, ""), receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 4, 0) + amount: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -3068,10 +3127,6 @@ proto.pactus.PayloadTransfer.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {number} */ (reader.readInt64()); msg.setAmount(value); break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; default: reader.skipField(); break; @@ -3122,13 +3177,6 @@ proto.pactus.PayloadTransfer.serializeBinaryToWriter = function(message, writer) f ); } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } }; @@ -3186,24 +3234,6 @@ proto.pactus.PayloadTransfer.prototype.setAmount = function(value) { }; -/** - * optional int64 fee = 4; - * @return {number} - */ -proto.pactus.PayloadTransfer.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PayloadTransfer} returns this - */ -proto.pactus.PayloadTransfer.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - @@ -3239,8 +3269,7 @@ proto.pactus.PayloadBond.toObject = function(includeInstance, msg) { sender: jspb.Message.getFieldWithDefault(msg, 1, ""), receiver: jspb.Message.getFieldWithDefault(msg, 2, ""), stake: jspb.Message.getFieldWithDefault(msg, 3, 0), - publicKey: jspb.Message.getFieldWithDefault(msg, 4, ""), - fee: jspb.Message.getFieldWithDefault(msg, 5, 0) + publicKey: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -3293,10 +3322,6 @@ proto.pactus.PayloadBond.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {string} */ (reader.readString()); msg.setPublicKey(value); break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; default: reader.skipField(); break; @@ -3354,13 +3379,6 @@ proto.pactus.PayloadBond.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } }; @@ -3436,24 +3454,6 @@ proto.pactus.PayloadBond.prototype.setPublicKey = function(value) { }; -/** - * optional int64 fee = 5; - * @return {number} - */ -proto.pactus.PayloadBond.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PayloadBond} returns this - */ -proto.pactus.PayloadBond.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - @@ -3778,8 +3778,7 @@ proto.pactus.PayloadWithdraw.toObject = function(includeInstance, msg) { var f, obj = { validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), accountAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), - amount: jspb.Message.getFieldWithDefault(msg, 3, 0), - fee: jspb.Message.getFieldWithDefault(msg, 4, 0) + amount: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -3828,10 +3827,6 @@ proto.pactus.PayloadWithdraw.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {number} */ (reader.readInt64()); msg.setAmount(value); break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setFee(value); - break; default: reader.skipField(); break; @@ -3882,13 +3877,6 @@ proto.pactus.PayloadWithdraw.serializeBinaryToWriter = function(message, writer) f ); } - f = message.getFee(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } }; @@ -3946,24 +3934,6 @@ proto.pactus.PayloadWithdraw.prototype.setAmount = function(value) { }; -/** - * optional int64 fee = 4; - * @return {number} - */ -proto.pactus.PayloadWithdraw.prototype.getFee = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.pactus.PayloadWithdraw} returns this - */ -proto.pactus.PayloadWithdraw.prototype.setFee = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - /** * Oneof group definitions for this message. Each group defines the field diff --git a/www/grpc/gen/python/transaction_pb2.py b/www/grpc/gen/python/transaction_pb2.py index 3cfb8ed32..a6e91d71a 100644 --- a/www/grpc/gen/python/transaction_pb2.py +++ b/www/grpc/gen/python/transaction_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11transaction.proto\x12\x06pactus\"c\n\x15GetTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tverbosity\x18\x02 \x01(\x0e\x32\x1c.pactus.TransactionVerbosityR\tverbosity\"\x95\x01\n\x16GetTransactionResponse\x12!\n\x0c\x62lock_height\x18\x01 \x01(\rR\x0b\x62lockHeight\x12\x1d\n\nblock_time\x18\x02 \x01(\rR\tblockTime\x12\x39\n\x0btransaction\x18\x03 \x01(\x0b\x32\x17.pactus.TransactionInfoR\x0btransaction\"\x88\x01\n\x13\x43\x61lculateFeeRequest\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x36\n\x0cpayload_type\x18\x02 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12!\n\x0c\x66ixed_amount\x18\x03 \x01(\x08R\x0b\x66ixedAmount\"@\n\x14\x43\x61lculateFeeResponse\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x02 \x01(\x03R\x03\x66\x65\x65\"S\n\x1b\x42roadcastTransactionRequest\x12\x34\n\x16signed_raw_transaction\x18\x01 \x01(\tR\x14signedRawTransaction\".\n\x1c\x42roadcastTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xa0\x02\n\x18GetRawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x12\n\x04memo\x18\x02 \x01(\tR\x04memo\x12\x35\n\x08transfer\x18\x03 \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x04 \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12/\n\x06unbond\x18\x05 \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\x06 \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdrawB\t\n\x07payload\"\xb1\x01\n GetRawTransferTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"\xca\x01\n\x1cGetRawBondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x04 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x05 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x07 \x01(\tR\x04memo\"~\n\x1eGetRawUnbondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x03 \x01(\tR\x10validatorAddress\x12\x12\n\x04memo\x18\x04 \x01(\tR\x04memo\"\xd3\x01\n GetRawWithdrawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"D\n\x19GetRawTransactionResponse\x12\'\n\x0fraw_transaction\x18\x01 \x01(\tR\x0erawTransaction\"o\n\x0fPayloadTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"\x88\x01\n\x0bPayloadBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x04 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\"B\n\x10PayloadSortition\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x14\n\x05proof\x18\x02 \x01(\tR\x05proof\"-\n\rPayloadUnbond\x12\x1c\n\tvalidator\x18\x01 \x01(\tR\tvalidator\"\x91\x01\n\x0fPayloadWithdraw\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x02 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x04 \x01(\x03R\x03\x66\x65\x65\"\xac\x04\n\x0fTransactionInfo\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x18\n\x07version\x18\x03 \x01(\x05R\x07version\x12\x1b\n\tlock_time\x18\x04 \x01(\rR\x08lockTime\x12\x14\n\x05value\x18\x05 \x01(\x03R\x05value\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x36\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12\x35\n\x08transfer\x18\x1e \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x1f \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12\x38\n\tsortition\x18 \x01(\x0b\x32\x18.pactus.PayloadSortitionH\x00R\tsortition\x12/\n\x06unbond\x18! \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\" \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdraw\x12\x12\n\x04memo\x18\x08 \x01(\tR\x04memo\x12\x1d\n\npublic_key\x18\t \x01(\tR\tpublicKey\x12\x1c\n\tsignature\x18\n \x01(\tR\tsignatureB\t\n\x07payload*\x83\x01\n\x0bPayloadType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10TRANSFER_PAYLOAD\x10\x01\x12\x10\n\x0c\x42OND_PAYLOAD\x10\x02\x12\x15\n\x11SORTITION_PAYLOAD\x10\x03\x12\x12\n\x0eUNBOND_PAYLOAD\x10\x04\x12\x14\n\x10WITHDRAW_PAYLOAD\x10\x05*B\n\x14TransactionVerbosity\x12\x14\n\x10TRANSACTION_DATA\x10\x00\x12\x14\n\x10TRANSACTION_INFO\x10\x01\x32\x82\x06\n\x0bTransaction\x12O\n\x0eGetTransaction\x12\x1d.pactus.GetTransactionRequest\x1a\x1e.pactus.GetTransactionResponse\x12I\n\x0c\x43\x61lculateFee\x12\x1b.pactus.CalculateFeeRequest\x1a\x1c.pactus.CalculateFeeResponse\x12\x61\n\x14\x42roadcastTransaction\x12#.pactus.BroadcastTransactionRequest\x1a$.pactus.BroadcastTransactionResponse\x12X\n\x11GetRawTransaction\x12 .pactus.GetRawTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawTransferTransaction\x12(.pactus.GetRawTransferTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12`\n\x15GetRawBondTransaction\x12$.pactus.GetRawBondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12\x64\n\x17GetRawUnbondTransaction\x12&.pactus.GetRawUnbondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawWithdrawTransaction\x12(.pactus.GetRawWithdrawTransactionRequest\x1a!.pactus.GetRawTransactionResponseBF\n\x12pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11transaction.proto\x12\x06pactus\"c\n\x15GetTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\tverbosity\x18\x02 \x01(\x0e\x32\x1c.pactus.TransactionVerbosityR\tverbosity\"\x95\x01\n\x16GetTransactionResponse\x12!\n\x0c\x62lock_height\x18\x01 \x01(\rR\x0b\x62lockHeight\x12\x1d\n\nblock_time\x18\x02 \x01(\rR\tblockTime\x12\x39\n\x0btransaction\x18\x03 \x01(\x0b\x32\x17.pactus.TransactionInfoR\x0btransaction\"\x88\x01\n\x13\x43\x61lculateFeeRequest\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x36\n\x0cpayload_type\x18\x02 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12!\n\x0c\x66ixed_amount\x18\x03 \x01(\x08R\x0b\x66ixedAmount\"@\n\x14\x43\x61lculateFeeResponse\x12\x16\n\x06\x61mount\x18\x01 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x02 \x01(\x03R\x03\x66\x65\x65\"S\n\x1b\x42roadcastTransactionRequest\x12\x34\n\x16signed_raw_transaction\x18\x01 \x01(\tR\x14signedRawTransaction\".\n\x1c\x42roadcastTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xb2\x02\n\x18GetRawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x12\n\x04memo\x18\x02 \x01(\tR\x04memo\x12\x10\n\x03\x66\x65\x65\x18\x03 \x01(\x03R\x03\x66\x65\x65\x12\x35\n\x08transfer\x18\x04 \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x05 \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12/\n\x06unbond\x18\x06 \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\x07 \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdrawB\t\n\x07payload\"\xb1\x01\n GetRawTransferTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"\xca\x01\n\x1cGetRawBondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12\x16\n\x06sender\x18\x02 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x03 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x04 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x05 \x01(\tR\tpublicKey\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x07 \x01(\tR\x04memo\"~\n\x1eGetRawUnbondTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x03 \x01(\tR\x10validatorAddress\x12\x12\n\x04memo\x18\x04 \x01(\tR\x04memo\"\xd3\x01\n GetRawWithdrawTransactionRequest\x12\x1b\n\tlock_time\x18\x01 \x01(\rR\x08lockTime\x12+\n\x11validator_address\x18\x02 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x03 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x04 \x01(\x03R\x06\x61mount\x12\x10\n\x03\x66\x65\x65\x18\x05 \x01(\x03R\x03\x66\x65\x65\x12\x12\n\x04memo\x18\x06 \x01(\tR\x04memo\"T\n\x19GetRawTransactionResponse\x12\'\n\x0fraw_transaction\x18\x01 \x01(\tR\x0erawTransaction\x12\x0e\n\x02id\x18\x02 \x01(\tR\x02id\"]\n\x0fPayloadTransfer\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"v\n\x0bPayloadBond\x12\x16\n\x06sender\x18\x01 \x01(\tR\x06sender\x12\x1a\n\x08receiver\x18\x02 \x01(\tR\x08receiver\x12\x14\n\x05stake\x18\x03 \x01(\x03R\x05stake\x12\x1d\n\npublic_key\x18\x04 \x01(\tR\tpublicKey\"B\n\x10PayloadSortition\x12\x18\n\x07\x61\x64\x64ress\x18\x01 \x01(\tR\x07\x61\x64\x64ress\x12\x14\n\x05proof\x18\x02 \x01(\tR\x05proof\"-\n\rPayloadUnbond\x12\x1c\n\tvalidator\x18\x01 \x01(\tR\tvalidator\"\x7f\n\x0fPayloadWithdraw\x12+\n\x11validator_address\x18\x01 \x01(\tR\x10validatorAddress\x12\'\n\x0f\x61\x63\x63ount_address\x18\x02 \x01(\tR\x0e\x61\x63\x63ountAddress\x12\x16\n\x06\x61mount\x18\x03 \x01(\x03R\x06\x61mount\"\xac\x04\n\x0fTransactionInfo\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04\x64\x61ta\x18\x02 \x01(\tR\x04\x64\x61ta\x12\x18\n\x07version\x18\x03 \x01(\x05R\x07version\x12\x1b\n\tlock_time\x18\x04 \x01(\rR\x08lockTime\x12\x14\n\x05value\x18\x05 \x01(\x03R\x05value\x12\x10\n\x03\x66\x65\x65\x18\x06 \x01(\x03R\x03\x66\x65\x65\x12\x36\n\x0cpayload_type\x18\x07 \x01(\x0e\x32\x13.pactus.PayloadTypeR\x0bpayloadType\x12\x35\n\x08transfer\x18\x1e \x01(\x0b\x32\x17.pactus.PayloadTransferH\x00R\x08transfer\x12)\n\x04\x62ond\x18\x1f \x01(\x0b\x32\x13.pactus.PayloadBondH\x00R\x04\x62ond\x12\x38\n\tsortition\x18 \x01(\x0b\x32\x18.pactus.PayloadSortitionH\x00R\tsortition\x12/\n\x06unbond\x18! \x01(\x0b\x32\x15.pactus.PayloadUnbondH\x00R\x06unbond\x12\x35\n\x08withdraw\x18\" \x01(\x0b\x32\x17.pactus.PayloadWithdrawH\x00R\x08withdraw\x12\x12\n\x04memo\x18\x08 \x01(\tR\x04memo\x12\x1d\n\npublic_key\x18\t \x01(\tR\tpublicKey\x12\x1c\n\tsignature\x18\n \x01(\tR\tsignatureB\t\n\x07payload*\x83\x01\n\x0bPayloadType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10TRANSFER_PAYLOAD\x10\x01\x12\x10\n\x0c\x42OND_PAYLOAD\x10\x02\x12\x15\n\x11SORTITION_PAYLOAD\x10\x03\x12\x12\n\x0eUNBOND_PAYLOAD\x10\x04\x12\x14\n\x10WITHDRAW_PAYLOAD\x10\x05*B\n\x14TransactionVerbosity\x12\x14\n\x10TRANSACTION_DATA\x10\x00\x12\x14\n\x10TRANSACTION_INFO\x10\x01\x32\x82\x06\n\x0bTransaction\x12O\n\x0eGetTransaction\x12\x1d.pactus.GetTransactionRequest\x1a\x1e.pactus.GetTransactionResponse\x12I\n\x0c\x43\x61lculateFee\x12\x1b.pactus.CalculateFeeRequest\x1a\x1c.pactus.CalculateFeeResponse\x12\x61\n\x14\x42roadcastTransaction\x12#.pactus.BroadcastTransactionRequest\x1a$.pactus.BroadcastTransactionResponse\x12X\n\x11GetRawTransaction\x12 .pactus.GetRawTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawTransferTransaction\x12(.pactus.GetRawTransferTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12`\n\x15GetRawBondTransaction\x12$.pactus.GetRawBondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12\x64\n\x17GetRawUnbondTransaction\x12&.pactus.GetRawUnbondTransactionRequest\x1a!.pactus.GetRawTransactionResponse\x12h\n\x19GetRawWithdrawTransaction\x12(.pactus.GetRawWithdrawTransactionRequest\x1a!.pactus.GetRawTransactionResponseBF\n\x12pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactusb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'transaction_pb2', globals()) @@ -21,10 +21,10 @@ DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022pactus.transactionZ0github.com/pactus-project/pactus/www/grpc/pactus' - _PAYLOADTYPE._serialized_start=2783 - _PAYLOADTYPE._serialized_end=2914 - _TRANSACTIONVERBOSITY._serialized_start=2916 - _TRANSACTIONVERBOSITY._serialized_end=2982 + _PAYLOADTYPE._serialized_start=2761 + _PAYLOADTYPE._serialized_end=2892 + _TRANSACTIONVERBOSITY._serialized_start=2894 + _TRANSACTIONVERBOSITY._serialized_end=2960 _GETTRANSACTIONREQUEST._serialized_start=29 _GETTRANSACTIONREQUEST._serialized_end=128 _GETTRANSACTIONRESPONSE._serialized_start=131 @@ -38,29 +38,29 @@ _BROADCASTTRANSACTIONRESPONSE._serialized_start=572 _BROADCASTTRANSACTIONRESPONSE._serialized_end=618 _GETRAWTRANSACTIONREQUEST._serialized_start=621 - _GETRAWTRANSACTIONREQUEST._serialized_end=909 - _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_start=912 - _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_end=1089 - _GETRAWBONDTRANSACTIONREQUEST._serialized_start=1092 - _GETRAWBONDTRANSACTIONREQUEST._serialized_end=1294 - _GETRAWUNBONDTRANSACTIONREQUEST._serialized_start=1296 - _GETRAWUNBONDTRANSACTIONREQUEST._serialized_end=1422 - _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_start=1425 - _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_end=1636 - _GETRAWTRANSACTIONRESPONSE._serialized_start=1638 - _GETRAWTRANSACTIONRESPONSE._serialized_end=1706 - _PAYLOADTRANSFER._serialized_start=1708 - _PAYLOADTRANSFER._serialized_end=1819 - _PAYLOADBOND._serialized_start=1822 - _PAYLOADBOND._serialized_end=1958 - _PAYLOADSORTITION._serialized_start=1960 - _PAYLOADSORTITION._serialized_end=2026 - _PAYLOADUNBOND._serialized_start=2028 - _PAYLOADUNBOND._serialized_end=2073 - _PAYLOADWITHDRAW._serialized_start=2076 - _PAYLOADWITHDRAW._serialized_end=2221 - _TRANSACTIONINFO._serialized_start=2224 - _TRANSACTIONINFO._serialized_end=2780 - _TRANSACTION._serialized_start=2985 - _TRANSACTION._serialized_end=3755 + _GETRAWTRANSACTIONREQUEST._serialized_end=927 + _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_start=930 + _GETRAWTRANSFERTRANSACTIONREQUEST._serialized_end=1107 + _GETRAWBONDTRANSACTIONREQUEST._serialized_start=1110 + _GETRAWBONDTRANSACTIONREQUEST._serialized_end=1312 + _GETRAWUNBONDTRANSACTIONREQUEST._serialized_start=1314 + _GETRAWUNBONDTRANSACTIONREQUEST._serialized_end=1440 + _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_start=1443 + _GETRAWWITHDRAWTRANSACTIONREQUEST._serialized_end=1654 + _GETRAWTRANSACTIONRESPONSE._serialized_start=1656 + _GETRAWTRANSACTIONRESPONSE._serialized_end=1740 + _PAYLOADTRANSFER._serialized_start=1742 + _PAYLOADTRANSFER._serialized_end=1835 + _PAYLOADBOND._serialized_start=1837 + _PAYLOADBOND._serialized_end=1955 + _PAYLOADSORTITION._serialized_start=1957 + _PAYLOADSORTITION._serialized_end=2023 + _PAYLOADUNBOND._serialized_start=2025 + _PAYLOADUNBOND._serialized_end=2070 + _PAYLOADWITHDRAW._serialized_start=2072 + _PAYLOADWITHDRAW._serialized_end=2199 + _TRANSACTIONINFO._serialized_start=2202 + _TRANSACTIONINFO._serialized_end=2758 + _TRANSACTION._serialized_start=2963 + _TRANSACTION._serialized_end=3733 # @@protoc_insertion_point(module_scope) diff --git a/www/grpc/gen/python/transaction_pb2.pyi b/www/grpc/gen/python/transaction_pb2.pyi index b3c9ce5ec..be86e4f53 100644 --- a/www/grpc/gen/python/transaction_pb2.pyi +++ b/www/grpc/gen/python/transaction_pb2.pyi @@ -76,20 +76,22 @@ class BroadcastTransactionResponse(_message.Message): def __init__(self, id: _Optional[str] = ...) -> None: ... class GetRawTransactionRequest(_message.Message): - __slots__ = ("lock_time", "memo", "transfer", "bond", "unbond", "withdraw") + __slots__ = ("lock_time", "memo", "fee", "transfer", "bond", "unbond", "withdraw") LOCK_TIME_FIELD_NUMBER: _ClassVar[int] MEMO_FIELD_NUMBER: _ClassVar[int] + FEE_FIELD_NUMBER: _ClassVar[int] TRANSFER_FIELD_NUMBER: _ClassVar[int] BOND_FIELD_NUMBER: _ClassVar[int] UNBOND_FIELD_NUMBER: _ClassVar[int] WITHDRAW_FIELD_NUMBER: _ClassVar[int] lock_time: int memo: str + fee: int transfer: PayloadTransfer bond: PayloadBond unbond: PayloadUnbond withdraw: PayloadWithdraw - def __init__(self, lock_time: _Optional[int] = ..., memo: _Optional[str] = ..., transfer: _Optional[_Union[PayloadTransfer, _Mapping]] = ..., bond: _Optional[_Union[PayloadBond, _Mapping]] = ..., unbond: _Optional[_Union[PayloadUnbond, _Mapping]] = ..., withdraw: _Optional[_Union[PayloadWithdraw, _Mapping]] = ...) -> None: ... + def __init__(self, lock_time: _Optional[int] = ..., memo: _Optional[str] = ..., fee: _Optional[int] = ..., transfer: _Optional[_Union[PayloadTransfer, _Mapping]] = ..., bond: _Optional[_Union[PayloadBond, _Mapping]] = ..., unbond: _Optional[_Union[PayloadUnbond, _Mapping]] = ..., withdraw: _Optional[_Union[PayloadWithdraw, _Mapping]] = ...) -> None: ... class GetRawTransferTransactionRequest(_message.Message): __slots__ = ("lock_time", "sender", "receiver", "amount", "fee", "memo") @@ -152,36 +154,34 @@ class GetRawWithdrawTransactionRequest(_message.Message): def __init__(self, lock_time: _Optional[int] = ..., validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ..., memo: _Optional[str] = ...) -> None: ... class GetRawTransactionResponse(_message.Message): - __slots__ = ("raw_transaction",) + __slots__ = ("raw_transaction", "id") RAW_TRANSACTION_FIELD_NUMBER: _ClassVar[int] + ID_FIELD_NUMBER: _ClassVar[int] raw_transaction: str - def __init__(self, raw_transaction: _Optional[str] = ...) -> None: ... + id: str + def __init__(self, raw_transaction: _Optional[str] = ..., id: _Optional[str] = ...) -> None: ... class PayloadTransfer(_message.Message): - __slots__ = ("sender", "receiver", "amount", "fee") + __slots__ = ("sender", "receiver", "amount") SENDER_FIELD_NUMBER: _ClassVar[int] RECEIVER_FIELD_NUMBER: _ClassVar[int] AMOUNT_FIELD_NUMBER: _ClassVar[int] - FEE_FIELD_NUMBER: _ClassVar[int] sender: str receiver: str amount: int - fee: int - def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... + def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ... class PayloadBond(_message.Message): - __slots__ = ("sender", "receiver", "stake", "public_key", "fee") + __slots__ = ("sender", "receiver", "stake", "public_key") SENDER_FIELD_NUMBER: _ClassVar[int] RECEIVER_FIELD_NUMBER: _ClassVar[int] STAKE_FIELD_NUMBER: _ClassVar[int] PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int] - FEE_FIELD_NUMBER: _ClassVar[int] sender: str receiver: str stake: int public_key: str - fee: int - def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ..., fee: _Optional[int] = ...) -> None: ... + def __init__(self, sender: _Optional[str] = ..., receiver: _Optional[str] = ..., stake: _Optional[int] = ..., public_key: _Optional[str] = ...) -> None: ... class PayloadSortition(_message.Message): __slots__ = ("address", "proof") @@ -198,16 +198,14 @@ class PayloadUnbond(_message.Message): def __init__(self, validator: _Optional[str] = ...) -> None: ... class PayloadWithdraw(_message.Message): - __slots__ = ("validator_address", "account_address", "amount", "fee") + __slots__ = ("validator_address", "account_address", "amount") VALIDATOR_ADDRESS_FIELD_NUMBER: _ClassVar[int] ACCOUNT_ADDRESS_FIELD_NUMBER: _ClassVar[int] AMOUNT_FIELD_NUMBER: _ClassVar[int] - FEE_FIELD_NUMBER: _ClassVar[int] validator_address: str account_address: str amount: int - fee: int - def __init__(self, validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ..., fee: _Optional[int] = ...) -> None: ... + def __init__(self, validator_address: _Optional[str] = ..., account_address: _Optional[str] = ..., amount: _Optional[int] = ...) -> None: ... class TransactionInfo(_message.Message): __slots__ = ("id", "data", "version", "lock_time", "value", "fee", "payload_type", "transfer", "bond", "sortition", "unbond", "withdraw", "memo", "public_key", "signature") diff --git a/www/grpc/gen/rust/pactus.rs b/www/grpc/gen/rust/pactus.rs index fa8167bc2..9d08b350b 100644 --- a/www/grpc/gen/rust/pactus.rs +++ b/www/grpc/gen/rust/pactus.rs @@ -69,14 +69,16 @@ pub struct BroadcastTransactionResponse { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetRawTransactionRequest { - /// The lock time for the transaction. If not set, defaults to the last block - /// height. + /// The lock time for the transaction. If not set, defaults to the last block height. #[prost(uint32, tag="1")] pub lock_time: u32, /// A memo string for the transaction. #[prost(string, tag="2")] pub memo: ::prost::alloc::string::String, - #[prost(oneof="get_raw_transaction_request::Payload", tags="3, 4, 5, 6")] + /// The fee for the transaction in NanoPAC. + #[prost(int64, tag="3")] + pub fee: i64, + #[prost(oneof="get_raw_transaction_request::Payload", tags="4, 5, 6, 7")] pub payload: ::core::option::Option, } /// Nested message and enum types in `GetRawTransactionRequest`. @@ -84,13 +86,13 @@ pub mod get_raw_transaction_request { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Payload { - #[prost(message, tag="3")] - Transfer(super::PayloadTransfer), #[prost(message, tag="4")] - Bond(super::PayloadBond), + Transfer(super::PayloadTransfer), #[prost(message, tag="5")] - Unbond(super::PayloadUnbond), + Bond(super::PayloadBond), #[prost(message, tag="6")] + Unbond(super::PayloadUnbond), + #[prost(message, tag="7")] Withdraw(super::PayloadWithdraw), } } @@ -191,6 +193,9 @@ pub struct GetRawTransactionResponse { /// The raw transaction data. #[prost(string, tag="1")] pub raw_transaction: ::prost::alloc::string::String, + /// The unique ID of the transaction. + #[prost(string, tag="2")] + pub id: ::prost::alloc::string::String, } /// Payload for a transfer transaction. #[allow(clippy::derive_partial_eq_without_eq)] @@ -205,9 +210,6 @@ pub struct PayloadTransfer { /// The amount to be transferred in NanoPAC. #[prost(int64, tag="3")] pub amount: i64, - /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - #[prost(int64, tag="4")] - pub fee: i64, } /// Payload for a bond transaction. #[allow(clippy::derive_partial_eq_without_eq)] @@ -225,9 +227,6 @@ pub struct PayloadBond { /// The public key of the validator. #[prost(string, tag="4")] pub public_key: ::prost::alloc::string::String, - /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - #[prost(int64, tag="5")] - pub fee: i64, } /// Payload for a sortition transaction. #[allow(clippy::derive_partial_eq_without_eq)] @@ -261,9 +260,6 @@ pub struct PayloadWithdraw { /// The withdrawal amount in NanoPAC. #[prost(int64, tag="3")] pub amount: i64, - /// The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - #[prost(int64, tag="4")] - pub fee: i64, } /// Information about a transaction. #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/www/grpc/gen/rust/pactus.serde.rs b/www/grpc/gen/rust/pactus.serde.rs index 87ffce2dd..c3f394ae5 100644 --- a/www/grpc/gen/rust/pactus.serde.rs +++ b/www/grpc/gen/rust/pactus.serde.rs @@ -4600,6 +4600,9 @@ impl serde::Serialize for GetRawTransactionRequest { if !self.memo.is_empty() { len += 1; } + if self.fee != 0 { + len += 1; + } if self.payload.is_some() { len += 1; } @@ -4610,6 +4613,9 @@ impl serde::Serialize for GetRawTransactionRequest { if !self.memo.is_empty() { struct_ser.serialize_field("memo", &self.memo)?; } + if self.fee != 0 { + struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; + } if let Some(v) = self.payload.as_ref() { match v { get_raw_transaction_request::Payload::Transfer(v) => { @@ -4639,6 +4645,7 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionRequest { "lock_time", "lockTime", "memo", + "fee", "transfer", "bond", "unbond", @@ -4649,6 +4656,7 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionRequest { enum GeneratedField { LockTime, Memo, + Fee, Transfer, Bond, Unbond, @@ -4676,6 +4684,7 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionRequest { match value { "lockTime" | "lock_time" => Ok(GeneratedField::LockTime), "memo" => Ok(GeneratedField::Memo), + "fee" => Ok(GeneratedField::Fee), "transfer" => Ok(GeneratedField::Transfer), "bond" => Ok(GeneratedField::Bond), "unbond" => Ok(GeneratedField::Unbond), @@ -4701,6 +4710,7 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionRequest { { let mut lock_time__ = None; let mut memo__ = None; + let mut fee__ = None; let mut payload__ = None; while let Some(k) = map.next_key()? { match k { @@ -4718,6 +4728,14 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionRequest { } memo__ = Some(map.next_value()?); } + GeneratedField::Fee => { + if fee__.is_some() { + return Err(serde::de::Error::duplicate_field("fee")); + } + fee__ = + Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) + ; + } GeneratedField::Transfer => { if payload__.is_some() { return Err(serde::de::Error::duplicate_field("transfer")); @@ -4751,6 +4769,7 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionRequest { Ok(GetRawTransactionRequest { lock_time: lock_time__.unwrap_or_default(), memo: memo__.unwrap_or_default(), + fee: fee__.unwrap_or_default(), payload: payload__, }) } @@ -4769,10 +4788,16 @@ impl serde::Serialize for GetRawTransactionResponse { if !self.raw_transaction.is_empty() { len += 1; } + if !self.id.is_empty() { + len += 1; + } let mut struct_ser = serializer.serialize_struct("pactus.GetRawTransactionResponse", len)?; if !self.raw_transaction.is_empty() { struct_ser.serialize_field("rawTransaction", &self.raw_transaction)?; } + if !self.id.is_empty() { + struct_ser.serialize_field("id", &self.id)?; + } struct_ser.end() } } @@ -4785,11 +4810,13 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionResponse { const FIELDS: &[&str] = &[ "raw_transaction", "rawTransaction", + "id", ]; #[allow(clippy::enum_variant_names)] enum GeneratedField { RawTransaction, + Id, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -4812,6 +4839,7 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionResponse { { match value { "rawTransaction" | "raw_transaction" => Ok(GeneratedField::RawTransaction), + "id" => Ok(GeneratedField::Id), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -4832,6 +4860,7 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionResponse { V: serde::de::MapAccess<'de>, { let mut raw_transaction__ = None; + let mut id__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::RawTransaction => { @@ -4840,10 +4869,17 @@ impl<'de> serde::Deserialize<'de> for GetRawTransactionResponse { } raw_transaction__ = Some(map.next_value()?); } + GeneratedField::Id => { + if id__.is_some() { + return Err(serde::de::Error::duplicate_field("id")); + } + id__ = Some(map.next_value()?); + } } } Ok(GetRawTransactionResponse { raw_transaction: raw_transaction__.unwrap_or_default(), + id: id__.unwrap_or_default(), }) } } @@ -6966,9 +7002,6 @@ impl serde::Serialize for PayloadBond { if !self.public_key.is_empty() { len += 1; } - if self.fee != 0 { - len += 1; - } let mut struct_ser = serializer.serialize_struct("pactus.PayloadBond", len)?; if !self.sender.is_empty() { struct_ser.serialize_field("sender", &self.sender)?; @@ -6982,9 +7015,6 @@ impl serde::Serialize for PayloadBond { if !self.public_key.is_empty() { struct_ser.serialize_field("publicKey", &self.public_key)?; } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } struct_ser.end() } } @@ -7000,7 +7030,6 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { "stake", "public_key", "publicKey", - "fee", ]; #[allow(clippy::enum_variant_names)] @@ -7009,7 +7038,6 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { Receiver, Stake, PublicKey, - Fee, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7035,7 +7063,6 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { "receiver" => Ok(GeneratedField::Receiver), "stake" => Ok(GeneratedField::Stake), "publicKey" | "public_key" => Ok(GeneratedField::PublicKey), - "fee" => Ok(GeneratedField::Fee), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7059,7 +7086,6 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { let mut receiver__ = None; let mut stake__ = None; let mut public_key__ = None; - let mut fee__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Sender => { @@ -7088,14 +7114,6 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { } public_key__ = Some(map.next_value()?); } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } } } Ok(PayloadBond { @@ -7103,7 +7121,6 @@ impl<'de> serde::Deserialize<'de> for PayloadBond { receiver: receiver__.unwrap_or_default(), stake: stake__.unwrap_or_default(), public_key: public_key__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), }) } } @@ -7235,9 +7252,6 @@ impl serde::Serialize for PayloadTransfer { if self.amount != 0 { len += 1; } - if self.fee != 0 { - len += 1; - } let mut struct_ser = serializer.serialize_struct("pactus.PayloadTransfer", len)?; if !self.sender.is_empty() { struct_ser.serialize_field("sender", &self.sender)?; @@ -7248,9 +7262,6 @@ impl serde::Serialize for PayloadTransfer { if self.amount != 0 { struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } struct_ser.end() } } @@ -7264,7 +7275,6 @@ impl<'de> serde::Deserialize<'de> for PayloadTransfer { "sender", "receiver", "amount", - "fee", ]; #[allow(clippy::enum_variant_names)] @@ -7272,7 +7282,6 @@ impl<'de> serde::Deserialize<'de> for PayloadTransfer { Sender, Receiver, Amount, - Fee, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7297,7 +7306,6 @@ impl<'de> serde::Deserialize<'de> for PayloadTransfer { "sender" => Ok(GeneratedField::Sender), "receiver" => Ok(GeneratedField::Receiver), "amount" => Ok(GeneratedField::Amount), - "fee" => Ok(GeneratedField::Fee), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7320,7 +7328,6 @@ impl<'de> serde::Deserialize<'de> for PayloadTransfer { let mut sender__ = None; let mut receiver__ = None; let mut amount__ = None; - let mut fee__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::Sender => { @@ -7343,21 +7350,12 @@ impl<'de> serde::Deserialize<'de> for PayloadTransfer { Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } } } Ok(PayloadTransfer { sender: sender__.unwrap_or_default(), receiver: receiver__.unwrap_or_default(), amount: amount__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), }) } } @@ -7557,9 +7555,6 @@ impl serde::Serialize for PayloadWithdraw { if self.amount != 0 { len += 1; } - if self.fee != 0 { - len += 1; - } let mut struct_ser = serializer.serialize_struct("pactus.PayloadWithdraw", len)?; if !self.validator_address.is_empty() { struct_ser.serialize_field("validatorAddress", &self.validator_address)?; @@ -7570,9 +7565,6 @@ impl serde::Serialize for PayloadWithdraw { if self.amount != 0 { struct_ser.serialize_field("amount", ToString::to_string(&self.amount).as_str())?; } - if self.fee != 0 { - struct_ser.serialize_field("fee", ToString::to_string(&self.fee).as_str())?; - } struct_ser.end() } } @@ -7588,7 +7580,6 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { "account_address", "accountAddress", "amount", - "fee", ]; #[allow(clippy::enum_variant_names)] @@ -7596,7 +7587,6 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { ValidatorAddress, AccountAddress, Amount, - Fee, } impl<'de> serde::Deserialize<'de> for GeneratedField { fn deserialize(deserializer: D) -> std::result::Result @@ -7621,7 +7611,6 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { "validatorAddress" | "validator_address" => Ok(GeneratedField::ValidatorAddress), "accountAddress" | "account_address" => Ok(GeneratedField::AccountAddress), "amount" => Ok(GeneratedField::Amount), - "fee" => Ok(GeneratedField::Fee), _ => Err(serde::de::Error::unknown_field(value, FIELDS)), } } @@ -7644,7 +7633,6 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { let mut validator_address__ = None; let mut account_address__ = None; let mut amount__ = None; - let mut fee__ = None; while let Some(k) = map.next_key()? { match k { GeneratedField::ValidatorAddress => { @@ -7667,21 +7655,12 @@ impl<'de> serde::Deserialize<'de> for PayloadWithdraw { Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) ; } - GeneratedField::Fee => { - if fee__.is_some() { - return Err(serde::de::Error::duplicate_field("fee")); - } - fee__ = - Some(map.next_value::<::pbjson::private::NumberDeserialize<_>>()?.0) - ; - } } } Ok(PayloadWithdraw { validator_address: validator_address__.unwrap_or_default(), account_address: account_address__.unwrap_or_default(), amount: amount__.unwrap_or_default(), - fee: fee__.unwrap_or_default(), }) } } diff --git a/www/grpc/proto/transaction.proto b/www/grpc/proto/transaction.proto index c2278f8b1..7480bcd3a 100644 --- a/www/grpc/proto/transaction.proto +++ b/www/grpc/proto/transaction.proto @@ -20,7 +20,7 @@ service Transaction { returns (BroadcastTransactionResponse); // GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. - rpc GetRawTransaction(GetRawTransactionRequest) returns(GetRawTransactionResponse); + rpc GetRawTransaction(GetRawTransactionRequest) returns (GetRawTransactionResponse); // Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. rpc GetRawTransferTransaction(GetRawTransferTransactionRequest) @@ -89,17 +89,18 @@ message BroadcastTransactionResponse { // Request message for retrieving raw details of transaction. message GetRawTransactionRequest { - // The lock time for the transaction. If not set, defaults to the last block - // height. + // The lock time for the transaction. If not set, defaults to the last block height. uint32 lock_time = 1; // A memo string for the transaction. string memo = 2; + // The fee for the transaction in NanoPAC. + int64 fee = 3; oneof payload { - PayloadTransfer transfer = 3; - PayloadBond bond = 4; - PayloadUnbond unbond = 5; - PayloadWithdraw withdraw = 6; + PayloadTransfer transfer = 4; + PayloadBond bond = 5; + PayloadUnbond unbond = 6; + PayloadWithdraw withdraw = 7; } } @@ -171,6 +172,8 @@ message GetRawWithdrawTransactionRequest { message GetRawTransactionResponse { // The raw transaction data. string raw_transaction = 1; + // The unique ID of the transaction. + string id = 2; } // Payload for a transfer transaction. @@ -181,8 +184,6 @@ message PayloadTransfer { string receiver = 2; // The amount to be transferred in NanoPAC. int64 amount = 3; - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - int64 fee = 4; } // Payload for a bond transaction. @@ -193,10 +194,8 @@ message PayloadBond { string receiver = 2; // The stake amount in NanoPAC. int64 stake = 3; - // The public key of the validator. + // The public key of the validator. string public_key = 4; - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - int64 fee = 5; } // Payload for a sortition transaction. @@ -215,14 +214,12 @@ message PayloadUnbond { // Payload for a withdraw transaction. message PayloadWithdraw { - // The address of the validator to withdraw from. + // The address of the validator to withdraw from. string validator_address = 1; // The address of the account to withdraw to. string account_address = 2; // The withdrawal amount in NanoPAC. int64 amount = 3; - // The transaction fee in NanoPAC. If not set, it is set to the estimated fee. - int64 fee = 4; } // Information about a transaction. diff --git a/www/grpc/swagger-ui/pactus.swagger.json b/www/grpc/swagger-ui/pactus.swagger.json index e91c29326..5cb886207 100644 --- a/www/grpc/swagger-ui/pactus.swagger.json +++ b/www/grpc/swagger-ui/pactus.swagger.json @@ -617,7 +617,7 @@ "parameters": [ { "name": "lockTime", - "description": "The lock time for the transaction. If not set, defaults to the last block\nheight.", + "description": "The lock time for the transaction. If not set, defaults to the last block height.", "in": "query", "required": false, "type": "integer", @@ -630,6 +630,14 @@ "required": false, "type": "string" }, + { + "name": "fee", + "description": "The fee for the transaction in NanoPAC.", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + }, { "name": "transfer.sender", "description": "The sender's address.", @@ -652,14 +660,6 @@ "type": "string", "format": "int64" }, - { - "name": "transfer.fee", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, { "name": "bond.sender", "description": "The sender's address.", @@ -689,14 +689,6 @@ "required": false, "type": "string" }, - { - "name": "bond.fee", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" - }, { "name": "unbond.validator", "description": "The address of the validator to unbond from.", @@ -725,14 +717,6 @@ "required": false, "type": "string", "format": "int64" - }, - { - "name": "withdraw.fee", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", - "in": "query", - "required": false, - "type": "string", - "format": "int64" } ], "tags": [ @@ -1678,6 +1662,10 @@ "rawTransaction": { "type": "string", "description": "The raw transaction data." + }, + "id": { + "type": "string", + "description": "The unique ID of the transaction." } }, "description": "Response message containing raw transaction data." @@ -1821,11 +1809,6 @@ "publicKey": { "type": "string", "description": "The public key of the validator." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." } }, "description": "Payload for a bond transaction." @@ -1859,11 +1842,6 @@ "type": "string", "format": "int64", "description": "The amount to be transferred in NanoPAC." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." } }, "description": "Payload for a transfer transaction." @@ -1906,11 +1884,6 @@ "type": "string", "format": "int64", "description": "The withdrawal amount in NanoPAC." - }, - "fee": { - "type": "string", - "format": "int64", - "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee." } }, "description": "Payload for a withdraw transaction." diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index 71314b635..93b0c1688 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -109,37 +109,42 @@ func (s *transactionServer) GetRawTransaction(_ context.Context, ) (*pactus.GetRawTransactionResponse, error) { lockTime := s.getLockTime(req.LockTime) - switch r := req.Payload.(type) { + var trx *tx.Tx + var err error + switch pld := req.Payload.(type) { case *pactus.GetRawTransactionRequest_Transfer: - raw, err := s.handleRawTransfer(r, lockTime, req.Memo) + trx, err = s.handleRawTransfer(lockTime, req.Memo, req.Fee, pld.Transfer) - return &pactus.GetRawTransactionResponse{ - RawTransaction: hex.EncodeToString(raw), - }, err case *pactus.GetRawTransactionRequest_Bond: - raw, err := s.handleRawBond(r, lockTime, req.Memo) + trx, err = s.handleRawBond(lockTime, req.Memo, req.Fee, pld.Bond) - return &pactus.GetRawTransactionResponse{ - RawTransaction: hex.EncodeToString(raw), - }, err case *pactus.GetRawTransactionRequest_Unbond: - raw, err := s.handleRawUnBond(r, lockTime, req.Memo) + trx, err = s.handleRawUnbond(lockTime, req.Memo, pld.Unbond) - return &pactus.GetRawTransactionResponse{ - RawTransaction: hex.EncodeToString(raw), - }, err case *pactus.GetRawTransactionRequest_Withdraw: - raw, err := s.handleRawWithdraw(r, lockTime, req.Memo) + trx, err = s.handleRawWithdraw(lockTime, req.Memo, req.Fee, pld.Withdraw) - return &pactus.GetRawTransactionResponse{ - RawTransaction: hex.EncodeToString(raw), - }, err + default: + return nil, status.Errorf(codes.InvalidArgument, "invalid transaction type") + } + + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) } - return nil, status.Errorf(codes.InvalidArgument, "invalid transaction type") + data, err := trx.Bytes() + if err != nil { + return nil, status.Errorf(codes.Internal, err.Error()) + } + return &pactus.GetRawTransactionResponse{ + RawTransaction: hex.EncodeToString(data), + Id: trx.ID().String(), + }, err + } -// Deprecated: GetRawTransferTransaction. +// Deprecated: GetRawTransferTransaction is deprecated. +// Use Get GetTransaction API instead. func (s *transactionServer) GetRawTransferTransaction(_ context.Context, req *pactus.GetRawTransferTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -168,7 +173,8 @@ func (s *transactionServer) GetRawTransferTransaction(_ context.Context, }, nil } -// Deprecated: GetRawBondTransaction. +// Deprecated: GetRawBondTransaction is deprecated. +// Use Get GetTransaction API instead. func (s *transactionServer) GetRawBondTransaction(_ context.Context, req *pactus.GetRawBondTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -207,7 +213,8 @@ func (s *transactionServer) GetRawBondTransaction(_ context.Context, }, nil } -// Deprecated: GetRawUnbondTransaction. +// Deprecated: GetRawUnbondTransaction is deprecated. +// Use Get GetTransaction API instead. func (s *transactionServer) GetRawUnbondTransaction(_ context.Context, req *pactus.GetRawUnbondTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -229,7 +236,8 @@ func (s *transactionServer) GetRawUnbondTransaction(_ context.Context, }, nil } -// Deprecated: GetRawWithdrawTransaction. +// Deprecated: GetRawWithdrawTransaction is deprecated. +// Use Get GetTransaction API instead. func (s *transactionServer) GetRawWithdrawTransaction(_ context.Context, req *pactus.GetRawWithdrawTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -258,45 +266,39 @@ func (s *transactionServer) GetRawWithdrawTransaction(_ context.Context, }, nil } -func (s *transactionServer) handleRawTransfer(payload *pactus.GetRawTransactionRequest_Transfer, - lockTime uint32, - memo string, -) ([]byte, error) { - sender, err := crypto.AddressFromString(payload.Transfer.Sender) +func (s *transactionServer) handleRawTransfer(lockTime uint32, memo string, feeInt int64, pld *pactus.PayloadTransfer) (*tx.Tx, error) { + sender, err := crypto.AddressFromString(pld.Sender) if err != nil { return nil, err } - receiver, err := crypto.AddressFromString(payload.Transfer.Receiver) + receiver, err := crypto.AddressFromString(pld.Receiver) if err != nil { return nil, err } - amt := amount.Amount(payload.Transfer.Amount) - fee := s.getFee(payload.Transfer.Fee, amt) + amt := amount.Amount(pld.Amount) + fee := s.getFee(feeInt, amt) transferTx := tx.NewTransferTx(lockTime, sender, receiver, amt, fee, tx.WithMemo(memo)) - return transferTx.Bytes() + return transferTx, nil } -func (s *transactionServer) handleRawBond(payload *pactus.GetRawTransactionRequest_Bond, - lockTime uint32, - memo string, -) ([]byte, error) { - sender, err := crypto.AddressFromString(payload.Bond.Sender) +func (s *transactionServer) handleRawBond(lockTime uint32, memo string, feeInt int64, pld *pactus.PayloadBond) (*tx.Tx, error) { + sender, err := crypto.AddressFromString(pld.Sender) if err != nil { return nil, err } - receiver, err := crypto.AddressFromString(payload.Bond.Receiver) + receiver, err := crypto.AddressFromString(pld.Receiver) if err != nil { return nil, err } var publicKey *bls.PublicKey - if payload.Bond.PublicKey != "" { - publicKey, err = bls.PublicKeyFromString(payload.Bond.PublicKey) + if pld.PublicKey != "" { + publicKey, err = bls.PublicKeyFromString(pld.PublicKey) if err != nil { return nil, err } @@ -304,48 +306,42 @@ func (s *transactionServer) handleRawBond(payload *pactus.GetRawTransactionReque publicKey = nil } - amt := amount.Amount(payload.Bond.Stake) - fee := s.getFee(payload.Bond.Fee, amt) + amt := amount.Amount(pld.Stake) + fee := s.getFee(feeInt, amt) bondTx := tx.NewBondTx(lockTime, sender, receiver, publicKey, amt, fee, tx.WithMemo(memo)) - return bondTx.Bytes() + return bondTx, nil } -func (*transactionServer) handleRawUnBond(payload *pactus.GetRawTransactionRequest_Unbond, - lockTime uint32, - memo string, -) ([]byte, error) { - validatorAddr, err := crypto.AddressFromString(payload.Unbond.Validator) +func (*transactionServer) handleRawUnbond(lockTime uint32, memo string, pld *pactus.PayloadUnbond) (*tx.Tx, error) { + validatorAddr, err := crypto.AddressFromString(pld.Validator) if err != nil { return nil, err } unbondTx := tx.NewUnbondTx(lockTime, validatorAddr, tx.WithMemo(memo)) - return unbondTx.Bytes() + return unbondTx, nil } -func (s *transactionServer) handleRawWithdraw(payload *pactus.GetRawTransactionRequest_Withdraw, - lockTime uint32, - memo string, -) ([]byte, error) { - validatorAddr, err := crypto.AddressFromString(payload.Withdraw.ValidatorAddress) +func (s *transactionServer) handleRawWithdraw(lockTime uint32, memo string, feeInt int64, pld *pactus.PayloadWithdraw) (*tx.Tx, error) { + validatorAddr, err := crypto.AddressFromString(pld.ValidatorAddress) if err != nil { return nil, err } - accountAddr, err := crypto.AddressFromString(payload.Withdraw.AccountAddress) + accountAddr, err := crypto.AddressFromString(pld.AccountAddress) if err != nil { return nil, err } - amt := amount.Amount(payload.Withdraw.Amount) - fee := s.getFee(payload.Withdraw.Fee, amt) + amt := amount.Amount(pld.Amount) + fee := s.getFee(feeInt, amt) withdrawTx := tx.NewWithdrawTx(lockTime, validatorAddr, accountAddr, amt, fee, tx.WithMemo(memo)) - return withdrawTx.Bytes() + return withdrawTx, nil } func (s *transactionServer) getFee(f int64, amt amount.Amount) amount.Amount { From 734b4cbe274319b4b61b4dad712751f92b115309 Mon Sep 17 00:00:00 2001 From: Javad Date: Mon, 23 Sep 2024 16:03:12 +0330 Subject: [PATCH 14/17] fix: linter errors --- www/grpc/transaction.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index 93b0c1688..3b6a77505 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -54,7 +54,7 @@ func (s *transactionServer) GetTransaction(_ context.Context, case pactus.TransactionVerbosity_TRANSACTION_INFO: trx, err := committedTx.ToTx() if err != nil { - return nil, status.Errorf(codes.Internal, err.Error()) + return nil, status.Errorf(codes.Internal, "%s", err.Error()) } res.Transaction = transactionToProto(trx) } @@ -136,11 +136,11 @@ func (s *transactionServer) GetRawTransaction(_ context.Context, if err != nil { return nil, status.Errorf(codes.Internal, err.Error()) } + return &pactus.GetRawTransactionResponse{ RawTransaction: hex.EncodeToString(data), Id: trx.ID().String(), }, err - } // Deprecated: GetRawTransferTransaction is deprecated. @@ -266,7 +266,9 @@ func (s *transactionServer) GetRawWithdrawTransaction(_ context.Context, }, nil } -func (s *transactionServer) handleRawTransfer(lockTime uint32, memo string, feeInt int64, pld *pactus.PayloadTransfer) (*tx.Tx, error) { +func (s *transactionServer) handleRawTransfer(lockTime uint32, memo string, feeInt int64, + pld *pactus.PayloadTransfer, +) (*tx.Tx, error) { sender, err := crypto.AddressFromString(pld.Sender) if err != nil { return nil, err @@ -285,7 +287,9 @@ func (s *transactionServer) handleRawTransfer(lockTime uint32, memo string, feeI return transferTx, nil } -func (s *transactionServer) handleRawBond(lockTime uint32, memo string, feeInt int64, pld *pactus.PayloadBond) (*tx.Tx, error) { +func (s *transactionServer) handleRawBond(lockTime uint32, memo string, feeInt int64, + pld *pactus.PayloadBond, +) (*tx.Tx, error) { sender, err := crypto.AddressFromString(pld.Sender) if err != nil { return nil, err @@ -325,7 +329,9 @@ func (*transactionServer) handleRawUnbond(lockTime uint32, memo string, pld *pac return unbondTx, nil } -func (s *transactionServer) handleRawWithdraw(lockTime uint32, memo string, feeInt int64, pld *pactus.PayloadWithdraw) (*tx.Tx, error) { +func (s *transactionServer) handleRawWithdraw(lockTime uint32, memo string, feeInt int64, + pld *pactus.PayloadWithdraw, +) (*tx.Tx, error) { validatorAddr, err := crypto.AddressFromString(pld.ValidatorAddress) if err != nil { return nil, err From 69265f39d5b3c5f7065db39627ac2a329ae3a1a3 Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 24 Sep 2024 13:06:32 +0330 Subject: [PATCH 15/17] fix: linter errors --- www/grpc/transaction.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index 3b6a77505..fc616b020 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -129,12 +129,12 @@ func (s *transactionServer) GetRawTransaction(_ context.Context, } if err != nil { - return nil, status.Errorf(codes.Internal, err.Error()) + return nil, status.Errorf(codes.Internal, "%s", err.Error()) } data, err := trx.Bytes() if err != nil { - return nil, status.Errorf(codes.Internal, err.Error()) + return nil, status.Errorf(codes.Internal, "%s", err.Error()) } return &pactus.GetRawTransactionResponse{ From c6ea7488b0d97280e112d21aed9916928613fe35 Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 24 Sep 2024 14:00:06 +0330 Subject: [PATCH 16/17] fix: add comment use GetRawTransaction... --- www/grpc/gen/docs/grpc.md | 12 ++++++++---- www/grpc/gen/docs/json-rpc.md | 12 ++++++++---- www/grpc/gen/go/transaction.cobra.pb.go | 8 ++++---- www/grpc/gen/go/transaction_grpc.pb.go | 8 ++++++++ .../java/pactus/transaction/TransactionGrpc.java | 16 ++++++++++++++++ www/grpc/gen/js/transaction_grpc_pb.js | 4 ++++ www/grpc/gen/python/transaction_pb2_grpc.py | 4 ++++ www/grpc/proto/transaction.proto | 4 ++++ www/grpc/transaction.go | 8 ++++---- 9 files changed, 60 insertions(+), 16 deletions(-) diff --git a/www/grpc/gen/docs/grpc.md b/www/grpc/gen/docs/grpc.md index 365a27b46..81d3ac3b5 100644 --- a/www/grpc/gen/docs/grpc.md +++ b/www/grpc/gen/docs/grpc.md @@ -634,7 +634,8 @@ and payload type.

                    ### GetRawTransferTransaction -

                    Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.

                    +

                    Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. +Use GetRawTransaction instead.

                    GetRawTransferTransactionRequest Request

                    @@ -714,7 +715,8 @@ height. ### GetRawBondTransaction -

                    Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.

                    +

                    Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. +Use GetRawTransaction instead.

                    GetRawBondTransactionRequest Request

                    @@ -801,7 +803,8 @@ height. ### GetRawUnbondTransaction -

                    Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.

                    +

                    Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. +Use GetRawTransaction instead.

                    GetRawUnbondTransactionRequest Request

                    @@ -860,7 +863,8 @@ height. ### GetRawWithdrawTransaction -

                    Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.

                    +

                    Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. +Use GetRawTransaction instead.

                    GetRawWithdrawTransactionRequest Request

                    diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md index 45bfd1fe2..5c10a8c24 100644 --- a/www/grpc/gen/docs/json-rpc.md +++ b/www/grpc/gen/docs/json-rpc.md @@ -685,7 +685,8 @@ and payload type.

                    ### pactus.transaction.get_raw_transfer_transaction -

                    Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.

                    +

                    Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. +Use GetRawTransaction instead.

                    Parameters

                    @@ -765,7 +766,8 @@ height. ### pactus.transaction.get_raw_bond_transaction -

                    Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.

                    +

                    Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. +Use GetRawTransaction instead.

                    Parameters

                    @@ -852,7 +854,8 @@ height. ### pactus.transaction.get_raw_unbond_transaction -

                    Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.

                    +

                    Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. +Use GetRawTransaction instead.

                    Parameters

                    @@ -911,7 +914,8 @@ height. ### pactus.transaction.get_raw_withdraw_transaction -

                    Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.

                    +

                    Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. +Use GetRawTransaction instead.

                    Parameters

                    diff --git a/www/grpc/gen/go/transaction.cobra.pb.go b/www/grpc/gen/go/transaction.cobra.pb.go index b23b8abe0..6bb2cd731 100644 --- a/www/grpc/gen/go/transaction.cobra.pb.go +++ b/www/grpc/gen/go/transaction.cobra.pb.go @@ -245,7 +245,7 @@ func _TransactionGetRawTransferTransactionCommand(cfg *client.Config) *cobra.Com cmd := &cobra.Command{ Use: cfg.CommandNamer("GetRawTransferTransaction"), Short: "GetRawTransferTransaction RPC client", - Long: "Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.", + Long: "Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.\n Use GetRawTransaction instead.", RunE: func(cmd *cobra.Command, args []string) error { if cfg.UseEnvVars { if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { @@ -292,7 +292,7 @@ func _TransactionGetRawBondTransactionCommand(cfg *client.Config) *cobra.Command cmd := &cobra.Command{ Use: cfg.CommandNamer("GetRawBondTransaction"), Short: "GetRawBondTransaction RPC client", - Long: "Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.", + Long: "Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.\n Use GetRawTransaction instead.", RunE: func(cmd *cobra.Command, args []string) error { if cfg.UseEnvVars { if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { @@ -340,7 +340,7 @@ func _TransactionGetRawUnbondTransactionCommand(cfg *client.Config) *cobra.Comma cmd := &cobra.Command{ Use: cfg.CommandNamer("GetRawUnbondTransaction"), Short: "GetRawUnbondTransaction RPC client", - Long: "Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.", + Long: "Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.\n Use GetRawTransaction instead.", RunE: func(cmd *cobra.Command, args []string) error { if cfg.UseEnvVars { if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { @@ -384,7 +384,7 @@ func _TransactionGetRawWithdrawTransactionCommand(cfg *client.Config) *cobra.Com cmd := &cobra.Command{ Use: cfg.CommandNamer("GetRawWithdrawTransaction"), Short: "GetRawWithdrawTransaction RPC client", - Long: "Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.", + Long: "Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.\n Use GetRawTransaction instead.", RunE: func(cmd *cobra.Command, args []string) error { if cfg.UseEnvVars { if err := flag.SetFlagsFromEnv(cmd.Parent().PersistentFlags(), true, cfg.EnvVarNamer, cfg.EnvVarPrefix, "Transaction"); err != nil { diff --git a/www/grpc/gen/go/transaction_grpc.pb.go b/www/grpc/gen/go/transaction_grpc.pb.go index 4ac99e86f..e72010e33 100644 --- a/www/grpc/gen/go/transaction_grpc.pb.go +++ b/www/grpc/gen/go/transaction_grpc.pb.go @@ -47,12 +47,16 @@ type TransactionClient interface { // GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. GetRawTransaction(ctx context.Context, in *GetRawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) // Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + // Use GetRawTransaction instead. GetRawTransferTransaction(ctx context.Context, in *GetRawTransferTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + // Use GetRawTransaction instead. GetRawBondTransaction(ctx context.Context, in *GetRawBondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + // Use GetRawTransaction instead. GetRawUnbondTransaction(ctx context.Context, in *GetRawUnbondTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + // Use GetRawTransaction instead. GetRawWithdrawTransaction(ctx context.Context, in *GetRawWithdrawTransactionRequest, opts ...grpc.CallOption) (*GetRawTransactionResponse, error) } @@ -162,12 +166,16 @@ type TransactionServer interface { // GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction. GetRawTransaction(context.Context, *GetRawTransactionRequest) (*GetRawTransactionResponse, error) // Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + // Use GetRawTransaction instead. GetRawTransferTransaction(context.Context, *GetRawTransferTransactionRequest) (*GetRawTransactionResponse, error) // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + // Use GetRawTransaction instead. GetRawBondTransaction(context.Context, *GetRawBondTransactionRequest) (*GetRawTransactionResponse, error) // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + // Use GetRawTransaction instead. GetRawUnbondTransaction(context.Context, *GetRawUnbondTransactionRequest) (*GetRawTransactionResponse, error) // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + // Use GetRawTransaction instead. GetRawWithdrawTransaction(context.Context, *GetRawWithdrawTransactionRequest) (*GetRawTransactionResponse, error) } diff --git a/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java b/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java index c387d196b..f7b2aba1a 100644 --- a/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java +++ b/www/grpc/gen/java/pactus/transaction/TransactionGrpc.java @@ -364,6 +364,7 @@ public void getRawTransaction(pactus.transaction.TransactionOuterClass.GetRawTra /** *
                          * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request, @@ -374,6 +375,7 @@ public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.G /** *
                          * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request, @@ -384,6 +386,7 @@ public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRa /** *
                          * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request, @@ -394,6 +397,7 @@ public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.Get /** *
                          * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public void getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request, @@ -530,6 +534,7 @@ public void getRawTransaction(pactus.transaction.TransactionOuterClass.GetRawTra /** *
                          * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request, @@ -541,6 +546,7 @@ public void getRawTransferTransaction(pactus.transaction.TransactionOuterClass.G /** *
                          * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request, @@ -552,6 +558,7 @@ public void getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRa /** *
                          * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request, @@ -563,6 +570,7 @@ public void getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.Get /** *
                          * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public void getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request, @@ -635,6 +643,7 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRaw /** *
                          * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawTransferTransaction(pactus.transaction.TransactionOuterClass.GetRawTransferTransactionRequest request) { @@ -645,6 +654,7 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRaw /** *
                          * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawBondTransaction(pactus.transaction.TransactionOuterClass.GetRawBondTransactionRequest request) { @@ -655,6 +665,7 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRaw /** *
                          * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawUnbondTransaction(pactus.transaction.TransactionOuterClass.GetRawUnbondTransactionRequest request) { @@ -665,6 +676,7 @@ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRaw /** *
                          * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
                    +     * Use GetRawTransaction instead.
                          * 
                    */ public pactus.transaction.TransactionOuterClass.GetRawTransactionResponse getRawWithdrawTransaction(pactus.transaction.TransactionOuterClass.GetRawWithdrawTransactionRequest request) { @@ -740,6 +752,7 @@ public com.google.common.util.concurrent.ListenableFuture * Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + * Use GetRawTransaction instead. *
                    */ public com.google.common.util.concurrent.ListenableFuture getRawTransferTransaction( @@ -751,6 +764,7 @@ public com.google.common.util.concurrent.ListenableFuture * Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + * Use GetRawTransaction instead. *
                    */ public com.google.common.util.concurrent.ListenableFuture getRawBondTransaction( @@ -762,6 +776,7 @@ public com.google.common.util.concurrent.ListenableFuture * Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + * Use GetRawTransaction instead. *
                    */ public com.google.common.util.concurrent.ListenableFuture getRawUnbondTransaction( @@ -773,6 +788,7 @@ public com.google.common.util.concurrent.ListenableFuture * Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + * Use GetRawTransaction instead. *
                    */ public com.google.common.util.concurrent.ListenableFuture getRawWithdrawTransaction( diff --git a/www/grpc/gen/js/transaction_grpc_pb.js b/www/grpc/gen/js/transaction_grpc_pb.js index d516fbb90..8a71f0964 100644 --- a/www/grpc/gen/js/transaction_grpc_pb.js +++ b/www/grpc/gen/js/transaction_grpc_pb.js @@ -191,6 +191,7 @@ getRawTransaction: { responseDeserialize: deserialize_pactus_GetRawTransactionResponse, }, // Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. +// Use GetRawTransaction instead. getRawTransferTransaction: { path: '/pactus.Transaction/GetRawTransferTransaction', requestStream: false, @@ -203,6 +204,7 @@ getRawTransferTransaction: { responseDeserialize: deserialize_pactus_GetRawTransactionResponse, }, // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. +// Use GetRawTransaction instead. getRawBondTransaction: { path: '/pactus.Transaction/GetRawBondTransaction', requestStream: false, @@ -215,6 +217,7 @@ getRawBondTransaction: { responseDeserialize: deserialize_pactus_GetRawTransactionResponse, }, // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. +// Use GetRawTransaction instead. getRawUnbondTransaction: { path: '/pactus.Transaction/GetRawUnbondTransaction', requestStream: false, @@ -227,6 +230,7 @@ getRawUnbondTransaction: { responseDeserialize: deserialize_pactus_GetRawTransactionResponse, }, // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. +// Use GetRawTransaction instead. getRawWithdrawTransaction: { path: '/pactus.Transaction/GetRawWithdrawTransaction', requestStream: false, diff --git a/www/grpc/gen/python/transaction_pb2_grpc.py b/www/grpc/gen/python/transaction_pb2_grpc.py index cead649ac..053281be3 100644 --- a/www/grpc/gen/python/transaction_pb2_grpc.py +++ b/www/grpc/gen/python/transaction_pb2_grpc.py @@ -95,6 +95,7 @@ def GetRawTransaction(self, request, context): def GetRawTransferTransaction(self, request, context): """Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + Use GetRawTransaction instead. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -102,6 +103,7 @@ def GetRawTransferTransaction(self, request, context): def GetRawBondTransaction(self, request, context): """Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + Use GetRawTransaction instead. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -109,6 +111,7 @@ def GetRawBondTransaction(self, request, context): def GetRawUnbondTransaction(self, request, context): """Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + Use GetRawTransaction instead. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -116,6 +119,7 @@ def GetRawUnbondTransaction(self, request, context): def GetRawWithdrawTransaction(self, request, context): """Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + Use GetRawTransaction instead. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') diff --git a/www/grpc/proto/transaction.proto b/www/grpc/proto/transaction.proto index 7480bcd3a..db14290b9 100644 --- a/www/grpc/proto/transaction.proto +++ b/www/grpc/proto/transaction.proto @@ -23,18 +23,22 @@ service Transaction { rpc GetRawTransaction(GetRawTransactionRequest) returns (GetRawTransactionResponse); // Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction. + // Use GetRawTransaction instead. rpc GetRawTransferTransaction(GetRawTransferTransactionRequest) returns (GetRawTransactionResponse); // Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction. + // Use GetRawTransaction instead. rpc GetRawBondTransaction(GetRawBondTransactionRequest) returns (GetRawTransactionResponse); // Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction. + // Use GetRawTransaction instead. rpc GetRawUnbondTransaction(GetRawUnbondTransactionRequest) returns (GetRawTransactionResponse); // Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction. + // Use GetRawTransaction instead. rpc GetRawWithdrawTransaction(GetRawWithdrawTransactionRequest) returns (GetRawTransactionResponse); } diff --git a/www/grpc/transaction.go b/www/grpc/transaction.go index fc616b020..80b4879ca 100644 --- a/www/grpc/transaction.go +++ b/www/grpc/transaction.go @@ -144,7 +144,7 @@ func (s *transactionServer) GetRawTransaction(_ context.Context, } // Deprecated: GetRawTransferTransaction is deprecated. -// Use Get GetTransaction API instead. +// Use GetRawTransaction API instead. func (s *transactionServer) GetRawTransferTransaction(_ context.Context, req *pactus.GetRawTransferTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -174,7 +174,7 @@ func (s *transactionServer) GetRawTransferTransaction(_ context.Context, } // Deprecated: GetRawBondTransaction is deprecated. -// Use Get GetTransaction API instead. +// Use GetRawTransaction API instead. func (s *transactionServer) GetRawBondTransaction(_ context.Context, req *pactus.GetRawBondTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -214,7 +214,7 @@ func (s *transactionServer) GetRawBondTransaction(_ context.Context, } // Deprecated: GetRawUnbondTransaction is deprecated. -// Use Get GetTransaction API instead. +// Use GetRawTransaction API instead. func (s *transactionServer) GetRawUnbondTransaction(_ context.Context, req *pactus.GetRawUnbondTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { @@ -237,7 +237,7 @@ func (s *transactionServer) GetRawUnbondTransaction(_ context.Context, } // Deprecated: GetRawWithdrawTransaction is deprecated. -// Use Get GetTransaction API instead. +// Use GetRawTransaction API instead. func (s *transactionServer) GetRawWithdrawTransaction(_ context.Context, req *pactus.GetRawWithdrawTransactionRequest, ) (*pactus.GetRawTransactionResponse, error) { From 701a8bcef9fa8bd0f465d28d2715673bac3b712a Mon Sep 17 00:00:00 2001 From: Javad Date: Tue, 24 Sep 2024 15:09:02 +0330 Subject: [PATCH 17/17] chore: update jrpc-gateway to v0.5.0 --- go.mod | 2 +- go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 311765c72..ea5f30d5e 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/libp2p/go-libp2p-pubsub v0.12.0 github.com/manifoldco/promptui v0.9.0 github.com/multiformats/go-multiaddr v0.13.0 - github.com/pacviewer/jrpc-gateway v0.4.0 + github.com/pacviewer/jrpc-gateway v0.5.0 github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.20.4 diff --git a/go.sum b/go.sum index b738d9647..b0d30634c 100644 --- a/go.sum +++ b/go.sum @@ -141,8 +141,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -400,8 +400,8 @@ github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/pacviewer/jrpc-gateway v0.4.0 h1:kHv0aJGRBIoKioVqTopRDM0W9E5WRaHr+EGSLoXwYXs= -github.com/pacviewer/jrpc-gateway v0.4.0/go.mod h1:UD39xHvA8M8WWkyIHfHSlI94Gtb9LPnHhm/X+LvNfA4= +github.com/pacviewer/jrpc-gateway v0.5.0 h1:zQAtUsy9oLiNYbnv7l1yv34ZTbkF6zYgtAqRZLXc59U= +github.com/pacviewer/jrpc-gateway v0.5.0/go.mod h1:jj1tMRRRc+MhydrEmJpIzfOvLDU+hGylhdvG7kqCrsk= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=